fix: fix indentation error in strategy 3
This commit is contained in:
18
train.py
18
train.py
@@ -89,15 +89,15 @@ def train(config_path):
|
||||
# --------------------------------------------------------------
|
||||
print("\n[3/4] Trying: bf16 CPU...")
|
||||
try:
|
||||
model = AutoModelForCausalLM.from_pretrained(
|
||||
config["base_model"],
|
||||
torch_dtype=torch.bfloat16,
|
||||
device_map="cpu",
|
||||
low_cpu_mem_usage=True,
|
||||
trust_remote_code=True,
|
||||
)
|
||||
print("✓ Success: bf16 CPU")
|
||||
except Exception as e:
|
||||
model = AutoModelForCausalLM.from_pretrained(
|
||||
config["base_model"],
|
||||
torch_dtype=torch.bfloat16,
|
||||
device_map="cpu",
|
||||
low_cpu_mem_usage=True,
|
||||
trust_remote_code=True,
|
||||
)
|
||||
print("✓ Success: bf16 CPU")
|
||||
except Exception as e:
|
||||
errors.append(("bf16 CPU", e))
|
||||
print(f"✗ Failed: {e}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user