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

Quantized aria with vllm serving #139

Open
argentum047101 opened this issue Jan 5, 2025 · 2 comments
Open

Quantized aria with vllm serving #139

argentum047101 opened this issue Jan 5, 2025 · 2 comments

Comments

@argentum047101
Copy link

Excellent work! I have 2 questions.
Is it possible to host quantized aria with vllm now?
How can i save quantized aria?

@mobicham
Copy link
Collaborator

mobicham commented Jan 6, 2025

Thank you!

I haven't followed much what's going with Aria, just checked and it looks like it's merged in Hugging Face, but the example is still using trust_remote=True hm.

The main issue is that in Aria, the quantized MoEs are a custom layer, not HQQLinear ,while the integration in HF and VLLM only supports HQQLinear, so unless the quantized MoEs are replaced on the fly-on-the while loading, even with saving I don't think it's gonna work out-of-the-box with the current code.

Unfortunately, this will require some work/testing and I don't have enough time on my plate, but happy to guide you. Which one is more important to you: being able to run it in VLLM or being able to save/load to use with HF?
Either way, I think if you rewrite this to use HQQLinear it could work actually with some post-loading patching function.
Basically the idea is to only use supported layers before saving - in this case the quantized MoEs will be a torch.nn.Sequential of HQQLinear layers instead of HQQGroupedGemm. Then after loading, we replace the forward pass call of the Sequential modules with the correct call via a patching function.

@argentum047101
Copy link
Author

Thank you for fast reply! Got the idea. Will try it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants