Skip to content
Snippets Groups Projects
Commit 065ddaa7 authored by Hamid Shojanazeri's avatar Hamid Shojanazeri
Browse files

fixing the condition for moving to cuda

parent 20b061e0
No related branches found
No related tags found
Loading
......@@ -85,7 +85,7 @@ def train(model, train_dataloader,eval_dataloader, tokenizer, optimizer, lr_sche
for key in batch.keys():
if train_config.enable_fsdp:
batch[key] = batch[key].to(local_rank)
elif not train_config.quantization:
else:
batch[key] = batch[key].to('cuda')
outputs = model(**batch)
loss = outputs.loss
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment