mirror of
https://github.com/deepseek-ai/DeepSeek-Coder.git
synced 2025-02-23 06:09:07 -05:00
Update finetune_deepseekcoder.py
Using torch.float16 or torch.cuda.amp can significantly reduce memory usage and speed up training by performing computations with lower precision.
This commit is contained in:
parent
b7ba565956
commit
78d0fd332a
@ -143,7 +143,7 @@ def train():
|
|||||||
|
|
||||||
model = transformers.AutoModelForCausalLM.from_pretrained(
|
model = transformers.AutoModelForCausalLM.from_pretrained(
|
||||||
model_args.model_name_or_path,
|
model_args.model_name_or_path,
|
||||||
torch_dtype=torch.bfloat16
|
torch_dtype=torch.float16
|
||||||
)
|
)
|
||||||
|
|
||||||
if training_args.local_rank == 0:
|
if training_args.local_rank == 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user