Skip to content

Add response-only loop readout and RLTT objective primitives - #7

Closed
0z5a wants to merge 1 commit into
feature/huginn-looped-rlfrom
feature/looped-streamed-readout
Closed

0z5a wants to merge 1 commit into
feature/huginn-looped-rlfrom
feature/looped-streamed-readout

Conversation

@0z5a

@0z5a 0z5a commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Depends on feature/huginn-looped-rl at 71860e55800229d68fbf48aed64a4a2688e8f1bd (upstream draft vllm-project#464). This fork PR contains only the incremental readout/objective work.

Add a response-only, fixed-depth readout for Ouro, Nanbeige and Huginn. It includes the prompt-to-response boundary, runs Huginn's coda for every supervised loop, and reconstructs vocabulary tiles during backward. A separate unclipped RLTT objective primitive makes reference policy, terminal sampled/full KL, reduction and credit gradients explicit. Existing dense provider calls retain their behavior; online trainer dispatch is still pending.

Test result

111 CPU tests pass: 50 numerical/objective oracles, 42 three-family readout comparisons, six provider regressions, and 13 existing short-update/publication/resume regressions. FP64 finite differences, FP32/BF16 readout derivatives, all trainable recurrent parameters, recomputation, empty responses and logical-batch partition invariance are covered. Ruff and diff checks pass. Three additional provider-factory checks fail at the existing MCore training import because Triton is unavailable; no packages were changed.

FP32, one CPU thread, three independent process starts; each warms both arms and runs three dense/streamed/streamed/dense blocks. These are geometric-mean readout-only forward/backward times on a shared macOS host. The prototype is slower in all measured cases; this is a correctness and retained-storage foundation.

Response / vocabulary Objective Dense (ms) Streamed (ms) Dense / streamed speed Saved intermediate bytes before → after
64 / 1024 selected 0.316 0.765 0.414× 262,144 → 1,024
64 / 1024 selected + entropy + full KL 0.656 1.478 0.444× 786,432 → 1,024
256 / 4096 selected 5.186 7.179 0.722× 4,194,304 → 4,096
256 / 4096 selected + entropy + full KL 10.284 15.720 0.654× 12,582,912 → 4,096

Raw observations are in benchmarks/results/streamed-readout-cpu/; objective differences and gradient bounds are in docs/looped_readout_contract.md. Saved intermediate bytes exclude supplied inputs/parameters and do not measure peak memory or GPU memory. This is an RLTT objective reimplementation, not original-stack reproduction. Official-model GPU E2E, BF16 cross-engine scores, full-step acceleration and reward convergence remain unmeasured.

Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
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