mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-14 23:58:11 +08:00
parent
3a8b2890eb
commit
6a2cd129c0
@ -153,8 +153,9 @@ def load_model(
|
||||
load_class = AutoModelForVision2Seq
|
||||
else:
|
||||
load_class = AutoModelForCausalLM
|
||||
|
||||
if model_args.train_from_scratch:
|
||||
model = load_class.from_config(config)
|
||||
model = load_class.from_config(config, trust_remote_code=True)
|
||||
else:
|
||||
model = load_class.from_pretrained(**init_kwargs)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user