Skip to content

Conversation

@gante
Copy link
Contributor

@gante gante commented Apr 22, 2025

What does this PR do?

#37394 introduces a cache change, but there are several cache test issues at the moment, preventing a clean merge.

This PR:

  1. Removes the @slow decorator from a few tests (change pulled from [Cache] Support compilable cache reuse with smaller batch sizes #37394)
  2. Deletes test_static_cache_greedy_decoding_pad_right, as it doesn't make sense to generate with right padding (change pulled from [Cache] Support compilable cache reuse with smaller batch sizes #37394)
  3. Moves torch.export() cache tests to its own class
  4. Cleans device memory between test runs. On some devices, we were observing CPU weight offloading after a few tests, massively slowing down runtimes. Cleaning the device memory between tests fixes it.

Follow-up PR, before retesting #37394:

  1. convert as many @slow tests into fast tests as possible
  2. fix failing tests

@github-actions github-actions bot marked this pull request as draft April 22, 2025 16:50
@github-actions
Copy link
Contributor

Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the Ready for review button (at the bottom of the PR page). This will assign reviewers and trigger CI.

@gante gante requested a review from zucchini-nlp April 22, 2025 16:50
@gante gante marked this pull request as ready for review April 22, 2025 16:50
@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.

Copy link
Member

@zucchini-nlp zucchini-nlp left a comment

Choose a reason for hiding this comment

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

Nice 🧼

@gante gante merged commit 755b0fa into huggingface:main Apr 29, 2025
11 checks passed
@gante gante deleted the cache_test_upgrades branch April 29, 2025 11:21
zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request May 14, 2025
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