Skip to content

[Audio] Qwen2 Audio Example#2177

Merged
HDCharles merged 4 commits intomainfrom
kylesayrs/qwen2_audio
Mar 19, 2026
Merged

[Audio] Qwen2 Audio Example#2177
HDCharles merged 4 commits intomainfrom
kylesayrs/qwen2_audio

Conversation

@kylesayrs
Copy link
Collaborator

@kylesayrs kylesayrs commented Dec 31, 2025

Purpose

  • Support qwen2_audio, which previously could not be supported due to accelerate offloading

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @kylesayrs, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new example showcasing the application of 4-bit GPTQ quantization to the Qwen2-Audio-7B model, detailing the entire process from data loading and preprocessing to model generation and saving. Concurrently, an existing Llama3 quantization example has been temporarily disabled by commenting out its core functionality and changing its target model, likely to streamline development or testing efforts related to the new audio model integration.

Highlights

  • New Qwen2 Audio Example: A new example script, qwen2_audio.py, has been added to demonstrate 4-bit quantization (W4A16 GPTQ) of the Qwen2-Audio-7B model using the llmcompressor library.
  • Audio Data Preprocessing: The new example includes comprehensive steps for loading and preprocessing audio data from the MLCommons/peoples_speech dataset, preparing it for the Qwen2-Audio model's input requirements.
  • Llama3 Example Modifications: The existing llama3_example.py script has been updated to change its target model to bigcode/starcoder2-3b and to comment out the quantization recipe, generation, and saving steps, effectively disabling its core functionality for now.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link

👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review.

Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new example script for quantizing the Qwen2 Audio model and modifies an existing Llama3 example. The new script is a valuable addition, but it appears to be a work in progress, with some key functionality commented out and using temporary values for quick testing. My review focuses on suggestions to make the new example script fully functional and improve its code quality. Specifically, I recommend uncommenting the main oneshot call, using a more appropriate number of calibration samples for effective quantization, and adopting a more idiomatic approach for tensor manipulation.

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
@kylesayrs kylesayrs force-pushed the kylesayrs/qwen2_audio branch from 7e91f93 to 5b9df94 Compare March 15, 2026 21:54
@mergify mergify bot added the documentation Improvements or additions to documentation label Mar 15, 2026
@kylesayrs kylesayrs marked this pull request as ready for review March 15, 2026 21:55
@kylesayrs kylesayrs changed the title [WIP] [Audio] Qwen2 Audio Example [Audio] Qwen2 Audio Example Mar 15, 2026
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Copy link
Collaborator

@brian-dellabetta brian-dellabetta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@kylesayrs kylesayrs added the ready When a PR is ready for review label Mar 16, 2026
@mergify
Copy link
Contributor

mergify bot commented Mar 17, 2026

The quality checks have failed. Please run make style and make quality under
the root directory to adddress the lint failures. You will need to install the
dev optional install to get the required linting packages:
https://github.com/vllm-project/llm-compressor/blob/main/CONTRIBUTING.md

@mergify mergify bot removed the quality-failed label Mar 19, 2026
@HDCharles HDCharles merged commit cf3bd64 into main Mar 19, 2026
14 checks passed
@HDCharles HDCharles deleted the kylesayrs/qwen2_audio branch March 19, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ready When a PR is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants