"ssh:/git@developer.sourcefind.cn:2222/OpenDAS/vllm_cscc.git" did not exist on "1d7c29f5fecab930fbb28bf59f1bc4510abe335b"
Commit 81eaff62 authored by zhuwenwen's avatar zhuwenwen
Browse files

restore v32 support

parent e0ba5f60
...@@ -410,8 +410,8 @@ class DeepseekV32ForCausalLM(VerifyAndUpdateConfig): ...@@ -410,8 +410,8 @@ class DeepseekV32ForCausalLM(VerifyAndUpdateConfig):
hf_config = vllm_config.model_config.hf_config hf_config = vllm_config.model_config.hf_config
# Mirror the check in vllm/model_executor/models/deepseek_v2.py # Mirror the check in vllm/model_executor/models/deepseek_v2.py
# is_v32 = hasattr(hf_config, "index_topk") is_v32 = hasattr(hf_config, "index_topk")
# assert is_v32 assert is_v32
# For DeepSeekV3.2, we use a custom fp8 format as default (i.e. # For DeepSeekV3.2, we use a custom fp8 format as default (i.e.
# "auto") # "auto")
......
...@@ -65,8 +65,7 @@ class DeepSeekMultiTokenPredictorLayer(nn.Module): ...@@ -65,8 +65,7 @@ class DeepSeekMultiTokenPredictorLayer(nn.Module):
config.hidden_size, config.hidden_size,
bias=False) bias=False)
# self.is_v32 = hasattr(config, "index_topk") self.is_v32 = hasattr(config, "index_topk")
self.is_v32 = False
if self.is_v32: if self.is_v32:
topk_tokens = config.index_topk topk_tokens = config.index_topk
topk_indices_buffer = torch.empty( topk_indices_buffer = torch.empty(
......
...@@ -954,8 +954,7 @@ class DeepseekV2MLAAttention(nn.Module): ...@@ -954,8 +954,7 @@ class DeepseekV2MLAAttention(nn.Module):
mscale = yarn_get_mscale(scaling_factor, float(mscale_all_dim)) mscale = yarn_get_mscale(scaling_factor, float(mscale_all_dim))
self.scaling = self.scaling * mscale * mscale self.scaling = self.scaling * mscale * mscale
# self.is_v32 = hasattr(config, "index_topk") self.is_v32 = hasattr(config, "index_topk")
self.is_v32 = False
if self.is_v32: if self.is_v32:
self.indexer = Indexer(vllm_config, config, hidden_size, self.indexer = Indexer(vllm_config, config, hidden_size,
...@@ -1176,8 +1175,7 @@ class DeepseekV2Model(nn.Module): ...@@ -1176,8 +1175,7 @@ class DeepseekV2Model(nn.Module):
self.config = config self.config = config
self.vocab_size = config.vocab_size self.vocab_size = config.vocab_size
# self.is_v32 = hasattr(config, "index_topk") self.is_v32 = hasattr(config, "index_topk")
self.is_v32 = False
if self.is_v32: if self.is_v32:
topk_tokens = config.index_topk topk_tokens = config.index_topk
topk_indices_buffer = torch.empty( topk_indices_buffer = torch.empty(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment