mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-24 00:12:08 +00:00
This PR addresses an issue where calling `model = model.cuda()` would throw a ValueError when `quantize` is set to "bitsandbytes". ``` > File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 147, in serve_inner model = get_model( File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/__init__.py", line 295, in get_model return CausalLM( File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/causal_lm.py", line 515, in __init__ model = model.cuda() File "/opt/conda/lib/python3.9/site-packages/transformers/modeling_utils.py", line 1998, in cuda raise ValueError( ValueError: Calling `cuda()` is not supported for `4-bit` or `8-bit` quantized models. Please use the model as it is, since the model has already been set to the correct devices and casted to the correct `dtype`. ``` Co-authored-by: mmnga <mmnga1mmnga@gmail.com> |
||
---|---|---|
.. | ||
custom_modeling | ||
__init__.py | ||
bloom.py | ||
cache_manager.py | ||
causal_lm.py | ||
flash_causal_lm.py | ||
flash_llama.py | ||
flash_mistral.py | ||
flash_neox.py | ||
flash_rw.py | ||
flash_santacoder.py | ||
galactica.py | ||
gpt_neox.py | ||
idefics_causal_lm.py | ||
idefics.py | ||
model.py | ||
mpt.py | ||
opt.py | ||
rw.py | ||
santacoder.py | ||
seq2seq_lm.py | ||
t5.py | ||
types.py |