fix: remove quantization_config after loading to bypass SFTTrainer check

This commit is contained in:
Christian Medina
2026-07-01 07:36:38 -04:00
parent 86b401c12f
commit f47944ee75
2 changed files with 3 additions and 1 deletions

View File

@@ -40,6 +40,8 @@ def train(config_path):
device_map="cpu", # Load to CPU first
trust_remote_code=True,
)
# Remove quantization config to avoid SFTTrainer validation error
model.config.quantization_config = None
print("Model loaded and converted to bf16.")
# Add LoRA