MiniMax-M2.7 - How to Run Locally

Run MiniMax-M2.7 LLM locally on your own device!

MiniMax-M2.7 is a new open model for agentic coding and chat use-cases. The model achieves SOTA performance in SWE-Pro (56.22%) and Terminal Bench 2 (57.0%).

The 230B parameters (10B active) model is the successor to MiniMax-M25 and has a 200K context window. The unquantized bf16 requires 457GB. Unsloth Dynamic 4-bit GGUF reduces the size to 108GB (-60%) so it can run on a 128GB RAM device: MiniMax-M2.7 GGUF

All uploads use Unsloth Dynamic 2.0 for SOTA quantization performance - so important layers are upcasted to higher bits (e.g. 8 or 16-bit). Thank you MiniMax for day zero access.

⚙️ Usage Guide

The 4-bit dynamic quant UD-IQ4_XS uses 108GB of disk space - this fits nicely on a 128GB unified memory Mac for ~15+ tokens/s, and also works faster with a 1x16GB GPU and 96GB of RAM for 25+ tokens/s. 2-bit quants or the biggest 2-bit will fit on a 96GB device.

For near full precision, use Q8_0 (8-bit) which utilizes 243GB and will fit on a 256GB RAM device / Mac for 15+ tokens/s.

MiniMax recommends using the following parameters for best performance: temperature=1.0, top_p = 0.95, top_k = 40.

Default Settings (Most Tasks)

temperature = 1.0

top_p = 0.95

top_k = 40

  • Maximum context window: 196,608

  • Default system prompt:

You are a helpful assistant. Your name is MiniMax-M2.7 and is built by MiniMax.

Run MiniMax-M2.7 Tutorials:

To make MiniMax-M2.7 work on a 128GB RAM device, we will be utilizing the 4-bit UD-IQ4_XS quant. You can now run MiniMax-M2.7 in llama.cpp and Unsloth Studio.

🦥 Run in Unsloth Studio

MiniMax-M2.7 can now run in Unsloth Studio, our new open-source web UI for local AI. Unsloth Studio lets you run models locally on MacOS, Windows, Linux and:

1

Install Unsloth

Run in your terminal:

MacOS, Linux, WSL:

Windows PowerShell:

2

Launch Unsloth

MacOS, Linux, WSL and Windows:

Then open http://localhost:8888 in your browser.

3

Search and download MiniMax-M2.7

On first launch you will need to create a password to secure your account and sign in again later. You’ll then see a brief onboarding wizard to choose a model, dataset, and basic settings. You can skip it at any time.

You can choose UD-IQ4_XS (dynamic 4bit quant) or other quantized versions like UD-Q4_K_XL . If downloads get stuck, see Hugging Face Hub, XET debugging

Then go to the Studio Chat tab and search for MiniMax-M2.7 in the search bar and download your desired model and quant. It will take some time to download due to the size so please wait. To ensure fast inference, ensure you have enough RAM/VRAM, otherwise inference will still work, but Unsloth will offload to your CPU.

4

Run MiniMax-M2.7

Inference parameters should be auto-set when using Unsloth Studio, however you can still change it manually. You can also edit the context length, chat template and other settings.

For more information, you can view our Unsloth Studio inference guide.

✨ Run in llama.cpp

1

Obtain the latest llama.cpp on GitHub here. You can follow the build instructions below as well. Change -DGGML_CUDA=ON to -DGGML_CUDA=OFF if you don't have a GPU or just want CPU inference. For Apple Mac / Metal devices, set -DGGML_CUDA=OFF then continue as usual - Metal support is on by default.

2

If you want to use llama.cpp directly to load models, you can do the below: (:IQ4_XS) is the quantization type. You can also download via Hugging Face (point 3). This is similar to ollama run . Use export LLAMA_CACHE="folder" to force llama.cpp to save to a specific location. Remember the model has only a maximum of 200K context length.

Follow this for most default use-cases:

3

Download the model (after installing pip install huggingface_hub hf_transfer). You can choose UD-IQ4_XS (dynamic 4-bit quant) or other quantized versions like UD-Q6_K_XL . We recommend using our 4bit dynamic quant UD-IQ4_XS to balance size and accuracy. If downloads get stuck, see Hugging Face Hub, XET debugging

4

You can edit --threads 32 for the number of CPU threads, --ctx-size 16384 for context length, --n-gpu-layers 2 for GPU offloading on how many layers. Try adjusting it if your GPU goes out of memory. Also remove it if you have CPU only inference.

🦙 Llama-server & OpenAI's completion library

To deploy MiniMax-M2.7 for production, we use llama-server or OpenAI API. In a new terminal say via tmux, deploy the model via:

Then in a new terminal, after doing pip install openai, do:

📊 Benchmarks

GGUF Benchmarks

Below are KLD 99% benchmarks for MiniMax-M2.7. Lower left is better:

Because MiniMax-M2.7 utilizes the same architecture as MiniMax-M2.5, GGUF quantization benchmarks for M2.7 should be very similar to M2.5. So, we'll also refer to previous quant benchmark conducted for M2.5:

Benjamin Marie (third-party) benchmarked MiniMax-M2.5 using Unsloth GGUF quantizations on a 750-prompt mixed suite (LiveCodeBench v6, MMLU Pro, GPQA, Math500), reporting both overall accuracy and relative error increase (how much more often the quantized model makes mistakes vs. the original).

Unsloth quants, no matter their precision perform much better than their non-Unsloth counterparts for both accuracy and relative error (despite being 8GB smaller).

Key results:

  • Best quality/size tradeoff here: unsloth UD-Q4_K_XL. It’s the closest to Original: only 6.0 points down, and “only” +22.8% more errors than baseline.

  • Other Unsloth Q4 quants perform closely together (~64.5–64.9 accuracy). IQ4_NL, MXFP4_MOE, and UD-IQ2_XXS are all basically the same quality on this benchmark, with ~33–35% more errors than Original.

  • Unsloth GGUFs perform much better than other non-Unsloth GGUFs, e.g. see lmstudio-community - Q4_K_M (despite being 8GB smaller) and AesSedai - IQ3_S.

Official Benchmarks

Last updated

Was this helpful?