[Engine] drafting: gguf_facts stops at the first string array, so a renamed llama.cpp GGUF never "fits" and DFlash2 is refused
Los mantenedores suelen responder en 6 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- machine-learning
Línea de trabajo
Empieza con gguf_facts() en terminal/strata_control/drafting.py, alrededor de la línea 580, donde el bucle de clave/valor se detiene en el primer array de cadenas (break). Lee el llamador de file_fit() y la fixture de cabecera existente tests/terminal/data/flash_next_iq3s_header.gguf en tests/terminal/test_drafting_file_fit.py. Está terminado cuando gguf_facts() devuelve layers, hidden y vocab para un GGUF cuyo array general.tags aparece antes de los tamaños, y un test con fixture cubre ese caso.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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)
- Lenguaje dominante
- C++
- Estrellas
- 11.6k
- Forks
- 1k
- Merge medio
- 17 d 21 h
- PR fusionados (30 d)
- 3
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Niko1221/Strata
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Niko1221/Strata#6731 · 2 comentarios ·
Los mantenedores suelen responder en 6 días
-
needs-format
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Niko1221/Strata#6721 · 1 comentario ·
Los mantenedores suelen responder en 6 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Niko1221/Strata#6698 · 2 comentarios ·
Los mantenedores suelen responder en 6 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 6 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Niko1221/Strata#6670 · 2 comentarios ·
Los mantenedores suelen responder en 6 días
Todos los issues de Niko1221/Strata
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
sav-oss-org/ptusa_main#1610 ·
Los mantenedores suelen responder en 1 día
-
Command gate: one shared constant for the just-below-1e-9 MoveAxis stop epsilon (ZWO, Bisque)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
open-astro/AlpacaBridge#2606 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Refactor force_torque_system integration test to use EcmScopePosiblemente ocupada @patelshivani2283-lab la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
upnp > 18 fixesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
BZFlag-Dev/bzflag#407 ·