From 068b173649f2fd8dc96b35ada5a0b76d8985105d Mon Sep 17 00:00:00 2001 From: Joel Farthing Date: Wed, 1 Jul 2026 08:45:02 -0500 Subject: [PATCH] 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> --- convert_hf_to_gguf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/convert_hf_to_gguf.py b/convert_hf_to_gguf.py index fb683d36..bfc42f6e 100644 --- a/convert_hf_to_gguf.py +++ b/convert_hf_to_gguf.py @@ -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}"