Skip to main content

miniVERL — single-GPU LLM post-training

CI Build PyPI Python License

PyPI · Stable docs · Development docs · 中文

miniVERL is a local, inspectable runtime for a documented subset of single-GPU LLM alignment and distillation. It keeps rollout provenance, assistant-only loss masks, teacher targets, update budgets and run artifacts explicit, then exports portable artifacts through a fail-closed bridge to one pinned upstream verl profile.

PyPI v0.6.1 is stable; main is development. The CUDA path has no GPU-name allowlist, but fit depends on the model pair, context budget, kernels and VRAM. miniVERL is independent from verl and does not claim distributed execution or full algorithmic compatibility.

Install and run the 60-second demo

python -m pip install "miniverl[train]"
miniverl doctor
miniverl demo --output runs/demo
miniverl inspect runs/demo

The demo is deterministic, needs no network or GPU, and performs a real toy optimization in about 50 seconds on the measured laptop CPU. For inspection, schemas and reports without the ML stack, use pip install miniverl. For CUDA training, install the matching CUDA-enabled PyTorch wheel first, then install miniverl[train,cuda]; the extra does not select a CUDA PyTorch build. See the single-GPU guide.

Three paths

Path Start with Concrete artifact Next
Align — compare SFT, DPO, KD and OPD only when the pilot evidence supports the cost miniverl pilot recipes/alignment_policy_conditioned_qwen.yaml alignment-card.json Alignment Lab
Distill locally — strict OPD, shared backbones and padded trajectory updates on one CUDA GPU miniverl train recipes/qwen_consumer_gpu_shared.yaml --dry-run config.resolved.yaml plus a revision-pinned PEFT adapter Bring your own GPU
Scale out — import a documented profile, convert Parquet, export a bundle and run bridge checks miniverl bridge doctor scaleout-bundle provenance/compatibility-report.json Verified verl artifact bridge

The bridge is a verified artifact bridge: a pinned config/data/model parse-load smoke at miniVERL-defined compatibility Level 3. It has never run a distributed verl job, and no OPD-to-PPO semantic parity is claimed.

The import is deliberately not generic YAML conversion. If dataset or environment, teacher identity, objective, or schedule semantics are missing, import-verl writes <stem>.import-report.json and a non-executable <stem>.template.yaml with status: needs_user_input. It never silently substitutes calculator tasks or an unqualified same-base teacher. An unresolved ${...} value can never reach an accepted recipe, outputs are stem-specific, and an existing output family is replaced only with an explicit --overwrite.

One measured alignment result

Alignment Lab v1 is a saturated tool-policy case study, not a broad safety benchmark. The shared SFT checkpoint already achieved 100% policy compliance and 100% retained tool utility in all three seeds. No continuation method improved it; continued SFT and both OPD variants retained measured regressions.

continuation alignment tool utility teacher queries GPU time
continued SFT 94.4% 88.9% 3.9 s
DPO 100.0% 100.0% 8.6 s
offline soft distillation 100.0% 100.0% 100.0% 26.6 s
standard OPD 98.6% 97.2% 100.0% 76.7 s
verifier-gated OPD 97.9% 95.8% 46.8% 66.0 s

Alignment and utility deltas from the saturated SFT checkpoint; small marks are all three seeds and large marks are means

The two sandbox safety checks tied at zero while utility still regressed. IFEval, XSTest, HarmBench and RewardBench were not executed. “Preference win rate” is a deterministic Minipolicy paired outcome, not human preference. Read the study, seed-level values and limitations.

One measured systems result

On one RTX 4080 with Qwen3-0.6B and eight fixed SQLite trajectories, physical batch 4 improved update throughput from 2.369 to 3.866 trajectories/s in the dual-model runtime. The shared-backbone batch-4 cell used 2.227 GiB peak reserved memory versus 3.035 GiB for dual model, while running 10.1% slower. All 12 preregistered equivalence comparisons passed. These are one-workload, one-machine measurements, not promises for other GPUs.

Measured throughput and reserved VRAM for dual-model and shared-backbone runtime cells

Consumer Runtime v1 methods and caveats

Compatibility boundary

Verified local runtime, portable artifact bundle and pinned upstream smoke; distributed verl execution remains untested

The bridge targets official verl v0.8.0 at commit 7aed6b23 and uses the term miniVERL-defined compatibility Level 3. That means a checksummed standard-artifact bundle plus pinned upstream config-parse/model-data-load smoke—not arbitrary verl YAML or a completed distributed job.

Current exported bundles are intentionally launchable: false: the base snapshot is absent, the reward implementation fails closed, and required user mappings remain placeholders. The generated entry point is therefore launch.template.sh. Readiness is reported as separate facts for artifact completeness, parse/load smoke, reward completeness, launchability, distributed execution and algorithm-semantic parity. The target is a PPO/reward scaffold, not an executable continuation of miniVERL OPD semantics.

Detailed studies and preserved negative evidence

  • RecoveryBench v1: frozen-student KD outperformed much slower fresh-state OPD on the preregistered primary view; the verifier gate remained insufficient_evidence.
  • Alignment Lab v1: the starting SFT checkpoint was at the ceiling, so no positive OPD result is claimed.
  • Calculator benchmark: both negative controls completed normally and measured 0% strict success. They were not configuration failures. Because they used the historical ambiguous protocol-v1 prompt, their failure cannot be attributed solely to intrinsic teacher behavior.
  • Consumer Runtime v1: padded update batches and shared adapters preserve the measured one-update objective within declared tolerances; rollout generation remains sequential.
  • Limitations, math, reproducibility and compatibility policy.

New runs establish tokenizer compatibility through structural identity. The legacy behavioral fingerprint—token IDs for one fixed probe plus metadata—is only a migration fallback for older artifacts and is not an identity proof.

Scope

miniVERL supports one local CUDA process. It does not implement or wrap Ray, FSDP, Megatron, PPO, GRPO or a distributed launcher. The public studies cover small Qwen3 models, deterministic tool environments and one RTX 4080; they do not establish cross-model, cross-task, cross-GPU or broad safety generality.

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"

Apache-2.0 licensed. See CONTRIBUTING.md and SECURITY.md. Project records: default GPU recipe, frozen calculator JSON, changelog, citation and license.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

miniverl-0.6.2.tar.gz (994.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

miniverl-0.6.2-py3-none-any.whl (330.9 kB view details)

Uploaded Python 3

File details

Details for the file miniverl-0.6.2.tar.gz.

File metadata

  • Download URL: miniverl-0.6.2.tar.gz
  • Upload date:
  • Size: 994.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for miniverl-0.6.2.tar.gz
Algorithm Hash digest
SHA256 bcd30863290c9c46c1e2c27c59d8ccfd3ec7e5934243f5bc86f7424d4f05333d
MD5 2befd4d90ceec998e374a68ed541f8d0
BLAKE2b-256 71f3fae716b9e3d0617aa63145d9d110ba3ff445da459032cf2a5faf8584dfb1

See more details on using hashes here.

Provenance

The following attestation bundles were made for miniverl-0.6.2.tar.gz:

Publisher: release.yml on DaoyuanLi2816/mini-verl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file miniverl-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: miniverl-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 330.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for miniverl-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 38131c3de838b480017b2f97df3e43d53e760f272c516522a470d2812f8a3803
MD5 286b39d4bc2c5dba7dfa7865294831d2
BLAKE2b-256 37f206e7ca76f41bea201edea84e5ead037d83acafc0ff542e223f4e2ec210b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for miniverl-0.6.2-py3-none-any.whl:

Publisher: release.yml on DaoyuanLi2816/mini-verl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page