Add mobilenet_v5 stub implementation to fix "Unknown Model" error#39211
Open
VXXXO wants to merge 4 commits intohuggingface:mainfrom
Open
Add mobilenet_v5 stub implementation to fix "Unknown Model" error#39211VXXXO wants to merge 4 commits intohuggingface:mainfrom
VXXXO wants to merge 4 commits intohuggingface:mainfrom
Conversation
…odel - Rename PretrainedFSMTModel to PreTrainedFSMTModel to match naming convention - Update all usages and exports accordingly - Fixes issue huggingface#39202
- Add minimal mobilenet_v5 model implementation with config, model, and image processor - Register mobilenet_v5 in auto classes (AutoConfig, AutoModel, AutoImageProcessor) - Fixes issue huggingface#39208: 'Unknown Model (mobilenetv5_300m_enc)' when loading Gemma 3n - Provides stub implementation that prevents crashes and allows future expansion - Includes proper docstrings and warnings about stub nature - All components are properly integrated with Transformers architecture
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: auto, fsmt |
Collaborator
|
cc @qubvel ! |
Contributor
|
Hey @VXXXO, thanks for your contribution, but we just need a check for the |
This was referenced Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR addresses issue #39208: "Unknown Model (mobilenetv5_300m_enc) when loading Gemma 3n".
Problem
When loading Gemma 3n models, the default vision architecture is set to "mobilenetv5_300m_enc", but this architecture was not implemented in Transformers, causing an "Unknown Model" error that prevents users from using Gemma 3n.
Solution
MobileNetV5Config- configuration class with standard parametersMobileNetV5Model- stub model implementation (inherits from PreTrainedModel)MobileNetV5ImageProcessor- stub image processorBenefits
Testing
Note: This is a stub implementation that prevents crashes. Full implementation of mobilenet_v5 architecture is left for future contributions.
Fixes #39208