Skip to content

Conversation

@yueshen2016
Copy link
Contributor

What does this PR do?

Type of change: ?
Bug fix

Overview: ?
Add transformers version restoration after PTQ for VILA

Usage

# Add a code snippet demonstrating how to use this

Testing

CUDA_VISIBLE_DEVICES=0 bash -e scripts/huggingface_example.sh --model /models/VILA1.5-3b --quant fp8 --tp 1 --pp 1 --trust_remote_code --kv_cache_free_gpu_memory_fraction 0.5

Before your PR is "Ready for review"

  • Make sure you read and follow Contributor guidelines and your commits are signed.
  • Is this change backward compatible?: Yes/No
  • Did you write any new necessary tests?: Yes/No
  • Did you add or update any necessary documentation?: Yes/No
  • Did you update Changelog?: Yes/No

Additional Information

@yueshen2016 yueshen2016 requested a review from a team as a code owner November 7, 2025 02:16
@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.52%. Comparing base (5adb9ba) to head (916016c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #525   +/-   ##
=======================================
  Coverage   73.52%   73.52%           
=======================================
  Files         181      181           
  Lines       18207    18207           
=======================================
  Hits        13387    13387           
  Misses       4820     4820           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

if [[ "${MODEL_NAME,,}" == *"vila"* ]]; then
# Save current transformers version for later restoration
ORIGINAL_TRANSFORMERS_VERSION=$(pip show transformers | grep Version | cut -d' ' -f2)
echo "Current transformers version: $ORIGINAL_TRANSFORMERS_VERSION"
Copy link
Collaborator

Choose a reason for hiding this comment

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

how about we just do a check and prompt user to install the supported version (if not, exit)?

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

Successfully merging this pull request may close these issues.

3 participants