fix: load QLoRA directly to GPU (skip CPU)

This commit is contained in:
Christian Medina
2026-07-01 12:33:21 -04:00
parent 9471d5cc77
commit f784d06f0a

View File

@@ -47,7 +47,7 @@ def train(config_path):
config["base_model"],
quantization_config=bnb_config,
dtype=torch.bfloat16,
device_map="cpu", # Load to CPU first
device_map="auto", # Load directly to GPU
trust_remote_code=True,
)
print("Model loaded with QLoRA (4-bit).")