From 64f668e6ff86c9a2f6d42dcd978c58aecf1945d4 Mon Sep 17 00:00:00 2001
From: Daoyuan Li <94409450+DaoyuanLi2816@users.noreply.github.com>
Date: Fri, 28 Aug 2026 23:05:17 -0700
Subject: [PATCH] Reframe documentation around product workflows
---
CHANGELOG.md | 12 +
CONTRIBUTING.md | 25 +-
PYPI.md | 351 +++++++-----------
README.md | 351 +++++++-----------
README.zh-CN.md | 270 ++++++--------
TODO.md | 4 +-
.../benchmark-governance.md | 5 +-
docs/alignment-lab/demo.md | 7 +-
docs/alignment-lab/launch-copy.md | 4 +-
docs/banner.svg | 2 +-
docs/comparisons.md | 161 ++++----
docs/compatibility.md | 24 +-
docs/config-overrides.md | 6 +-
docs/consumer-runtime-v1.md | 5 +-
docs/design.md | 7 +-
docs/for-verl-users.md | 54 ++-
docs/index.md | 153 ++++----
docs/limitations.md | 22 +-
docs/maintainer-architecture.md | 3 +-
docs/opd-quickstart.md | 36 +-
docs/profiles/index.md | 28 +-
docs/repository-settings.md | 4 +-
docs/scaleout-materialization.md | 8 +-
docs/security-review-v0.10.1.md | 4 +-
docs/single-gpu-guide.md | 57 ++-
docs/social-preview-v0.6.svg | 2 +-
docs/upstream-support-policy.md | 5 +-
docs/v1-readiness.md | 6 +-
docs/verl-bridge-demo.md | 4 +-
docs/verl-local-runtime-mobile.svg | 6 +-
docs/verl-local-runtime.svg | 10 +-
docs/verl-opd-runtime.md | 28 +-
docs/verl-opd-scaleout.md | 15 +-
mkdocs.yml | 5 +-
pyproject.toml | 2 +-
tests/unit/test_documentation_voice.py | 56 +++
36 files changed, 793 insertions(+), 949 deletions(-)
create mode 100644 tests/unit/test_documentation_voice.py
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9481bdc..3529339 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,18 @@ All notable changes to miniVERL are recorded here. The format follows
## [Unreleased]
+### Documentation narrative
+
+- Rebuilt the English, Chinese and PyPI landing narratives around the local
+ workflow, concrete artifacts, user paths and measured systems evidence.
+- Reframed the documentation home, stack-selection guide, verl migration,
+ hardware planning and OPD guides around supported workflows, with complete
+ execution and scientific boundaries consolidated in compatibility and
+ limitations.
+- Updated the main runtime diagram and contributor guidance so product pages
+ lead with capabilities while research, security and operational caveats stay
+ next to the decisions they qualify.
+
### Release evidence polish
- Corrected the v1-readiness record after the completed v0.10.1 attempt-1 RTX
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 5f97ef6..42681af 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,15 +1,14 @@
# Contributing to miniVERL
-Thank you for considering it. This document is short and specific, because the
-project has a small number of rules that matter a lot and very few that do not.
+Thank you for helping make one-GPU distillation easier to inspect, reproduce
+and extend. This guide covers the checks that keep code and published evidence
+aligned.
-## The one rule
+## Measurement provenance
-**Never state a number you did not measure.** Not in code, not in a docstring,
-not in the README, not in a pull-request description. If something was not run,
-write "not run" and leave the exact command that would run it. A missing number
-is fine; an invented one is not, and it is the fastest way to make a
-distillation project worthless.
+**Every reported number needs a measurement artifact or command.** When a check
+was unavailable, write "not run" and include the exact command for a future
+run. This convention keeps reviews useful across different hardware.
## Setup
@@ -77,6 +76,16 @@ required hardware or credentials are unavailable.
* Silent behaviour: truncating a sequence, changing a model, reusing a stale
cache, or swallowing an exception. Fail loudly with a hint instead.
+## Documentation voice
+
+Lead with what the workflow does, who it helps and which artifact it produces.
+State a local constraint where it changes the reader's next action; link to
+the [compatibility policy](docs/compatibility.md) or
+[limitations](docs/limitations.md) for complete exclusion lists and scientific
+boundaries. Avoid repeating a catalogue of absent features after every product
+capability. Research reports and security contracts should keep their precise
+caveats close to the evidence or decision they qualify.
+
## Adding an environment
See the "New environment" issue template for the checklist. In short: seeded and
diff --git a/PYPI.md b/PYPI.md
index 8c4700f..1c0441a 100644
--- a/PYPI.md
+++ b/PYPI.md
@@ -19,19 +19,17 @@
中文
-**Run a documented subset of verl-style on-policy distillation on one consumer
-GPU.** miniVERL takes typed verl-shaped YAML and Parquet prompts through actor
-rollout → teacher scoring → actor update, records every local reinterpretation,
-and exports standard PEFT, Parquet and config artifacts for a pinned scale-out
-handoff.
+**Run verl-style on-policy distillation on one NVIDIA GPU, with every config
+mapping, teacher target and training artifact available for inspection.**
+miniVERL turns typed YAML and structured Parquet prompts into a local actor
+rollout → teacher scoring → actor update loop, then exports standard PEFT,
+Parquet and config artifacts for scale-out work.
-PyPI `v0.10.1` is stable; `main` is development. miniVERL is an independent
-project with no upstream endorsement. It does not execute arbitrary verl YAML,
-launch distributed jobs, or claim full algorithmic compatibility.
+PyPI `v0.10.1` is stable; `main` is development.
-## Pip-only quickstart
+## Start in 60 seconds
-Install the matching CUDA-enabled PyTorch build for your machine first, then:
+Install the CUDA-enabled PyTorch build that matches your machine, then:
```bash
python -m pip install "miniverl[train,cuda]"
@@ -43,13 +41,29 @@ miniverl run --profile verl-opd-v0.8-single-gpu-v1 \
--plan plan.json --dry-run
```
-These commands need no Git checkout. `data sample` creates a real structured
-Parquet file, `plan` compiles the complete field matrix without loading weights,
-and `run --dry-run` validates the native execution contract. On one NVIDIA CUDA
-GPU, remove `--dry-run` to run the pinned Qwen3-0.6B actor and Qwen3-1.7B teacher
-recipe and produce an inspectable PEFT adapter.
-
-After reviewing the plan, the canonical continuation is:
+This path works from the published wheel and loads no model weights while
+planning. The generated `plan.json` binds the source config, ordered overrides,
+profile version and input Parquet bytes. On a CUDA GPU, remove `--dry-run` to
+run the pinned Qwen3-0.6B actor and Qwen3-1.7B teacher recipe.
+
+The `[train,cuda]` extra installs the ML and quantization dependencies. Select
+the matching CUDA PyTorch wheel separately with the
+[PyTorch installer](https://pytorch.org/get-started/locally/). The
+[single-GPU guide](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/single-gpu-guide.md) covers memory planning from 8 GiB
+cards upward and includes the maintainer-measured RTX 4080 stack.
+
+## What a run gives you
+
+- **A reviewable plan.** Every accepted verl field has a local effect,
+ classification and risk level before weights are loaded.
+- **Strict current-policy trajectories.** The actor policy version, token
+ spans and teacher-supervised positions travel together.
+- **Compact teacher targets.** Top-k targets and sampled-k1 signals use
+ checksummed, pickle-free caches.
+- **Recoverable training.** Transactional manifests, checkpoints and cache
+ indexes support inspection and exact resume.
+- **Standard outputs.** PEFT adapters, safetensors, structured Parquet,
+ resolved config and typed provenance remain portable.
```bash
miniverl run --profile verl-opd-v0.8-single-gpu-v1 --plan plan.json \
@@ -60,213 +74,117 @@ miniverl export-verl --run runs/my-opd --target-verl v0.8.0 --out scaleout
miniverl bridge doctor scaleout --json
```
-The `train` extra installs the ML runtime, but does not choose the correct CUDA
-PyTorch wheel. The optional `cuda` extra adds bitsandbytes only. Follow the
-[one-GPU installation and memory guide](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/single-gpu-guide.md) for both the
-flexible install and the machine-readable RTX 4080 known-good stack. Hardware
-other than that one measured RTX 4080 remains unmeasured.
-
-## Architecture
+## How it works
-
+
-miniVERL uses one ordinary process and schedules model roles in phases. It does
-not emulate Ray resource pools or pretend local Hugging Face generation is
-vLLM. Instead, the compatibility report retains the source value, explains the
-local meaning, assigns a risk level, and fails closed when a field would change
-the algorithm or distributed semantics.
-
-The native runtime also remains available for SFT, DPO, offline KD and
-tool-aware OPD recipes. Those workflows share strict token provenance,
-pickle-free teacher caches, transactional checkpoints and adapter export, but
-the verl-shaped profile is the shortest route for an existing verl user.
-
-### One local scheduler, explicit roles
-
-The actor generates from the current adapter; the teacher scores exactly those
-visited token positions; the actor then receives a padded, token-mean update.
-The teacher is never treated as a reward model, tool output never becomes a
-training label, and a stale actor-policy version cannot enter an on-policy
-batch. Memory planning chooses resident phased roles for quantized models,
-swap only for movable unquantized roles, or compatible shared-backbone
-placement while keeping actor, teacher and reference identities distinct.
-
-Each phase writes evidence before the next boundary: structured trajectories
-carry per-token provenance, top-k teacher targets are checksummed without
-pickle, checkpoints publish transactionally, and the final adapter is verified
-with the standard PEFT loader. A crash can therefore be inspected and resumed
-without reconstructing intent from console text.
-
-## Coming from verl?
-
-| What you do in verl | miniVERL equivalent |
-| --- | --- |
-| pass Hydra-style overrides | repeat `--set`; v0.9 development also accepts `--overrides-file` and tokens after `--` |
-| inspect the resolved config | `miniverl plan --json` |
-| execute pure OPD | `miniverl run` |
-| reuse prompt Parquet | point `data.train_files` at it directly |
-| allocate rollout/teacher workers | compile resource intent into local phases |
-| save an FSDP/Megatron checkpoint | unsupported |
-| prepare a scale-out handoff | `miniverl export-verl` |
-
-The same field names stay visible:
-
-```bash
-# familiar resolved intent
-actor_rollout_ref.model.path=Qwen/Qwen3-0.6B
-distillation.teacher_models.teacher_model.model_path=Qwen/Qwen3-1.7B
-
-# bounded local compilation
-miniverl plan --profile verl-opd-v0.8-single-gpu-v1 --config verl-opd.yaml \
- --set actor_rollout_ref.actor.optim.lr=1e-5
-```
-
-External YAML must explicitly accept the high-risk local mappings printed by
-`plan` before `run`; the packaged profile carries a value-bound reviewed
-manifest. [Override precedence and safe input forms](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/config-overrides.md)
-are documented without executing Hydra interpolation or shell text.
+miniVERL schedules actor, teacher and optional reference roles in phases inside
+one ordinary process. The actor generates with its current adapter, the teacher
+scores the visited token positions, and the actor receives a padded token-mean
+update. Resident, swap and shared-backbone placement strategies keep those role
+identities explicit while adapting to available memory.
-The public built-in profile deliberately uses upstream-shaped `name: vllm`
-values. miniVERL classifies both rollout and teacher engine names as local
-reinterpretations and executes them with sequential local HF phases; this is
-not vLLM equivalence. See [For verl users](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/for-verl-users.md) for config,
-data, role and error mappings.
+Each phase publishes evidence before the next boundary: structured
+trajectories carry per-token provenance, teacher targets are checksummed,
+checkpoints publish transactionally, and the final adapter is reloaded through
+standard PEFT. The result is a training run you can inspect without
+reconstructing intent from console logs.
-## Tested profile boundary
+## Choose your path
-Use `miniverl profiles list`, `profiles show/schema`, and `compat
-explain/check` to inspect the closed built-in registry and distinguish an
-accepted field from one with a demonstrated native effect. New plans, caches,
-checkpoints and exports bind the complete independent profile identity.
-
-Both profiles pin official verl `v0.8.0` at commit
-`7aed6b230776f963fa09509c10d9c3a767d1102c`:
-
-| Profile | Objective | Teacher target | Status |
+| Goal | First command | Primary artifact | Next step |
| --- | --- | --- | --- |
-| direct GKD | `forward_kl_topk` | top-k IDs/log-probabilities | measured |
-| PG OPD | sampled `k1` + vanilla policy loss | sampled-token teacher log-probability | measured |
-
-Their shared executable boundary is intentionally narrow:
-
-- one trainable actor and one teacher;
-- one generated response per prompt (`n=1`);
-- reward-free distillation with token-mean aggregation;
-- LoRA or QLoRA adapter updates on one CUDA GPU;
-- immutable model revisions and verl-style structured prompt Parquet.
-
-The PG path is not PPO: it uses a detached distillation-derived advantage with
-the pinned vanilla policy-loss form. Task rewards, KL penalties, multi-teacher routing,
-multimodal inputs, PPO, GRPO, critics, Ray, FSDP, Megatron, multi-GPU and
-multi-node execution are unsupported. Known unsupported values receive a
-machine-readable classification; unknown fields and unresolved `${...}`
-interpolations are rejected. A resolved profile subset is input—not an
-arbitrary launch script.
-
-## Measured RTX 4080 path
-
-The Qwen3-0.6B/1.7B developer workload consumed **32 distinct prompts**, each
-with a 64-token response bound, and completed **8 current-policy updates** at
-**3.1914 GiB peak reserved VRAM**. Median steady-state rollout, teacher-scoring
-and update times were 9.7200, 0.4864 and 2.3260 seconds. A matched 4-update
-interruption resumed to the same byte-identical trajectories, adapter and
-optimizer tensors. See the [data-bound figure and full record](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/verl-opd-reference-workload.md);
-the original one-update [pip smoke](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/opd-quickstart.md) remains preserved.
-A separate pinned SmolLM2-360M/1.7B recipe consumed 32 distinct prompts across
-8 updates at 1.4961 GiB peak reserved VRAM. Interruption/resume was
-byte-identical, PEFT reload passed, and the exact-snapshot scale-out bundle
-materialized successfully. See the [full SmolLM2 systems record](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/smollm2-opd-workload.md).
-
-This is deliberately a runtime and artifact proof. It is not a throughput
-benchmark, an alignment-quality endpoint, or evidence that OPD beats SFT, DPO
-or KD. Other NVIDIA GPUs use the same device-name-agnostic CUDA path, but model
-fit depends on VRAM, context length, quantization and installed kernels; they
-remain unmeasured. The [release qualification contract](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/release-qualification.md)
-builds one candidate wheel on a hosted runner and qualifies those exact bytes
-on the RTX 4080 before any release can reuse them, while the
-[upstream support policy](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/upstream-support-policy.md) keeps both published
-profile identities fixed. Runner activation is not described as continuous CI.
-
-### Choose a path by hardware, not GPU branding
-
-| Situation | Recommended starting point | What remains constant |
-| --- | --- | --- |
-| inspect on CPU or a laptop | `plan` and `run --dry-run` | full config classification |
-| one CUDA GPU with limited VRAM | QLoRA with resident local phases, or unquantized LoRA with swap | logical batch and loss semantics |
-| same-base actor and teacher adapters | shared-backbone mode | explicit role provenance |
-| more VRAM available | larger physical phase batches | source data and optimizer intent |
-
-Automatic BF16/FP16 selection follows device support; it is not inferred from
-marketing names such as 3070, 4080, 5090 or Titan. `miniverl doctor` reports the
-installed CUDA/PyTorch path. Normal planning is weight-free; explicit
-`plan --probe` adds bounded, cached CUDA measurements with zero optimizer
-updates. See [hardware planning](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/hardware-planning.md). There is no
-automatic downgrade to a different model,
-teacher, context, top-k or loss when memory is tight.
-
-Share a sanitized result without uploading it automatically:
-
-```bash
-miniverl hardware record --run runs/my-opd --out hardware-record.json
-miniverl hardware validate hardware-record.json
+| **Run local OPD** | `miniverl plan --profile verl-opd-v0.8-single-gpu-v1 --config verl-opd.yaml` | immutable execution plan | [OPD quickstart](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/opd-quickstart.md) |
+| **Bring a verl profile** | `miniverl compat check --profile verl-opd-v0.8-single-gpu-v1 --config verl-opd.yaml` | field-by-field compatibility report | [For verl users](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/for-verl-users.md) |
+| **Fit your GPU** | `miniverl plan --config verl-opd.yaml --probe` | measured placement plan | [Hardware planning](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/hardware-planning.md) |
+| **Hand off for scale-out** | `miniverl export-verl --run runs/my-opd --target-verl v0.8.0 --out scaleout` | PEFT + Parquet + config bundle | [Scale-out contract](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/verl-opd-scaleout.md) |
+
+The native recipe system also supports SFT, DPO, offline KD and tool-aware OPD
+over calculator, JSON navigation, read-only SQLite and custom environments.
+
+## Familiar verl inputs, local execution
+
+The current profiles pin official verl `v0.8.0` at
+`7aed6b230776f963fa09509c10d9c3a767d1102c` and preserve recognizable fields:
+
+```yaml
+actor_rollout_ref:
+ model: {path: Qwen/Qwen3-0.6B}
+ rollout: {name: vllm, n: 1}
+distillation:
+ teacher_models:
+ teacher_model:
+ model_path: Qwen/Qwen3-1.7B
+ inference: {name: vllm}
```
-Community records remain unreviewed until their hashes and provenance pass the
-[documented maintainer gate](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/community-benchmarks.md).
-
-## Data and artifact interoperability
-
-The profile consumes structured verl-style Parquet without substituting a toy
-environment. Prompt roles and content remain structured; data source, ability
-and extra metadata survive conversion. `miniverl convert-dataset` is available
-when crossing the native trajectory boundary, and rejects lossy rows unless the
-operator explicitly permits a partial conversion.
-
-A completed local run contains the resolved source config, compatibility
-matrix, local execution plan, trajectories, selected teacher targets,
-checkpoints, measurements and a PEFT adapter. Inspect before moving it:
-
-```bash
-miniverl inspect runs/my-opd/trajectories.jsonl
-miniverl cache stats runs/my-opd/teacher-cache
-miniverl export-verl --run runs/my-opd --target-verl v0.8.0 --out scaleout
-miniverl bridge materialize scaleout --download --offline
-miniverl bridge doctor scaleout --json
-```
+The compiler translates distributed resource intent into sequential local
+Hugging Face phases and records that translation in the plan. Two measured
+profiles are available:
-The v0.9 export preserves student/teacher identities, Parquet bytes and pure
-OPD overrides, but reports `launchable: false` until exact base snapshots are
-materialized and validated against the installed pinned verl commit. Only then
-does `bridge materialize` publish a checksummed `launch.sh`; distributed
-execution remains untested. Review the [current scale-out contract](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/verl-opd-scaleout.md),
-[legacy bridge](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/legacy-verl-bridge.md) and [compatibility policy](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/compatibility.md).
-
-The intended operating loop is **plan → inspect → run → inspect → export**.
-`plan --out` byte-binds the YAML, ordered overrides and scanned Parquet inputs
-to the exact native config; `run --plan` rejects drift before loading weights.
-Its digest follows the run manifest, teacher cache and checkpoints. Direct
-`run --config` remains available for experiments. See [immutable execution
-plans](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/immutable-plans.md).
-
-## Research and validation
-
-miniVERL keeps every measured study—including negative results, superseded
-runs and preregistered early stops—public under the documentation. None is used
-as a claim that OPD universally beats SFT, DPO or KD: see the
-[v0.7 External Alignment Gate](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/alignment-external/alignment-external-v1.md),
-[Alignment Lab](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/alignment-lab/alignment-lab-v1.md),
-[RecoveryBench](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/recoverybench/recoverybench-v1.md), and the
-[calculator study](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/benchmarking.md).
-
-New runs establish tokenizer compatibility through structural identity. The
-legacy behavioral fingerprint is retained only for migration and is not an
-identity proof. Scientific caveats and immutable source hashes remain in the
-detailed reports and [limitations](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/limitations.md).
-
-## Development, security and license
+| Profile | Objective | Teacher target |
+| --- | --- | --- |
+| `verl-opd-v0.8-single-gpu-v1` | direct GKD `forward_kl_topk` | top-k token IDs and log-probabilities |
+| `verl-opd-v0.8-single-gpu-pg-k1-v1` | sampled `k1` + vanilla policy loss | sampled-token teacher log-probability |
+
+Use `miniverl profiles show`, `compat explain` and `compat check` to inspect
+the complete mapping. [Compatibility profiles](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/profiles/index.md) explains
+how profile identity follows plans, caches, checkpoints and exports.
+
+## Measured systems evidence
+
+The Qwen3-0.6B/1.7B developer workload consumed **32 distinct prompts**, used a
+64-token response bound, and completed **8 current-policy updates** at
+**3.1914 GiB peak reserved VRAM** on an RTX 4080. Median steady-state rollout,
+teacher-scoring and update times were 9.7200, 0.4864 and 2.3260 seconds. A
+matched interruption after update four resumed to byte-identical trajectories,
+adapter and optimizer tensors.
+
+A second SmolLM2-360M/1.7B workload completed the same 32-prompt, 8-update
+shape at 1.4961 GiB peak reserved VRAM, including exact resume, PEFT reload and
+scale-out materialization. Read the
+[Qwen3](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/verl-opd-reference-workload.md) and
+[SmolLM2](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/smollm2-opd-workload.md) systems records for configs, hashes and
+phase-level measurements.
+
+Other NVIDIA GPUs use the same device-name-agnostic CUDA path. Model fit and
+speed vary with VRAM, context, quantization, kernels and software versions;
+`miniverl doctor` and `plan --probe` expose those machine-specific choices.
+
+## Research record
+
+The repository publishes positive, mixed and negative results with the same
+resolved configs and source hashes. The calculator study found that a
+protocol-qualified teacher prevented collapse but tied supervised
+continuation. RecoveryBench found no fresh-state advantage in its scoped
+SQLite setting. Alignment Lab began at a saturated SFT checkpoint and exposed
+utility regressions that two sandbox safety checks missed. The preregistered
+External Alignment Gate stopped before continuation because every candidate
+failed the retained-utility threshold.
+
+- [Calculator protocol study](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/benchmarking.md)
+- [RecoveryBench](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/recoverybench/recoverybench-v1.md)
+- [Alignment Lab](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/alignment-lab/alignment-lab-v1.md)
+- [External Alignment Gate](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/alignment-external/alignment-external-v1.md)
+
+These reports answer scoped experimental questions; the
+[limitations](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/limitations.md) page collects the measurement, architecture,
+security and generalization boundaries in one place.
+
+## Scope
+
+miniVERL is designed for one local process, one NVIDIA CUDA GPU and the
+documented OPD profiles above. Scale-out support produces and validates a
+portable bundle against the pinned upstream source. The
+[compatibility policy](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/compatibility.md) lists supported fields, profile
+semantics and handoff readiness states; [limitations](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/limitations.md)
+covers the broader execution and scientific boundaries. miniVERL is an
+independent Apache-2.0 project.
+
+## Development
```bash
git clone https://github.com/DaoyuanLi2816/mini-verl.git
@@ -275,8 +193,7 @@ python -m pip install -e ".[dev]"
pytest -q -m "not gpu and not network"
```
-Contributions should keep the one-GPU boundary explicit and include tests for
-new failure modes. Report vulnerabilities privately through
-[SECURITY.md](https://github.com/DaoyuanLi2816/mini-verl/blob/main/SECURITY.md). See [CONTRIBUTING.md](https://github.com/DaoyuanLi2816/mini-verl/blob/main/CONTRIBUTING.md), the
-[changelog](https://github.com/DaoyuanLi2816/mini-verl/blob/main/CHANGELOG.md), [citation metadata](https://github.com/DaoyuanLi2816/mini-verl/blob/main/CITATION.cff),
-[reproducibility guide](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/reproducibility.md), and [Apache-2.0 license](https://github.com/DaoyuanLi2816/mini-verl/blob/main/LICENSE).
+See [CONTRIBUTING.md](https://github.com/DaoyuanLi2816/mini-verl/blob/main/CONTRIBUTING.md), [CHANGELOG.md](https://github.com/DaoyuanLi2816/mini-verl/blob/main/CHANGELOG.md),
+[CITATION.cff](https://github.com/DaoyuanLi2816/mini-verl/blob/main/CITATION.cff), the
+[reproducibility guide](https://github.com/DaoyuanLi2816/mini-verl/blob/main/docs/reproducibility.md), [SECURITY.md](https://github.com/DaoyuanLi2816/mini-verl/blob/main/SECURITY.md)
+and the [Apache-2.0 license](https://github.com/DaoyuanLi2816/mini-verl/blob/main/LICENSE).
diff --git a/README.md b/README.md
index e1e3869..51b9f82 100644
--- a/README.md
+++ b/README.md
@@ -19,19 +19,17 @@
中文
-**Run a documented subset of verl-style on-policy distillation on one consumer
-GPU.** miniVERL takes typed verl-shaped YAML and Parquet prompts through actor
-rollout → teacher scoring → actor update, records every local reinterpretation,
-and exports standard PEFT, Parquet and config artifacts for a pinned scale-out
-handoff.
+**Run verl-style on-policy distillation on one NVIDIA GPU, with every config
+mapping, teacher target and training artifact available for inspection.**
+miniVERL turns typed YAML and structured Parquet prompts into a local actor
+rollout → teacher scoring → actor update loop, then exports standard PEFT,
+Parquet and config artifacts for scale-out work.
-PyPI `v0.10.1` is stable; `main` is development. miniVERL is an independent
-project with no upstream endorsement. It does not execute arbitrary verl YAML,
-launch distributed jobs, or claim full algorithmic compatibility.
+PyPI `v0.10.1` is stable; `main` is development.
-## Pip-only quickstart
+## Start in 60 seconds
-Install the matching CUDA-enabled PyTorch build for your machine first, then:
+Install the CUDA-enabled PyTorch build that matches your machine, then:
```bash
python -m pip install "miniverl[train,cuda]"
@@ -43,13 +41,29 @@ miniverl run --profile verl-opd-v0.8-single-gpu-v1 \
--plan plan.json --dry-run
```
-These commands need no Git checkout. `data sample` creates a real structured
-Parquet file, `plan` compiles the complete field matrix without loading weights,
-and `run --dry-run` validates the native execution contract. On one NVIDIA CUDA
-GPU, remove `--dry-run` to run the pinned Qwen3-0.6B actor and Qwen3-1.7B teacher
-recipe and produce an inspectable PEFT adapter.
-
-After reviewing the plan, the canonical continuation is:
+This path works from the published wheel and loads no model weights while
+planning. The generated `plan.json` binds the source config, ordered overrides,
+profile version and input Parquet bytes. On a CUDA GPU, remove `--dry-run` to
+run the pinned Qwen3-0.6B actor and Qwen3-1.7B teacher recipe.
+
+The `[train,cuda]` extra installs the ML and quantization dependencies. Select
+the matching CUDA PyTorch wheel separately with the
+[PyTorch installer](https://pytorch.org/get-started/locally/). The
+[single-GPU guide](docs/single-gpu-guide.md) covers memory planning from 8 GiB
+cards upward and includes the maintainer-measured RTX 4080 stack.
+
+## What a run gives you
+
+- **A reviewable plan.** Every accepted verl field has a local effect,
+ classification and risk level before weights are loaded.
+- **Strict current-policy trajectories.** The actor policy version, token
+ spans and teacher-supervised positions travel together.
+- **Compact teacher targets.** Top-k targets and sampled-k1 signals use
+ checksummed, pickle-free caches.
+- **Recoverable training.** Transactional manifests, checkpoints and cache
+ indexes support inspection and exact resume.
+- **Standard outputs.** PEFT adapters, safetensors, structured Parquet,
+ resolved config and typed provenance remain portable.
```bash
miniverl run --profile verl-opd-v0.8-single-gpu-v1 --plan plan.json \
@@ -60,213 +74,117 @@ miniverl export-verl --run runs/my-opd --target-verl v0.8.0 --out scaleout
miniverl bridge doctor scaleout --json
```
-The `train` extra installs the ML runtime, but does not choose the correct CUDA
-PyTorch wheel. The optional `cuda` extra adds bitsandbytes only. Follow the
-[one-GPU installation and memory guide](docs/single-gpu-guide.md) for both the
-flexible install and the machine-readable RTX 4080 known-good stack. Hardware
-other than that one measured RTX 4080 remains unmeasured.
-
-## Architecture
+## How it works
-
+
-miniVERL uses one ordinary process and schedules model roles in phases. It does
-not emulate Ray resource pools or pretend local Hugging Face generation is
-vLLM. Instead, the compatibility report retains the source value, explains the
-local meaning, assigns a risk level, and fails closed when a field would change
-the algorithm or distributed semantics.
-
-The native runtime also remains available for SFT, DPO, offline KD and
-tool-aware OPD recipes. Those workflows share strict token provenance,
-pickle-free teacher caches, transactional checkpoints and adapter export, but
-the verl-shaped profile is the shortest route for an existing verl user.
-
-### One local scheduler, explicit roles
-
-The actor generates from the current adapter; the teacher scores exactly those
-visited token positions; the actor then receives a padded, token-mean update.
-The teacher is never treated as a reward model, tool output never becomes a
-training label, and a stale actor-policy version cannot enter an on-policy
-batch. Memory planning chooses resident phased roles for quantized models,
-swap only for movable unquantized roles, or compatible shared-backbone
-placement while keeping actor, teacher and reference identities distinct.
-
-Each phase writes evidence before the next boundary: structured trajectories
-carry per-token provenance, top-k teacher targets are checksummed without
-pickle, checkpoints publish transactionally, and the final adapter is verified
-with the standard PEFT loader. A crash can therefore be inspected and resumed
-without reconstructing intent from console text.
-
-## Coming from verl?
-
-| What you do in verl | miniVERL equivalent |
-| --- | --- |
-| pass Hydra-style overrides | repeat `--set`; v0.9 development also accepts `--overrides-file` and tokens after `--` |
-| inspect the resolved config | `miniverl plan --json` |
-| execute pure OPD | `miniverl run` |
-| reuse prompt Parquet | point `data.train_files` at it directly |
-| allocate rollout/teacher workers | compile resource intent into local phases |
-| save an FSDP/Megatron checkpoint | unsupported |
-| prepare a scale-out handoff | `miniverl export-verl` |
-
-The same field names stay visible:
-
-```bash
-# familiar resolved intent
-actor_rollout_ref.model.path=Qwen/Qwen3-0.6B
-distillation.teacher_models.teacher_model.model_path=Qwen/Qwen3-1.7B
-
-# bounded local compilation
-miniverl plan --profile verl-opd-v0.8-single-gpu-v1 --config verl-opd.yaml \
- --set actor_rollout_ref.actor.optim.lr=1e-5
-```
-
-External YAML must explicitly accept the high-risk local mappings printed by
-`plan` before `run`; the packaged profile carries a value-bound reviewed
-manifest. [Override precedence and safe input forms](docs/config-overrides.md)
-are documented without executing Hydra interpolation or shell text.
+miniVERL schedules actor, teacher and optional reference roles in phases inside
+one ordinary process. The actor generates with its current adapter, the teacher
+scores the visited token positions, and the actor receives a padded token-mean
+update. Resident, swap and shared-backbone placement strategies keep those role
+identities explicit while adapting to available memory.
-The public built-in profile deliberately uses upstream-shaped `name: vllm`
-values. miniVERL classifies both rollout and teacher engine names as local
-reinterpretations and executes them with sequential local HF phases; this is
-not vLLM equivalence. See [For verl users](docs/for-verl-users.md) for config,
-data, role and error mappings.
+Each phase publishes evidence before the next boundary: structured
+trajectories carry per-token provenance, teacher targets are checksummed,
+checkpoints publish transactionally, and the final adapter is reloaded through
+standard PEFT. The result is a training run you can inspect without
+reconstructing intent from console logs.
-## Tested profile boundary
+## Choose your path
-Use `miniverl profiles list`, `profiles show/schema`, and `compat
-explain/check` to inspect the closed built-in registry and distinguish an
-accepted field from one with a demonstrated native effect. New plans, caches,
-checkpoints and exports bind the complete independent profile identity.
-
-Both profiles pin official verl `v0.8.0` at commit
-`7aed6b230776f963fa09509c10d9c3a767d1102c`:
-
-| Profile | Objective | Teacher target | Status |
+| Goal | First command | Primary artifact | Next step |
| --- | --- | --- | --- |
-| direct GKD | `forward_kl_topk` | top-k IDs/log-probabilities | measured |
-| PG OPD | sampled `k1` + vanilla policy loss | sampled-token teacher log-probability | measured |
-
-Their shared executable boundary is intentionally narrow:
-
-- one trainable actor and one teacher;
-- one generated response per prompt (`n=1`);
-- reward-free distillation with token-mean aggregation;
-- LoRA or QLoRA adapter updates on one CUDA GPU;
-- immutable model revisions and verl-style structured prompt Parquet.
-
-The PG path is not PPO: it uses a detached distillation-derived advantage with
-the pinned vanilla policy-loss form. Task rewards, KL penalties, multi-teacher routing,
-multimodal inputs, PPO, GRPO, critics, Ray, FSDP, Megatron, multi-GPU and
-multi-node execution are unsupported. Known unsupported values receive a
-machine-readable classification; unknown fields and unresolved `${...}`
-interpolations are rejected. A resolved profile subset is input—not an
-arbitrary launch script.
-
-## Measured RTX 4080 path
-
-The Qwen3-0.6B/1.7B developer workload consumed **32 distinct prompts**, each
-with a 64-token response bound, and completed **8 current-policy updates** at
-**3.1914 GiB peak reserved VRAM**. Median steady-state rollout, teacher-scoring
-and update times were 9.7200, 0.4864 and 2.3260 seconds. A matched 4-update
-interruption resumed to the same byte-identical trajectories, adapter and
-optimizer tensors. See the [data-bound figure and full record](docs/verl-opd-reference-workload.md);
-the original one-update [pip smoke](docs/opd-quickstart.md) remains preserved.
-A separate pinned SmolLM2-360M/1.7B recipe consumed 32 distinct prompts across
-8 updates at 1.4961 GiB peak reserved VRAM. Interruption/resume was
-byte-identical, PEFT reload passed, and the exact-snapshot scale-out bundle
-materialized successfully. See the [full SmolLM2 systems record](docs/smollm2-opd-workload.md).
-
-This is deliberately a runtime and artifact proof. It is not a throughput
-benchmark, an alignment-quality endpoint, or evidence that OPD beats SFT, DPO
-or KD. Other NVIDIA GPUs use the same device-name-agnostic CUDA path, but model
-fit depends on VRAM, context length, quantization and installed kernels; they
-remain unmeasured. The [release qualification contract](docs/release-qualification.md)
-builds one candidate wheel on a hosted runner and qualifies those exact bytes
-on the RTX 4080 before any release can reuse them, while the
-[upstream support policy](docs/upstream-support-policy.md) keeps both published
-profile identities fixed. Runner activation is not described as continuous CI.
-
-### Choose a path by hardware, not GPU branding
-
-| Situation | Recommended starting point | What remains constant |
-| --- | --- | --- |
-| inspect on CPU or a laptop | `plan` and `run --dry-run` | full config classification |
-| one CUDA GPU with limited VRAM | QLoRA with resident local phases, or unquantized LoRA with swap | logical batch and loss semantics |
-| same-base actor and teacher adapters | shared-backbone mode | explicit role provenance |
-| more VRAM available | larger physical phase batches | source data and optimizer intent |
-
-Automatic BF16/FP16 selection follows device support; it is not inferred from
-marketing names such as 3070, 4080, 5090 or Titan. `miniverl doctor` reports the
-installed CUDA/PyTorch path. Normal planning is weight-free; explicit
-`plan --probe` adds bounded, cached CUDA measurements with zero optimizer
-updates. See [hardware planning](docs/hardware-planning.md). There is no
-automatic downgrade to a different model,
-teacher, context, top-k or loss when memory is tight.
-
-Share a sanitized result without uploading it automatically:
-
-```bash
-miniverl hardware record --run runs/my-opd --out hardware-record.json
-miniverl hardware validate hardware-record.json
+| **Run local OPD** | `miniverl plan --profile verl-opd-v0.8-single-gpu-v1 --config verl-opd.yaml` | immutable execution plan | [OPD quickstart](docs/opd-quickstart.md) |
+| **Bring a verl profile** | `miniverl compat check --profile verl-opd-v0.8-single-gpu-v1 --config verl-opd.yaml` | field-by-field compatibility report | [For verl users](docs/for-verl-users.md) |
+| **Fit your GPU** | `miniverl plan --config verl-opd.yaml --probe` | measured placement plan | [Hardware planning](docs/hardware-planning.md) |
+| **Hand off for scale-out** | `miniverl export-verl --run runs/my-opd --target-verl v0.8.0 --out scaleout` | PEFT + Parquet + config bundle | [Scale-out contract](docs/verl-opd-scaleout.md) |
+
+The native recipe system also supports SFT, DPO, offline KD and tool-aware OPD
+over calculator, JSON navigation, read-only SQLite and custom environments.
+
+## Familiar verl inputs, local execution
+
+The current profiles pin official verl `v0.8.0` at
+`7aed6b230776f963fa09509c10d9c3a767d1102c` and preserve recognizable fields:
+
+```yaml
+actor_rollout_ref:
+ model: {path: Qwen/Qwen3-0.6B}
+ rollout: {name: vllm, n: 1}
+distillation:
+ teacher_models:
+ teacher_model:
+ model_path: Qwen/Qwen3-1.7B
+ inference: {name: vllm}
```
-Community records remain unreviewed until their hashes and provenance pass the
-[documented maintainer gate](docs/community-benchmarks.md).
-
-## Data and artifact interoperability
-
-The profile consumes structured verl-style Parquet without substituting a toy
-environment. Prompt roles and content remain structured; data source, ability
-and extra metadata survive conversion. `miniverl convert-dataset` is available
-when crossing the native trajectory boundary, and rejects lossy rows unless the
-operator explicitly permits a partial conversion.
-
-A completed local run contains the resolved source config, compatibility
-matrix, local execution plan, trajectories, selected teacher targets,
-checkpoints, measurements and a PEFT adapter. Inspect before moving it:
-
-```bash
-miniverl inspect runs/my-opd/trajectories.jsonl
-miniverl cache stats runs/my-opd/teacher-cache
-miniverl export-verl --run runs/my-opd --target-verl v0.8.0 --out scaleout
-miniverl bridge materialize scaleout --download --offline
-miniverl bridge doctor scaleout --json
-```
+The compiler translates distributed resource intent into sequential local
+Hugging Face phases and records that translation in the plan. Two measured
+profiles are available:
-The v0.9 export preserves student/teacher identities, Parquet bytes and pure
-OPD overrides, but reports `launchable: false` until exact base snapshots are
-materialized and validated against the installed pinned verl commit. Only then
-does `bridge materialize` publish a checksummed `launch.sh`; distributed
-execution remains untested. Review the [current scale-out contract](docs/verl-opd-scaleout.md),
-[legacy bridge](docs/legacy-verl-bridge.md) and [compatibility policy](docs/compatibility.md).
-
-The intended operating loop is **plan → inspect → run → inspect → export**.
-`plan --out` byte-binds the YAML, ordered overrides and scanned Parquet inputs
-to the exact native config; `run --plan` rejects drift before loading weights.
-Its digest follows the run manifest, teacher cache and checkpoints. Direct
-`run --config` remains available for experiments. See [immutable execution
-plans](docs/immutable-plans.md).
-
-## Research and validation
-
-miniVERL keeps every measured study—including negative results, superseded
-runs and preregistered early stops—public under the documentation. None is used
-as a claim that OPD universally beats SFT, DPO or KD: see the
-[v0.7 External Alignment Gate](docs/alignment-external/alignment-external-v1.md),
-[Alignment Lab](docs/alignment-lab/alignment-lab-v1.md),
-[RecoveryBench](docs/recoverybench/recoverybench-v1.md), and the
-[calculator study](docs/benchmarking.md).
-
-New runs establish tokenizer compatibility through structural identity. The
-legacy behavioral fingerprint is retained only for migration and is not an
-identity proof. Scientific caveats and immutable source hashes remain in the
-detailed reports and [limitations](docs/limitations.md).
-
-## Development, security and license
+| Profile | Objective | Teacher target |
+| --- | --- | --- |
+| `verl-opd-v0.8-single-gpu-v1` | direct GKD `forward_kl_topk` | top-k token IDs and log-probabilities |
+| `verl-opd-v0.8-single-gpu-pg-k1-v1` | sampled `k1` + vanilla policy loss | sampled-token teacher log-probability |
+
+Use `miniverl profiles show`, `compat explain` and `compat check` to inspect
+the complete mapping. [Compatibility profiles](docs/profiles/index.md) explains
+how profile identity follows plans, caches, checkpoints and exports.
+
+## Measured systems evidence
+
+The Qwen3-0.6B/1.7B developer workload consumed **32 distinct prompts**, used a
+64-token response bound, and completed **8 current-policy updates** at
+**3.1914 GiB peak reserved VRAM** on an RTX 4080. Median steady-state rollout,
+teacher-scoring and update times were 9.7200, 0.4864 and 2.3260 seconds. A
+matched interruption after update four resumed to byte-identical trajectories,
+adapter and optimizer tensors.
+
+A second SmolLM2-360M/1.7B workload completed the same 32-prompt, 8-update
+shape at 1.4961 GiB peak reserved VRAM, including exact resume, PEFT reload and
+scale-out materialization. Read the
+[Qwen3](docs/verl-opd-reference-workload.md) and
+[SmolLM2](docs/smollm2-opd-workload.md) systems records for configs, hashes and
+phase-level measurements.
+
+Other NVIDIA GPUs use the same device-name-agnostic CUDA path. Model fit and
+speed vary with VRAM, context, quantization, kernels and software versions;
+`miniverl doctor` and `plan --probe` expose those machine-specific choices.
+
+## Research record
+
+The repository publishes positive, mixed and negative results with the same
+resolved configs and source hashes. The calculator study found that a
+protocol-qualified teacher prevented collapse but tied supervised
+continuation. RecoveryBench found no fresh-state advantage in its scoped
+SQLite setting. Alignment Lab began at a saturated SFT checkpoint and exposed
+utility regressions that two sandbox safety checks missed. The preregistered
+External Alignment Gate stopped before continuation because every candidate
+failed the retained-utility threshold.
+
+- [Calculator protocol study](docs/benchmarking.md)
+- [RecoveryBench](docs/recoverybench/recoverybench-v1.md)
+- [Alignment Lab](docs/alignment-lab/alignment-lab-v1.md)
+- [External Alignment Gate](docs/alignment-external/alignment-external-v1.md)
+
+These reports answer scoped experimental questions; the
+[limitations](docs/limitations.md) page collects the measurement, architecture,
+security and generalization boundaries in one place.
+
+## Scope
+
+miniVERL is designed for one local process, one NVIDIA CUDA GPU and the
+documented OPD profiles above. Scale-out support produces and validates a
+portable bundle against the pinned upstream source. The
+[compatibility policy](docs/compatibility.md) lists supported fields, profile
+semantics and handoff readiness states; [limitations](docs/limitations.md)
+covers the broader execution and scientific boundaries. miniVERL is an
+independent Apache-2.0 project.
+
+## Development
```bash
git clone https://github.com/DaoyuanLi2816/mini-verl.git
@@ -275,8 +193,7 @@ python -m pip install -e ".[dev]"
pytest -q -m "not gpu and not network"
```
-Contributions should keep the one-GPU boundary explicit and include tests for
-new failure modes. Report vulnerabilities privately through
-[SECURITY.md](SECURITY.md). See [CONTRIBUTING.md](CONTRIBUTING.md), the
-[changelog](CHANGELOG.md), [citation metadata](CITATION.cff),
-[reproducibility guide](docs/reproducibility.md), and [Apache-2.0 license](LICENSE).
+See [CONTRIBUTING.md](CONTRIBUTING.md), [CHANGELOG.md](CHANGELOG.md),
+[CITATION.cff](CITATION.cff), the
+[reproducibility guide](docs/reproducibility.md), [SECURITY.md](SECURITY.md)
+and the [Apache-2.0 license](LICENSE).
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 40fd856..a3ea69a 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -1,5 +1,5 @@
-
+
@@ -18,17 +18,16 @@
English
-**在一张个人 GPU 上运行边界明确的 verl 风格在线策略蒸馏。** miniVERL 读取类型化的
-verl 风格 YAML 与 Parquet prompt,在本地依次执行 actor rollout → teacher scoring →
-actor update,记录每个本地语义重解释,并导出标准 PEFT、Parquet 与配置产物供固定版本
-的 verl 接手扩展。
+**在一张 NVIDIA GPU 上运行 verl 风格在线策略蒸馏,并能检查每一项配置映射、
+teacher target 与训练产物。** miniVERL 把类型化 YAML 和结构化 Parquet prompt
+编译成本地 actor rollout → teacher scoring → actor update 循环,再导出标准 PEFT、
+Parquet 与配置产物,便于继续扩展。
-PyPI `v0.10.1` 是稳定版;`main` 是开发版。miniVERL 是独立项目,不代表上游背书;它
-不执行任意 verl YAML、不启动分布式任务,也不声称完整的算法兼容性。
+PyPI `v0.10.1` 是稳定版;`main` 是开发版。
-## 仅用 pip 的快速开始
+## 60 秒开始
-请先安装与本机 CUDA 匹配的 PyTorch wheel,然后运行:
+先安装与本机匹配的 CUDA PyTorch,再运行:
```bash
python -m pip install "miniverl[train,cuda]"
@@ -40,12 +39,25 @@ miniverl run --profile verl-opd-v0.8-single-gpu-v1 \
--plan plan.json --dry-run
```
-这些命令不需要 Git checkout。`data sample` 生成真实的结构化 Parquet;`plan` 在不加载
-权重时编译完整字段矩阵;`run --dry-run` 验证本地执行契约。在一张 NVIDIA CUDA GPU
-上移除 `--dry-run`,即可运行固定版本的 Qwen3-0.6B actor 与 Qwen3-1.7B teacher,并
-得到可检查、可重新加载的 PEFT adapter。
+这条路径直接使用 PyPI wheel。规划阶段无需加载模型权重;生成的 `plan.json` 会绑定
+源配置、顺序 override、profile 版本与输入 Parquet 字节。准备好 CUDA GPU 后移除
+`--dry-run`,即可运行固定版本的 Qwen3-0.6B actor 与 Qwen3-1.7B teacher recipe。
-检查 plan 后,标准后续路径为:
+`[train,cuda]` extra 安装 ML 与量化依赖。CUDA PyTorch wheel 请通过
+[PyTorch 安装器](https://pytorch.org/get-started/locally/)单独选择。
+[单卡指南](docs/single-gpu-guide.md)介绍从 8 GiB 显卡开始的显存规划,并附有维护者实测的
+RTX 4080 环境。
+
+## 一次运行会得到什么
+
+- **可审阅的 plan。** 每个接受的 verl 字段在加载权重前就有本地作用、分类与风险等级。
+- **严格的 current-policy trajectory。** actor policy version、token span 与 teacher
+ 监督位置始终绑定在一起。
+- **紧凑的 teacher target。** top-k target 与 sampled-k1 signal 写入带校验和、无 pickle
+ 的 cache。
+- **可恢复训练。** 事务化 manifest、checkpoint 与 cache index 支持检查和精确续跑。
+- **标准产物。** PEFT adapter、safetensors、结构化 Parquet、resolved config 与类型化
+ provenance 可直接携带。
```bash
miniverl run --profile verl-opd-v0.8-single-gpu-v1 --plan plan.json \
@@ -56,179 +68,105 @@ miniverl export-verl --run runs/my-opd --target-verl v0.8.0 --out scaleout
miniverl bridge doctor scaleout --json
```
-`train` extra 安装训练运行时,但不会选择正确的 CUDA PyTorch;`cuda` extra 只额外安装
-bitsandbytes。[单卡安装与显存指南](docs/single-gpu-guide.md)同时提供灵活安装与机器可读的
-RTX 4080 known-good 环境;除这一张实测 RTX 4080 外,其余硬件仍是未测量状态。
-
-## 架构
+## 工作方式
-
+
-miniVERL 在一个普通进程里按阶段调度模型角色。它不模拟 Ray resource pool,也不把本地
-Hugging Face generation 伪装成 vLLM。兼容报告保留源字段、解释本地含义、标注风险,
-并在字段改变算法或分布式语义时 fail closed。
-
-原生 SFT、DPO、offline KD 与工具型 OPD recipe 仍然保留。它们共享严格 token provenance、
-无 pickle teacher cache、事务化 checkpoint 与 adapter 导出;但对于已有 verl 经验的用户,
-类型化 verl profile 是最短入口。
-
-### 单一本地 scheduler,角色始终明确
-
-actor 使用当前 adapter 生成;teacher 只对 actor 实际访问的 token 位置评分;随后 actor 接收
-padded、token-mean update。teacher 不会被当作 reward model,tool output 不会成为训练标签,
-过期 actor-policy version 也不能进入 on-policy batch。显存规划可选择 resident、swap 或兼容
-的 shared-backbone,同时始终区分 actor、teacher 与 reference 身份。
-
-每个阶段都在跨越下一边界前写入证据:trajectory 带逐 token provenance,top-k teacher
-target 以无 pickle 格式校验,checkpoint 事务化发布,最终 adapter 用标准 PEFT loader 验证。
-因此崩溃后的检查与恢复不需要依靠终端文本猜测原始意图。
-
-## 从 verl 迁移?
-
-| verl 中的动作 | miniVERL 对应方式 |
-| --- | --- |
-| 传入 Hydra 风格 override | 重复使用 `--set`;v0.9 开发版也接受 `--overrides-file` 与 `--` 后的参数 |
-| 检查 resolved config | `miniverl plan --json` |
-| 执行纯 OPD | `miniverl run` |
-| 复用 prompt Parquet | 直接设置 `data.train_files` |
-| 分配 rollout/teacher worker | 编译为单卡顺序阶段 |
-| 保存 FSDP/Megatron checkpoint | 不支持 |
-| 准备扩展交接 | `miniverl export-verl` |
-
-```bash
-actor_rollout_ref.model.path=Qwen/Qwen3-0.6B
-distillation.teacher_models.teacher_model.model_path=Qwen/Qwen3-1.7B
-
-miniverl plan --profile verl-opd-v0.8-single-gpu-v1 --config verl-opd.yaml \
- --set actor_rollout_ref.actor.optim.lr=1e-5
-```
-
-外部 YAML 在 `run` 前必须显式接受 `plan` 列出的高风险本地重解释;内置
-profile 使用与具体值绑定的审核清单。详见[覆盖优先级与安全输入格式](docs/config-overrides.md),
-miniVERL 不执行 Hydra interpolation 或 shell 文本。
-
-公开内置 profile 刻意使用上游形状的 `name: vllm`。miniVERL 会把 rollout 与 teacher
-engine 名分类为本地重解释,再通过顺序本地 HF 阶段执行;这不等于 vLLM 语义。完整
-config、data、role 与错误映射见[面向 verl 用户的指南](docs/for-verl-users.md)。
-
-## 已测试的 profile 边界
+miniVERL 在一个普通进程中分阶段调度 actor、teacher 与可选 reference。actor 使用当前
+adapter 生成,teacher 对实际访问的 token 位置评分,随后 actor 接收 padded token-mean
+update。resident、swap 与 shared-backbone placement 会适配可用显存,同时保持各角色身份
+清晰可追踪。
-可用 `miniverl profiles list`、`profiles show/schema` 和 `compat
-explain/check` 查看封闭的内置 registry,并区分“字段可接受”和“字段确实对本地运行时
-生效”。新生成的 plan、cache、checkpoint 与 export 都绑定完整且独立版本化的 profile
-identity。
+每个阶段都会先发布证据,再跨越下一边界:trajectory 携带逐 token provenance,teacher
+target 带校验和,checkpoint 事务化发布,最终 adapter 通过标准 PEFT 重新加载。检查一次
+运行时不必再从终端日志反推原始意图。
-两个 profile 都固定官方 verl `v0.8.0` 与 commit
-`7aed6b230776f963fa09509c10d9c3a767d1102c`:
+## 选择你的路径
-| Profile | 目标 | Teacher target | 状态 |
+| 目标 | 第一个命令 | 主要产物 | 下一步 |
| --- | --- | --- | --- |
-| direct GKD | `forward_kl_topk` | top-k ID/log-probability | 已实测 |
-| PG OPD | sampled `k1` + vanilla policy loss | sampled-token teacher log-probability | 已实测 |
-
-两者的可执行边界有意保持狭窄:
-
-- 一个可训练 actor 与一个 teacher;
-- 每个 prompt 只生成一个 response(`n=1`);
-- 无 reward 的 distillation 与 token-mean 聚合;
-- 一张 CUDA GPU 上的 LoRA/QLoRA adapter 更新;
-- 不可变模型 revision 与 verl 风格结构化 prompt Parquet。
-
-PG 路径不是 PPO:它用 detach 的 distillation advantage 和固定 vanilla policy-loss 形式。
-Task reward、KL penalty、多 teacher、多模态、PPO、GRPO、critic、Ray、FSDP、
-Megatron、多 GPU 与多节点均不支持。已知不支持值会得到机器可读分类;未知字段和未解析
-的 `${...}` 会被拒绝。输入必须是 resolved profile 子集,而不是任意启动脚本。
+| **在本地运行 OPD** | `miniverl plan --profile verl-opd-v0.8-single-gpu-v1 --config verl-opd.yaml` | 不可变执行 plan | [OPD quickstart](docs/opd-quickstart.md) |
+| **迁移 verl profile** | `miniverl compat check --profile verl-opd-v0.8-single-gpu-v1 --config verl-opd.yaml` | 逐字段兼容报告 | [面向 verl 用户](docs/for-verl-users.md) |
+| **适配你的显卡** | `miniverl plan --config verl-opd.yaml --probe` | 实测 placement plan | [硬件规划](docs/hardware-planning.md) |
+| **准备 scale-out 交接** | `miniverl export-verl --run runs/my-opd --target-verl v0.8.0 --out scaleout` | PEFT + Parquet + config bundle | [Scale-out 契约](docs/verl-opd-scaleout.md) |
+
+原生 recipe 系统还支持 SFT、DPO、offline KD,以及 calculator、JSON navigation、只读
+SQLite 和自定义环境上的 tool-aware OPD。
+
+## 熟悉的 verl 输入,本地执行
+
+当前 profile 固定官方 verl `v0.8.0` commit
+`7aed6b230776f963fa09509c10d9c3a767d1102c`,并保留熟悉的字段:
+
+```yaml
+actor_rollout_ref:
+ model: {path: Qwen/Qwen3-0.6B}
+ rollout: {name: vllm, n: 1}
+distillation:
+ teacher_models:
+ teacher_model:
+ model_path: Qwen/Qwen3-1.7B
+ inference: {name: vllm}
+```
-## RTX 4080 实测路径
+编译器把分布式 resource intent 转换为顺序本地 Hugging Face 阶段,并在 plan 中记录这次
+转换。目前有两个实测 profile:
-Qwen3-0.6B/1.7B developer workload 实际消费 **32 个不同 prompt**,response 上限为
-64 token,完成 **8 次 current-policy update**,**peak reserved VRAM 为 3.1914 GiB**。
-稳态 rollout、teacher scoring 与 update 的中位耗时分别为 9.7200、0.4864 与 2.3260 秒。
-匹配的运行在第 4 次 update 后中断并恢复;最终 trajectory、adapter 与 optimizer tensor
-均字节一致。详见[数据绑定图与完整记录](docs/verl-opd-reference-workload.md);原始一次更新的
-[pip smoke](docs/opd-quickstart.md)仍完整保留。
-另一套固定版本的 SmolLM2-360M/1.7B recipe 消费 32 个不同 prompt 并完成 8 次
-update,peak reserved VRAM 为 1.4961 GiB;中断恢复保持字节一致,PEFT 重载与精确
-snapshot 的 scale-out 物化均通过。详见[完整 SmolLM2 系统记录](docs/smollm2-opd-workload.md)。
-
-这只证明一个运行时与产物路径,不是吞吐 benchmark、对齐质量 endpoint,也不证明 OPD
-优于 SFT、DPO 或 KD。其他 NVIDIA GPU 使用相同的 device-name-agnostic CUDA 路径,但
-能否装下仍取决于显存、上下文、量化与 kernel,并且仍未测量。
-[发布资格契约](docs/release-qualification.md)先在 GitHub-hosted runner 上构建唯一 candidate
-wheel,再在实测 RTX 4080 上验证完全相同的字节;发布只能复用这份制品。
-[上游支持政策](docs/upstream-support-policy.md)保证已发布 profile identity 不原地漂移。
-runner 尚未激活时不会被描述成持续 GPU CI。
-
-### 按硬件条件选择路径,而不是按显卡名称
-
-| 情况 | 建议起点 | 保持不变的内容 |
+| Profile | 目标 | Teacher target |
| --- | --- | --- |
-| CPU 或笔记本上先检查 | `plan` 与 `run --dry-run` | 完整配置分类 |
-| 单张小显存 CUDA GPU | QLoRA 使用 resident 本地分阶段;或 unquantized LoRA 使用 swap | 逻辑 batch 与 loss 语义 |
-| 同 base 的 actor/teacher adapter | shared-backbone | 明确角色 provenance |
-| 显存更充足 | 增大各阶段 physical batch | 数据与 optimizer 意图 |
-
-BF16/FP16 自动选择取决于设备能力,而不是 3070、4080、5090 或 Titan 等市场名称。
-`miniverl doctor` 报告实际 CUDA/PyTorch 路径;普通 plan 不加载权重,显式
-`plan --probe` 才执行零 optimizer update 的有界 CUDA 测量。详见
-[硬件规划](docs/hardware-planning.md)。
-显存紧张时不会静默更换模型、teacher、context、top-k 或 loss。
+| `verl-opd-v0.8-single-gpu-v1` | direct GKD `forward_kl_topk` | top-k token ID 与 log-probability |
+| `verl-opd-v0.8-single-gpu-pg-k1-v1` | sampled `k1` + vanilla policy loss | sampled-token teacher log-probability |
-已完成的 run 可以生成经过清理、且不会自动上传的硬件记录:
-
-```bash
-miniverl hardware record --run artifacts/runs/ --out hardware-record.json
-miniverl hardware validate hardware-record.json
-```
+使用 `miniverl profiles show`、`compat explain` 与 `compat check` 查看完整映射。
+[兼容 profile](docs/profiles/index.md)说明 profile identity 如何跟随 plan、cache、checkpoint
+与 export。
-社区提交即使通过 schema 校验也仍标记为 `unreviewed`;只有维护者复核并确认发布许可后,
-才会进入公开的“maintainer-validated measured”矩阵。
+## 实测系统证据
-## 数据与产物互操作
+Qwen3-0.6B/1.7B developer workload 消费 **32 个不同 prompt**,response 上限为 64 token,
+在 RTX 4080 上完成 **8 次 current-policy update**,**peak reserved VRAM 为 3.1914 GiB**。
+稳态 rollout、teacher scoring 与 update 的中位耗时分别为 9.7200、0.4864 与 2.3260 秒。
+匹配运行在第 4 次 update 后中断并续跑,最终 trajectory、adapter 与 optimizer tensor
+字节一致。
-profile 直接读取结构化 verl 风格 Parquet,不会在缺失数据时静默换成 calculator 环境。
-prompt 的 role/content 保持结构化,data source、ability 与 extra metadata 也会保留。跨越
-原生 trajectory 边界时可用 `miniverl convert-dataset`;除非明确允许部分转换,任何有损行
-都会被拒绝。
+第二套 SmolLM2-360M/1.7B workload 以 1.4961 GiB peak reserved VRAM 完成相同的
+32-prompt、8-update 形状,并通过精确续跑、PEFT 重载与 scale-out 物化。完整配置、哈希和
+分阶段测量见 [Qwen3](docs/verl-opd-reference-workload.md) 与
+[SmolLM2](docs/smollm2-opd-workload.md) 系统记录。
-本地 run 包含源配置、兼容矩阵、本地执行计划、trajectory、teacher target、checkpoint、
-实测记录与 PEFT adapter。导出前可执行:
+其他 NVIDIA GPU 使用同一条 device-name-agnostic CUDA 路径。模型能否装下以及实际速度
+取决于显存、上下文、量化、kernel 与软件版本;`miniverl doctor` 和 `plan --probe` 会把
+这些机器相关选择显示出来。
-```bash
-miniverl inspect runs/my-opd/trajectories.jsonl
-miniverl cache stats runs/my-opd/teacher-cache
-miniverl export-verl --run runs/my-opd --target-verl v0.8.0 --out scaleout
-miniverl bridge materialize scaleout --download --offline
-miniverl bridge doctor scaleout --json
-```
+## 研究记录
-v0.9 export 保留 student/teacher 身份、Parquet 原始字节与纯 OPD override;在精确 base
-snapshot 被物化并通过已安装的固定 verl commit 验证前,仍报告 `launchable: false`。只有此后
-`bridge materialize` 才会发布带校验和的 `launch.sh`;分布式执行仍是未测试。详见
-[物化契约](docs/scaleout-materialization.md)、[当前 scale-out 契约](docs/verl-opd-scaleout.md)与
-[兼容性政策](docs/compatibility.md)。
+仓库以相同的 resolved config 与源哈希发布正面、混合和负面结果。Calculator study 中,
+protocol-qualified teacher 避免了 collapse,但只追平 supervised continuation。
+RecoveryBench 在限定的 SQLite 设置中没有观察到 fresh-state 优势。Alignment Lab 从饱和
+SFT checkpoint 出发,发现了两个 sandbox safety check 没有捕捉到的 utility regression。
+预注册 External Alignment Gate 则因所有候选都未通过 retained-utility 阈值,在 continuation
+之前结束。
-建议操作闭环是 **plan → inspect → run → inspect → export**。`plan --out` 把 YAML、按顺序
-应用的 override、扫描后的 Parquet 与精确 native config 绑定;`run --plan` 在加载权重前拒绝
-任何漂移。plan digest 同时进入 run manifest、teacher cache 和 checkpoint;直接
-`run --config` 仍适合快速实验。详见[不可变执行计划](docs/immutable-plans.md)。
+- [Calculator protocol study](docs/benchmarking.md)
+- [RecoveryBench](docs/recoverybench/recoverybench-v1.md)
+- [Alignment Lab](docs/alignment-lab/alignment-lab-v1.md)
+- [External Alignment Gate](docs/alignment-external/alignment-external-v1.md)
-## 研究与验证
+这些报告回答的是各自限定的实验问题;[限制页面](docs/limitations.md)集中列出测量、架构、
+安全与泛化边界。
-miniVERL 将所有实测研究——包括负结果、被取代的运行与预注册 early stop——继续公开在
-文档中;它们都不会被用来宣称 OPD 普遍优于 SFT、DPO 或 KD。参见
-[v0.7 External Alignment Gate](docs/alignment-external/alignment-external-v1.md)、
-[Alignment Lab](docs/alignment-lab/alignment-lab-v1.md)、
-[RecoveryBench](docs/recoverybench/recoverybench-v1.md)与
-[calculator study](docs/benchmarking.md)。
+## 适用范围
-新运行通过结构身份确认 tokenizer 兼容性;旧 behavioral fingerprint 只用于迁移,不是身份
-证明。科学限制与不可变源哈希继续保留在详细报告和[限制页面](docs/limitations.md)。
+miniVERL 面向一个本地进程、一张 NVIDIA CUDA GPU 和上面的文档化 OPD profile。
+Scale-out 支持会生成 portable bundle,并对固定版本的上游源码执行验证。
+[兼容性政策](docs/compatibility.md)列出支持字段、profile 语义与 handoff readiness state;
+[限制页面](docs/limitations.md)集中说明更广的执行和科学边界。miniVERL 是独立的
+Apache-2.0 项目。
-## 开发、安全与许可
+## 开发
```bash
git clone https://github.com/DaoyuanLi2816/mini-verl.git
@@ -237,6 +175,6 @@ python -m pip install -e ".[dev]"
pytest -q -m "not gpu and not network"
```
-贡献应保持单卡边界清晰,并为新失败模式添加测试。安全问题请按 [SECURITY.md](SECURITY.md)
-私下报告。另见 [CONTRIBUTING.md](CONTRIBUTING.md)、[changelog](CHANGELOG.md)、
-[citation](CITATION.cff)、[复现指南](docs/reproducibility.md)与 [Apache-2.0 license](LICENSE)。
+另见 [CONTRIBUTING.md](CONTRIBUTING.md)、[CHANGELOG.md](CHANGELOG.md)、
+[CITATION.cff](CITATION.cff)、[复现指南](docs/reproducibility.md)、
+[SECURITY.md](SECURITY.md) 与 [Apache-2.0 license](LICENSE)。
diff --git a/TODO.md b/TODO.md
index 759d9e9..e5d2f28 100644
--- a/TODO.md
+++ b/TODO.md
@@ -6,5 +6,5 @@ GitHub issues are the active roadmap:
- [#64 — single-GPU verl-style OPD roadmap](https://github.com/DaoyuanLi2816/mini-verl/issues/64)
Completed work and evidence are indexed in [PROJECT_STATE.md](PROJECT_STATE.md)
-and [CHANGELOG.md](CHANGELOG.md). Multi-GPU training, Ray, FSDP, DeepSpeed,
-vLLM and PPO/GRPO remain outside miniVERL's local runtime.
+and [CHANGELOG.md](CHANGELOG.md). Current execution and research boundaries are
+maintained in [docs/limitations.md](docs/limitations.md).
diff --git a/docs/alignment-external/benchmark-governance.md b/docs/alignment-external/benchmark-governance.md
index 4f406f3..1a1bdb7 100644
--- a/docs/alignment-external/benchmark-governance.md
+++ b/docs/alignment-external/benchmark-governance.md
@@ -1,8 +1,7 @@
# External benchmark governance
-This page records where every external alignment endpoint comes from, what
-licence it carries, what this project redistributes, and what each measurement
-does *not* establish. It is the auditable half of
+This page records the source, licence, redistribution policy and interpretation
+scope for every external alignment endpoint. It is the auditable half of
[`benchmarks/external-alignment/registry.yaml`](https://github.com/DaoyuanLi2816/mini-verl/blob/main/benchmarks/external-alignment/registry.yaml),
which is the machine-readable half.
diff --git a/docs/alignment-lab/demo.md b/docs/alignment-lab/demo.md
index cad6907..bffd20d 100644
--- a/docs/alignment-lab/demo.md
+++ b/docs/alignment-lab/demo.md
@@ -1,9 +1,8 @@
# Alignment Lab demo recording script
-This is a reproducible recording plan, not a fabricated video. The short run
-uses the CPU toy backend and proves the workflow and artifact surfaces; its 0%
-task score is not capability evidence. The measured v0.5 result remains the
-separate three-seed Qwen3 artifact.
+This reproducible recording plan uses the CPU toy backend to show the workflow
+and artifact surfaces. Its 0% task score belongs to the demo fixture; the
+measured v0.5 result is the separate three-seed Qwen3 artifact.
## Install
diff --git a/docs/alignment-lab/launch-copy.md b/docs/alignment-lab/launch-copy.md
index 3166543..2147609 100644
--- a/docs/alignment-lab/launch-copy.md
+++ b/docs/alignment-lab/launch-copy.md
@@ -1,7 +1,7 @@
# miniVERL v0.5.0 launch copy
-All text below is evidence-bounded. Update the release URL only after the exact
-tag is public.
+This archived launch copy is tied to the v0.5.0 evidence bundle. Update its
+release URL only when republishing against the exact tag.
## GitHub Release summary
diff --git a/docs/banner.svg b/docs/banner.svg
index 0d21991..f058b63 100644
--- a/docs/banner.svg
+++ b/docs/banner.svg
@@ -1,7 +1,7 @@
diff --git a/docs/upstream-support-policy.md b/docs/upstream-support-policy.md
index 97e87b3..a7ffeff 100644
--- a/docs/upstream-support-policy.md
+++ b/docs/upstream-support-policy.md
@@ -1,7 +1,7 @@
# Upstream verl support policy
-miniVERL supports closed compatibility profiles, not “latest verl” and not
-arbitrary upstream configuration. The machine-readable matrix is
+miniVERL supports versioned compatibility profiles tied to exact upstream
+source states. The machine-readable matrix is
[`generated/upstream-support-matrix.json`](generated/upstream-support-matrix.json).
## Lifecycle
@@ -26,4 +26,3 @@ The active direct-GKD and sampled-k1 profiles both target official verl
`v0.8.0` at `7aed6b230776f963fa09509c10d9c3a767d1102c`. No v0.9-or-newer profile is
currently supported. Existing bridge artifacts remain independent-project
handoffs and do not imply upstream endorsement.
-
diff --git a/docs/v1-readiness.md b/docs/v1-readiness.md
index d15ab1f..b2b8a9b 100644
--- a/docs/v1-readiness.md
+++ b/docs/v1-readiness.md
@@ -1,8 +1,8 @@
# v1 readiness contract
-Version 1 is a stability promise, not a feature-count milestone. A successful
-release qualification is necessary evidence, but it does not by itself freeze
-the public surface or make miniVERL a v1 candidate.
+Version 1 marks a reviewed stability promise across the public surface. Release
+qualification supplies the binary evidence; the contracts below define the
+additional API, artifact and maintenance commitments.
## Stability contract
diff --git a/docs/verl-bridge-demo.md b/docs/verl-bridge-demo.md
index d503781..12ab339 100644
--- a/docs/verl-bridge-demo.md
+++ b/docs/verl-bridge-demo.md
@@ -1,7 +1,7 @@
# Verified-bridge demo recording script
-This recording is an artifact-only CPU demo. It needs the `bridge` extra but
-does not need CUDA, model downloads, Ray or a verl installation.
+This CPU recording follows the artifact path with the `bridge` extra. It runs
+from local fixtures and produces the same reports without a training setup.
## Before recording
diff --git a/docs/verl-local-runtime-mobile.svg b/docs/verl-local-runtime-mobile.svg
index ae37762..200cbe3 100644
--- a/docs/verl-local-runtime-mobile.svg
+++ b/docs/verl-local-runtime-mobile.svg
@@ -1,10 +1,10 @@
diff --git a/docs/verl-local-runtime.svg b/docs/verl-local-runtime.svg
index 0c7301b..56787c9 100644
--- a/docs/verl-local-runtime.svg
+++ b/docs/verl-local-runtime.svg
@@ -1,6 +1,6 @@
diff --git a/docs/verl-opd-runtime.md b/docs/verl-opd-runtime.md
index 7ad7592..1ac0040 100644
--- a/docs/verl-opd-runtime.md
+++ b/docs/verl-opd-runtime.md
@@ -1,9 +1,8 @@
# Current verl-style OPD runtime
-This is miniVERL's current executable path: two documented, resolved subsets of
-official verl `v0.8.0`, pinned at `7aed6b23`, compiled into local phases on one
-NVIDIA CUDA GPU. It is not a distributed verl runtime and does not accept
-arbitrary Hydra YAML.
+This is miniVERL's current executable path: two documented, resolved profiles
+from official verl `v0.8.0`, pinned at `7aed6b23`, compiled into local phases
+on one NVIDIA CUDA GPU.
## Start from the pinned profile
@@ -35,26 +34,27 @@ reinterpretations; the built-in profile has a value-bound approval manifest.
| `lora_adapter_path` plus pinned metadata | validated trainable student initialization |
`forward_kl_topk` consumes teacher top-k token IDs and log-probabilities and
-reports top-k mass/overlap diagnostics. It does not create the explicit K+1
-tail bucket used by miniVERL's separate native `bucketed_topk_tail` objective.
+reports top-k mass/overlap diagnostics. miniVERL's separate native
+`bucketed_topk_tail` objective adds an explicit K+1 tail bucket.
The second profile, `verl-opd-v0.8-single-gpu-pg-k1-v1`, records the sampled
token, rollout-time actor log-probability and teacher log-probability, then
recomputes the current actor log-probability for pinned `k1` + vanilla
-policy-loss semantics. It exports no top-k requirement. See [Which profile
-should I use?](profiles/index.md) for the neutral choice boundary.
+policy-loss semantics. Its export carries sampled-token signals in place of a
+top-k target requirement. See [Which profile should I use?](profiles/index.md)
+for the choice guide.
-## Placement is fail-closed
+## Placement strategy
-- NF4/int8 roles use resident local phases; bitsandbytes parameters cannot swap.
+- NF4/int8 roles use resident local phases.
- Swap is available only for movable unquantized LoRA roles.
- Shared backbone requires compatible same-base roles.
-- Unknown-size quantized roles report `requires_probe` and are not executable
- until feasibility is proven.
+- Unknown-size quantized roles use `requires_probe` until a bounded measurement
+ establishes feasibility.
Normal planning is weight-free. `plan --probe` is a bounded, cached CUDA
-calibration that performs zero optimizer updates. An executable plan must not
-select a placement the native runtime rejects for a known static reason.
+calibration with zero optimizer updates. The finalized plan therefore contains
+either a statically valid placement or the measurement needed to validate it.
The generated [compatibility matrix](generated/verl-opd-v0.8-compatibility.json)
and [field-effect evidence](generated/verl-opd-v0.8-field-effects.json) are
diff --git a/docs/verl-opd-scaleout.md b/docs/verl-opd-scaleout.md
index aa7cbe9..ab430f8 100644
--- a/docs/verl-opd-scaleout.md
+++ b/docs/verl-opd-scaleout.md
@@ -2,8 +2,8 @@
A completed direct-GKD or sampled-k1 PG profile run can export portable PEFT,
Parquet, config and provenance artifacts for the exact pinned upstream profile.
-This is an artifact handoff, not proof that a distributed job ran or that
-miniVERL and verl have algorithmic parity.
+The handoff advances through explicit bundle, materialization, launch and
+execution states.
```bash
miniverl export-verl --run runs/my-opd --target-verl v0.8.0 --out scaleout
@@ -25,13 +25,14 @@ validation data remains missing rather than being replaced with training data.
| upstream config parse passed | the exact pinned source parsed the bounded overrides |
| model/data load smoke passed | local load checks completed for materialized inputs |
| launchable | all required local inputs exist and the fail-closed checks passed |
-| distributed execution tested | always false in the current evidence |
-| algorithm semantic parity | not claimed |
+| distributed execution tested | whether the recorded evidence includes the upstream distributed job |
+| algorithm semantic parity | whether a separately declared parity study exists |
-Fresh identity-only exports remain `launchable: false`. Materialization resolves
+Fresh identity-only exports begin before model snapshots are materialized.
+Materialization resolves
the exact base snapshots, validates tokenizer/model/adapter/Parquet closure and
-publishes a checksummed `launch.sh` transactionally. Even `launchable: true`
-does not say Ray, FSDP, vLLM or a distributed optimizer step executed.
+publishes a checksummed `launch.sh` transactionally. The later execution and
+semantic-parity fields keep those evidence stages distinct from launchability.
The current pure-OPD export has no reward scaffold. The older
`single-gpu-online-distillation-v1` environment/PPO scaffold is retained only
diff --git a/mkdocs.yml b/mkdocs.yml
index cfb8d6d..7cbfbcc 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -1,5 +1,5 @@
site_name: miniVERL
-site_description: Run a documented subset of verl-style OPD on one consumer GPU
+site_description: Inspectable verl-style on-policy distillation on one NVIDIA GPU
site_url: https://daoyuanli2816.github.io/mini-verl/
repo_url: https://github.com/DaoyuanLi2816/mini-verl
repo_name: DaoyuanLi2816/mini-verl
@@ -41,6 +41,7 @@ plugins:
- search
nav:
- Home: index.md
+ - Choose a stack: comparisons.md
- For verl users: for-verl-users.md
- Compatibility profiles: profiles/index.md
- PG-k1 semantic ADR: adr/0010-verl-v0.8-pg-k1-contract.md
@@ -95,4 +96,4 @@ extra_css:
- assets/stylesheets/extra.css
extra_javascript:
- assets/javascripts/versioning.js
-copyright: miniVERL is an independent project; no endorsement by upstream projects is implied.
+copyright: miniVERL · inspectable single-GPU post-training · Apache-2.0
diff --git a/pyproject.toml b/pyproject.toml
index fe18d75..72bbc4e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
[project]
name = "miniverl"
dynamic = ["version"]
-description = "Run a documented subset of verl-style OPD on one consumer GPU."
+description = "Inspectable verl-style on-policy distillation on one NVIDIA GPU."
readme = "PYPI.md"
requires-python = ">=3.10"
license = { text = "Apache-2.0" }
diff --git a/tests/unit/test_documentation_voice.py b/tests/unit/test_documentation_voice.py
new file mode 100644
index 0000000..2a44d37
--- /dev/null
+++ b/tests/unit/test_documentation_voice.py
@@ -0,0 +1,56 @@
+from __future__ import annotations
+
+from pathlib import Path
+
+ROOT = Path(__file__).resolve().parents[2]
+
+
+def _read(path: str) -> str:
+ return (ROOT / path).read_text(encoding="utf-8")
+
+
+def test_product_entry_points_lead_with_workflows() -> None:
+ entry_points = "\n".join(
+ _read(path)
+ for path in (
+ "README.md",
+ "README.zh-CN.md",
+ "docs/index.md",
+ "docs/comparisons.md",
+ )
+ )
+ for old_framing in (
+ "For most serious distillation work it is",
+ "What miniVERL is not",
+ "reasons not to trust miniVERL",
+ "full verl compatibility are not claimed",
+ "不执行任意 verl YAML",
+ ):
+ assert old_framing not in entry_points
+
+ assert "## What a run gives you" in entry_points
+ assert "## Choose your path" in entry_points
+ assert "## 一次运行会得到什么" in entry_points
+ assert "## 选择你的路径" in entry_points
+
+
+def test_complete_boundaries_have_canonical_destinations() -> None:
+ for path in ("README.md", "README.zh-CN.md", "docs/index.md", "docs/comparisons.md"):
+ text = _read(path)
+ assert "limitations" in text
+ assert "compatibility" in text or "兼容" in text
+
+ limitations = _read("docs/limitations.md")
+ assert "one machine" in limitations
+ assert "multi-GPU" in limitations
+ assert "PPO/GRPO" in limitations
+ assert "## Evidence scope" in limitations
+ assert "### Execution boundary" in limitations
+
+
+def test_main_runtime_visual_describes_the_product_flow() -> None:
+ visuals = _read("docs/verl-local-runtime.svg") + _read("docs/verl-local-runtime-mobile.svg")
+ assert "READINESS REPORT" in visuals
+ assert "typed · inspectable · resumable" in visuals
+ assert "OUTSIDE miniVERL" not in visuals
+ assert "fail-closed" not in visuals