$ the-wire · showcase
Error propagation hardened in ollama's MLX bindings, gemma4 gains multimodal support
By RepoJournal · Filed · About Local LLMs
ollama's MLX runner now treats every fallible MLX call as an error it can surface, ending silent failures that corrupted outputs.
Ollama's MLX bindings dropped a process-exiting default error handler and then ignored the return codes, so failed ops continued with a null array and surfaced later as zeros, skipped evals, or crashes in unrelated code. The new [1] and [2] work checks every fallible call, panics with the captured MLX message, and returns load/save errors directly, so failures fail loudly at the point of origin. This is a correctness fix for anyone running gemma4 or other safetensors models on Apple Silicon via the MLX engine.
Gemma4 imports served by the MLX engine now accept image and audio input. Images run through the transformer tower (26B, 31B, e-series) and the 12B's encoder-free unified embedder, while audio flows through WAV bytes in the images field, OpenAI input_audio, and /v1/audio/transcriptions. The server no longer hides these capabilities [3]. This brings MLX parity with the GGUF-side multimodal support [4] already present in ollama.
Cache-aware metrics ship: native responses gain prompt_eval_cached_count, and OpenAI- and Anthropic-compatible APIs expose equivalent fields, keeping prompt_eval_count as the logical total while excluding cache hits from prefill rate calculations. llama-server and MLX both feed the counts [5].
Action items
- → Upgrade ollama to pick up MLX error-propagation fixes, which prevent silent output corruption on failed MLX operations. ollama/ollama [immediate]
- → After upgrading, validate gemma4 MLX deployments with image and audio chat tests to exercise the newly exposed capabilities. ollama/ollama [plan]
- → If you rely on prompt caching metrics, adopt the new prompt_eval_cached_count fields; prefill rates are now cache-excluded. ollama/ollama [plan]
References
- [1] mlxrunner: capture MLX errors in a single buffer read after every call ↗ ollama/ollama
- [2] mlxrunner: check every fallible mlx-c call in the MLX bindings ↗ ollama/ollama
- [3] gemma4: image and audio input on the MLX engine ↗ ollama/ollama
- [4] gemma4: image and audio input support ↗ ollama/ollama
- [5] Report cached prompt tokens ↗ ollama/ollama