Skip to content

Commit 3c1ac5f

Browse files
fzyzcjytarinkk
authored andcommitted
Speedup shared expert weight construction by avoid cloning (sgl-project#5188)
1 parent 691686e commit 3c1ac5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/sglang/srt/models/deepseek_v2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,7 @@ def load_weights(self, weights: Iterable[Tuple[str, torch.Tensor]]):
16281628
f"mlp.experts."
16291629
f"{self.config.n_routed_experts + num_repeat}"
16301630
f".{suffix}",
1631-
weights_dict[shared_expert_weight_name].clone(),
1631+
weights_dict[shared_expert_weight_name],
16321632
)
16331633
)
16341634
names_to_remove += [shared_expert_weight_name]

0 commit comments

Comments
 (0)