# llamafile

> Distribute and run a local LLM as a single executable file

- Category: Models & Inference / Local Runtimes
- Licence: Apache-2.0
- Repository: https://github.com/mozilla-ai/llamafile
- Canonical page: https://ai-tldr.dev/tools/llamafile/

## In short

llamafile is a Mozilla project that turns an open large language model and the code to run it into a single executable file. It combines llama.cpp with Cosmopolitan Libc, so one file can run locally on most operating systems and CPU architectures without any installation step. It sits in the Local Runtimes category of the Models & Inference tools and is open-source, licensed Apache-2.0.

## Overview

llamafile is a Mozilla project that turns an open large language model and the code to run it into a single executable file. It combines llama.cpp with Cosmopolitan Libc, so one file can run locally on most operating systems and CPU architectures without any installation step.

It is aimed at developers and end users who want to try or ship a local model without setting up a Python environment, downloading separate weights, or managing platform-specific builds. You download one file, make it executable, and run it.

As a local runtime, it fits the same niche as other on-device inference tools, but its focus is portability and zero-install distribution. The project also includes whisperfile, a single-file speech-to-text tool built on whisper.cpp and the same packaging.

## What it does

- Packages a model plus its runtime into one executable that needs no installation
- Built on llama.cpp and Cosmopolitan Libc to run across most operating systems and CPU architectures
- Pre-built llamafiles are available for download, ranging from small CPU-friendly models to larger ones
- Includes whisperfile for single-file audio transcription and translation built on whisper.cpp
- Runs on CPU out of the box, with support for larger models on more capable hardware and GPUs
- Apache 2.0 licensed, with changes to llama.cpp and whisper.cpp kept under MIT for upstream compatibility

## Getting started

Download a pre-built llamafile, make it executable, and run it locally. On Windows, rename the file to add a .exe extension (only executables under 4GB run on Windows).

1. Download an example model

   Fetch a small pre-built llamafile (Qwen3.5 0.8B) so it works out of the box on most hardware.

```bash
curl -LO https://huggingface.co/mozilla-ai/llamafile_0.10/resolve/main/Qwen3.5-0.8B-Q8_0.llamafile
```

2. Make it executable

   On macOS, Linux, or BSD, mark the downloaded file as executable.

```bash
chmod +x Qwen3.5-0.8B-Q8_0.llamafile
```

3. Run it

   Start the llamafile. It launches the bundled server locally with no separate install.

```bash
./Qwen3.5-0.8B-Q8_0.llamafile
```

## When to use it

- Run a local LLM on a laptop without setting up Python, CUDA, or a package manager
- Distribute a model to non-technical users as one file they can download and run
- Test or demo open models across macOS, Linux, BSD, and Windows from the same binary
- Transcribe or translate audio offline using whisperfile, the single-file speech-to-text companion
