Repository navigation
Description
Problem
The #1749 sibling audit found that rwkv7 resets its internal recurrent state on a multi-token forward without a sequence ID, while retaining the default supports_chunked_prefill() == true. Legacy callers that split a prompt across no-ID forwards can therefore discard earlier chunks. Current DirectEngine prefill passes a stable sequence ID, so this is a capability and legacy-call contract defect, not evidence that today's CLI truncates this model.
Proposed change
Validate this family's no-ID chunking contract and either opt out of chunked prefill or introduce an explicit continuation mechanism. Preserve independent-prompt reset behavior and sequence-ID server state. Reuse the Kimi Linear fix from #1749 after it lands.
Acceptance criteria
- A loaded-model regression proves the selected chunking capability and state behavior.
- Separate prompts do not inherit stale state; sequence-ID continuations retain their state.
- Checkpoint or synthetic-fixture validation and any memory tradeoff are documented.
Audit location on main 448935b6: src/models/rwkv7.rs:1016. The default capability remains true at src/lib/mlxcel-core/src/generate.rs:285. Current DirectEngine uses the same ID for every piece at src/lib/mlxcel-core/src/engine/direct.rs:557; engine/prefill.rs:110-112 passes Some(step.seq_id). This avoids the reset defect in that path; full numerical chunk parity has not been established by this audit.
Duplicate search refreshed 2026-10-13 across open and closed issues: no dedicated duplicate found; #1749 requests this follow-up. Related closed #1220 fixes state reconstruction at every decode step, not multi-token no-ID continuation.
Activity
fix: opt Kimi Linear out of chunked prefill (#2293)
fix: reconcile RWKV7 prefill with the current MLX runtime
fix: correct RWKV7 prefill state contract (lablup#2297)