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...")
|
print("\n[3/4] Trying: bf16 CPU...")
|
||||||
try:
|
try:
|
||||||
model = AutoModelForCausalLM.from_pretrained(
|
model = AutoModelForCausalLM.from_pretrained(
|
||||||
config["base_model"],
|
config["base_model"],
|
||||||
torch_dtype=torch.bfloat16,
|
torch_dtype=torch.bfloat16,
|
||||||
device_map="cpu",
|
device_map="cpu",
|
||||||
low_cpu_mem_usage=True,
|
low_cpu_mem_usage=True,
|
||||||
trust_remote_code=True,
|
trust_remote_code=True,
|
||||||
)
|
)
|
||||||
print("✓ Success: bf16 CPU")
|
print("✓ Success: bf16 CPU")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
errors.append(("bf16 CPU", e))
|
errors.append(("bf16 CPU", e))
|
||||||
print(f"✗ Failed: {e}")
|
print(f"✗ Failed: {e}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user