llamafile and llama.cpp are closely related. llama.cpp is the open-source engine behind many local AI apps, while llamafile, from Mozilla.ai, takes llama.cpp and packages it, and optionally a model, into one file that runs without installation. So which should you use on your own PC? 10.6.
The key difference
llama.cpp is the upstream project. Its README lists several ways to get it: an install script from llama.app (for a shell or PowerShell), Docker, pre-built binaries from the GitHub releases page, or building from source. Once installed, you run models with commands such as llama cli and start an OpenAI-compatible API server with llama serve, and both can download a GGUF model directly from Hugging Face.
llamafile combines llama.cpp with Cosmopolitan Libc, so one executable runs on Windows, Linux, macOS and BSD without installation. A pre-built llamafile can include the model weights too, so a single file is the whole app. You can also run the standalone llamafile program with a separate GGUF model.
At a glance
| llamafile | llama.cpp |
|---|
Who makes it | Mozilla.ai (a Mozilla Builders project) | ggml-org and contributors |
Licence | Apache 2.0 (changes to llama.cpp are MIT) | MIT |
Install | None: one executable for several operating systems | Install script, pre-built binaries, Docker or build from source |
Model format | GGUF, optionally built into the file | GGUF |
Built-in model | Yes, with pre-built llamafiles | No, downloaded separately |
Web UI and API | llama.cpp's web UI and server, OpenAI- and Anthropic-compatible endpoints | Web UI and OpenAI-compatible server |
Extras | whisperfile speech-to-text in the same releases | Large set of tools and backends in one project |
Ease of use
llamafile is the simpler way to start. The quickstart has you download a small Qwen3.5 0.8B llamafile (1.77GB), add .exe to its name on Windows and run it. A chat opens in the terminal, and you can also use a browser chat at http://localhost:8080/.
On Windows there is a catch: the README says only executables under 4GB can run, so most larger models need the standalone llamafile program with an external GGUF file. At that point, using llamafile looks much like using llama.cpp.
The llama.cpp README now offers a one-line installer as well as ready-made binaries, so it is less fiddly than it used to be. Our guide to running llama.cpp on Windows goes through it.
Keeping up with new models
llama.cpp is where support for new models and features lands first. llamafile bundles a specific llama.cpp version: the README badge showed llama.cpp commit 7f5ee54 when we checked. The 0.10 series moved to a new build system to stay closer to llama.cpp, but the README warns it may be missing some features from older llamafile versions. Its own notes list things still missing in the new build, such as Stable Diffusion and some command-line features, though the release page now also offers a separate image-generation program, diffusionfile.
If you always want the newest model support, llama.cpp is the safer choice. If you just want something that works, llamafile's fixed version may suit you better.
GPU support
Both use GPU backends from llama.cpp. llamafile's supported systems page lists Apple Metal, NVIDIA CUDA, AMD HIP/ROCm and Vulkan, with no Intel oneAPI backend, although Vulkan covers many other GPUs. The standard llamafile download bundles the CUDA and Vulkan libraries for x86-64 Windows and Linux. ROCm is experimental and not bundled. The docs also say the bundled CUDA library leaves out the kernels for IQ-quantised models, so those layers stay on the CPU, and that the 0.10 series should be treated as best-effort on AMD and Windows.
llama.cpp's build guide covers more backends, including CUDA, HIP, Vulkan, Metal and SYCL, which is aimed at Intel GPUs. For more on this, see our CUDA vs ROCm vs Vulkan for local AI guide.
Which should you choose?
Choose llamafile if you want the easiest possible start, a file you can copy to another PC and run, or a way to share a model and app as one download.
Choose llama.cpp if you want the newest models and features, the widest choice of GPU backends (including Intel's SYCL), or you plan to use large models on Windows anyway, where llamafile needs separate weights.
If you would rather have a desktop app, see our llama.cpp vs LM Studio and llamafile vs Ollama comparisons.