Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions PROJECT_STATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,26 @@ response or implementation fails closed. The prompt-data integration exercises
rollout, exact-state scoring, cache reload, one token-mean optimizer update and
the emitted verl diagnostics.

## v0.8.0 single-GPU verl OPD pivot — PR D

`miniverl plan` now compiles a path or the packaged
`builtin:qwen3-0.6b-1.7b-opd` profile without importing torch or allocating
weights. Estimated memory, disk and placement stay distinct from measured and
unknown values. Auto placement uses parsed model-scale metadata and configured
headroom, never a GPU-name allowlist; unknown sizes conservatively select swap.
`miniverl run` validates a generated native `RunConfig`, preserves the source,
field report and local plan in the run, and executes the supported prompt OPD
path. `miniverl data sample` makes reward-free verl-style message Parquet from
an installed wheel.

One RTX 4080 runtime-conformance run at `d441c45` used pinned Qwen3-0.6B /
Qwen3-1.7B NF4 snapshots, two prompts, 16 response tokens each, top-k 32 and
one optimizer update. Peak reserved memory was 3.1758 GiB; first rollout,
teacher target batch and update completed at 10.8684 s, 11.0630 s and 12.0224 s
from construction start. The standard PEFT adapter load passed. This is a
systems result only; no alignment endpoint or method comparison ran. The
machine-readable record is `benchmarks/results/rtx4080-verl-opd-runtime-v1.json`.

## v0.7.1 Product correction — RELEASE CANDIDATE

Branch `v0.7.1-product-correction` starts from synchronized main
Expand Down
70 changes: 70 additions & 0 deletions benchmarks/results/rtx4080-verl-opd-runtime-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"schema_version": 1,
"kind": "single_gpu_runtime_conformance",
"status": "measured",
"measured_at": "2026-08-12T07:34:15Z",
"miniverl_version": "0.8.0.dev0",
"source_commit": "d441c458ab5e30a939352e64391b6f875b489c99",
"profile": "verl-opd-v0.8-single-gpu-v1",
"verl": {
"tag": "v0.8.0",
"commit": "7aed6b230776f963fa09509c10d9c3a767d1102c",
"distributed_execution_tested": false
},
"hardware": {
"gpu": "NVIDIA GeForce RTX 4080",
"gpu_count": 1,
"vram_gib": 15.992,
"driver": "596.49",
"torch": "2.13.0+cu130"
},
"models": {
"student": {
"id": "Qwen/Qwen3-0.6B",
"revision": "c1899de289a04d12100db370d81485cdf75e47ca",
"quantization": "nf4",
"adapter": "lora-r8-alpha16"
},
"teacher": {
"id": "Qwen/Qwen3-1.7B",
"revision": "70d244cc86ccca08cf5af4e1e306ecf908b1ad5e",
"quantization": "nf4"
}
},
"recipe": {
"runtime_strategy": "dual_model_resident",
"prompt_limit": 128,
"response_limit": 16,
"logical_batch": 2,
"rollout_physical_batch": 2,
"update_physical_batch": 1,
"top_k": 32,
"optimizer_updates": 1,
"compiled_plan_sha256": "a4e7a377e313022766c80098cadd67577743905c9c2a96862696b5afeeabfa8c",
"input_parquet_sha256": "a686aaa602a5a6cd3411de137190779e692806ddedd03f4d728e808539800c54"
},
"measurements": {
"peak_allocated_gib": 2.1713,
"peak_reserved_gib": 3.1758,
"time_to_first_rollout_seconds": 10.8684,
"time_to_first_teacher_target_batch_seconds": 11.063,
"time_to_first_optimizer_update_seconds": 12.0224,
"rollout_tokens_per_second": 23.39,
"teacher_scored_positions_per_second": 164.44,
"update_selected_positions_per_second": 41.2463,
"checkpoint_bytes": 27649321,
"run_disk_bytes": 27757228,
"resume_load_seconds": 9.4933
},
"artifacts": {
"checkpoint_adapter_sha256": "8c20e2136593c7a37bd084df6324bdd8e937561e63af6c8eec05e5b543589667",
"standard_peft_adapter_sha256": "595046de169790870bc87d6a04f043ebab0ed94bee2ab7bc37db8cf30665ef58",
"standard_peft_manifest_sha256": "e6d0e7b0ad8b39221775ad0655c3fbb355baa0d659ca3c89927e46030890353c",
"standard_peft_load_verified": true
},
"scientific_scope": {
"runtime_correctness_only": true,
"alignment_quality_evaluated": false,
"opd_beats_sft_dpo_or_kd_claimed": false
}
}
47 changes: 47 additions & 0 deletions docs/opd-quickstart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Run verl-style OPD locally

