"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "8aa67fc192c1485f499e4c2dcb22bf8ad245160b"
Unverified Commit fc5d3e11 authored by Younes Belkada's avatar Younes Belkada Committed by GitHub
Browse files

Quantization: Enhance bnb error message (#31160)

enhance error message
parent bd9d1ddf
...@@ -63,7 +63,7 @@ class Bnb4BitHfQuantizer(HfQuantizer): ...@@ -63,7 +63,7 @@ class Bnb4BitHfQuantizer(HfQuantizer):
if not (is_accelerate_available() and is_bitsandbytes_available()): if not (is_accelerate_available() and is_bitsandbytes_available()):
raise ImportError( raise ImportError(
"Using `bitsandbytes` 8-bit quantization requires Accelerate: `pip install accelerate` " "Using `bitsandbytes` 8-bit quantization requires Accelerate: `pip install accelerate` "
"and the latest version of bitsandbytes: `pip install -i https://pypi.org/simple/ bitsandbytes`" "and the latest version of bitsandbytes: `pip install -U bitsandbytes`"
) )
if kwargs.get("from_tf", False) or kwargs.get("from_flax", False): if kwargs.get("from_tf", False) or kwargs.get("from_flax", False):
......
...@@ -64,7 +64,7 @@ class Bnb8BitHfQuantizer(HfQuantizer): ...@@ -64,7 +64,7 @@ class Bnb8BitHfQuantizer(HfQuantizer):
if not (is_accelerate_available() and is_bitsandbytes_available()): if not (is_accelerate_available() and is_bitsandbytes_available()):
raise ImportError( raise ImportError(
"Using `bitsandbytes` 8-bit quantization requires Accelerate: `pip install accelerate` " "Using `bitsandbytes` 8-bit quantization requires Accelerate: `pip install accelerate` "
"and the latest version of bitsandbytes: `pip install -i https://pypi.org/simple/ bitsandbytes`" "and the latest version of bitsandbytes: `pip install -U bitsandbytes`"
) )
if kwargs.get("from_tf", False) or kwargs.get("from_flax", False): if kwargs.get("from_tf", False) or kwargs.get("from_flax", False):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment