added trust_remote_code to deepspeed init loaderClass (#5237)
This commit is contained in:
parent
bfe2326a24
commit
c0bdcee646
1 changed files with 1 additions and 1 deletions
|
@ -162,7 +162,7 @@ def huggingface_loader(model_name):
|
|||
|
||||
# DeepSpeed ZeRO-3
|
||||
elif shared.args.deepspeed:
|
||||
model = LoaderClass.from_pretrained(path_to_model, torch_dtype=params['torch_dtype'])
|
||||
model = LoaderClass.from_pretrained(path_to_model, torch_dtype=params['torch_dtype'], trust_remote_code=params['trust_remote_code'])
|
||||
model = deepspeed.initialize(model=model, config_params=ds_config, model_parameters=None, optimizer=None, lr_scheduler=None)[0]
|
||||
model.module.eval() # Inference
|
||||
logger.info(f'DeepSpeed ZeRO-3 is enabled: {is_deepspeed_zero3_enabled()}')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue