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

Support GPTQ on ChatGLM2-6B #1269

Merged
merged 2 commits into from
Sep 21, 2023
Merged

Support GPTQ on ChatGLM2-6B #1269

merged 2 commits into from
Sep 21, 2023

Conversation

YIYANGCAI
Copy link
Contributor

@YIYANGCAI YIYANGCAI commented Sep 20, 2023

Type of Change

bug fix

Description

ChatGLM's source code, whose forwarding functions take several positional arguments, besides fixed "hidden_states". However, current GPTQ API only collects keyword arguments automatically. Thus, this pr is to add positional arguments automatic collection.

Expected Behavior & Potential Risk

Execute GPTQ quantization on ChatGLM2-6B automatically.

How has this PR been tested?

PreCI

Dependency Change?

no

@xin3he
Copy link
Contributor

xin3he commented Sep 20, 2023

Is it possible that we use args and kwargs insteand of seperating hidden_state from them? I think it would be more robust.

for args, kwargs in zip(self.total_block_args, self.total_block_kwargs):

@YIYANGCAI
Copy link
Contributor Author

Is it possible that we use args and kwargs insteand of seperating hidden_state from them? I think it would be more robust.

for args, kwargs in zip(self.total_block_args, self.total_block_kwargs):

Hi Xin, this is a good point, I will try it on multiple models.

@chensuyue chensuyue merged commit b886701 into master Sep 21, 2023
@chensuyue chensuyue deleted the gptq-chatglm2-6b branch September 21, 2023 01:09
chensuyue pushed a commit to chensuyue/lpot that referenced this pull request Feb 21, 2024
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.

4 participants