Skip to content

Conversation

@IlyasMoutawwakil
Copy link
Member

@IlyasMoutawwakil IlyasMoutawwakil commented Oct 22, 2025

@thewh1teagle this PR allows to correctly export with text-generation(-with-past) task even when loading from a vlm checkpoint.
it in the last PR there was only a causal lm checkpoint in the onnxruntime tests, and a vlm checkpoint in the exporters tests (which I wasn't aware of its failure)

@echarlaix apparently with gemma3, there's no way to make the model output the past_key_values (even when all configs and subconfigs have their use_cache attribute set to True) because of this line
I have made changes so that we can pass use_cache as an argument instead, this seems to be more reliable and removes the need for patching a couple models where a specific use_cache had to be set (seq2seq models and trocr).

@IlyasMoutawwakil IlyasMoutawwakil changed the title Fix gemma3 vlm checkpoint Fix gemma3 export from a vlm checkpoint Oct 22, 2025
@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.

@IlyasMoutawwakil IlyasMoutawwakil marked this pull request as ready for review October 22, 2025 11:21
@IlyasMoutawwakil IlyasMoutawwakil merged commit c123e8f into main Oct 22, 2025
36 checks passed
@IlyasMoutawwakil IlyasMoutawwakil deleted the fix-gemma3-tasks branch October 22, 2025 15:34
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