mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-02 03:32:50 +08:00
[config] fix export max len (#7230)
Former-commit-id: 728c2f68190129e88ac375b453c60ed0d6bebbd8
This commit is contained in:
parent
9a0044ef5e
commit
4e68828e46
@ -418,7 +418,8 @@ def get_infer_args(args: Optional[Union[Dict[str, Any], List[str]]] = None) -> _
|
||||
|
||||
if model_args.export_dir is not None and model_args.export_device == "cpu":
|
||||
model_args.device_map = {"": torch.device("cpu")}
|
||||
model_args.model_max_length = data_args.cutoff_len
|
||||
if data_args.cutoff_len != DataArguments().cutoff_len: # override cutoff_len if it is not default
|
||||
model_args.model_max_length = data_args.cutoff_len
|
||||
else:
|
||||
model_args.device_map = "auto"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user