当前位置:   article > 正文

got an unexpected keyword argument ‘disable_exllamav2‘_typeerror: blank() got an unexpected keyword argum

typeerror: blank() got an unexpected keyword argument 'disable

问题

  1. >>> from transformers import AutoModelForCausalLM, AutoTokenizer
  2. >>> model_dir = "qwen/Qwen-VL-Chat-Int4"
  3. >>> tokenizer = AutoTokenizer.from_pretrained(model_dir, trust_remote_code=True)
  4. >>> model = AutoModelForCausalLM.from_pretrained(model_dir, device_map="auto",trust_remote_code=True).eval()
  5. Traceback (most recent call last):
  6. File "<stdin>", line 1, in <module>
  7. File "/ssd1/miniconda3/envs/pytorch2.1.2/lib/python3.8/site-packages/transformers/models/auto/auto_factory.py", line 511, in from_pretrained
  8. return model_class.from_pretrained(
  9. File "/ssd1/miniconda3/envs/pytorch2.1.2/lib/python3.8/site-packages/transformers/modeling_utils.py", line 2945, in from_pretrained
  10. model = quantizer.convert_model(model)
  11. File "/ssd1/miniconda3/envs/pytorch2.1.2/lib/python3.8/site-packages/optimum/gptq/quantizer.py", line 229, in convert_model
  12. self._replace_by_quant_layers(model, layers_to_be_replaced)
  13. File "/ssd1/miniconda3/envs/pytorch2.1.2/lib/python3.8/site-packages/optimum/gptq/quantizer.py", line 256, in _replace_by_quant_layers
  14. QuantLinear = dynamically_import_QuantLinear(
  15. TypeError: dynamically_import_QuantLinear() got an unexpected keyword argument 'disable_exllamav2'

解决

pip install optimum==1.12.0

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/590254
推荐阅读
相关标签
  

闽ICP备14008679号