Spaces:
Runtime error
Runtime error
Update train.py
Browse files
train.py
CHANGED
|
@@ -133,7 +133,9 @@ training_args = TrainingArguments(
|
|
| 133 |
save_strategy="epoch",
|
| 134 |
remove_unused_columns=False,
|
| 135 |
gradient_checkpointing=True,
|
| 136 |
-
fp16=
|
|
|
|
|
|
|
| 137 |
)
|
| 138 |
|
| 139 |
# ✅ **手动禁用 `use_cache`**
|
|
|
|
| 133 |
save_strategy="epoch",
|
| 134 |
remove_unused_columns=False,
|
| 135 |
gradient_checkpointing=True,
|
| 136 |
+
fp16=False, # ✅ 禁用 fp16,避免 _scale=None 错误
|
| 137 |
+
bf16=True if torch.cuda.is_available() else False # ✅ 仅在支持 bf16 时启用
|
| 138 |
+
|
| 139 |
)
|
| 140 |
|
| 141 |
# ✅ **手动禁用 `use_cache`**
|