This commit is contained in:
Xuan Son Nguyen
2026-08-27 15:21:59 +02:00
parent 539c35e940
commit af1ffaf37f
2 changed files with 3 additions and 4 deletions
+2 -3
View File
@@ -15,7 +15,7 @@ from .qwen3vl import Qwen3VLVisionModel
@ModelBase.register("Qwen4ExpForConditionalGeneration", "Qwen4ExpForCausalLM")
@ModelBase.example("unsloth/Qwen3.8-Flash-Next")
@ModelBase.example("Qwen/Qwen3.8-Flash-Next")
class Qwen4ExpTextModel(_Qwen35MRopeMixin, _LinearAttentionVReorderBase):
"""Qwen3.8-Flash-Next.
@@ -98,7 +98,6 @@ class Qwen4ExpTextModel(_Qwen35MRopeMixin, _LinearAttentionVReorderBase):
self._read_hash_constants("ple_embedding.ngram_heads_vocab_sizes"))
def _image_token_id(self) -> int | None:
# base.py merges text_config into the root of hparams, where image_token_id already is
img = self.hparams.get("image_token_id")
return None if img is None else int(img)
@@ -242,6 +241,6 @@ class Qwen4ExpTextModel(_Qwen35MRopeMixin, _LinearAttentionVReorderBase):
@ModelBase.register("Qwen4ExpForConditionalGeneration")
@ModelBase.example("unsloth/Qwen3.8-Flash-Next")
@ModelBase.example("Qwen/Qwen3.8-Flash-Next")
class Qwen4ExpVisionModel(Qwen3VLVisionModel):
"""The vision tower is an unmodified Qwen3-VL ViT."""
+1 -1
View File
@@ -115,7 +115,7 @@ void llama_model_qwen4exp::load_arch_tensors(llama_model_loader & ml) {
GGML_ASSERT(ple_w != nullptr && "qwen4exp is missing the PLE n-gram table");
const int64_t ple_rows = ple_w->tensor->ne[1];
per_layer_tok_embd = create_tensor(tn(LLM_TENSOR_PER_LAYER_TOKEN_EMBD, "weight"),
{ hparams.ple_head_dim, ple_rows }, 0);
{ hparams.ple_head_dim, ple_rows }, TENSOR_READ_LAZY);
}
for (int il = 0; il < n_layer; ++il) {