Instructions to use junnei/gemma-3-4b-it-speech with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use junnei/gemma-3-4b-it-speech with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="junnei/gemma-3-4b-it-speech", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("junnei/gemma-3-4b-it-speech", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
AttributeError: 'Gemma3TextModel' object has no attribute 'prepare_inputs_for_generation'
#5
by StephennFernandes - opened
i am facing the issue when running inference on the latest version of transformers, peft and accelerate.
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)
/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py in __getattr__(self, name)
1926 if name in modules:
1927 return modules[name]
-> 1928 raise AttributeError(
1929 f"'{type(self).__name__}' object has no attribute '{name}'"
1930 )
AttributeError: 'Gemma3TextModel' object has no attribute 'prepare_inputs_for_generation'