[Feature] Integrate DeepEP into SGLang (#4232)

Co-authored-by: Cheng Wan <cwan39@gatech.edu>
Co-authored-by: Xuting Zhou <xutingz@nvidia.com>
This commit is contained in:
Jinyan Chen
2025-03-19 08:16:31 -07:00
committed by GitHub
co-authored by Cheng Wan Xuting Zhou
parent f9c53cbb42
commit f44db16c8e
12 changed files with 1228 additions and 35 deletions
+13 -2
View File
@@ -687,10 +687,19 @@ class MergedColumnParallelLinear(ColumnParallelLinear):
):
if loaded_shard_id is None:
if isinstance(param, PerTensorScaleParameter):
param.load_merged_column_weight(loaded_weight=loaded_weight, shard_id=0)
param.load_merged_column_weight(
loaded_weight=loaded_weight,
shard_id=0,
tp_rank=self.tp_rank,
tp_size=self.tp_size,
)
return
elif type(param) in (RowvLLMParameter, BasevLLMParameter):
param.load_merged_column_weight(loaded_weight=loaded_weight)
param.load_merged_column_weight(
loaded_weight=loaded_weight,
tp_rank=self.tp_rank,
tp_size=self.tp_size,
)
return
# TODO: @dsikka - move to parameter.py
self._load_fused_module_from_checkpoint(param, loaded_weight)
@@ -719,6 +728,8 @@ class MergedColumnParallelLinear(ColumnParallelLinear):
shard_offset=shard_offset,
shard_size=shard_size,
use_presharded_weights=self.use_presharded_weights,
tp_rank=self.tp_rank,
tp_size=self.tp_size,
)