Skip to content

Commit 89b6687

Browse files
committed
[Misc] Deepsek V2 fp8 Remapping
Signed-off-by: Yida Wu <[email protected]>
1 parent 91b361a commit 89b6687

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

vllm/model_executor/models/deepseek_v2.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
from vllm.model_executor.layers.sampler import SamplerOutput, get_sampler
4646
from vllm.model_executor.layers.vocab_parallel_embedding import (
4747
ParallelLMHead, VocabParallelEmbedding)
48-
from vllm.model_executor.model_loader.weight_utils import default_weight_loader
48+
from vllm.model_executor.model_loader.weight_utils import (
49+
default_weight_loader, maybe_remap_kv_scale_name)
4950
from vllm.model_executor.sampling_metadata import SamplingMetadata
5051
from vllm.sequence import IntermediateTensors
5152

@@ -619,6 +620,11 @@ def load_weights(self, weights: Iterable[Tuple[str,
619620
if name.endswith(".bias") and name not in params_dict:
620621
continue
621622

623+
# Remapping the name of FP8 kv-scale.
624+
name = maybe_remap_kv_scale_name(name, params_dict)
625+
if name is None:
626+
continue
627+
622628
if is_pp_missing_parameter(name, self):
623629
continue
624630

0 commit comments

Comments
 (0)