remove auto device map in training strategies
This commit is contained in:
4
train.py
4
train.py
@@ -41,7 +41,7 @@ def train(config_path):
|
||||
model = AutoModelForCausalLM.from_pretrained(
|
||||
config["base_model"],
|
||||
torch_dtype=torch.float16,
|
||||
device_map="auto",
|
||||
# device_map="auto",
|
||||
trust_remote_code=True,
|
||||
)
|
||||
print("✓ Success: 4-bit AS-IS")
|
||||
@@ -81,7 +81,7 @@ def train(config_path):
|
||||
model = AutoModelForCausalLM.from_pretrained(
|
||||
config["base_model"],
|
||||
torch_dtype=torch.bfloat16,
|
||||
device_map="auto",
|
||||
# device_map="auto",
|
||||
low_cpu_mem_usage=True,
|
||||
trust_remote_code=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user