Tiny remove duplicated code (#11164)

This commit is contained in:
fzyzcjy
2025-10-02 21:56:31 +08:00
committed by GitHub
parent 12d6818380
commit afcd3e1089

View File

@@ -2618,14 +2618,6 @@ def read_system_prompt_from_file(model_name: str) -> str:
return ""
def bind_or_assign(target, source):
if target is not None:
target.copy_(source)
return target
else:
return source
def prepack_weight_if_needed(weight):
if weight.device != torch.device("cpu"):
return weight