Skip to content

Conversation

@zucchini-nlp
Copy link
Member

@zucchini-nlp zucchini-nlp commented Jan 23, 2025

What does this PR do?

Some tests started failing after #35164. This PR fixes it by:

  1. Removing manual forward compilation, as it is compiled again in the generation's _sample
  2. Removes the overriden prepare_inputs_for_generation

Ran tests:

  • pytest -k greedy tests/models (moshi is failing even on main)
  • pytest tests/models/whisper/test_modeling_whisper.py

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

Nice that the slack ping worked!

Copy link
Contributor

@gante gante left a comment

Choose a reason for hiding this comment

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

In general LGTM, but I have a question

input_features = input_features.to(torch_device)
eager_generated_ids = model.generate(input_features, max_new_tokens=64)

# Using statiic cache compiles forward for each decoding step, so we don't have to manually compile
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Using statiic cache compiles forward for each decoding step, so we don't have to manually compile
# Using static cache compiles forward for each decoding step, so we don't have to manually compile

@zucchini-nlp
Copy link
Member Author

Merging after tests are fixed on main

@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.

@zucchini-nlp zucchini-nlp merged commit 365fecb into huggingface:main Jan 30, 2025
25 checks passed
bursteratom pushed a commit to bursteratom/transformers that referenced this pull request Feb 5, 2025
* fix

* remove overriden method

* small change
elvircrn pushed a commit to elvircrn/transformers that referenced this pull request Feb 13, 2025
* fix

* remove overriden method

* small change
sbucaille pushed a commit to sbucaille/transformers that referenced this pull request Feb 16, 2025
* fix

* remove overriden method

* small change
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