To add some numbers, on MBP M1 64GB with ggml-org/gemma-3-4b-it-GGUF I get<p><pre><code> 25t/s prompt processing
63t/s token generation
</code></pre>
Overall processing time per image is ~15secs, no matter what size the image is. The small 4B has already very decent output, describing different images pretty well.<p>Steps to reproduce:<p><pre><code> git clone https://github.com/ggml-org/llama.cpp.git
cmake -B build
cmake --build build --config Release -j 12 --clean-first
# download model and mmproj files...
build/bin/llama-server \
--model gemma-3-4b-it-Q4_K_M.gguf \
--mmproj mmproj-model-f16.gguf
</code></pre>
Then open <a href="http://127.0.0.1:8080/" rel="nofollow">http://127.0.0.1:8080/</a> for the web interface<p>Note: if you are not using -hf, you must include the --mmproj switch or otherwise the web interface gives an error message that multimodal is not supported by the model.<p>I have used the official ggml-org/gemma-3-4b-it-GGUF quants, I expect the unsloth quants from danielhanchen to be a bit faster.
It works super well!<p>You'll have to compile llama.cpp from source, and you should get a llama-mtmd-cli program.<p>I made some quants with vision support - literally run:<p>./llama.cpp/llama-mtmd-cli -hf unsloth/gemma-3-4b-it-GGUF:Q4_K_XL -ngl -1<p>./llama.cpp/llama-mtmd-cli -hf unsloth/gemma-3-12b-it-GGUF:Q4_K_XL -ngl -1<p>./llama.cpp/llama-mtmd-cli -hf unsloth/gemma-3-27b-it-GGUF:Q4_K_XL -ngl -1<p>./llama.cpp/llama-mtmd-cli -hf unsloth/unsloth/Mistral-Small-3.1-24B-Instruct-2503-GGUF:Q4_K_XL -ngl -1<p>Then load the image with /image image.png inside the chat, and chat away!<p>EDIT: -ngl -1 is not needed anymore for Metal backends (CUDA still yes) (llama.cpp will auto offload to the GPU by default!). -1 means all GPU layers offloaded to the GPU.
We also support SmolVLM series which delivers light-speed response thanks to its mini size!<p>This is perfect for real-time home video surveillance system. That's one of the ideas for my next hobby project!<p><pre><code> llama-server -hf ggml-org/SmolVLM-Instruct-GGUF
llama-server -hf ggml-org/SmolVLM-256M-Instruct-GGUF
llama-server -hf ggml-org/SmolVLM-500M-Instruct-GGUF
llama-server -hf ggml-org/SmolVLM2-2.2B-Instruct-GGUF
llama-server -hf ggml-org/SmolVLM2-256M-Video-Instruct-GGUF
llama-server -hf ggml-org/SmolVLM2-500M-Video-Instruct-GGUF</code></pre>
This is the most useful documentation I've found so far to help understand how this works: <a href="https://github.com/ggml-org/llama.cpp/tree/master/tools/mtmd#multimodal-support-in-llamacpp">https://github.com/ggml-org/llama.cpp/tree/master/tools/mtmd...</a>
I used this to create keywords and descriptions on a bunch of photos from a trip recently using Gemma3 4b. Works impressively well, including going doing basic OCR to give me summaries of photos of text, and picking up context clues to figure out where many of the pictures were taken.<p>Very nice for something that's self hosted.
llama.cpp offers compiled releases for multiple platforms. This release has the new vision features: <a href="https://github.com/ggml-org/llama.cpp/releases/tag/b5332">https://github.com/ggml-org/llama.cpp/releases/tag/b5332</a><p>On macOS I downloaded the llama-b5332-bin-macos-arm64.zip file and then had to run this to get it to work:<p><pre><code> unzip llama-b5332-bin-macos-arm64.zip
cd build/bin
sudo xattr -rd com.apple.quarantine llama-server llama-mtmd-cli *.dylib
</code></pre>
Then I could run the interactive terminal (with a 3.2GB model download) like this (borrowing from <a href="https://news.ycombinator.com/item?id=43943370R">https://news.ycombinator.com/item?id=43943370R</a>)<p><pre><code> ./llama-mtmd-cli -hf unsloth/gemma-3-4b-it-GGUF:Q4_K_XL -ngl 99
</code></pre>
Or start the localhost 8080 web server (with a UI and API) like this:<p><pre><code> ./llama-server -hf unsloth/gemma-3-4b-it-GGUF:Q4_K_XL -ngl 99
</code></pre>
I wrote up some more detailed notes here: <a href="https://simonwillison.net/2025/May/10/llama-cpp-vision/" rel="nofollow">https://simonwillison.net/2025/May/10/llama-cpp-vision/</a>
How does this compare to using a multimodal model like gemma3 via ollama?<p>Any benefit on a Mac with apple silicon? Any experiences someone could share?
Are there any tools that leverage vision for UI development?<p>Use case: I am working on a hobby project that uses TS/React as frontend. I can use local or cloud LLMs in VSCode but even those with vision require that I take a screenshot and paste it to a chat. Ideally, I would want it all automated until some stop criterion is met (even if only n-iterations). But even an extension that would screenshot a preview and paste it to chat (triggered by a keyboard shortcut) would be a big time-saver.
This is excellent. I've been pulling and rebuilding periodically, and watching the commit notes as they (mostly ngxson, I think) first added more vision models, each with their own CLI program, then unified those under a single CLI program and deprecated the standalone one, while bug fixing and improving the image processing. I'd been hoping that meant they'd eventually add support to the server again, and now it's here! Thanks!
Seems like another step change. The first time I ran a local LLM on my phone and carried on a fairly coherent conversation, I imagined edge inference would take off really quickly at least with e.g. personal assistant/"digital waifu" business cases. I wonder what the next wave of apps built on Llama.cpp and its downstream technologies will do to the global economy in the next three months.
Finally! Open source multimodal is so far behind closed source options that people don’t even try to benchmark<p>They’re still doing text and math tests on every new model because it’s so bad
Man, the ngl abbreviation gets me every time too. Kinda cool seeing all the tweaks folks do to make this stuff run faster on their Macs. You think models hitting these speed boosts will mean more people start playing with vision stuff at home?