Unverified Commit afcd3e10 authored by fzyzcjy's avatar fzyzcjy Committed by GitHub
Browse files

Tiny remove duplicated code (#11164)

parent 12d68183
...@@ -2618,14 +2618,6 @@ def read_system_prompt_from_file(model_name: str) -> str: ...@@ -2618,14 +2618,6 @@ def read_system_prompt_from_file(model_name: str) -> str:
return "" 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): def prepack_weight_if_needed(weight):
if weight.device != torch.device("cpu"): if weight.device != torch.device("cpu"):
return weight return weight
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment