GLM-5.3-Flash-DFly2-B6 release does not load into `DFlashDraftModel` (config mismatch, mHC check, MoE key layout)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- json, python
Línea de trabajo
Start with angelspec/models/draft/dflash.py around the DFlashConfig mHC validation and angelspec/config/dfly2_glm53_flash_draft_config.json, then inspect tools/convert_to_hf.py for checkpoint-key conversion. Reproduce loading the released config and checkpoint, including the missing embed_tokens.weight handling. Done means the released config loads, per-expert and fused MoE weights round-trip, and tests cover the mHC/MoE layout.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
angelspec/config/dfly2_glm53_flash_draft_config.json does not describe the released GLM-5.3-Flash-DFly2-B6:
| field | repo config | release config.json |
|---|---|---|
num_hidden_layers |
5 | 3 |
| target KV layers | 27, 31, 35, 39, 43 | 35, 39, 43 |
| MLP | dense, 12288 | MoE, 128 routed, top-3, 1 shared |
hc_mult |
1 | 4 (20 Sinkhorn iters) |
| hidden correction | plain | attentive, gated, hidden_embed, 4096 |
Building a config with the release values fails in DFlashConfig:
https://github.com/Tencent/AngelSpec/blob/main/angelspec/models/draft/dflash.py#L686-L690
if hc_mult > 1:
if attention_type != "dsv41_mla":
raise ValueError(
"hc_mult > 1 is DeepSeek-V4.1's mHC residual; set attention_type 'dsv41_mla'"
)
The release combines mHC with glm53_mla. With hc_mult, hc_sinkhorn_iters and hc_eps set on the config after construction, the forward runs.
The checkpoint also stores the MoE per expert (mlp.experts.<e>.{gate,up,down}_proj.weight, mlp.shared_experts.*, mlp.gate.weight, mlp.gate.e_score_correction_bias), while the draft MoE expects fused mlp.experts_{gate,up,down}_proj.weight of shape [E, in, out], mlp.shared_mlp.*, mlp.router.gate.weight and mlp.expert_bias. Nothing in tools/ converts between the two. Stacking the transposed per-expert weights and renaming the shared/router keys loads with no unexpected keys; only embed_tokens.weight is missing (taken from the target).
Loaded this way, the model matches an independent implementation of the release on GLM-5.3-Flash target features (layer 35/39/43 KV latents, indexer picks, final hidden) at 12 anchors over two prompts: corrected drafts identical at all 12 (60/60 slots), backbone hidden within ~1% relative.
Suggested fix: allow hc_mult > 1 with glm53_mla, ship the release config, and add a per-expert ↔ fused conversion (fused → per-expert in tools/convert_to_hf.py). Happy to send a PR with a round-trip test.
Env: Python 3.12, torch 2.15 (CPU), transformers 4.57.6, macOS.
- Lenguaje dominante
- Python
- Estrellas
- 460
- Forks
- 40
- Merge medio
- 1 h 4 min
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
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 Tencent/AngelSpec
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
SGLang multi-node: auto-negotiated dist_init port can collide with pre-allocated engine portsAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Todos los issues de Tencent/AngelSpec
Issues similares
-
ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
accepted
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
future-agi/future-agi#5070 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
juandresrodca/AdminForge#69 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
deepset-ai/haystack-integrations#817 ·
Los mantenedores suelen responder en 12 días
-
[Bug]: test_remote_realpath_uses_argument_vector fails on Windows with Python 3.13+ (ntpath.isabs)Posiblemente ocupada @gouyu-hou la tomó hoy. Abiertotriage/confirmed
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
agentscope-ai/agentscope#4397 ·
Los mantenedores suelen responder en 2 días