diff --git a/python/sglang/srt/eplb/expert_location.py b/python/sglang/srt/eplb/expert_location.py index e4f5de8d1..04ce28c1d 100644 --- a/python/sglang/srt/eplb/expert_location.py +++ b/python/sglang/srt/eplb/expert_location.py @@ -773,7 +773,7 @@ def compute_initial_expert_location_metadata( # TODO unify with the utils function if data.endswith(".pt"): - data_dict = torch.load(data, weights_only=True) + data_dict = torch.load(data, weights_only=True, map_location="cpu") elif data.endswith(".json"): data_dict = json.loads(Path(data).read_text()) else: