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

Update mixtral.md #1940

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Update mixtral.md #1940

wants to merge 6 commits into from

Conversation

saahil1801
Copy link

@saahil1801 saahil1801 commented Mar 26, 2024

Exllama kernels using GPTQConfig for faster inference and production load. @davanstrien @younesbelkada @pcuenca

Exllama kernels in GPTQConfig for faster inference and production load.
added link to official exllama github repo
Copy link
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

LGTM !

mixtral.md Outdated Show resolved Hide resolved
mixtral.md Outdated Show resolved Hide resolved
saahil1801 and others added 2 commits April 5, 2024 21:40
Co-authored-by: Younes Belkada <[email protected]>
Co-authored-by: Younes Belkada <[email protected]>
Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

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

Thank you! I have some questions / doubts about how it works, so I'd suggest we try to dispel them for readers too.

mixtral.md Outdated Show resolved Hide resolved
mixtral.md Outdated Show resolved Hide resolved
print(tokenizer.decode(output[0], skip_special_tokens=True))
```

If left unset , the "use_exllama" parameter defaults to True , enabling the exllama backend functionality, specifically designed to work with the "bits" value of 4.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
If left unset , the "use_exllama" parameter defaults to True , enabling the exllama backend functionality, specifically designed to work with the "bits" value of 4.
If left unset, `use_exllama` defaults to `True` when kernels are installed.

I don't fully follow, sorry. If the backend is designed for 4-bits and use_exllama is True by default, then it means:

  • We can't use any other value (4 bits) in the GPTQConfig.
  • Exllama would be enabled anyway if we don't provide the configuration object.

Is that correct? If it is, then I'd simply mention in a paragraph that exllama will be used when installed, and wouldn't provide a code example that might confuse readers.

Copy link
Author

@saahil1801 saahil1801 Apr 6, 2024

Choose a reason for hiding this comment

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

The exllama kernels are passed through the GPTQConfig object.Simply passing the GPTQConfig would do the trick for LLama Based LLMS.But the GPTQConfig object needs to be passed

Copy link
Author

@saahil1801 saahil1801 Apr 6, 2024

Choose a reason for hiding this comment

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

I created the GPTQConfig with other parameters defined

gptq_config = GPTQConfig(bits=4, use_exllama=True)

to help educate readers about some basic parameters in GPTQConfig object , when using exllama kernels .


If left unset , the "use_exllama" parameter defaults to True , enabling the exllama backend functionality, specifically designed to work with the "bits" value of 4.

Note that for both QLoRA and GPTQ you need at least 30 GB of GPU VRAM to fit the model. You can make it work with 24 GB if you use `device_map="auto"`, like in the example above, so some layers are offloaded to CPU.
Copy link
Member

Choose a reason for hiding this comment

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

Is this also true when exllama is enabled?

Copy link
Author

Choose a reason for hiding this comment

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

Using exllama kernels would significantly reduce only the inferencing speed of the fitted model as it uses 4-bit GPTQ weights for faster computation

saahil1801 and others added 2 commits April 6, 2024 18:44
Co-authored-by: Pedro Cuenca <[email protected]>
Co-authored-by: Pedro Cuenca <[email protected]>
@saahil1801 saahil1801 requested a review from pcuenca April 6, 2024 14:34
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