fix: add bnb_4bit_quant_storage for FSDP sharding of 4-bit weights
This commit is contained in:
1
train.py
1
train.py
@@ -47,6 +47,7 @@ def train(config_path):
|
||||
bnb_4bit_quant_type="nf4",
|
||||
bnb_4bit_compute_dtype=torch.bfloat16,
|
||||
bnb_4bit_use_double_quant=True,
|
||||
bnb_4bit_quant_storage=torch.bfloat16, # Enable FSDP sharding of 4-bit weights
|
||||
)
|
||||
model = AutoModelForCausalLM.from_pretrained(
|
||||
config["base_model"],
|
||||
|
||||
Reference in New Issue
Block a user