Offloaded cache: fix generate#34921
Merged
zucchini-nlp merged 5 commits intohuggingface:mainfrom Nov 28, 2024
Merged
Conversation
|
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. |
ArthurZucker
approved these changes
Nov 28, 2024
Comment on lines
+1257
to
+1263
| @property | ||
| def batch_size(self): | ||
| logger.warning_once( | ||
| f"The 'batch_size' attribute of {self.__class__.__name__} is deprecated and will be removed in " | ||
| "v4.49. Use the more precisely named 'self.max_batch_size' attribute instead." | ||
| ) | ||
| return self.max_batch_size |
Collaborator
There was a problem hiding this comment.
cool, let's make sure all our codes uses max_batch_size as logger warning is incompatible with compile
Member
Author
There was a problem hiding this comment.
yep, I check the generation files and the repo, seems like all changes are done already. Plus the compile tests on llama still pass
BernardZach
pushed a commit
to BernardZach/transformers
that referenced
this pull request
Dec 5, 2024
* fix cache impl * require_torch_gpu * fix mamba * fix copies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #34718 and adds tests. Also had to fix some inconsistencies in the code so that the test passes for all models, for ex using
max_batch_sizeinstead ofbatch_sizein all cache classes