-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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 more cross-references to the KV cache docs #33323
Conversation
@@ -51,11 +51,11 @@ More concretely, key-value cache acts as a memory bank for these generative mode | |||
|
|||
|
|||
See an example below for how to implement your own generation loop. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(my VSCode automatically removes any hanging space on save 🤗 )
- a [`~cache_utils.Cache`] instance, see our | ||
[kv cache guide](https://huggingface.co/docs/transformers/en/kv_cache); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update added to all models supporting Cache
classes
Two formats are allowed: | ||
- a [`~cache_utils.Cache`] instance; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not true for TF models 👀
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, very welcome cross-references. This looks exhaustive, LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for adding this 💖
* add more cross-references * nit * import guard * more import guards * nit * Update src/transformers/generation/configuration_utils.py
* add more cross-references * nit * import guard * more import guards * nit * Update src/transformers/generation/configuration_utils.py
What does this PR do?
@zucchini-nlp wrote a great guide for our KV caches. This PR adds more cross-references to that guide in relevant places.
These references were added because: