Skip to content

Build the v0.4 consumer batched runtime - #30

Merged
DaoyuanLi2816 merged 5 commits into
mainfrom
v0.4-consumer-runtime
Aug 3, 2026
Merged

Build the v0.4 consumer batched runtime#30
DaoyuanLi2816 merged 5 commits into
mainfrom
v0.4-consumer-runtime

Conversation

@DaoyuanLi2816

@DaoyuanLi2816 DaoyuanLi2816 commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • add typed, mask-isolated padded update batches for SFT, offline KD and strict OPD
  • keep optimizer-group semantics while making physical batch size independently configurable
  • add a local typed role graph without Ray, DataProto, FSDP or distributed API emulation
  • add one-base student/teacher/optional-reference adapter ownership with failure-safe role restoration and standard student PEFT export
  • publish a preregistered RTX 4080 runtime matrix, profiler summary, data-bound Pareto SVG and systems-only frozen adapter

Measured result

The final matrix used Qwen3-0.6B NF4 weights with FP32 compute, eight fixed SQLite trajectories, one strict-OPD update, one warmup and three measured repetitions per cell.

  • dual batch-4: 3.866 trajectories/s, 3.035 GiB peak reserved, 1.63x sequential throughput
  • shared batch-4: 3.475 trajectories/s, 2.227 GiB peak reserved, 1.54x sequential throughput
  • sharing saved 26.6% reserved memory at batch-4 but was 10.1% slower than dual ownership
  • auto was not optimal because padding all eight trajectories added 1,636 tokens
  • trajectory and teacher-target digests were identical across all eight cells
  • all 12 preregistered loss/full-gradient/post-update-logit comparisons passed

Preregistration revisions 1.1 and 1.2 were public before the sole headline run. They record the non-headline diagnostics that replaced nondeterministic SDPA with eager attention and BF16 compute with FP32 compute so the original strict numerical gates remained meaningful.

Scientific scope

This is a systems release. It does not claim a task-quality gain, universal speedup across GPUs or models, a batched rollout server, or verified/distributed verl parity. The shared benchmark teacher is explicitly not a newly qualified teacher. No compatible preregistered 4B/7B adapter was available, so those cells remain not_run with reasons.

Validation

  • Ruff check and format check: pass
  • mypy: 84 source files, pass
  • full non-GPU/non-network suite: 1,448 passed, 6 deselected, 86.26% branch coverage
  • available GPU suite: 5 passed
  • available network suite: 3 passed
  • focused HF/config/runtime suites: pass, including one-base loading, optional frozen reference, role restoration and shared/dual update equivalence
  • both shipped Qwen recipes validate without downloads
  • package build and twine check: pass for wheel and sdist
  • Markdown/link, generated PyPI README and JSON Schema checks: pass
  • generated SVG byte comparison: pass; native and ~820 px visual inspection: pass
  • immutable calculator JSON SHA-256 remains 53fc1d4d5b7adee09618d77ad62d4086ba56b78569832d6fc7c3bcd5c2695bbc

Frozen artifacts

  • result: a302da31af99f1d29f1efd4e6b3dbeb6ea4ac956bba102ca8a1bee8dff0319eb
  • profiler: 66111cd7fc876cf1befea3297a1a51bcd99252c0bf8989c029381e1dc155a98b
  • Pareto SVG: 98645a668a7832423d28b621262292619615917f037adf7219ff1bf071fb2fea

@DaoyuanLi2816
DaoyuanLi2816 marked this pull request as ready for review August 3, 2026 01:20
@DaoyuanLi2816
DaoyuanLi2816 merged commit 9914c6d into main Aug 3, 2026
10 checks passed
@DaoyuanLi2816
DaoyuanLi2816 deleted the v0.4-consumer-runtime branch August 3, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant