Skip to content

fix: correct RWKV7 prefill state contract - #2297

Merged
inureyes merged 7 commits into
mainfrom
fix/issue-2286-rwkv7-chunk-contract
Oct 14, 2026
Merged

inureyes merged 7 commits into
mainfrom
fix/issue-2286-rwkv7-chunk-contract

Conversation

@inureyes

@inureyes inureyes commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Disable chunked prefill for RWKV7 because multi-token forwards without a sequence ID deliberately reset recurrent state. Preserve independent-prompt behavior and stable-ID continuation. A loaded regression also exposed an extra matrix-product axis: squeeze the final singleton axis before stacking steps so per-head normalization receives [B, T, H, D], while recurrent state remains [B, H, D, D].

Integrate main d3cf28ac, including MLX 243bdf09 and mlxcelverse. Update the deterministic test fixture's parity expression for the current Clippy lint without changing generated weights.

Validation:

  • Rebuilt CUDA test-fast source passes all five RWKV7 tests, including the nonzero-weight loaded-model regression for no-ID reset and stable-ID split continuation. The original pre-fix fixture reproduced the native output-shape failure.
  • CUDA Clippy (--lib --tests, warnings denied), formatting, and diff checks pass.
  • Historical shared validation passed 123 Python and 49 WebUI tests; bilingual reports distinguish that evidence from the fresh pin revalidation.

Review found no remaining blocking correctness, security, or performance issue. Whole-prompt prefill may use more transient memory than chunked prefill; the capability cannot depend on whether a caller supplies an ID. Validation uses loaded synthetic weights, not an external checkpoint.

Closes #2286

@inureyes inureyes added status:review Under review type:bug Bug fixes, error corrections, or issue resolutions priority:medium Medium priority area:models Model architectures, weights, loading, metadata area:inference Generation, sampling, decoding (incl. speculative, DRY) labels Oct 13, 2026
Merge current main through the mlxcelverse migration and revalidate the loaded recurrent-state and output-shape contracts on MLX 243bdf09. All five focused CUDA regressions pass. Fix the test fixture parity expression for the current Clippy lint without changing its values; Clippy, formatting, and diff checks pass.

Refs #2286
@inureyes
inureyes merged commit b159c89 into main Oct 14, 2026
26 checks passed
@inureyes
inureyes deleted the fix/issue-2286-rwkv7-chunk-contract branch October 30, 2026 13:35
@inureyes inureyes added this to the 0.8 milestone Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:inference Generation, sampling, decoding (incl. speculative, DRY) area:models Model architectures, weights, loading, metadata priority:medium Medium priority status:review Under review type:bug Bug fixes, error corrections, or issue resolutions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(rwkv7): correct the no-ID chunked prefill contract

1 participant