Skip to content

fix(kimi_linear): diagnose CUDA token-zero degeneration #2292

Closed

Description

@inureyes

Problem

On Linux GB10, mlx-community/Kimi-Linear-48B-A3B-Instruct-4bit at revision 919175d75427f1c10cfc17e7254b53295edddf72 emits token ID 0 repeatedly, including with chunking disabled and on a short prompt. This blocks #1749 checkpoint validation and is separate from its no-ID chunking policy.

Reproduction evidence

Baseline main 190b83c3, CLI SHA256 592c33a141ccd7a497732e132ac6da302661e22400e27fbcdb2cb3ca858ae8ff, emitted ID 0 for all 64 tokens of a 3,411-token early-fact prompt with both the default chunk size and MLXCEL_PREFILL_CHUNK=0. A 21-token arithmetic prompt with chunking disabled also emitted ID 0, decoded as !.

The #1749 candidate from main 448935b6 plus the frozen policy diff, CLI SHA256 c0b0319f0b4f0302e9e5dccf02f4f403453ec3dc9aa7e5e1a4ce625f3f060eb7, reproduced both results and exited successfully. Identical invalid output is not numerical parity or an accuracy pass.

Current DirectEngine prefill passes a stable sequence ID, so the no-ID reset addressed by #1749 does not explain this observation by itself. Qwen2.5-VL CUDA inference on the same host produced a correct video answer.

Acceptance criteria

  • A minimized numerical regression identifies whether loading, quantization, model computation, or CUDA execution causes the degeneration.
  • The pinned checkpoint answers the 21-token 2 + 2 prompt with exactly 4 on GB10 instead of token ID 0.
  • The 3,411-token prompt answers exactly AMBER-RAVEN-7429 with both default chunking and MLXCEL_PREFILL_CHUNK=0.
  • Before-and-after token IDs, outputs, build revisions, checkpoint revision, and both chunk settings are recorded.

Duplicate search refreshed 2026-10-13 across open and closed issues using token-zero, CUDA degeneration, exclamation-output, and GB10 terms. No dedicated Kimi Linear duplicate was found; closed #630 concerns the generic nvfp4 path and does not cover this checkpoint behavior.

Activity

  1. added
    status:ready
    type:bug
    priority:medium
    area:models
    area:inference
    platform:linux
    status:in-progress
    and removed
    status:ready
    on Oct 13, 2026
  2. added
    status:review
    and removed
    status:in-progress
    on Oct 13, 2026
  3. added a commit that references this issue on Oct 14, 2026
    d3cf28a
  4. 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:modelsplatform:linuxpriority:mediumstatus:reviewtype:bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions