GLM-5.3-Flash-DFly2-B6 release does not load into `DFlashDraftModel` (config mismatch, mHC check, MoE key layout)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- json, python
- Lĩnh vực
- ai-infra-agents, machine-learning
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 460
- Fork
- 40
- Merge trung bình
- 1 giờ 4 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Tencent/AngelSpec
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
SGLang multi-node: auto-negotiated dist_init port can collide with pre-allocated engine portsĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Tất cả issue của Tencent/AngelSpec
Issue tương tự
-
ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
accepted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
future-agi/future-agi#5070 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
juandresrodca/AdminForge#69 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
deepset-ai/haystack-integrations#817 ·
Maintainer thường phản hồi trong vòng 12 ngày
-
[Bug]: test_remote_realpath_uses_argument_vector fails on Windows with Python 3.13+ (ntpath.isabs)Có thể đã có người làm @gouyu-hou đã nhận hôm nay. Đang mởtriage/confirmed
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
agentscope-ai/agentscope#4397 ·
Maintainer thường phản hồi trong vòng 2 ngày