Fix deepseek awq v3 (#3450)

This commit is contained in:
Liangsheng Yin
2025-02-12 22:09:52 +08:00
committed by GitHub
parent 8adbc78b30
commit 8616357a97
4 changed files with 69 additions and 10 deletions

View File

@@ -421,11 +421,18 @@ class ColumnParallelLinear(LinearBase):
if len(loaded_weight.shape) == 0:
assert loaded_weight.numel() == 1
loaded_weight = loaded_weight.reshape(1)
param.load_column_parallel_weight(
loaded_weight,
tp_rank=self.tp_rank,
use_presharded_weights=self.use_presharded_weights,
)
from sglang.srt.layers.parameter import _ColumnvLLMParameter
if isinstance(param, _ColumnvLLMParameter):
# FIXME: why would we need this special case?
param.load_column_parallel_weight(
loaded_weight,
tp_rank=self.tp_rank,
use_presharded_weights=self.use_presharded_weights,
)
else:
param.load_column_parallel_weight(loaded_weight)
def forward(self, input_):
bias = self.bias if not self.skip_bias_add else None