Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- train_grpo.py +5 -4
train_grpo.py
CHANGED
|
@@ -221,10 +221,11 @@ print(f"GPU: {torch.cuda.get_device_name(0)}")
|
|
| 221 |
model, tokenizer = FastLanguageModel.from_pretrained(
|
| 222 |
model_name=MODEL_NAME,
|
| 223 |
max_seq_length=MAX_SEQ_LENGTH,
|
| 224 |
-
#
|
| 225 |
-
#
|
| 226 |
-
|
| 227 |
-
|
|
|
|
| 228 |
)
|
| 229 |
|
| 230 |
model = FastLanguageModel.get_peft_model(
|
|
|
|
| 221 |
model, tokenizer = FastLanguageModel.from_pretrained(
|
| 222 |
model_name=MODEL_NAME,
|
| 223 |
max_seq_length=MAX_SEQ_LENGTH,
|
| 224 |
+
# Use bfloat16 without 4bit quantization to avoid Unsloth 2026.4.8
|
| 225 |
+
# bug where quantized LoRA kernel hits Half/Float dtype mismatch.
|
| 226 |
+
# L40S has 44GB VRAM so Qwen2.5-1.5B fits easily in bf16.
|
| 227 |
+
dtype=torch.bfloat16,
|
| 228 |
+
load_in_4bit=False,
|
| 229 |
)
|
| 230 |
|
| 231 |
model = FastLanguageModel.get_peft_model(
|