Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/sglang/srt/models/llama_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def load_weights(self, weights: Iterable[Tuple[str, torch.Tensor]]):
elif "lm_head" in name:
continue
else:
LlamaForCausalLM.load_weights(self, [(name, loaded_weight)])
LlamaForCausalLM._legacy_load_weights(self, [(name, loaded_weight)])


EntryClass = LlamaForClassification
2 changes: 1 addition & 1 deletion python/sglang/srt/models/llama_reward.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def forward(
)

def load_weights(self, weights: Iterable[Tuple[str, torch.Tensor]]):
return LlamaForCausalLM.load_weights(self, weights)
return LlamaForCausalLM._legacy_load_weights(self, weights)


class LlamaForSequenceClassificationWithNormal_Weights(LlamaForSequenceClassification):
Expand Down
2 changes: 1 addition & 1 deletion python/sglang/srt/models/qwen2_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def load_weights(self, weights: Iterable[Tuple[str, torch.Tensor]]):
filtered_weights = [
(name, w) for name, w in weights if not name.startswith("lm_head")
]
return Qwen2ForCausalLM.load_weights(self, filtered_weights)
return Qwen2ForCausalLM._legacy_load_weights(self, filtered_weights)


EntryClass = [
Expand Down
2 changes: 1 addition & 1 deletion python/sglang/srt/models/qwen2_rm.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def load_weights(self, weights: Iterable[Tuple[str, torch.Tensor]]):
filtered_weights = [
(name, w) for name, w in weights if not name.startswith("lm_head")
]
return Qwen2ForCausalLM.load_weights(self, filtered_weights)
return Qwen2ForCausalLM._legacy_load_weights(self, filtered_weights)


EntryClass = [
Expand Down
Loading