Skip to content

Conversation

@zucchini-nlp
Copy link
Member

What does this PR do?

As per title, fixes slow tests for BART and MVP

@github-actions
Copy link
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: bart, mvp

@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
Copy link
Member Author

slow bart test won't pass anyway due to weight tying, so skipping it for now

@zucchini-nlp zucchini-nlp requested a review from vasqu November 24, 2025 08:54
Copy link
Contributor

@vasqu vasqu left a comment

Choose a reason for hiding this comment

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

Thx LGTM, just a small nit

And could you also include another fix (I checked locally with #42355 that everything works).

model = BartForConditionalGeneration.from_pretrained("facebook/bart-large", forced_bos_token_id=0).to(

This shouldn't be passed in from_pretrained anymore and we should rather pass this to generate, i.e. model.generate(..., forced_bos_token_id=0)

self._commit_hash = kwargs.pop("_commit_hash", None)
self.transformers_version = kwargs.pop("transformers_version", __version__)

# Ensure backward compatibility for BART CNN models
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
# Ensure backward compatibility for BART CNN models
# Ensure backward compatibility for models that use `forced_bos_token_id` within their config

might affect more, nit

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