Locally AI is a native chatbot for running models on iPhone with MLX, Apple’s framework for Apple silicon. Grondin points developers to MLX Swift LM for iOS, iPadOS, and macOS apps, saying its API can get a basic on-device model app running in under 10 minutes.
Running LLMs on your iPhone: 40 tok/s Gemma 4 with MLX
Speaker
Adrien Grondin, developer of Locally AI, explains how to run Gemma 4 and other language models on iPhone with MLX during an AI Engineer talk.
Grondin recommends finding compatible models in the MLX Community on Hugging Face, where he says thousands of model variants are available. Developers can pass a model ID to MLX Swift LM to download its weights. For iPhone, he recommends quantized models, generally between 4-bit and 8-bit, because lower bit counts can noticeably affect output.
Grondin says a 4-bit Gemma 4 can reach about 40 tokens per second on the latest iPhones, and demonstrates it generating text offline. Older iPhones can run models too, though more slowly; he gives 20 tokens per second as an already useful rate. Model downloads, typically around one to three gigabytes, remain a practical constraint.
Grondin says Locally AI had been acquired by LM Studio, which supports running local models with MLX or llama.cpp and serving them through compatible response formats. In response to a question, he says MLX Swift LM supports tool calling but not structured generation yet. App users can choose from models Grondin has checked for iPhone compatibility.
Takeaways
- Start an iOS prototype with MLX Swift LM and a compatible Hugging Face model ID.
- For phone deployments, compare quantized variants; Grondin recommends trying 4-bit to 8-bit models.
- Benchmark on target devices: his latest-iPhone example reaches about 40 tokens per second, while older phones are slower.
- Include model download size in the user experience; the cited models can require one to three gigabytes.
- MLX Swift LM supports tool calling, but structured generation was not supported at the time of the talk.
Mentioned in this talk
Search inside this talk
What was claimed 6
- feature
Locally: Runs on-device models on iPhone with MLX“lets you run on-device models on your iPhone with MLX”
YouTube Unverified1 source· Talk
- built
Apple Computer built MLX
“a framework made by Apple and optimized for Apple silicon”
YouTube Unverified1 source· Talk
- integrates with
MLX Swift LM integrates with Hugging Face
“the framework, which integrates with Hugging Face to download the model directly”
YouTube Unverified1 source· Talk
- metric
Gemma 4: 40 tokens per second on the latest iPhone with 4-bit quantization“Gemma 4 with 4-bit quantization ... can easily run at 40 tokens per second”
YouTube Unverified1 source· Talk
- feature
MLX Swift LM: Does not yet support structured generation“but not structured generation yet”
YouTube Unverified1 source· Talk
- feature
MLX Swift LM: Supports tool calling“MLX Swift LM does support tool calling”
YouTube Unverified1 source· Talk














