Spaces:
Runtime error
Runtime error
Update grpo_train.py
Browse files- grpo_train.py +2 -2
grpo_train.py
CHANGED
|
@@ -351,8 +351,8 @@ else:
|
|
| 351 |
_name = "CPU"
|
| 352 |
_cc = (0, 0)
|
| 353 |
|
| 354 |
-
USE_4BIT = _vram < 40 * 1024**3 # T4 (15 GB), L4 (24 GB) → 4-bit; A100 (80 GB) →
|
| 355 |
-
USE_BF16 = _cc >= (8, 0)
|
| 356 |
|
| 357 |
# #region agent log
|
| 358 |
_dlog("A", "grpo_train.py:gpu_detect", "GPU config resolved", {"name":_name,"vram_gb":round(_vram/1024**3,1),"cc":list(_cc),"USE_4BIT":USE_4BIT,"USE_BF16":USE_BF16})
|
|
|
|
| 351 |
_name = "CPU"
|
| 352 |
_cc = (0, 0)
|
| 353 |
|
| 354 |
+
USE_4BIT = _vram < 40 * 1024**3 # T4 (15 GB), L4 (24 GB) → 4-bit; A100 (80 GB) → full
|
| 355 |
+
USE_BF16 = _cc >= (8, 0) and not USE_4BIT # bf16 only when full-precision; 4-bit LoRA uses fp16 internally
|
| 356 |
|
| 357 |
# #region agent log
|
| 358 |
_dlog("A", "grpo_train.py:gpu_detect", "GPU config resolved", {"name":_name,"vram_gb":round(_vram/1024**3,1),"cc":list(_cc),"USE_4BIT":USE_4BIT,"USE_BF16":USE_BF16})
|