Commit 1f9533150 for llama.cpp

commit 1f9533150db46df37370e645e79282e570cb3c9e
Author: Xiaoyuan Wang <xiaoyuanwang765@gmail.com>
Date:   Wed Dec 2 06:09:55 2026 -0800

    convert : recognize DeepSeek-V4 FP8 block scales in the scale check (#33510)

    * convert : recognize DeepSeek-V4 FP8 block scales in the scale check

    DeepSeek-V4 and V4.1 store the E8M0 block scale of an FP8 weight as "<stem>.scale", which their dequant_model consumes, but the source scale check from #28898 runs first and only knows the generic names.

    Assisted-by: Claude Code

    * convert : move the <stem>.scale name into the base scale check

    ModelBase._has_fp8_source_scale now accepts "<stem>.scale" for every model, so DeepseekV4Model needs no override. The test is removed, as asked in review.

    Assisted-by: Claude Code

    * convert : derive the .scale name from the .weight suffix

    Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co>
    Assisted-by: Claude Code

    ---------

    Co-authored-by: Xiaoyuan Wang <174581044+XiaoyuanWang111@users.noreply.github.com>
    Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co>

diff --git a/conversion/base.py b/conversion/base.py
index 89e7c32bf..025dc4790 100644
--- a/conversion/base.py
+++ b/conversion/base.py
@@ -1509,7 +1509,7 @@ class ModelBase:
         return is_ple if self.ple_only else not is_ple

     def _has_fp8_source_scale(self, name: str) -> bool:
-        scale_names = (name + "_scale", name + "_scale_inv", name.removesuffix("weight") + "qscale_weight")
+        scale_names = (name + "_scale", name + "_scale_inv", name.removesuffix("weight") + "qscale_weight", name.removesuffix(".weight") + ".scale")
         return any(scale_name in self.model_tensors for scale_name in scale_names)

     def prepare_tensors(self):