[Bugfix] Fix broken deepseek fp8 TP weights loading (#24367)

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
This commit is contained in:
Isotr0py
2025-09-07 00:23:12 +08:00
committed by GitHub
parent 0eadaeff7e
commit 00a4e56d8d
2 changed files with 5 additions and 2 deletions

View File

@@ -270,7 +270,8 @@ class Fp8LinearMethod(LinearMethodBase):
layer.weight_block_size = None
if self.block_quant:
tp_size = get_tensor_model_parallel_world_size()
tp_size = getattr(layer, "tp_size",
get_tensor_model_parallel_world_size())
assert self.quant_config.weight_block_size is not None
layer.weight_block_size = self.quant_config.weight_block_size
block_n, block_k = (