Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gemma3 not supported in main branch #36940

Open
2 of 4 tasks
xihuai18 opened this issue Mar 24, 2025 · 1 comment
Open
2 of 4 tasks

Gemma3 not supported in main branch #36940

xihuai18 opened this issue Mar 24, 2025 · 1 comment
Labels

Comments

@xihuai18
Copy link

System Info

latest main branch of 0325

Who can help?

@amyeroberts, @qubvel

Gemma3Config is not supported in the lastest main branch.

ValueError: Unrecognized configuration class <class 'transformers.models.gemma3.configuration_gemma3.Gemma3Config'> for this kind of AutoModel: AutoModel.

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

run gemma3 using AutoModel.from_config

Expected behavior

No.

@xihuai18 xihuai18 added the bug label Mar 24, 2025
@zucchini-nlp
Copy link
Member

zucchini-nlp commented Mar 24, 2025

@xihuai18 hey! We don't have a base Gemma3Model class yet, I am adding base classes for all vision LLMs currently in #36367. If you want to get last hidden state from the model, you can do as follows:

model = Gemma3ForConditionalGeneration.from_pretrained(model_id)
last_hidden_states = model(input_ids, pixel_values=pixel_values).hidden_states[-1]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants