ImportError: cannot import name 'Gemma3ForConditionalGeneration' from 'transformers'

#21
by Sashv - opened

(.venv) Macbook-pro gemma3 % modal deploy main.py
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/sashvdave/gemma3/main.py:4 in │
│ │
│ 3 import modal │
│ ❱ 4 from transformers import AutoProcessor, Gemma3ForConditionalGeneration │
│ 5 from PIL import Image │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ImportError: cannot import name 'Gemma3ForConditionalGeneration' from 'transformers'
(/Users/sashvdave/.pyenv/versions/3.11.7/lib/python3.11/site-packages/transformers/init.py)
(.venv) Macbook-pro gemma3 % gemma3 % pip freeze |grep transformers
transformers @ git+https://github.com/huggingface/transformers@46350f5eae87ac1d168ddfdc57a0b39b64b9a029
(.venv) Macbook-pro gemma3 % gemma3 %

Saw a thread on this but still getting the issue. Pretty sure i have the right version installed?

Your need to confirm your account before you can post a new comment.

Sign up or log in to comment