Skip to content

GLM-5.3-Flash on CUDA answers "!!!!" past the 2,051-token dense window (0.3.5.1) #53

Closed

Description

@taussoe

What happens

On two DGX Sparks (GB10, 128 GB each), TensorFold 0.3.5.1 at beddbb7, Vontra/GLM-5.3-Flash-MLX-4bit-MTP,
both ranks started with --tp 2 --context 36864 --drafter none. A 32,770-token prompt (a synthetic codebase with one
hidden fact, then a question about it) returns a reply of only ! characters:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

It decodes that at ~110 tok/s, where normal replies run at 40-60 tok/s. Prompts within 2,051 tokens are fine:
short replies are normal and drafted == serial holds (9/9). --context 40960 is refused by the startup estimate
(largest window 40,888), so ~40k is the most this checkpoint gets on two Sparks today.

Reproduce

  1. Serve GLM-5.3-Flash on two Sparks with --context 36864.
  2. Send any prompt longer than ~2,100 tokens, e.g. 32k tokens of code, and ask about it.
  3. The reply is !!!!....

A fix we have running

We have GLM running past 2,051 tokens on the same Sparks by keeping DSA's 512-wide latent in the cache instead of
per-head keys and values (the layers are NoPE MLA, so the query can absorb kv_b's key blocks and the output
expand through its value blocks). With that, a 256k prompt fits and finds the hidden fact, and prompts are read at
~1,100 tok/s on 0.3.5.1's prefill kernels. Drafted replies stay byte-identical to serial ones. We'll open a PR with it
and the tests; happy to adapt it to how you'd like it structured.

Activity

  1. added a commit that references this issue on Sep 28, 2026
  2. ashhart commented on Sep 28, 2026

    @ashhart
    Owner

    Fixed in 0.3.6, and confirmed on real weights: on two DGX Sparks with the MLX 4-bit checkpoint, 0.3.5.1 answered "!!!!" at a 2,403-token prompt, and 0.3.6 finds the needle at every length we tried, up to 12,001 tokens. The cause: sparse attention kept each row's chunk partials in buffers sized for 128 rows, while prompts had started prefilling in 2,048-row chunks. So rows past 128 read other rows' partials, and the logits went to NaN, which greedy decoding reads as "!". The MTP head then drafted "!" too, which is why it looked fast. The kernels now take at most 128 rows a launch. Your #54 lands in 0.3.6.1, once its memory estimate covers the measured 256k peak. Thank you for the clear report. It made this quick to find.

    Release: https://github.com/ashhart/TensorFold/releases/tag/v0.3.6

  3. added a commit that references this issue on Oct 20, 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions