Skip to main content
This guide covers local deployment of MiniMax-M2.7 using three inference frameworks: vLLM and SGLang for Linux GPU servers, and MLX for Apple Silicon Mac Studio. For the MiniMax API service, see LLM.

GPU Server Deployment (vLLM / SGLang)

System Requirements

  • OS: Linux
  • Python: 3.10 – 3.12
  • GPU: Compute capability 7.0 or higher
The values above represent the total aggregate hardware KV Cache capacity. The maximum context length per individual sequence remains 196K tokens.

Deploy with vLLM

vLLM is a high-performance LLM inference and serving library that uses PagedAttention for efficient KV cache management, combined with continuous batching and prefix caching for state-of-the-art serving throughput.

Installation

Start the Server

vLLM will automatically download and cache the model from Hugging Face.

Deploy with SGLang

SGLang is a high-performance serving framework for large language and multimodal models. It leverages RadixAttention for efficient prefix caching and scheduling, delivering low-latency, high-throughput inference.

Installation

Start the Server

SGLang will automatically download and cache the model from Hugging Face.

Verify Deployment

Both vLLM and SGLang expose an OpenAI-compatible API. After startup, call it via curl or the OpenAI SDK:

Mac Studio Deployment (MLX)

Thanks to Apple Silicon’s unified memory architecture, Mac Studio can load the full model into memory and run inference entirely on-device — no GPU clusters required, with complete data privacy.

System Requirements

  • Mac Studio with Apple Silicon (M4 Max or M3 Ultra)
  • macOS 15.0 (Sequoia) or later
  • Python 3.10+
  • Sufficient unified memory — see Model Selection Guide below

Model Selection Guide

All MLX model variants are available from the mlx-community on Hugging Face. Higher bit quantization preserves more model quality but requires more memory.

Available Model Variants

“Min Memory” = model size + ~10–15 GB headroom for KV cache, activations, and OS overhead. Actual memory usage grows with context length.
The smallest MLX variant (3-bit) requires ~112 GB of memory. Mac Studio configurations with less than 128 GB unified memory (M4 Max 36/48/64 GB, M3 Ultra 96 GB) cannot run MiniMax-M2.7 via MLX, but may still work with inference frameworks that support more aggressive quantization such as llama.cpp.

Quick Start

Installation

Usage

Generate text directly from the terminal or via a Python script:

API Server Deployment

For serving MiniMax-M2.7 as a local API (compatible with OpenAI SDK), you can use mlx_lm.server or third-party tools like LM Studio.

mlx_lm.server

Launch an OpenAI-compatible API server:
mlx_lm.server automatically separates the model’s thinking process (<think> tag content) into a reasoning field, while content contains only the final response:
Once the server is running, call it via curl or the OpenAI SDK:

LM Studio

LM Studio provides a desktop GUI for Mac with built-in MLX support:
  1. Download and install LM Studio
  2. Search for MiniMax-M2.7 in the model browser
  3. Select a quantization variant that fits your memory
  4. Click Load and start chatting
LM Studio also exposes an OpenAI-compatible local server for integration with other tools.

Fine-Tuning (LoRA)

mlx-lm supports parameter-efficient fine-tuning (PEFT) using LoRA / QLoRA. For an MoE model like MiniMax-M2.7, use a quantized base model + QLoRA to keep memory requirements manageable.
Fine-tuning MiniMax-M2.7 on Mac Studio is extremely memory-intensive. Even with QLoRA, you need at least 192 GB unified memory (M3 Ultra) and very conservative training settings. Configurations with 128 GB or less are not recommended for fine-tuning.

Install Training Dependencies

Prepare Training Data

Training data uses JSONL format. Create train.jsonl, valid.jsonl, and (optionally) test.jsonl files in your data directory. Chat format (recommended):
Completions format:

Start Fine-Tuning

Run QLoRA fine-tuning with a quantized model and memory optimization flags:
Key parameter guidelines:

Use the Fine-Tuned Model

Generate with adapters:
Fuse adapters into the model (optional):
After fusing, you can load the merged model directly without specifying an adapter path.
The following parameters are recommended for MiniMax-M2.7 and apply to all inference frameworks:

MiniMax-M2.7 on Hugging Face

Official model weights, documentation, and benchmarks

MiniMax-M2.7 MLX Models

All quantization variants on MLX Community

vLLM Documentation

Official vLLM documentation and deployment guides

SGLang Documentation

Official SGLang documentation and deployment guides