Commit 1faf662d authored by zhuwenwen's avatar zhuwenwen
Browse files

skip is_v32

parent 9ae6b242
...@@ -7,7 +7,7 @@ import os ...@@ -7,7 +7,7 @@ import os
# torch.compile needs typing.List. It will fail torch.library.infer_schema # torch.compile needs typing.List. It will fail torch.library.infer_schema
# otherwise # otherwise
from typing import List # noqa: UP035 from typing import List # noqa: UP035
from typing import Any, Callable, Optional, Union, List from typing import Any, Callable, Optional, Union, List, Dict
import torch import torch
......
...@@ -938,7 +938,8 @@ class DeepseekV2MLAAttention(nn.Module): ...@@ -938,7 +938,8 @@ 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,
...@@ -1116,7 +1117,8 @@ class DeepseekV2Model(nn.Module): ...@@ -1116,7 +1117,8 @@ 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