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

TorchFX: GPTQ accuracy fix #26294

Merged
merged 19 commits into from
Oct 18, 2024

Conversation

cavusmustafa
Copy link
Contributor

@cavusmustafa cavusmustafa commented Aug 29, 2024

Details:

  • Fix for the accuracy issues discovered in Llama2 GPTQ with aot_autograd

Tickets:

@github-actions github-actions bot added the category: PyTorch FE OpenVINO PyTorch Frontend label Aug 29, 2024
@cavusmustafa cavusmustafa marked this pull request as ready for review August 29, 2024 05:57
@cavusmustafa cavusmustafa requested a review from a team as a code owner August 29, 2024 05:57
@cavusmustafa cavusmustafa added this to the 2024.4 milestone Aug 29, 2024
@cavusmustafa cavusmustafa requested a review from suryasidd August 29, 2024 05:58
Copy link
Member

@rkazants rkazants left a comment

Choose a reason for hiding this comment

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

Where is the test to check accuracy?

@rkazants rkazants requested a review from mvafin August 29, 2024 07:08
@rkazants rkazants added the pr: needs tests PR needs tests updating label Aug 29, 2024
@moslex moslex removed the Code Freeze label Sep 4, 2024
@cavusmustafa
Copy link
Contributor Author

Where is the test to check accuracy?

Test for GPTQ will require to create a certain pattern and check if all the related passes are applied and the execution is optimized as expected. I am sharing the link to the ticket to track the progress on GPTQ tests and additional improvements. But I don't think it will be part of this PR and I don't think it will be ready in next 2-3 weeks due to other priorities.
https://jira.devtools.intel.com/browse/CVS-152181

@cavusmustafa
Copy link
Contributor Author

gptq_test.py.txt
@rkazants, could you please help deciding where to add this test? Is this a good location to implement it?: https://github.com/openvinotoolkit/openvino/tree/master/tests/model_hub_tests/pytorch
I need to skip model conversion and run it as a regular pytorch model after torch.compile. Can I do it in this structure?
Attached is the standalone script to test GPTQ patterns in a HF model.

@mvafin
Copy link
Contributor

mvafin commented Oct 2, 2024

@cavusmustafa Add the test here https://github.com/openvinotoolkit/openvino/tree/master/tests/model_hub_tests/transformation_tests
You will not be bound to existing workflow and can create your custom test.

@cavusmustafa cavusmustafa requested a review from a team as a code owner October 3, 2024 00:46
@github-actions github-actions bot added category: TF FE OpenVINO TensorFlow FrontEnd category: JAX FE OpenVINO JAX FrontEnd labels Oct 3, 2024
@cavusmustafa
Copy link
Contributor Author

cavusmustafa commented Oct 3, 2024

@cavusmustafa Add the test here https://github.com/openvinotoolkit/openvino/tree/master/tests/model_hub_tests/transformation_tests You will not be bound to existing workflow and can create your custom test.

I just pushed into this directory. Can you review please?
@mvafin @rkazants

@mvafin
Copy link
Contributor

mvafin commented Oct 7, 2024

@cavusmustafa cavusmustafa requested a review from a team as a code owner October 8, 2024 20:27
@github-actions github-actions bot added category: CI OpenVINO public CI github_actions Pull requests that update GitHub Actions code labels Oct 8, 2024
@cavusmustafa
Copy link
Contributor Author

@cavusmustafa Please add the test in here: https://github.com/openvinotoolkit/openvino/blob/500284d6bdcf979b4c4eda6abfa0b45cfe8f0635/.github/workflows/job_pytorch_models_tests.yml

You can refer to PagedAttention Test as example

@mvafin, added the test into the ".yml" file. Please let me know if anything is missing. Thanks.

@mvafin
Copy link
Contributor

mvafin commented Oct 16, 2024

Test fails

@mvafin mvafin added this pull request to the merge queue Oct 18, 2024
Merged via the queue into openvinotoolkit:master with commit 43df0b6 Oct 18, 2024
160 checks passed
CuriousPanCake pushed a commit to CuriousPanCake/openvino that referenced this pull request Nov 6, 2024
### Details:
- Fix for the accuracy issues discovered in Llama2 GPTQ with
aot_autograd

### Tickets:
 - [CVS-149032](https://jira.devtools.intel.com/browse/CVS-149032)

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: CI OpenVINO public CI category: JAX FE OpenVINO JAX FrontEnd category: PyTorch FE OpenVINO PyTorch Frontend category: TF FE OpenVINO TensorFlow FrontEnd github_actions Pull requests that update GitHub Actions code pr: needs tests PR needs tests updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants