Gemma 4: MTP speed tests and Claude Code setup
Learn how to connect Gemma 4 through Ollama to Claude Code and OpenCode, with MLX VLM drafter tests reporting 85 versus 221 tokens per second.
Player not loading? Watch on YouTube
This tutorial covers Gemma 4 speed tests and an Ollama setup for using the model as a local coding assistant in Claude Code or OpenCode. The speaker explains how a small assistant, or drafter, proposes multiple tokens for the target model to verify through speculative decoding.
The drafter demonstration uses MLX VLM. In one live test, the speaker reports 85 tokens per second without the drafter and 221 with it, roughly a 2.6x increase. These are results from the demonstrated setup, not a guaranteed speedup. At the time of recording, the speaker says Ollama, LM Studio and llama.cpp do not support the drafter, so the Claude Code walkthrough uses regular Gemma 4 instead.
The setup covers installing Ollama, downloading a model with ollama run, and launching Claude Code with that model selected. The speaker checks /status for the model name and a localhost base URL, then shows how to launch OpenCode with the same model.
The speaker has an M5 Pro machine with 64 GB of RAM but chooses 9B for the walkthrough. They recommend 2B for 8 GB of RAM and warn that larger models may run slowly or fail when memory is insufficient. In their testing, OpenCode handles tool calling better than Claude Code. The walkthrough therefore gives both connection steps and practical limitations for people who want to run models locally.