[GH-ISSUE #500] pack_gguf: a GGUF with no DSpark geometry (ISTA's GSQ-RCO) packs a drafter that never drafts, with no warning #204

Closed
opened 2026-10-29 21:22:32 +07:00 by bsakaguchi · 1 comment
Owner

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

ISTA's GSQ-RCO GGUF of DeepSeek-V4.1-Flash-1017 (#440; loading added in v1.1.27) carries one DSpark key, deepseek41.dspark_target_layer_ids = [37, 38, 39], which NEWER_KEYS maps to dspark.target_layers. The other five aren't there under any spelling. tools/ds4/pack_gguf.py reads them with a default of 0 (g("dspark.block_size", 0) and so on), so a pack built with --drafter writes:

dspark_block_size 0
dspark_noise_token_id 0
dspark_markov_rank 0
dspark_n_routed_experts 0
dspark_num_experts_per_tok 0
dspark_target_layer_ids 37,38,39

The engine then loads the drafter, VRAM and experts included, but draft_block() is 0, so it never drafts. Nothing in the log says so; the only sign is that no drafts N of M kept lines appear. Re-checked on v1.1.28: same zeros. #453 lists automatic DSpark setup as outside its scope, so this may be known, but the silent part cost us a start.

Writing DeepSeek-V4.1-Flash's own values into the pack's ds4.txt makes it work: block 5, noise token 128799, markov rank 256, 128 experts, top 3. We took them from unsloth's UD-Q8_K_XL metadata shard; Strata's pack of these files carries the same. With tensor parallel 2 on v1.1.27, code decode went from ~40 to ~51 tok/s, with 84% of drafts kept.

Possible fixes, any one is enough:

  • refuse, or warn loudly, when --drafter is given and dspark_block_size comes out 0;
  • fall back to DeepSeek-V4.1-Flash's published DSpark geometry when the GGUF has none;
  • or have drafter_pack.py write the geometry into the drafter's .json, which it builds from DeepSeek's checkpoint and so has the config for. The pack would then take it from there, the way it takes the vision tower's geometry from vision_pack.py's folder. dspark-xs2.json today has only from, experts, dense, tensors.

Repro: pack_gguf.py --model <dir> --out <pack> --drafter <dspark-xs2.json> --shards <the 4 IQ2_XXS shards> DeepSeek-V4.1-Flash-Engram-IQ4_NL.gguf, then grep dspark <pack>/ds4.txt.

Originally created by @noonghunna on GitHub (Oct 26, 2026). Original GitHub issue: https://github.com/mw00/project-maya/issues/500 ISTA's GSQ-RCO GGUF of DeepSeek-V4.1-Flash-1017 (#440; loading added in v1.1.27) carries one DSpark key, `deepseek41.dspark_target_layer_ids` = [37, 38, 39], which `NEWER_KEYS` maps to `dspark.target_layers`. The other five aren't there under any spelling. `tools/ds4/pack_gguf.py` reads them with a default of 0 (`g("dspark.block_size", 0)` and so on), so a pack built with `--drafter` writes: ``` dspark_block_size 0 dspark_noise_token_id 0 dspark_markov_rank 0 dspark_n_routed_experts 0 dspark_num_experts_per_tok 0 dspark_target_layer_ids 37,38,39 ``` The engine then loads the drafter, VRAM and experts included, but `draft_block()` is 0, so it never drafts. Nothing in the log says so; the only sign is that no `drafts N of M kept` lines appear. Re-checked on v1.1.28: same zeros. #453 lists automatic DSpark setup as outside its scope, so this may be known, but the silent part cost us a start. Writing DeepSeek-V4.1-Flash's own values into the pack's `ds4.txt` makes it work: block 5, noise token 128799, markov rank 256, 128 experts, top 3. We took them from unsloth's UD-Q8_K_XL metadata shard; Strata's pack of these files carries the same. With tensor parallel 2 on v1.1.27, code decode went from ~40 to ~51 tok/s, with 84% of drafts kept. Possible fixes, any one is enough: - refuse, or warn loudly, when `--drafter` is given and `dspark_block_size` comes out 0; - fall back to DeepSeek-V4.1-Flash's published DSpark geometry when the GGUF has none; - or have `drafter_pack.py` write the geometry into the drafter's `.json`, which it builds from DeepSeek's checkpoint and so has the config for. The pack would then take it from there, the way it takes the vision tower's geometry from `vision_pack.py`'s folder. `dspark-xs2.json` today has only `from`, `experts`, `dense`, `tensors`. **Repro:** `pack_gguf.py --model <dir> --out <pack> --drafter <dspark-xs2.json> --shards <the 4 IQ2_XXS shards> DeepSeek-V4.1-Flash-Engram-IQ4_NL.gguf`, then `grep dspark <pack>/ds4.txt`.
Author
Owner

@mw00 commented on GitHub (Oct 27, 2026):

Thank you for the clear report and the values. In v1.1.30 pack_gguf.py no longer packs such a drafter silently:

  • When the GGUF lacks the DSpark keys, the pack takes them from the drafter's own .json (drafter_pack.py now records them when DeepSeek's config.json is beside the shards). Otherwise it uses DeepSeek-V4.1-Flash's own values (block 5, noise token 128799, Markov rank 256, 128 experts, top 3, targets 37-39) when the trunk and the drafter are that model's. It prints which values it took.
  • When neither applies, it leaves the drafter out with a warning instead of a drafter that loads and never drafts. A pack rebuilt from ISTA's GSQ-RCO GGUF with --drafter should now draft without editing ds4.txt.
<!-- gh-comment-id:6436263310 --> @mw00 commented on GitHub (Oct 27, 2026): Thank you for the clear report and the values. In v1.1.30 `pack_gguf.py` no longer packs such a drafter silently: - When the GGUF lacks the DSpark keys, the pack takes them from the drafter's own `.json` (`drafter_pack.py` now records them when DeepSeek's `config.json` is beside the shards). Otherwise it uses DeepSeek-V4.1-Flash's own values (block 5, noise token 128799, Markov rank 256, 128 experts, top 3, targets 37-39) when the trunk and the drafter are that model's. It prints which values it took. - When neither applies, it leaves the drafter out with a warning instead of a drafter that loads and never drafts. A pack rebuilt from ISTA's GSQ-RCO GGUF with `--drafter` should now draft without editing `ds4.txt`.
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#204
No description provided.