Gemma 4 12B MLX Model Fails to Load: gemma4_unified Not Supported

#2
by rishi454 - opened

The model downloads successfully (~12.7 GB), but fails during model initialization with:
ModuleNotFoundError: No module named 'mlx_lm.models.gemma4_unified'

ValueError: Model type gemma4_unified not supported.

Command used :
python3 -m mlx_lm server
--model "mlx-community/gemma-4-12B-it-8bit"

The same error occurs with both mlx-community/gemma-4-12B-it-bf16 and mlx-community/gemma-4-12B-it-8bit

rishi454 changed discussion status to closed

just upgrade your version...

@usermma what version, exactly? pip3 install mlx-lm? thanks.

@usermma what version, exactly? pip3 install mlx-lm? thanks.

did it work?
pip3 install mlx-lm -U

$ pip3 list | grep mlx
mlx                0.31.2
mlx-audio          0.4.4
mlx-lm             0.31.3
mlx-metal          0.31.2
mlx-optiq          0.2.7
mlx-vlm            0.6.3

$ pip3 --version
pip 26.1.2 from /Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/pip (python 3.13)

unfortunately it does not work... is it working for you, and if so, could you detail how you have installed it?
thanks!

use this:
to upgrade all of them:

Very-FIRST Upgrade pip:
pip3 install -U pip

and afterwards do a little-execution of this:
pip3 install -U mlx mlx-lm mlx-metal mlx-optiq mlx-vlm mlx-audio

thanks! I did, and pip said there was nothing to do, and the 2nd one updated optiq (0.2.7 -> 0.2.9); so now I have:

mlx                0.31.2
mlx-audio          0.4.4
mlx-lm             0.31.3
mlx-metal          0.31.2
mlx-optiq          0.2.9
mlx-vlm            0.6.3

do these versions match yours?

i hope you stop trying to run gemma4-12B , its slow and not very great at coding...
thats only in case if you managed to run it...

Actually No , i don't have a any of apple products currently..

consider try a different model or cheap Nvidia GPUs or DGX small computers...

Sign up or log in to comment