Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: more robust check whether the HF model is quantized #11891

Merged

Conversation

eryk-dsai
Copy link
Contributor

Removes the check of model.is_quantized and adds more robust way of checking for 4bit and 8bit quantization in the huggingface_pipeline.py script. I had to make the original change on the outdated version of transformers, because the models had this property before. Seems redundant now.

Fixes: #11809 and #11759

@vercel
Copy link

vercel bot commented Oct 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Oct 16, 2023 8:36pm

@dosubot dosubot bot added Ɑ: models Related to LLMs or chat model modules 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Oct 16, 2023
@baskaryan baskaryan merged commit 5019f59 into langchain-ai:master Oct 16, 2023
31 checks passed
chocolate4 pushed a commit to chocolate4/langchain that referenced this pull request Oct 17, 2023
…i#11891)

Removes the check of `model.is_quantized` and adds more robust way of
checking for 4bit and 8bit quantization in the `huggingface_pipeline.py`
script. I had to make the original change on the outdated version of
`transformers`, because the models had this property before. Seems
redundant now.

Fixes: langchain-ai#11809 and
langchain-ai#11759
hoanq1811 pushed a commit to hoanq1811/langchain that referenced this pull request Feb 2, 2024
…i#11891)

Removes the check of `model.is_quantized` and adds more robust way of
checking for 4bit and 8bit quantization in the `huggingface_pipeline.py`
script. I had to make the original change on the outdated version of
`transformers`, because the models had this property before. Seems
redundant now.

Fixes: langchain-ai#11809 and
langchain-ai#11759
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature Ɑ: models Related to LLMs or chat model modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: 'LlamaForCausalLM' object has no attribute 'is_quantized'
2 participants