Skip to content

Added check if reuse_cache supported by selected model_type#675

Merged
regisss merged 1 commit into
huggingface:mainfrom
iermolae:reuse_cache_check
Feb 2, 2024
Merged

Added check if reuse_cache supported by selected model_type#675
regisss merged 1 commit into
huggingface:mainfrom
iermolae:reuse_cache_check

Conversation

@iermolae
Copy link
Copy Markdown
Contributor

Add a check if reuse_cache flag supported by selected model_type in GaudiGenerationMixin.generate()

Previously, if run_generation.py ran with other than "llama" model and --reuse_check there was an error:

AttributeError: 'GaudiMistralForCausalLM' object has no attribute 'allocate_kv_cache'

Now there is a more user-freindly message describing the problem:

AssertionError: reuse_cache only supported by llama at the moment

@regisss regisss added the run-test Run CI for PRs from external contributors label Feb 2, 2024
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Collaborator

@regisss regisss left a comment

Choose a reason for hiding this comment

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

LGTM!

@regisss regisss merged commit 4077355 into huggingface:main Feb 2, 2024
jychen21 pushed a commit to jychen21/optimum-habana that referenced this pull request Feb 27, 2024
HolyFalafel pushed a commit to HabanaAI/optimum-habana-fork that referenced this pull request Mar 11, 2024
gplutop7 pushed a commit to HabanaAI/optimum-habana-fork that referenced this pull request Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-test Run CI for PRs from external contributors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants