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

> ## Agent Instructions
> Tokios exposes private local models through https://api.tokios.com using an outbound-only connector tunnel.
> Use 'connector' for the local tokios-connector process.
> Use 'deployment' for the public model name in the API model field.
> Use 'upstream model id' for the model served by Ollama, llama.cpp, vLLM, LM Studio, or another local backend.
> API keys use the prefix sk-tok-. Connector tokens use the prefix ct-tok-.

# Run MiniMax M3.1 Flash and M3 locally — the realistic path (and M2)

> MiniMax M3.1 Flash is the latest release — a 428B MoE with native multimodal, 1M context, and DSpark speculative decoding. M3 and the M2 line also documented. Here's what runs on your hardware.

> [!NOTE]
>
> Last verified: 2026-10-24

MiniMax ships open-weight, agent-focused models. **MiniMax M3.1 Flash** (released October 23, 2026) is the current flagship — a **\~428B mixture-of-experts** model (about 23B active per token) with native multimodal input (text, image, video), **1M-token context**, and DSpark speculative decoding. The earlier **M3** is superseded by M3.1 Flash. The **M2 line** (M2 → M2.5 → M2.7) is the earlier, coding-agent-oriented series at \~230B; it has the most mature community quantization ecosystem. None of these are single-consumer-GPU models, but the M2 line *is* reachable on a big-memory Mac or workstation.

## Can you run MiniMax locally?

MiniMax publishes only **safetensors** (BF16/F32) in its own repos — no official GGUF, AWQ, or MLX. Every quantized build comes from the community (Unsloth, bartowski, and others). What that means in practice:

| Model | Realistic local setup | Notes |
| - | - | - |
| **M3.1 Flash** (\~428B / 23B active) | \~249 GB for Q4\_K\_XL GGUF, or multi-GPU server for safetensors | Current flagship; DSpark speculative decoding |
| **M3** (\~428B / 23B active) | 128–270 GB RAM/VRAM for a community GGUF, or a multi-GPU server for the safetensors | Superseded by M3.1 Flash |
| **M2.7 / M2.5** (\~229B / 10B active) | **128 GB unified-memory Mac**, or 1×16 GB GPU + \~96 GB system RAM | \~15–25 tok/s on a 128 GB Mac at `UD-Q3/IQ4`-class quants |
| **M2** (\~230B / 10B active) | Same class as M2.5/M2.7 | Original release; most third-party tooling references it |
| Single consumer GPU (8–24 GB) | Not on its own | Even the smallest usable quant is \~100 GB+ |

So the honest picture: MiniMax is a **big-memory** model, not a laptop-GPU one. If you have a 128 GB+ unified-memory Mac or a workstation with 128–512 GB of RAM, the M2 line runs via community GGUF. The M3.1 Flash and M3 need 249+ GB at Q4 — plan for 4x DGX Spark, 2x Mac Studio M5 Ultra 512 GB, or similar. Below that, MiniMax is effectively an API/cloud model.

> [!WARNING]
>
> **MiniMax Sparse Attention (MSA) isn't supported in `llama.cpp` yet.** M3 and M3.1 Flash's headline 1M-context and speed advantages come from MSA — but community GGUF builds fall back to dense attention, so a *local* `llama.cpp`/LM Studio run won't deliver the full long-context behavior today. For the real experience at full context, serve the safetensors on vLLM/SGLang.

## "MiniMax on Ollama" is cloud, not local

`minimax-m3-1-flash`, `minimax-m3`, `minimax-m2.7`, `minimax-m2.5`, and `minimax-m2` all exist in the Ollama library — but each exposes only a **`:cloud`** tag. Those proxy requests to MiniMax's hosted API; the weights never download to your machine, so there's nothing local for a connector to point at. To self-host MiniMax on hardware you control, use a community GGUF (`llama.cpp`/LM Studio) or the safetensors (vLLM/SGLang), below — not Ollama's `:cloud` tag.

## Run it on your own hardware

