[GH-ISSUE #420] 0.1.32 aborts with mmq.cuh:1555 fatal error (J_best=0) on a 77-token prompt, SM 12.0, 2 GPUs, Swift IQ3_XXS #194

Closed
opened 2026-11-04 01:40:49 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @qni-live on GitHub (Oct 1, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/420

Engine 0.1.32 aborts on the first longer request. Engine 0.1.30 with the same settings, model and pack runs fine.

Setup

  • 2x RTX PRO 4500 Blackwell (SM 12.0, 32 GB each), driver 595.84, CUDA 13.3 toolkit, Ubuntu 26.04
  • Engine built from the v0.1.32 source tarball with setup.py --build (arch 120, source built on this PC, not the ready-made engine)
  • Model: Swift 1.5 IQ3_XXS pack, --layer-split 25, --kv k8v4, --spec 5 --spec-min-p 0.5, MTP, --prefill auto, vision on
  • Same config file as the 0.1.30 run that works (only exe points at the 0.1.32 build)

What happens

  • Server starts and prints ready.
  • First request: a chat completion with a 77-token prompt (max_tokens 256, temperature 0).
  • The server prints reading the prompt: 77 tokens, 10 s so far, then the engine aborts:
J_best=0
.../third_party/llama.cpp/ggml/src/ggml-cuda/template-instances/../mmq.cuh:1555: fatal error
  • Happened in 2 of 2 runs with that request.
  • Three much shorter requests ("Say hi. 1/2/3", about 20 tokens, max_tokens 20) in the same setup did answer, also with --prefill 512 and with --spec 4. I did not find the exact prompt length where it starts, and I did not test other models or one GPU.

Not tested: whether it is my local build or the release code; whether one GPU or another quantization shows it.

Logs available: server log with the abort, the config file. I can try a given length or flag if you tell me what is useful.

Originally created by @qni-live on GitHub (Oct 1, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/420 Engine 0.1.32 aborts on the first longer request. Engine 0.1.30 with the same settings, model and pack runs fine. Setup - 2x RTX PRO 4500 Blackwell (SM 12.0, 32 GB each), driver 595.84, CUDA 13.3 toolkit, Ubuntu 26.04 - Engine built from the v0.1.32 source tarball with `setup.py --build` (arch 120, source built on this PC, not the ready-made engine) - Model: Swift 1.5 IQ3_XXS pack, `--layer-split 25`, `--kv k8v4`, `--spec 5 --spec-min-p 0.5`, MTP, `--prefill auto`, vision on - Same config file as the 0.1.30 run that works (only `exe` points at the 0.1.32 build) What happens - Server starts and prints `ready`. - First request: a chat completion with a 77-token prompt (`max_tokens 256`, temperature 0). - The server prints `reading the prompt: 77 tokens, 10 s so far`, then the engine aborts: ``` J_best=0 .../third_party/llama.cpp/ggml/src/ggml-cuda/template-instances/../mmq.cuh:1555: fatal error ``` - Happened in 2 of 2 runs with that request. - Three much shorter requests ("Say hi. 1/2/3", about 20 tokens, `max_tokens 20`) in the same setup did answer, also with `--prefill 512` and with `--spec 4`. I did not find the exact prompt length where it starts, and I did not test other models or one GPU. Not tested: whether it is my local build or the release code; whether one GPU or another quantization shows it. Logs available: server log with the abort, the config file. I can try a given length or flag if you tell me what is useful.
Author
Owner

@Niko1221 commented on GitHub (Oct 1, 2026):

Thanks for the clear report. J_best=0 means ggml's MMQ found no tile size that fits for that matrix on that card. Our builds use the same pinned ggml on the same compute capability (an sm_120 RTX 5070 here) without this, so we need to find which matrix it is. Your 20-token requests worked and the 77-token one didn't, and from 64 tokens the draft layer reads the prompt in one batch through a Q8_0 MMQ product. So that's the first suspect; the experts' MMQ path is the other.

Could you run the 77-token request once with each of these in the config's "env" (one at a time) and say which one avoids the abort?

  1. "STRATA_MTP_BATCH_F16": "1": the draft layer's batch pass on FP16 instead of MMQ.
  2. "STRATA_PREFILL_MMQ": "0": the experts' prompt products without MMQ.

Also useful:

  • whether one GPU ("gpu": 0, no layer split) shows it;
  • the engine log lines just before the abort, with "STRATA_TRACE": "1";
  • nvidia-smi -q | grep -i -A2 "compute mode\|MIG", in case the cards are partitioned.

Engine 0.1.33 is out (./setup.sh --build rebuilds), but it doesn't change this path, so please test on whichever is easier. Either switch above is also a workaround until it's fixed: (1) costs nothing measurable, while (2) makes prompts slower.

<!-- gh-comment-id:5940920005 --> @Niko1221 commented on GitHub (Oct 1, 2026): Thanks for the clear report. `J_best=0` means ggml's MMQ found no tile size that fits for that matrix on that card. Our builds use the same pinned ggml on the same compute capability (an sm_120 RTX 5070 here) without this, so we need to find which matrix it is. Your 20-token requests worked and the 77-token one didn't, and from 64 tokens the draft layer reads the prompt in one batch through a Q8_0 MMQ product. So that's the first suspect; the experts' MMQ path is the other. Could you run the 77-token request once with each of these in the config's `"env"` (one at a time) and say which one avoids the abort? 1. `"STRATA_MTP_BATCH_F16": "1"`: the draft layer's batch pass on FP16 instead of MMQ. 2. `"STRATA_PREFILL_MMQ": "0"`: the experts' prompt products without MMQ. Also useful: - whether one GPU (`"gpu": 0`, no layer split) shows it; - the engine log lines just before the abort, with `"STRATA_TRACE": "1"`; - `nvidia-smi -q | grep -i -A2 "compute mode\|MIG"`, in case the cards are partitioned. Engine [0.1.33](https://github.com/Niko1221/Strata/releases/tag/v0.1.33) is out (`./setup.sh --build` rebuilds), but it doesn't change this path, so please test on whichever is easier. Either switch above is also a workaround until it's fixed: (1) costs nothing measurable, while (2) makes prompts slower.
Author
Owner

@qni-live commented on GitHub (Oct 1, 2026):

Thanks, results on 0.1.32 (my source build, sm_120), same 76-token prompt each time:

  • baseline: abort (J_best=0, mmq.cuh:1555)
  • STRATA_MTP_BATCH_F16=1: still aborts
  • STRATA_PREFILL_MMQ=0: no abort, answer returned
  • single GPU (gpu 0, no layer split): still aborts
  • STRATA_TRACE=1: abort in "prompt chunk 0" (last lines: "request 76 0", "prompt start 75 -1", "lent 189 slots for 256 tokens", "prompt chunk 0 of 71")
    nvidia-smi: Compute Mode Default, MIG N/A on both cards.

So it looks like the experts' prompt MMQ path, not the draft layer and not the layer split. I have not measured how much slower prompts are with PREFILL_MMQ=0, and I have not tried 0.1.33.

I can only continue testing tomorrow, so there is no rush on your side. Happy to test 0.1.33 or any other flag then.

<!-- gh-comment-id:5941708283 --> @qni-live commented on GitHub (Oct 1, 2026): Thanks, results on 0.1.32 (my source build, sm_120), same 76-token prompt each time: - baseline: abort (J_best=0, mmq.cuh:1555) - STRATA_MTP_BATCH_F16=1: still aborts - STRATA_PREFILL_MMQ=0: no abort, answer returned - single GPU (gpu 0, no layer split): still aborts - STRATA_TRACE=1: abort in "prompt chunk 0" (last lines: "request 76 0", "prompt start 75 -1", "lent 189 slots for 256 tokens", "prompt chunk 0 of 71") nvidia-smi: Compute Mode Default, MIG N/A on both cards. So it looks like the experts' prompt MMQ path, not the draft layer and not the layer split. I have not measured how much slower prompts are with PREFILL_MMQ=0, and I have not tried 0.1.33. I can only continue testing tomorrow, so there is no rush on your side. Happy to test 0.1.33 or any other flag then.
Author
Owner

@Niko1221 commented on GitHub (Oct 2, 2026):

Thanks for the report. We couldn't reproduce it here: the same pinned ggml on an sm_120 card never runs out of tiles. So 0.1.34 makes the engine robust against it. Before the prompt path uses llama.cpp's MMQ for a type, it asks, on every visible GPU, the same question MMQ's tile choice asks: is there a tile for this type and matrix shape that fits the card's shared memory? Where there isn't, that product takes the existing FP16 path instead of aborting with J_best=0, and the engine prints one line naming the type, the card, its compute capability and its shared memory. On cards where everything fits (all ours), nothing changes. Please update; if that line appears in your log, post it here and reopen. It tells us exactly which matrix your cards can't tile. Run START-HERE.bat (Linux: ./setup.sh) once to update.

<!-- gh-comment-id:5943822110 --> @Niko1221 commented on GitHub (Oct 2, 2026): Thanks for the report. We couldn't reproduce it here: the same pinned ggml on an sm_120 card never runs out of tiles. So [0.1.34](https://github.com/Niko1221/Strata/releases/tag/v0.1.34) makes the engine robust against it. Before the prompt path uses llama.cpp's MMQ for a type, it asks, on every visible GPU, the same question MMQ's tile choice asks: is there a tile for this type and matrix shape that fits the card's shared memory? Where there isn't, that product takes the existing FP16 path instead of aborting with `J_best=0`, and the engine prints one line naming the type, the card, its compute capability and its shared memory. On cards where everything fits (all ours), nothing changes. Please update; if that line appears in your log, post it here and reopen. It tells us exactly which matrix your cards can't tile. Run `START-HERE.bat` (Linux: `./setup.sh`) once to update.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#194
No description provided.