miniVERL v0.8 supports one pinned, fail-closed subset of verl v0.8: one actor,
one teacher, one generation per prompt, reward-free direct GKD with
`forward_kl_topk`, token-mean aggregation and a LoRA/QLoRA student. It is local
single-GPU execution, not Ray/FSDP or distributed verl execution.

Install a CUDA build of PyTorch that matches your machine first, then:

```bash
python -m pip install "miniverl[train,cuda,bridge]"
miniverl data sample --format verl-parquet --out data/opd-smoke.parquet
miniverl plan --profile verl-opd-v0.8-single-gpu-v1 \
--config builtin:qwen3-0.6b-1.7b-opd
miniverl run --profile verl-opd-v0.8-single-gpu-v1 \
--config builtin:qwen3-0.6b-1.7b-opd
```

The built-in recipe downloads pinned Qwen3-0.6B and Qwen3-1.7B snapshots when
they are not cached. Allow roughly 6 GiB of download/cache space and 0.25 GiB
for run artifacts. The plan command itself is CPU-only and weight-free; use
`--offline` for a zero-network compiler smoke.

## Measured reference

| GPU | student / teacher | strategy | limits / top-k | peak reserved | first update | status |
| --- | --- | --- | --- | ---: | ---: | --- |
| RTX 4080 16 GiB | Qwen3-0.6B / Qwen3-1.7B, both NF4 | dual resident | 128 + 16 tokens / 32 | 3.176 GiB | 12.02 s | measured |
| 12 GiB CUDA GPU | same built-in recipe | planner-selected | same | — | — | not measured |
| 24 GiB CUDA GPU | same built-in recipe | planner-selected | same | — | — | not measured |

The measured run completed one current-policy rollout/scoring/update cycle,
exported a loadable PEFT adapter, and used one RTX 4080. It demonstrates
runtime and artifact correctness only; it did not evaluate alignment quality.
The checksummed record is
[`rtx4080-verl-opd-runtime-v1.json`](https://github.com/DaoyuanLi2816/mini-verl/blob/main/benchmarks/results/rtx4080-verl-opd-runtime-v1.json).

## What `plan` means

`plan` reports estimates separately from measurements. Auto placement uses
model metadata plus the configured VRAM headroom; it never branches on a GPU
product name. Unknown model sizes conservatively select swap. `--probe` is
reserved but fails closed in v0.8.0 rather than loading weights unexpectedly.

Unsupported settings—including policy-gradient OPD, task rewards, reference
KL, multiple teachers, multiple generations, multimodal inputs and every
distributed dimension—are rejected rather than reinterpreted.
5 changes: 4 additions & 1 deletion examples/verl-opd-v0.8-single-gpu.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Resolved fixture for the pinned verl-opd-v0.8-single-gpu-v1 compiler.
# This file compiles offline. Runtime execution is added in later v0.8 PRs.
# This file compiles offline and can be executed through `miniverl run` once
# the referenced Parquet files exist.
data:
train_files: [data/train.parquet]
val_files: [data/val.parquet]
Expand Down Expand Up @@ -76,6 +77,8 @@ trainer:
n_gpus_per_node: 1
nnodes: 1
miniverl:
student_revision: c1899de289a04d12100db370d81485cdf75e47ca
teacher_revision: 70d244cc86ccca08cf5af4e1e306ecf908b1ad5e
runtime:
mode: auto
memory:
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ plugins:
- search
nav:
- Home: index.md
- Run verl-style OPD: opd-quickstart.md
- Start on one GPU: single-gpu-guide.md
- Align:
- "External Alignment Gate v1: early stop": alignment-external/alignment-external-v1.md
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ core-metadata-version = "2.4"
"benchmarks/schema/alignment-external-result.schema.json" = "miniverl/evidence/data/alignment-external-v1/result.schema.json"
"benchmarks/preregistration/alignment-external-v1.yaml" = "miniverl/evidence/data/alignment-external-v1/preregistration.yaml"
"benchmarks/evidence/alignment-external-v1/jsonnav-selection-records.jsonl" = "miniverl/evidence/data/alignment-external-v1/task-evidence.jsonl"
"src/miniverl/resources/qwen3_0_6b_1_7b_opd.yaml" = "miniverl/resources/qwen3_0_6b_1_7b_opd.yaml"

[tool.hatch.build.targets.sdist]
core-metadata-version = "2.4"
Expand Down
Loading