Open-weight models on a laptop
One of my goals for the first note was to see how far a free model on an ordinary laptop is from a frontier model. That meant learning how to run one.
A model’s weights, also called its parameters, are the numbers it learned in training. An open-weight model is one whose weights anyone can download and run. A frontier model is one of the most capable models of its time, usually closed-weight, and you reach it through its maker’s API.
The first problem is size. At 16 bits per weight, a model with 12 billion weights needs about 24 GB of memory, and my laptop has 16 GB. Quantization stores each weight in fewer bits, 4 instead of 16, which shrinks the model to about a quarter of the size and costs some quality. Google released versions of Gemma 3 trained with that compression built in (quantization-aware training), so they lose less. mlx-lm runs a model like that on a Mac’s Apple silicon and accepts requests in a format like OpenAI’s API, so Inspect can call it like any other model. Running a trained model to get answers is called inference, and mlx-lm is acting as an inference server.
The second thing is making sure you can run the same model again. A model on Hugging Face is a repository of files, and its owner can change them. Every version has a commit hash, and downloading by that hash, called pinning the revision, means you always get the same weights. That’s what makes the run reproducible. A vendor’s model is pinned by its dated name, and it’s gone once the vendor retires it.
So why bother? A laptop model is free to run, keeps everything on the laptop, can be rerun with the same weights years from now, and you can look inside it, which is what interpretability research needs. It’s also smaller and slower, and the compressed version may answer differently from the full one. A frontier model through an API is far more capable, costs money per call, and can change or disappear.
Where I learned it
- How far is a small open-weight model on a laptop from a frontier model on these conversations? Pretty far. It was behind on every axis, and furthest behind with health professionals.
- How do I make sure the laptop model can be run again exactly? Download it by its commit hash, have the run refuse any other revision, and use the sampling settings its maker published.
- Is it fair to compare a model that thinks before it answers with one that doesn’t? I ran each the way people actually use it, and listed the difference as a limit.
Read more
- Gemma 3 QAT models, Google’s post on quantization-aware training
- mlx-lm, which runs language models on Apple silicon
- Downloading files from the Hub, Hugging Face’s guide, including a download by revision