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

[Docs] Add 4-bit serialization docs #28182

Merged
merged 3 commits into from
Dec 22, 2023

Conversation

younesbelkada
Copy link
Contributor

@younesbelkada younesbelkada commented Dec 21, 2023

What does this PR do?

Follow up work from: #26037
Adds few lines in the documentation about serializing 4-bit models on the Hub

cc @amyeroberts @stevhliu

@younesbelkada younesbelkada changed the title [add 4-bit serialization docs [Docs] Add 4-bit serialization docs Dec 21, 2023
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@@ -468,6 +468,10 @@ Try 4-bit quantization in this [notebook](https://colab.research.google.com/driv

This section explores some of the specific features of 4-bit models, such as changing the compute data type, using the Normal Float 4 (NF4) data type, and using nested quantization.

#### Push 4-bit models on the Hub

If you have `bitsandbytes>=0.41.3`, you can serialize 4-bit models and push them on Hugging Face Hub. Simply call `model.push_to_hub()` after loading it in 4-bit precision.
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the update! I think it would be nicer to include this here so it parallels the 8-bit section :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AH thanks! good point, will do it now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, maybe it is a bit repetitive, lmk what do you think!

Copy link
Member

Choose a reason for hiding this comment

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

Nice, and then we can remove the #### Push 4-bit models on the Hub section so its not as repetitive

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay , done!

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Great - thanks for adding!

@younesbelkada younesbelkada merged commit 3a8769f into huggingface:main Dec 22, 2023
8 checks passed
@younesbelkada younesbelkada deleted the add-4bit-ser-docs branch December 22, 2023 09:18
staghado pushed a commit to staghado/transformers that referenced this pull request Jan 15, 2024
* add 4-bit serialization docs

* up

* up
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