Skip to main content

miniVERL — run verl-style OPD on one consumer GPU

CI Build PyPI Python License

PyPI · Stable docs · Development docs · 中文

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.11.0 is stable; main is development.

Start in 60 seconds

Install the CUDA-enabled PyTorch build that matches your machine, then:

python -m pip install "miniverl[train,cuda]"
miniverl data sample --format verl-parquet --out prompts.parquet
miniverl plan --profile verl-opd-v0.8-single-gpu-v1 \
  --config builtin:qwen3-0.6b-1.7b-opd \
  --set 'data.train_files=["prompts.parquet"]' --out plan.json
miniverl run --profile verl-opd-v0.8-single-gpu-v1 \
  --plan plan.json --dry-run

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. The single-GPU guide 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.
miniverl run --profile verl-opd-v0.8-single-gpu-v1 --plan plan.json \
  --output runs --run-id my-opd
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 doctor scaleout --json

How it works

Typed verl-style configuration and Parquet prompts compile into sequential actor rollout, teacher scoring and actor update phases on one CUDA GPU, producing inspectable local artifacts and a pinned scale-out bundle.

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.

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.

Choose your path

Goal First command Primary artifact Next step
Run local OPD miniverl plan --profile verl-opd-v0.8-single-gpu-v1 --config verl-opd.yaml immutable execution plan OPD quickstart
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
Fit your GPU miniverl plan --config verl-opd.yaml --probe measured placement plan Hardware planning
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

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:

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}

The compiler translates distributed resource intent into sequential local Hugging Face phases and records that translation in the plan. Two measured profiles are available:

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 explains how profile identity follows plans, caches, checkpoints and exports. Separate conformance-only grouped profiles add transactional Parquet n>1 samples without changing either measured n=1 profile or introducing GRPO semantics. A separate conformance-only rewarded profile adds deterministic exact-answer rewards and explicit group advantage composition; it has no task-quality claim.

Measured systems evidence

Rollout Runtime v2 has a complete 24-cell RTX 4080 measurement across 64/256/512-token responses, n=1/4, greedy and seeded sampling. The compiled hf_cached path reached 124.2–248.7 output tokens/s and passed the preregistered 2× gate in every required cell. It keeps the NF4 actor for training and synchronizes each policy version into an owned BF16 rollout mirror.

Managed vLLM 0.28.0 with CUDA Graph execution reached 626.6–836.4 output tokens/s and was 3.08–5.97× faster than hf_cached in the 256/512-token cells. Both backends passed memory, eight-refresh and teardown gates. vLLM is the measured direct-GKD engine; PG-k1 stays on hf_cached because its engine log-probability probe exceeded the numerical threshold. See the full runtime result for every cell, the preserved first candidate and artifact hashes.

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 and SmolLM2 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.

These reports answer scoped experimental questions; the limitations 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 lists supported fields, profile semantics and handoff readiness states; limitations covers the broader execution and scientific boundaries. miniVERL is an independent Apache-2.0 project.

Development

git clone https://github.com/DaoyuanLi2816/mini-verl.git
cd mini-verl
python -m pip install -e ".[dev]"
pytest -q -m "not gpu and not network"

See CONTRIBUTING.md, CHANGELOG.md, CITATION.cff, the reproducibility guide, SECURITY.md and the Apache-2.0 license.

Release files for miniverl 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for miniverl 0.11.0
File Size Uploaded
miniverl-0.11.0.tar.gz 1.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for miniverl 0.11.0
File Interpreter ABI Platform
miniverl-0.11.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.2 MB

Release files / miniverl-0.11.0.tar.gz

Download URL miniverl-0.11.0.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
5ee1de64b2eaf82d7076f11add1f897d99668b245ba3635a8f9bb7260f970b13
BLAKE2b-256 checksum
How to use checksums
3e5a6adc60836f962ac8b97128fa1a2dcf60c7ebed5972cd945cad5aa598b36c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / miniverl-0.11.0-py3-none-any.whl

Download URL miniverl-0.11.0-py3-none-any.whl
Size 587.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2fb981987b34bc53dfdefa505ded96d019614c69c4d0509360a414e8ab69aca
BLAKE2b-256 checksum
How to use checksums
54a42176e1d1f50e4cca463e959fc4c58ec44027a8049159cc330c9a5aafd9de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release history Release notifications | RSS feed

0.16.0

2 release files

0.15.0

2 release files

This release

0.11.0 This release

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page