Jaswanth1210 commited on
Commit
b42adcc
·
1 Parent(s): 0d411fb

fix: add torch_dtype=bfloat16 to prevent Float/BFloat16 mismatch in GRPO

Browse files
Files changed (1) hide show
  1. train/grpo_train.py +1 -0
train/grpo_train.py CHANGED
@@ -115,6 +115,7 @@ def _load_model_and_tokenizer(model_id: str, seed: int):
115
  model = AutoModelForCausalLM.from_pretrained(
116
  model_id,
117
  quantization_config=bnb,
 
118
  device_map="auto",
119
  trust_remote_code=True,
120
  )
 
115
  model = AutoModelForCausalLM.from_pretrained(
116
  model_id,
117
  quantization_config=bnb,
118
+ torch_dtype=torch.bfloat16,
119
  device_map="auto",
120
  trust_remote_code=True,
121
  )