> [tab] Community GGUF — M3.1 Flash (multi-GPU server)
>
> Download GGUF builds from [`unsloth/MiniMax-M3.1-Flash-GGUF`](https://huggingface.co/unsloth/MiniMax-M3.1-Flash-GGUF). Q4\_K\_XL is \~249 GB — needs 4x DGX Spark, 2x Mac Studio M5 Ultra 512 GB, or similar. Experimental [VQ-GGUF](https://huggingface.co/Baekpica/MiniMax-M3.1-Flash-VQ-GGUF) from Baekpica pushes routed experts to \~2.0 bpw for a smaller footprint. Run through `llama.cpp` or LM Studio for an OpenAI-compatible API on `http://127.0.0.1:8080/v1`.

> [tab] Community GGUF — M2 line (big-RAM Mac/workstation)
>
> On a 128 GB+ unified-memory Mac or a big-RAM workstation, run an M2.5/M2.7 community GGUF through `llama.cpp` or LM Studio. Start from Unsloth's or bartowski's quants and pick the largest that fits your combined memory (`UD-Q3_K_XL` ≈ 101 GB, `UD-IQ4_XS` ≈ 108 GB; `Q8_0` ≈ 243 GB needs \~256 GB RAM). LM Studio then exposes an OpenAI-compatible API on `http://127.0.0.1:1234/v1`.

> [tab] vLLM / SGLang — M3.1 Flash (multi-GPU server)
>
> ```bash theme={"theme":{"light":"github-light","dark":"css-variables"}}
> vllm serve MiniMaxAI/MiniMax-M3.1-Flash \
>   --tensor-parallel-size 8 \
>   --trust-remote-code
> ```
>
> Serve the official safetensors across a multi-GPU box to get M3.1 Flash's real 1M-context behavior (MSA intact) with DSpark speculative decoding. vLLM exposes an OpenAI-compatible API on `http://127.0.0.1:8000/v1`. Check the model card for the current recommended flags and tool-call parser before serving.

> [tab] vLLM / SGLang — M3 (multi-GPU server, superseded)
>
> ```bash theme={"theme":{"light":"github-light","dark":"css-variables"}}
> vllm serve MiniMaxAI/MiniMax-M3 \
>   --tensor-parallel-size 8 \
>   --trust-remote-code
> ```
>
> Serve the official safetensors across a multi-GPU box to get M3's real 1M-context behavior (MSA intact). vLLM exposes an OpenAI-compatible API on `http://127.0.0.1:8000/v1`. Check the model card for the current recommended flags and tool-call parser before serving.

## Variants & specs

Every value below is from the MiniMax model cards on Hugging Face and MiniMax's release notes. M2, M2.1, M2.5, M2.7, and M3 are marked **superseded** on MiniMax's own docs — M3.1 Flash is current. Verify against the model card before standardizing.

| Property | MiniMax M3.1 Flash (current) | MiniMax M3 (superseded) | MiniMax M2.7 | MiniMax M2 (original) |
| - | - | - | - | - |
| Hugging Face | [`MiniMaxAI/MiniMax-M3.1-Flash`](https://huggingface.co/MiniMaxAI/MiniMax-M3.1-Flash) | [`MiniMaxAI/MiniMax-M3`](https://huggingface.co/MiniMaxAI/MiniMax-M3) | [`MiniMaxAI/MiniMax-M2.7`](https://huggingface.co/MiniMaxAI/MiniMax-M2.7) | [`MiniMaxAI/MiniMax-M2`](https://huggingface.co/MiniMaxAI/MiniMax-M2) |
| GGUF | [`unsloth/MiniMax-M3.1-Flash-GGUF`](https://huggingface.co/unsloth/MiniMax-M3.1-Flash-GGUF) | Community GGUF only | Community GGUF only | Community GGUF only |
| Ollama tag | `minimax-m3-1-flash:cloud` (cloud only) | `minimax-m3:cloud` (cloud only) | `minimax-m2.7:cloud` (cloud only) | `minimax-m2:cloud` (cloud only) |
| Parameters | \~428B total / **\~23B active** (128 experts, 4/token + 1 shared) | \~428B total / **\~23B active** | \~229B total / **\~10B active** | \~230B total / **\~10B active** (256 experts, 8/token) |
| Context window | 1,048,576 (1M) | 1,048,576 (1M) | \~200K (204,800) | \~196K (196,608) |
| Modality | Text + image + video | Text + image + video; computer use | Text | Text |
| Speculative decoding | **DSpark head** | EAGLE-like MTP | None | None |
| Official format | Safetensors (BF16/F32) — community GGUF available | Safetensors — community GGUF only | Safetensors — community GGUF only | Safetensors — community GGUF only |
| License | minimax-community | MiniMax Community License | Non-commercial | MIT + attribution clause |
| Best for | Current flagship; multimodal + agentic + DSpark | Superseded by M3.1 Flash | Coding agents (superseded) | The coding-agent line's origin; best community tooling |

Sources: [`MiniMaxAI/MiniMax-M3.1-Flash`](https://huggingface.co/MiniMaxAI/MiniMax-M3.1-Flash), [`MiniMaxAI/MiniMax-M3`](https://huggingface.co/MiniMaxAI/MiniMax-M3), [`MiniMaxAI/MiniMax-M2`](https://huggingface.co/MiniMaxAI/MiniMax-M2), [MiniMax release notes](https://platform.minimax.io/docs/release-notes/models), [ollama.com/library/minimax-m3-1-flash](https://ollama.com/library/minimax-m3-1-flash).

> [!NOTE]
>
> **Licensing varies a lot by version.** M2 is MIT-with-attribution (permissive), M2.7 is **non-commercial** (commercial use needs written authorization), and M3 uses the **MiniMax Community License** (free below a revenue threshold, attribution "Built with MiniMax M3"). Read the `LICENSE`/`LICENSE-MODEL` file on the specific model card before any commercial deployment.

## Which MiniMax should you run?

* **M3.1 Flash** if you want the current flagship — DSpark speculative decoding, multimodal, 1M context — and have a multi-GPU server (249+ GB at Q4) or accept the `llama.cpp` sparse-attention limitation on a big-RAM box.
* **M3** if you need the earlier release for a specific reason (superseded by M3.1 Flash).
* **M2 / M2.7** if you're on a 128 GB unified-memory Mac or big-RAM workstation and want a coding-agent model that runs *today* via mature community GGUFs. M2 has the deepest third-party tooling; M2.7 is the newer coding release (non-commercial license).

## Connect it with Tokios

Once MiniMax is running on your own hardware — LM Studio, `llama.cpp`, vLLM, or SGLang exposing an OpenAI-compatible `/v1` — pair the Tokios connector so you can reach it as `https://api.tokios.com` from Claude Code, Cline, or any other compatible client, instead of only from that one machine.

**1. Pair the Tokios connector**

Sign in at [tokios.com/console](https://tokios.com/console), open the **Setup** tab, and click **Start pairing** to get a one-time claim code (`TKS-XXXX-XXXX`). Install and run the connector on the machine hosting MiniMax:

```bash macOS theme={"theme":{"light":"github-light","dark":"css-variables"}}
curl -fsSL https://tokios.com/downloads/install/macos | sh -s -- --code TKS-XXXX-XXXX
```

```bash Linux theme={"theme":{"light":"github-light","dark":"css-variables"}}
curl -fsSL https://tokios.com/downloads/install/linux | sh -s -- --code TKS-XXXX-XXXX
```

Then **approve** the device on the **Setup** or **Connectors** tab.

**2. Point the connector at your runtime's /v1 API**

LM Studio serves `http://127.0.0.1:1234/v1`; vLLM/SGLang serve `http://127.0.0.1:8000/v1`. Set the right one as the upstream in `tokios-connector.json` — see [Connector config](https://docs.tokios.com/reference/connector-config.md).

**3. Register a deployment**

In the [Models](https://tokios.com/console/models) tab, register the model and choose a public deployment name, for example `minimax-tunnel`. This name — not the upstream model id — is what clients send in the `model` field.

**4. Create an API key**

In the [Keys](https://tokios.com/console/keys) tab, click **Create key**. Copy the `sk-tok-…` key now — it's shown only once.

### Call it from anywhere

```bash curl (OpenAI-compatible) theme={"theme":{"light":"github-light","dark":"css-variables"}}
curl https://api.tokios.com/v1/chat/completions \
  -H "Authorization: Bearer sk-tok-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-tunnel",
    "stream": true,
    "messages": [{"role": "user", "content": "Refactor this module and run the tests."}]
  }'
```

```bash Claude Code (Anthropic-compatible) theme={"theme":{"light":"github-light","dark":"css-variables"}}
export ANTHROPIC_BASE_URL=https://api.tokios.com
export ANTHROPIC_API_KEY=sk-tok-YOUR_KEY
claude --model minimax-tunnel
```

> [!TIP]
>
> The `model` field is always your registered **deployment** name (`minimax-tunnel` above), never the upstream model id. See [Use Claude Code](https://docs.tokios.com/guides/claude-code.md) and [Use Cline](https://docs.tokios.com/guides/cline.md) for full client setup.

## Caveats

* MiniMax publishes **safetensors only** — every GGUF/AWQ/MLX build is community-made. Unsloth publishes GGUF builds for M3.1 Flash at [`unsloth/MiniMax-M3.1-Flash-GGUF`](https://huggingface.co/unsloth/MiniMax-M3.1-Flash-GGUF). Check the quant author before you rely on one.
* **Ollama's `minimax-*` tags are `:cloud`-only** — they run on MiniMax's infrastructure, not yours. Self-host via community GGUF or the safetensors if you want it local.
* **`llama.cpp` doesn't support MiniMax Sparse Attention yet**, so local GGUF runs of M3.1 Flash and M3 fall back to dense attention and lose the full long-context advantage — use vLLM/SGLang for the real thing.
* These are **big-memory MoE** models — all params must fit in memory even though only \~10–23B are active per token. M3.1 Flash at Q4 needs \~249 GB. Plan for a multi-GPU server, not a single consumer GPU.

> [card] [Quickstart](https://docs.tokios.com/quickstart.md)
>
> Pair a connector and register your first model end to end.

> [card] [Run models on a Mac Studio](https://docs.tokios.com/use-cases/mac-studio.md)
>
> Why a big unified-memory Mac is the natural home for the M2 line.

> [card] [What size model fits your GPU?](https://docs.tokios.com/guides/model-fit.md)
>
> The sizing math behind these memory numbers.

> [card] [Which local model for which task?](https://docs.tokios.com/guides/model-by-task.md)
>
> Lighter models that run on hardware you already own.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.