convert : map self-contained DFlash draft embed_tokens (#2062)

DFlashDraftModel.modify_tensors rewrites flat-named norm.weight and layers.N.* to their model.* form but not embed_tokens.weight, so a draft that carries its own (self-contained) token embeddings with flat naming fails with 'Can not map tensor embed_tokens.weight'. Handle it the same way as norm.weight so self-contained drafts convert.

Co-authored-by: Joel Farthing <262452229+joelfarthing@users.noreply.github.com>
This commit is contained in:
Joel Farthing
2026-07-01 15:45:02 +02:00
committed by GitHub
co-authored by Joel Farthing
parent 29431b31c8
commit 068b173649
+2
View File
@@ -2592,6 +2592,8 @@ class DFlashDraftModel(Qwen3Model):
return [(f"{gguf.TENSOR_NAMES[gguf.MODEL_TENSOR.ATTN_SINKS].format(bid=bid)}.weight", data_torch)]
if name == "norm.weight":
name = "model.norm.weight"
elif name == "embed_tokens.weight":
name = "model.embed_tokens.weight"
elif name.startswith("layers."):
name = f"model.{name}"