> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prismml.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Download the Models

> Hugging Face repositories, file names, and download commands for every Bonsai variant.

All weights live under the [`prism-ml`](https://huggingface.co/prism-ml) org on Hugging Face. Names follow one convention:

| Family             | Format | Repository pattern                        |
| ------------------ | ------ | ----------------------------------------- |
| Bonsai (1-bit)     | GGUF   | `prism-ml/Bonsai-{SIZE}-gguf`             |
| Bonsai (1-bit)     | MLX    | `prism-ml/Bonsai-{SIZE}-mlx-1bit`         |
| Ternary (1.58-bit) | GGUF   | `prism-ml/Ternary-Bonsai-{SIZE}-gguf`     |
| Ternary (1.58-bit) | MLX    | `prism-ml/Ternary-Bonsai-{SIZE}-mlx-2bit` |

`{SIZE}` is `27B`, `8B`, `4B`, or `1.7B`. Not sure which variant you want? See the [lineup](/get-started/introduction#the-lineup) for size trade-offs, and [Formats & runtime support](/download/formats) for GGUF vs MLX.

## Automatic (demo repo)

[`setup.sh`](/get-started/quickstart) resolves the repository from `BONSAI_MODEL` and `BONSAI_FAMILY` and downloads into `models/`. To fetch additional variants later without re-running full setup:

```bash theme={null}
BONSAI_FAMILY=ternary BONSAI_MODEL=8B ./scripts/download_models.sh
BONSAI_FAMILY=all BONSAI_MODEL=all ./scripts/download_models.sh   # everything
```

## Manual (Hugging Face CLI)

```bash theme={null}
pip install -U "huggingface_hub[cli]"
hf download prism-ml/Bonsai-8B-gguf --local-dir ./Bonsai-8B-gguf
```

Swap in any repository from the tables below. No authentication is required; the repos are public.

## Repositories and sizes

### 27B

All 27B repos also carry an `mmproj` file for vision (+0.9 GiB), needed for image input regardless of format.

| Family         | Format | Repository                                                                                            | On disk (weights) |
| -------------- | ------ | ----------------------------------------------------------------------------------------------------- | ----------------- |
| Bonsai (1-bit) | GGUF   | [`prism-ml/Bonsai-27B-gguf`](https://huggingface.co/prism-ml/Bonsai-27B-gguf)                         | 3.53 GiB          |
| Bonsai (1-bit) | MLX    | [`prism-ml/Bonsai-27B-mlx-1bit`](https://huggingface.co/prism-ml/Bonsai-27B-mlx-1bit)                 | 3.92 GiB          |
| Ternary        | GGUF   | [`prism-ml/Ternary-Bonsai-27B-gguf`](https://huggingface.co/prism-ml/Ternary-Bonsai-27B-gguf)         | 6.66 GiB          |
| Ternary        | MLX    | [`prism-ml/Ternary-Bonsai-27B-mlx-2bit`](https://huggingface.co/prism-ml/Ternary-Bonsai-27B-mlx-2bit) | 7.05 GiB          |

### 8B

| Family         | Format | Repository                                                                                          | On disk |
| -------------- | ------ | --------------------------------------------------------------------------------------------------- | ------- |
| Bonsai (1-bit) | GGUF   | [`prism-ml/Bonsai-8B-gguf`](https://huggingface.co/prism-ml/Bonsai-8B-gguf)                         | 1.16 GB |
| Bonsai (1-bit) | MLX    | [`prism-ml/Bonsai-8B-mlx-1bit`](https://huggingface.co/prism-ml/Bonsai-8B-mlx-1bit)                 | 1.28 GB |
| Ternary        | GGUF   | [`prism-ml/Ternary-Bonsai-8B-gguf`](https://huggingface.co/prism-ml/Ternary-Bonsai-8B-gguf)         | 2.18 GB |
| Ternary        | MLX    | [`prism-ml/Ternary-Bonsai-8B-mlx-2bit`](https://huggingface.co/prism-ml/Ternary-Bonsai-8B-mlx-2bit) | 2.30 GB |

### 4B

| Family         | Format | Repository                                                                                          | On disk |
| -------------- | ------ | --------------------------------------------------------------------------------------------------- | ------- |
| Bonsai (1-bit) | GGUF   | [`prism-ml/Bonsai-4B-gguf`](https://huggingface.co/prism-ml/Bonsai-4B-gguf)                         | 0.57 GB |
| Bonsai (1-bit) | MLX    | [`prism-ml/Bonsai-4B-mlx-1bit`](https://huggingface.co/prism-ml/Bonsai-4B-mlx-1bit)                 | 0.63 GB |
| Ternary        | GGUF   | [`prism-ml/Ternary-Bonsai-4B-gguf`](https://huggingface.co/prism-ml/Ternary-Bonsai-4B-gguf)         | 1.07 GB |
| Ternary        | MLX    | [`prism-ml/Ternary-Bonsai-4B-mlx-2bit`](https://huggingface.co/prism-ml/Ternary-Bonsai-4B-mlx-2bit) | 1.13 GB |

### 1.7B

| Family         | Format | Repository                                                                                              | On disk |
| -------------- | ------ | ------------------------------------------------------------------------------------------------------- | ------- |
| Bonsai (1-bit) | GGUF   | [`prism-ml/Bonsai-1.7B-gguf`](https://huggingface.co/prism-ml/Bonsai-1.7B-gguf)                         | 0.25 GB |
| Bonsai (1-bit) | MLX    | [`prism-ml/Bonsai-1.7B-mlx-1bit`](https://huggingface.co/prism-ml/Bonsai-1.7B-mlx-1bit)                 | 0.27 GB |
| Ternary        | GGUF   | [`prism-ml/Ternary-Bonsai-1.7B-gguf`](https://huggingface.co/prism-ml/Ternary-Bonsai-1.7B-gguf)         | 0.46 GB |
| Ternary        | MLX    | [`prism-ml/Ternary-Bonsai-1.7B-mlx-2bit`](https://huggingface.co/prism-ml/Ternary-Bonsai-1.7B-mlx-2bit) | 0.48 GB |

## What's inside a GGUF repo

You usually want exactly one file from each repo:

* **1-bit repos**: `Bonsai-{SIZE}-Q1_0.gguf` is the file to use.
* **Ternary repos**: `Ternary-Bonsai-{SIZE}-Q2_0.gguf` is the default, plus the FP16 reference weights (large; only for comparison work).
* **27B repos only**: also grab the `mmproj` file alongside the quant file — it's required for image input and isn't optional the way the FP16 reference is.

To pull just the file you need:

```bash theme={null}
hf download prism-ml/Ternary-Bonsai-8B-gguf Ternary-Bonsai-8B-Q2_0.gguf --local-dir .
```

MLX repos are standard `mlx-lm` model directories (config, tokenizer, safetensors); download the whole repo.

## Next steps

<CardGroup cols={2}>
  <Card title="Check runtime support" icon="box" href="/download/formats">
    Make sure your runtime has native kernels for the file you downloaded.
  </Card>

  <Card title="Run it" icon="terminal" href="/run/server">
    Start the local server and connect your tools.
  </Card>
</CardGroup>
