[go: up one dir, main page]

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

[Draft] Add AutoRound support #5486

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

wenhuach21
Copy link
@wenhuach21 wenhuach21 commented Sep 19, 2024

What does this PR do?

New Feature: Support AutoRound quantization algorithm which has shown benefit for finetuning https://substack.com/@bnjmnmarie/p-147609171

Before submitting

  • Did you read the contributor guideline?
  • Did you write any new necessary tests?
    Not yet, only draft now, but test locally

@wenhuach21 wenhuach21 marked this pull request as draft September 19, 2024 10:05
@wenhuach21
Copy link
Author

Hi @hiyouga

After attempting to integrate AutoRound, I’ve encountered several issues, and one in particular that I’d like to discuss with you first.

Quantization Order: I’ve noticed challenges related to quantization with GPTQ on multiple GPU devices. Specifically, the torch parallelization seems to distribute the quantization process across different devices, which doesn’t appear optimal. Additionally, I’ve encountered exceptions after the quantization process."ValueError: You can't train a model that has been loaded with device_map='auto' in any distributed mode. Please rerun your script specifying --num_processes=1 or by launching with python {{myscript.py}}."

To avoid conflicts between settings for models during quantization and fine-tuning, I’ve opted to quantize the model first, followed by fine-tuning. However, I believe there’s room for improvement in the code.

Which approach do you prefer? Would you rather merge the quantization process into the model loading phase, or is the naive method I proposed acceptable? I would appreciate your input.

Thank you!

@wenhuach21
Copy link
Author
wenhuach21 commented Sep 26, 2024

Hi @hiyouga, could you kindly take a look? Once I have your feedback, I can continue refining my code. Thank you!

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.

1 participant