Skip to content
This repository was archived by the owner on Mar 21, 2026. It is now read-only.

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

Merged
Narsil merged 3 commits into
mainfrom
using_quantize_config
Jul 25, 2023
Merged

Narsil merged 3 commits into
mainfrom
using_quantize_config

Conversation

@Narsil

@Narsil Narsil commented Jul 21, 2023 •

Copy link
Copy Markdown
Contributor
  • 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.

@Narsil
Narsil requested a review from OlivierDehaene July 21, 2023 10:22
num_heads = config.num_attention_heads

self.embed_dim = embed_dim
self.hidden_size = hidden_size

Copy link
Copy Markdown
Contributor 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

@OlivierDehaene OlivierDehaene left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice

Narsil added 3 commits July 25, 2023 09:14
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

Narsil commented Jul 25, 2023

Copy link
Copy Markdown
Contributor Author

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
@Narsil
Narsil deleted the using_quantize_config branch July 25, 2023 11:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants