Views
No views yet
google/gemma-4-31b with an added chat template for tool calling support, prepared for local inference on Apple Silicon.mlx-community/gemma-4-31b-4bit conversion (using mlx-vlm 0.4.3), with the addition of a chat template that was missing from the original conversion.henrybravo. All model capabilities, limitations, and licensing inherit from the original Google Gemma release.mlx-community conversion shipped without a chat template — neither tokenizer_config.json nor any separate template file contained one. Google's original google/gemma-4-31b also has no chat template in its published configs.<|turn> / <turn|> for turn boundaries)<|tool_call> / <tool_call|> and <|tool_response> / <tool_response|> tokenstokenizer_config.json and provided as a standalone chat_template.jinjagoogle/gemma-4-31bGemma4ForConditionalGeneration (gemma4)mlx-community/gemma-4-31b-4bit)safetensors (4 shards)mlx-vlm / MLX ecosystem on macOSpip install -U mlx-vlm>=0.4.3mlx-router.mlx_vlm.generate, or serve the model through mlx-router.1python -m mlx_vlm.generate \
2 --model henrybravo/gemma-4-31b-4bit \
3 --max-tokens 100 \
4 --temperature 0.0 \
5 --prompt "Hello, what model are you?"1python -m mlx_vlm.generate \
2 --model henrybravo/gemma-4-31b-4bit \
3 --max-tokens 200 \
4 --temperature 0.0 \
5 --prompt "Describe this image in detail." \
6 --image https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/Camponotus_flavomarginatus_ant.jpg/320px-Camponotus_flavomarginatus_ant.jpgmlx-vlm, not mlx-lm (which does not support the gemma4 architecture yet)tokenizer_config.json and the Gemma 3 template structurehas_tool_calling is not set on the tokenizer; tool call parsing should be handled by the serving layer (e.g. mlx-router parses <|tool_call>...<tool_call|> blocks)