You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
➜ agent git:(agent) ✗ python3
Python 3.10.16 (main, Mar 4 2025, 12:34:35) [Clang 16.0.0 (clang-1600.0.26.6)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from smolagents import MLXModel
Python-dotenv could not parse statement starting at line 33
>>> engine = MLXModel(model_id="mlx-community/gemma-3-4b-it-8bit",max_tokens=10000)
Fetching 10 files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [00:00<00:00, 169125.16it/s]
ERROR:root:Model type gemma3 not supported.
Traceback (most recent call last):
File "/Users/litan/.pyenv/versions/3.10.16/envs/shoppingwise/lib/python3.10/site-packages/mlx_lm/utils.py", line 148, in _get_classes
arch = importlib.import_module(f"mlx_lm.models.{model_type}")
File "/Users/litan/.pyenv/versions/3.10.16/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'mlx_lm.models.gemma3'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/litan/.pyenv/versions/3.10.16/envs/shoppingwise/lib/python3.10/site-packages/smolagents/models.py", line 522, in __init__
self.model, self.tokenizer = mlx_lm.load(model_id, tokenizer_config={"trust_remote_code": trust_remote_code})
File "/Users/litan/.pyenv/versions/3.10.16/envs/shoppingwise/lib/python3.10/site-packages/mlx_lm/utils.py", line 785, in load
model, config = load_model(model_path, lazy)
File "/Users/litan/.pyenv/versions/3.10.16/envs/shoppingwise/lib/python3.10/site-packages/mlx_lm/utils.py", line 720, in load_model
model_class, model_args_class = get_model_classes(config=config)
File "/Users/litan/.pyenv/versions/3.10.16/envs/shoppingwise/lib/python3.10/site-packages/mlx_lm/utils.py", line 152, in _get_classes
raise ValueError(msg)
ValueError: Model type gemma3 not supported.
>>> engine = MLXModel(model_id="mlx-community/gemma-3-4b-it-8bit",max_tokens=10000)
Error logs (if any)
See the command line output above.
Additional context
I can get the output through python -m mlx_vlm.generate --model mlx-community/gemma-3-4b-it-8bit --max-tokens 100 --temperature 0.0 --prompt "How to make sushi?" and I assume the problem was more on the smolagents' usage.
Packages version:
Run pip freeze | grep smolagents and paste it here.
Describe the bug
MLXModel doesn't support Gemm3
Code to reproduce the error
Error logs (if any)
See the command line output above.
Additional context
I can get the output through
python -m mlx_vlm.generate --model mlx-community/gemma-3-4b-it-8bit --max-tokens 100 --temperature 0.0 --prompt "How to make sushi?"
and I assume the problem was more on the smolagents' usage.Packages version:
Run
pip freeze | grep smolagents
and paste it here.Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: