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

feat(server): Using quantize_config.json instead of GPTQ_BITS env variables. #671

Merged
merged 3 commits into from
Jul 25, 2023

Conversation

Narsil
Copy link
Collaborator

@Narsil Narsil commented Jul 21, 2023

  • Current PR is not great because we're side stepping the
    Weights.__init__ but Weights shouldn't requires anything related
    to the config or the model_id as it aims to be a simple Wrapper
    over multi file loading.

  • Ideal solution would be to use something like Rust enum

    enum Quantize{
      Bitandbytes(Bitsandbytes),
      GPTQ(bits: usize, groupsize: usize)
    

    And passing that around during load. Unfortunately we don't
    have access to this, so for now, side-stepping seems easier.

  • Re-enabling groupsize<0 with exllama (confirmed it works.)

Helps #601

In next steps we should make sure our quantization script uses that format and make it standard.

What does this PR do?

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

num_heads = config.num_attention_heads

self.embed_dim = embed_dim
self.hidden_size = hidden_size
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not really related. but this is a bug in current OPT code that I found out. I can roll this back if you want.

OlivierDehaene
OlivierDehaene previously approved these changes Jul 21, 2023
Copy link
Member

@OlivierDehaene OlivierDehaene left a comment

Choose a reason for hiding this comment

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

nice

variables.

- Current PR is not great because we're side stepping the
  `Weights.__init__` but Weights shouldn't requires anything related
  to the config or the model_id as it aims to be a simple Wrapper
  over multi file loading.
- Ideal solution would be to use something like Rust enum
  ```
  enum Quantize{
    Bitandbytes(Bitsandbytes),
    GPTQ(bits: usize, groupsize: usize)
  ```
  And passing that around during load. Unfortunately we don't
  have access to this, so for now, side-stepping seems easier.
@Narsil
Copy link
Collaborator Author

Narsil commented Jul 25, 2023

Merging. It's only the flaky tests from exllama kernels. We're fixing their flakyness in a different PR.

@Narsil Narsil merged commit a0d5535 into main Jul 25, 2023
4 of 5 checks passed
@Narsil Narsil deleted the using_quantize_config branch July 25, 2023 11:00
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