Skip to content

Commit 33e0099

Browse files
Concurrenseemzusman
authored andcommitted
[Misc] Fix Deepseek V2 fp8 kv-scale remapping (vllm-project#11947)
Signed-off-by: Yida Wu <[email protected]>
1 parent c407e22 commit 33e0099

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

@@ -635,6 +636,11 @@ def load_weights(self, weights: Iterable[Tuple[str,
635636
if name.endswith(".bias") and name not in params_dict:
636637
continue
637638

639+
# Remapping the name of FP8 kv-scale.
640+
name = maybe_remap_kv_scale_name(name, params_dict)
641+
if name is None:
642+
continue
643+
638644
if is_pp_missing_parameter(name, self):
639645
continue
640646

0 commit comments

Comments
 (0)