-
Notifications
You must be signed in to change notification settings - Fork 180
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
Easy backwards compatibility fix #41
Comments
I see. Thanks! Could you submit a PR? |
Thanks for this smart fix. @michael-heinrich : Do you see a similar workaround to provide backwards compatibility to awq/kernels as well for running VILA using AWQ & TinyChat? This will help to run video inference demo on ancient GPUs faster ;-) Refer: https://github.com/mit-han-lab/llm-awq/ At present, the installation of awq/kernels fails due to following error
|
I will definitely look into it. Last night I already spent a few hours on getting the AWQ quants running, but no luck so far. From the source code / documentation of the transformers library, it appears to have AWQ support built in and with a few changes to the HF repo, I could partially load the AWQ checkpoint using the video inference demo. However, in the end the shapes of the tensors did not match. But maybe it's possible to load it like this. |
Hi! Thanks for your piece of code. Have you changed anything apart from that? I am encountering an issue when running inference on the Llama-3-VILA1.5-8B model. The error message I receive is:
I am using a V100 GPU, which is not an Ampere GPU. Could you please provide guidance on how to disable Flash Attention for this model, and if there are any other steps besides what you have already provided? Thanks. |
Your version of transformers forces LlamaFlashAttention2 in the constructor of LlamaDecoderLayer in transformers/models/llama/modeling_llama.py which requires Ampere or newer to work. Just by using the old LlamaAttention class instead of LlamaFlashAttention2 here, I could make the video inference demo run on an ancient GTX1060 (even if it's very slow).
The current main branch of transformers uses a mechanism to decide which is the best compatible attention for this purpose.
If you don't want to backport that, you could use a very simple logic to decide which class to use here. Something like this:
`
The text was updated successfully, but these errors were encountered: