-
Notifications
You must be signed in to change notification settings - Fork 52
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
[Bugfix] DisableKVCache Context #834
base: main
Are you sure you want to change the base?
Conversation
👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test?
# unknown config structure | ||
else: | ||
raise NotImplementedError( | ||
f"Cannot find `use_cache` for config of type {type(model.config)}" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you try this on other models that doesn't have a use_cache in their config? Such as Llava https://huggingface.co/llava-hf/llava-1.5-7b-hf
There are likely many ways to achieve this, including using the |
Pending testing with llava models |
Purpose
Changes
use_cache
andtext_config.use_cache
in cases likeMllamaConfig
Testing
meta-llama/Llama-3.2-11B-Vision-Instruct
would lead to attribute error. Now runs normally withmodel.config.text_config.use_cache == False
meta-llama/Meta-Llama-3-8B-Instruct