From a220c14f815b0860d4493b2f275bd27e8d0e2abb Mon Sep 17 00:00:00 2001 From: scut-cbq <1269935910@qq.com> Date: Tue, 16 Sep 2025 09:45:15 +0800 Subject: [PATCH] fix crash of DeepSeek-V3 update_weights_from_disk (#8863) Co-authored-by: parkeychen --- python/sglang/srt/layers/quantization/fp8.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/srt/layers/quantization/fp8.py b/python/sglang/srt/layers/quantization/fp8.py index b020e4188..d14e9b18e 100644 --- a/python/sglang/srt/layers/quantization/fp8.py +++ b/python/sglang/srt/layers/quantization/fp8.py @@ -358,8 +358,8 @@ class Fp8LinearMethod(LinearMethodBase): return else: weight, weight_scale = layer.weight.data, layer.weight_scale_inv.data - layer.weight = Parameter(weight, requires_grad=False) - layer.weight_scale_inv = Parameter(weight_scale, requires_grad=False) + layer.weight.data = weight.data + layer.weight_scale_inv.data = weight_scale.data else: layer.weight = Parameter(layer.weight.data, requires_grad=False)