Skip to content

fix(qwen3_next): correct the no-ID chunked prefill contract #2285

Closed

Description

@inureyes

Problem

The #1749 sibling audit found that qwen3_next 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/qwen3_next.rs:1714. 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 #600 fixes per-sequence isolation, not the no-ID continuation contract.

Activity

  1. added
    status:ready
    type:bug
    priority:medium
    area:models
    area:inference
    on Oct 13, 2026
  2. added
    status:in-progress
    status:review
    and removed
    status:ready
    status:in-progress
    on Oct 13, 2026
  3. added
    status:done
    and removed
    status:review
    on Oct 13, 2026
  4. added a commit that references this issue on Oct 14, 2026
    90d78fc
  5. added this to the 0.8 milestone on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:inferencearea:modelspriority:mediumstatus:donetype:bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions