Skip to content

Conversation

gante
Copy link
Member

@gante gante commented Sep 5, 2025

What does this PR do?

See title.

In the process, deflakes a lot of tests :) (It was generating forbidden tokens in tests, like image tokens in VLMs -- now we can specify which sequences are forbidden)

py.test tests/models/voxtral/test_modeling_voxtral.py -k test_prompt_lookup_decoding_matches_greedy_search --flake-finder --flake-runs 1000 now runs with without problems.

Copy link
Contributor

github-actions bot commented Sep 5, 2025

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

run-slow: idefics2, idefics3, qwen2_5_vl, smolvlm

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

@@ -1019,11 +1019,15 @@ def __init__(
num_output_tokens: int = 10,
max_matching_ngram_size: Optional[int] = None,
max_length: int = 20,
bad_words_ids: Optional[list[list[int]]] = None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe somewhere to explain this in more details.

I get the idea, but not clear about the format, like why it's a list of list of int, and below it is converted to list of tensors, and how this format is sued in the actual logic if any(bad_word_id.to(chosen_ids.device) in chosen_ids for bad_word_id in self.bad_words_ids):.

Just nit but would be nice to have

Copy link
Collaborator

@ydshieh ydshieh left a comment

Choose a reason for hiding this comment

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

Super!!!!!

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