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

Enable vllm load gptq model #12083

Merged
merged 5 commits into from
Sep 18, 2024
Merged

Conversation

hzjane
Copy link
Contributor

@hzjane hzjane commented Sep 14, 2024

Description

Enable vllm load gptq model.
Have tested Llama-2-13B-chat-GPTQ and Llama-2-7B-Chat-GPTQ will vllm.

1. Why the change?

2. User API changes

Only supports asym_int4.

llm = LLM(model="/llm/models/Llama-2-13B-chat-GPTQ",
          quantization="GPTQ",
          load_in_low_bit="asym_int4",
          ....
)

or

python -m ipex_llm.vllm.xpu.entrypoints.openai.api_server \
--quantization gptq
--load-in-low-bit asym_int4
...

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
    - ...

@hzjane hzjane marked this pull request as ready for review September 14, 2024 06:18
@@ -291,16 +296,23 @@ def convert_vllm(module, qtype, in_features, out_features, mp_group, cur_qtype,
return new_linear


def convert_vllm_awq(module):
def convert_vllm_awq(module, gptq=False, act_order=False):
Copy link
Contributor

Choose a reason for hiding this comment

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

convert_vllm_awq_or_gptq

Copy link
Contributor

@glorysdj glorysdj left a comment

Choose a reason for hiding this comment

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

LGTM

@hzjane hzjane merged commit 40e463c into intel-analytics:main Sep 18, 2024
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.

3 participants