[Engine] drafting: gguf_facts stops at the first string array, so a renamed llama.cpp GGUF never "fits" and DFlash2 is refused
メンテナーはふだん 6 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
terminal/strata_control/drafting.py の約580行目にある gguf_facts() から始めてください。ここではキーと値のループが最初の文字列配列で停止しています(break)。file_fit() の呼び出し元と、tests/terminal/test_drafting_file_fit.py にある既存のヘッダーフィクスチャ tests/terminal/data/flash_next_iq3s_header.gguf を読んでください。general.tags 配列がサイズ情報より前にある GGUF に対して gguf_facts() が layers、hidden、vocab を返し、そのケースをフィクスチャのテストで確認できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Area
speed, kernels, models, the server and API
Desktop app, Terminal or source?
Source (START-HERE.bat, setup.sh or a build)
What happened
file_fit() (dd015b8c3, "drafting: decide DFlash2 by what the model file is when its name is not one setup writes") reads a GGUF's header to decide whether a run config with an unknown model_name is Qwen3.8-Flash-Next. gguf_facts() walks the key/value pairs and stops at the first array whose elements are strings (terminal/strata_control/drafting.py:580 in v0.2.19):
else:
break # an array of words before the tokens: not looked into
GGUFs written by llama.cpp's converter carry general.tags (and often general.languages) among the general.* keys, before <arch>.block_count and <arch>.embedding_length. For those files the reader returns no sizes, and file_fit() answers family for a file that is exactly the model. The start then logs Drafting: MTP (DFlash2 is for Qwen3.8-Flash-Next only) and runs the MTP, also when DFlash2 is chosen by name.
Every llama.cpp-written GGUF on this PC reads that way. general.tags is key 16 in Unsloth's Qwen3.8-27B UD-Q4_K_M and UD-Q4_K_XL, and key 17 in a Qwen3.8-Flash-Next ModelOpt NVFP4 file converted by tools/nvfp4_convert.py:
Qwen3.8-27B-UD-Q4_K_M.gguf {'arch': 'qwen35', 'layers': None, 'hidden': None, 'vocab': None}
Qwen3.8-27B-UD-Q4_K_XL.gguf {'arch': 'qwen35', 'layers': None, 'hidden': None, 'vocab': None}
gemma-4-31B-it-Q4_0.gguf {'arch': 'gemma4', 'layers': None, 'hidden': None, 'vocab': None}
Flash-Next NVFP4 (ModelOpt) {'arch': 'qwen4exp', 'layers': None, 'hidden': None, 'vocab': None} -> file_fit: family
tests/terminal/data/flash_next_iq3s_header.gguf has no string array before tokenizer.ggml.tokens (its keys run general.architecture ... general.size_label, then qwen4exp.*), so test_drafting_file_fit.py passes.
Expected: the sizes are read past a string array, and a renamed Qwen3.8-Flash-Next GGUF fits.
A fix. Skip a string array (each element is a u64 length and its bytes) instead of stopping:
elif etype == 8:
for _ in range(count):
(slen,) = struct.unpack_from("<Q", head, pos)
pos += 8 + slen
else:
break
With it the NVFP4 file above reads {'arch': 'qwen4exp', 'layers': 48, 'hidden': 2560, 'vocab': 248320} and fits. A header fixture with general.tags before the sizes would cover it in test_drafting_file_fit.py.
Smallest steps or command that reproduce it
from strata_control import drafting as d
print(d.gguf_facts("<any llama.cpp-converted GGUF with general.tags>")) # layers / hidden / vocab: None
print(d.file_fit(["--native", "<a Qwen3.8-Flash-Next GGUF with general.tags>"], "<its data folder>")) # 'family'
Reproduction status
Reproduced locally
Strata version
Strata 0.2.15 through strata-nvfp4 0.2.15-nvfp4.7 (engine 0.1.61), where this was run. gguf_facts is byte-identical in v0.2.19, which was read, not run.
Graphics card, memory and system
RTX 5090 32 GB · 128 GB RAM · Windows 11
Model, size and settings
Unsloth Qwen3.8-27B UD-Q4_K_M and UD-Q4_K_XL, Gemma 4 31B Q4_0 (header read only); a Qwen3.8-Flash-Next ModelOpt NVFP4 checkpoint converted with tools/nvfp4_convert.py, served under its own model name
Logs
[strata] Drafting: MTP (DFlash2 is for Qwen3.8-Flash-Next only)
- 主要言語
- C++
- スター
- 11.6k
- フォーク
- 1k
- 平均マージ
- 17日 21時間
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Niko1221/Strata のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Niko1221/Strata#6731 · コメント 2 件 ·
メンテナーはふだん 6 日以内に返信
-
needs-format
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
Niko1221/Strata#6721 · コメント 1 件 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Niko1221/Strata#6698 · コメント 2 件 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Niko1221/Strata#6670 · コメント 2 件 ·
メンテナーはふだん 6 日以内に返信
Niko1221/Strata の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
sav-oss-org/ptusa_main#1610 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
open-astro/AlpacaBridge#2606 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Refactor force_torque_system integration test to use EcmScope対応中かも @patelshivani2283-lab が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
upnp > 18 fixesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
BZFlag-Dev/bzflag#407 ·