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:
Rahul Dubey 2025-01-29 12:38:12 +05:30 committed by GitHub
parent b7ba565956
commit 78d0fd332a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: