Tiny remove duplicated code (#11164)
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user