mirror of
https://github.com/deepseek-ai/DeepSeek-Coder
synced 2025-06-26 18:25:53 +00: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:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user