remove nf4 unsupport comment in cpu finetuning (#12460)

Co-authored-by: Ariadne <wyn2000330@126.com>
This commit is contained in:
Heyang Sun 2024-11-28 13:26:46 +08:00 committed by GitHub
parent b29da30205
commit d272f6b471
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -181,7 +181,7 @@ def train(
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_use_double_quant=False,
bnb_4bit_quant_type="int4", # nf4 not supported on cpu yet
bnb_4bit_quant_type="int4",
bnb_4bit_compute_dtype=torch.bfloat16
)
model = AutoModelForCausalLM.from_pretrained(base_model,

View file

@ -62,7 +62,7 @@ if __name__ == "__main__":
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_use_double_quant=False,
bnb_4bit_quant_type="int4", # nf4 not supported on cpu yet
bnb_4bit_quant_type="int4",
bnb_4bit_compute_dtype=torch.bfloat16
)
model = AutoModelForCausalLM.from_pretrained(model_path,