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

Add disable optimization params for awq #12641

Merged
merged 2 commits into from
Jan 2, 2025
Merged

Add disable optimization params for awq #12641

merged 2 commits into from
Jan 2, 2025

Conversation

cyita
Copy link
Contributor

@cyita cyita commented Jan 2, 2025

Description

  1. Add disable_optimize_pre in from_pretrained to disable merge qkv for AWQ.
  2. Add disable_fp16_opt in FP16Linear to disable transpose weight for AWQ.

1. Why the change?

2. User API changes

3. Summary of the change

4. How to test?

  • N/A
  • Unit test: Please manually trigger the PR Validation here by inputting the PR number (e.g., 1234). And paste your action link here once it has been successfully finished.
  • Application test
  • Document test
  • ...

5. New dependencies

  • New Python dependencies
    - Dependency1
    - Dependency2
    - ...
  • New Java/Scala dependencies and their license
    - Dependency1 and license1
    - Dependency2 and license2
    - ...

@cyita cyita requested a review from rnwang04 January 2, 2025 06:40
@@ -764,6 +764,7 @@ def __init__(self, input_features, output_features, bias=True,
# weigh_type = 3 means weight has been transposed by esimd method
self.weight_type = 1
self.optimize_lm_head = optimize_lm_head
self.disable_fp16_opt = False
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder where did you set it to True for your use case ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On the AWQ side.

Copy link
Contributor

@rnwang04 rnwang04 left a comment

Choose a reason for hiding this comment

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

LGTM

@cyita
Copy link
Contributor Author

cyita commented Jan 2, 2025

PR Validation: https://github.com/intel-analytics/ipex-llm-workflow/actions/runs/12578787560
Error due to outdated falcon model.

@cyita cyita merged commit 8e5328e into intel:main Jan 2, 2025
1 check passed
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.

2 participants