Skip to content

Commit

Permalink
[Misc] Deepsek V2 fp8 Remapping
Browse files Browse the repository at this point in the history
Signed-off-by: Yida Wu <[email protected]>
  • Loading branch information
Concurrensee committed Jan 11, 2025
1 parent 91b361a commit 89b6687
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vllm/model_executor/models/deepseek_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
from vllm.model_executor.layers.sampler import SamplerOutput, get_sampler
from vllm.model_executor.layers.vocab_parallel_embedding import (
ParallelLMHead, VocabParallelEmbedding)
from vllm.model_executor.model_loader.weight_utils import default_weight_loader
from vllm.model_executor.model_loader.weight_utils import (
default_weight_loader, maybe_remap_kv_scale_name)
from vllm.model_executor.sampling_metadata import SamplingMetadata
from vllm.sequence import IntermediateTensors

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

# Remapping the name of FP8 kv-scale.
name = maybe_remap_kv_scale_name(name, params_dict)
if name is None:
continue

if is_pp_missing_parameter(name, self):
continue

Expand Down

0 comments on commit 89b6687

Please sign in to comment.