Skip to content

Commit de11d0b

Browse files
authored
Update quantizer_bnb_4bit.py: In the ValueError string there should be "....you need to set llm_int8_enable_fp32_cpu_offload=True...." instead of "load_in_8bit_fp32_cpu_offload=True". (#30013)
* Update quantizer_bnb_4bit.py There is an mistake in ValueError on line 86 of quantizer_bnb_4bit.py. In the error string there should be "....you need to set `llm_int8_enable_fp32_cpu_offload=True`...." instead of "load_in_8bit_fp32_cpu_offload=True". I think you updated the BitsAndBytesConfig() arguments, but forgot to change the ValueError in quantizer_bnb_4bit.py. * Update quantizer_bnb_4bit.py Changed ValueError string "...you need to set load_in_8bit_fp32_cpu_offload=True..." to "....you need to set llm_int8_enable_fp32_cpu_offload=True...."
1 parent 4207a40 commit de11d0b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/transformers/quantizers/quantizer_bnb_4bit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def validate_environment(self, *args, **kwargs):
8787
"""
8888
Some modules are dispatched on the CPU or the disk. Make sure you have enough GPU RAM to fit the
8989
quantized model. If you want to dispatch the model on the CPU or the disk while keeping these modules
90-
in 32-bit, you need to set `load_in_8bit_fp32_cpu_offload=True` and pass a custom `device_map` to
90+
in 32-bit, you need to set `llm_int8_enable_fp32_cpu_offload=True` and pass a custom `device_map` to
9191
`from_pretrained`. Check
9292
https://huggingface.co/docs/transformers/main/en/main_classes/quantization#offload-between-cpu-and-gpu
9393
for more details.

src/transformers/quantizers/quantizer_bnb_8bit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def validate_environment(self, *args, **kwargs):
8787
"""
8888
Some modules are dispatched on the CPU or the disk. Make sure you have enough GPU RAM to fit the
8989
quantized model. If you want to dispatch the model on the CPU or the disk while keeping these modules
90-
in 32-bit, you need to set `load_in_8bit_fp32_cpu_offload=True` and pass a custom `device_map` to
90+
in 32-bit, you need to set `llm_int8_enable_fp32_cpu_offload=True` and pass a custom `device_map` to
9191
`from_pretrained`. Check
9292
https://huggingface.co/docs/transformers/main/en/main_classes/quantization#offload-between-cpu-and-gpu
9393
for more details.

0 commit comments

Comments
 (0)