huggingface / huggingface/local-gemma
local-gemma is not compatible with transformers 4.47
- Dominant language
- Python
- Stars
- 383
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
Installing the package using pip, by default installs the latest version of transformers (4.47).
Then, running the local-gemma command, returns the following error.
```
File "/local_gemma/attention.py", line 8, in
from transformers.models.gemma2.modeling_gemma2 import Gemma2RotaryEmbedding, apply_rotary_pos_emb, repeat_kv, GEMMA2_ATTENTION_CLASSES
ImportError: cannot import name 'GEMMA2_ATTENTION_CLASSES' from 'transformers.models.gemma2.modeling_gemma2'
(/transformers/models/gemma2/modeling_gemma2.py)
```
It turns out this has to do with a bug introduced in version 4.47.0 of the transformers package, in the file
'transformers/models/gemma2/modeling_gemma2.py'
Downgrading to version 4.46 solved the issue for me.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.