Conversation
Signed-off-by: yiliu30 <yi4.liu@intel.com>
Signed-off-by: yiliu30 <yi4.liu@intel.com>
Signed-off-by: yiliu30 <yi4.liu@intel.com>
for more information, see https://pre-commit.ci
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to restore/fix FP8 fine-grained integration compatibility with Transformers v4 by switching the HPU finegrained-fp8 monkeypatch to a version-specific patch module, and by introducing a dedicated v4 patch implementation.
Changes:
- Update HPU patching to select a Transformers v4 vs v5+ compatible
finegrained_fp8replacement module at runtime. - Add a new
finegrained_fp8_patch_v4.pymodule providing FP8Linear replacement logic for Transformers v4. - Add an example script for running FP8 static quantization and saving output.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| examples/quant_model.py | Adds an example CLI for quantizing/saving a model with AutoRound FP8 static scheme. |
| auto_round/modeling/hpu_patch.py | Selects the correct finegrained_fp8 patch module depending on Transformers major version. |
| auto_round/modeling/finegrained_fp8_patch_v4.py | Introduces a Transformers v4-specific FP8Linear replacement implementation. |
Signed-off-by: yiliu30 <yi4.liu@intel.com>
for more information, see https://pre-commit.ci
Signed-off-by: yiliu30 <yi4.liu@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Please briefly describe your main changes, the motivation.
Type of Change
Related Issues
Fixes or relates to #
Checklist Before Submitting