parent
af18b0dce7
commit
01d8cb1ca7
|
@ -71,6 +71,7 @@ def load_model_and_tokenizer(
|
|||
tokenizer = AutoTokenizer.from_pretrained(
|
||||
model_args.model_name_or_path,
|
||||
use_fast=model_args.use_fast_tokenizer,
|
||||
split_special_tokens=model_args.split_special_tokens,
|
||||
padding_side="right", # training with left-padded tensors in fp16 precision may cause overflow
|
||||
**config_kwargs
|
||||
)
|
||||
|
@ -184,6 +185,7 @@ def load_model_and_tokenizer(
|
|||
model = AutoModelForCausalLM.from_pretrained(
|
||||
model_to_load,
|
||||
config=config,
|
||||
torch_dtype=getattr(config, "torch_dtype"),
|
||||
low_cpu_mem_usage=(not is_deepspeed_zero3_enabled()),
|
||||
**config_kwargs
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue