Skip to content

LM Eval tests -- ignore vision tower for VL fp8 test #1562

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

Merged
merged 3 commits into from
Jun 17, 2025

Conversation

brian-dellabetta
Copy link
Collaborator

@brian-dellabetta brian-dellabetta commented Jun 17, 2025

SUMMARY:
The current lm-eval test for vision language models with fp8_dynamic scheme include the vision tower component of the model in the compression. As discussed with @anmarques and @eldarkurtic, this is generally not a good idea and we want to err on the side of accuracy over improved runtime when the tradeoff exists. Excluding vision tower from compression slightly decreases accuracy (from 0.866 to 0.833) in this case, but generally speaking it will degrade performance and we don't want to encourage users to do so.

This PR updates the test to explicitly ignore the vision tower components in the test

TEST PLAN:
Ran test a few times locally, reproduced 0.8333 value each time. Confirmed the model size is now slightly larger with the vision tower excluded from compression

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.

Summary of Changes

Hello @brian-dellabetta, 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 refines the lm-eval testing for vision-language models that use FP8 dynamic quantization. It introduces a new quantization recipe that explicitly prevents the compression of vision tower components, as compressing them can negatively impact model accuracy. The corresponding test configuration is updated to reflect this new quantization strategy and its resulting expected accuracy.

Highlights

  • New Quantization Recipe for VL Models: A new YAML configuration file, tests/e2e/vLLM/recipes/FP8/recipe_fp8_dynamic.yaml, has been introduced. This file defines an FP8 dynamic quantization recipe that explicitly instructs the QuantizationModifier to ignore various vision-related components (e.g., vision_tower, multi_modal_projector, visual) during the quantization process. This ensures that these critical parts of vision-language models are not compressed, aiming to preserve accuracy.
  • LM-Eval Test Configuration Update: The tests/lmeval/configs/vl_fp8_dynamic_per_token.yaml test configuration has been updated. It now includes a recipe field on line 5, pointing to the newly created recipe_fp8_dynamic.yaml. This change ensures that the lm-eval test for vision-language models utilizes the specified FP8 dynamic quantization scheme, which excludes the vision tower components from compression.
  • Adjusted Expected Accuracy Metric: The expected accuracy metric (acc,none) within the vl_fp8_dynamic_per_token.yaml test configuration has been adjusted from 0.8667 to 0.833 on line 17. This update reflects the observed accuracy when the vision tower components are excluded from FP8 dynamic compression, aligning with the PR's intent to prioritize accuracy over compressing these specific model parts.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 is currently in preview and 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 to provide feedback.

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.

@brian-dellabetta brian-dellabetta force-pushed the bdellabe/vl-fp8dynamic-ignore-vision branch from 5691090 to bf48051 Compare June 17, 2025 15:19
@brian-dellabetta brian-dellabetta added the ready When a PR is ready for review label Jun 17, 2025
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

The pull request successfully implements the exclusion of vision tower components from FP8 compression for VL model tests by adding a new recipe and updating the test configuration. A minor adjustment to the precision of the expected accuracy metric is suggested for better consistency with reported test results.

Copy link
Collaborator

@kylesayrs kylesayrs left a comment

Choose a reason for hiding this comment

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

Strange that accuracy decreases in this case, but if you're sure that everything is being ignored correctly then lgtm

@brian-dellabetta brian-dellabetta force-pushed the bdellabe/vl-fp8dynamic-ignore-vision branch from 46a0f7c to 91a550d Compare June 17, 2025 18:45
@dsikka dsikka merged commit ca00edd into main Jun 17, 2025
11 checks passed
@dsikka dsikka deleted the bdellabe/vl-fp8dynamic-ignore-vision branch June 17, 2025 19:10
aireilly pushed a commit to aireilly/llm-compressor that referenced this pull request Jul 30, 2025
SUMMARY:
The current lm-eval test for vision language models with fp8_dynamic
scheme include the vision tower component of the model in the
compression. As discussed with @anmarques and @eldarkurtic, this is
generally not a good idea and we want to err on the side of accuracy
over improved runtime when the tradeoff exists. Excluding vision tower
from compression slightly decreases accuracy (from 0.866 to 0.833) in
this case, but generally speaking it will degrade performance and we
don't want to encourage users to do so.

This PR updates the test to explicitly ignore the vision tower
components in the test


TEST PLAN:
Ran test a few times locally, reproduced 0.8333 value each time.
Confirmed the model size is now slightly larger with the vision tower
excluded from compression

---------

Signed-off-by: Brian Dellabetta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready When a PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants