[GH-ISSUE #658] --dump-logits writes only the header with a native (IQ) pack #271

Open
opened 2026-10-29 21:23:33 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @blaakstone on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/658

Version: v1.1.36 (f031a23). Same result on v1.1.34. Single RTX 5090.

What I ran (Qwen3.8-Flash-Next fine-tune, native pack, teacher forcing, one generated token):

build/maya --pack <pack> --native <model>.gguf --ple-gguf <model>.gguf \
  --tokens-file code.ids --max-new 1 --dump-logits code.logits \
  --spec 4 --prefill 512 --expert-cache auto --max-context 262144 --kv int8 \
  --expert-profile <pack>/expert-profile.bin

What happens: the run ends normally and prints logits dumped code.logits. The file is 8 bytes: a header that announces 248320 × 1495 rows, then no rows. Adding --prefill-until 1 gives the same result.

Why, from reading src/program/generate.cpp:

  • The rows are written only in the per-token loop (emit_logits → fwrite, around line 8259).
  • With a native pack, that loop exits at once: line 8124, if (native_pack) { spec_pos = pos; break; }. The rest runs in the speculative loop, which never writes to dump.
  • A native pack requires --spec T with T ≥ 2 (line 4884), so the option cannot be used with a native pack at all.

Suggestion: either write a row per position from the verify windows, or refuse --dump-logits with a native pack. Then the file would not announce rows it will never contain. Commit 50abdfa0 in Basalt has the same idea: "must not promise rows it will never write".

Why it matters to us: we compare engines and quants by KLD against BF16 reference logits. The DeepSeek and MiniMax paths have their own dumps, which work. On the Qwen path, we have no way to measure a native pack (for example a Flash-Next fine-tune).

Originally created by @blaakstone on GitHub (Oct 29, 2026). Original GitHub issue: https://github.com/mw00/project-maya/issues/658 **Version:** v1.1.36 (f031a23). Same result on v1.1.34. Single RTX 5090. **What I ran** (Qwen3.8-Flash-Next fine-tune, native pack, teacher forcing, one generated token): ``` build/maya --pack <pack> --native <model>.gguf --ple-gguf <model>.gguf \ --tokens-file code.ids --max-new 1 --dump-logits code.logits \ --spec 4 --prefill 512 --expert-cache auto --max-context 262144 --kv int8 \ --expert-profile <pack>/expert-profile.bin ``` **What happens:** the run ends normally and prints `logits dumped code.logits`. The file is 8 bytes: a header that announces 248320 × 1495 rows, then no rows. Adding `--prefill-until 1` gives the same result. **Why, from reading `src/program/generate.cpp`:** - The rows are written only in the per-token loop (`emit_logits` → `fwrite`, around line 8259). - With a native pack, that loop exits at once: line 8124, `if (native_pack) { spec_pos = pos; break; }`. The rest runs in the speculative loop, which never writes to `dump`. - A native pack requires `--spec T` with T ≥ 2 (line 4884), so the option cannot be used with a native pack at all. **Suggestion:** either write a row per position from the verify windows, or refuse `--dump-logits` with a native pack. Then the file would not announce rows it will never contain. Commit 50abdfa0 in Basalt has the same idea: "must not promise rows it will never write". **Why it matters to us:** we compare engines and quants by KLD against BF16 reference logits. The DeepSeek and MiniMax paths have their own dumps, which work. On the Qwen path, we have no way to measure a native pack (for example a Flash-Next fine-tune).
Sign in to join this conversation.
No labels
pull-request
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
mw00/project-maya#271
No description provided.