---
title: MiniMax-M3.1-Flash-W8A8-mthreads-FlagOS
canonical_url: "https://www.modelscope.cn/models/FlagRelease/MiniMax-M3.1-Flash-W8A8-mthreads-FlagOS"
md_url: "https://www.modelscope.cn/models/FlagRelease/MiniMax-M3.1-Flash-W8A8-mthreads-FlagOS.md"
repository: FlagRelease/MiniMax-M3.1-Flash-W8A8-mthreads-FlagOS
last_updated: 2026-10-23
license: apache-2.0
model_type:
  - minimax_m3_vl
architectures:
  - MiniMaxM3SparseForConditionalGeneration
parameters: 427.1B
tensor_type:
  - F32
  - I8
  - BF16
library_name:
  - safetensors
language:
  - zh
  - en
downloads: 6
stars: 0
---

# MiniMax-M3.1-Flash-W8A8-mthreads-FlagOS

> MiniMax-M3.1-Flash-W8A8-mthreads-FlagOS - FlagRelease 在 ModelScope 开源的模型。Introduction MiniMax has released MiniMax-M3.1-Flash, its new-generation Flash model. Zhongzhi FlagOS Community has completed Day-0 cross-chip enablement across platforms from nine chip…

FlagRelease/MiniMax-M3.1-Flash-W8A8-mthreads-FlagOS 是 ModelScope 魔搭社区上的 427.1B 参数机器学习模型，采用 apache-2.0 许可。

- **Repository**: FlagRelease/MiniMax-M3.1-Flash-W8A8-mthreads-FlagOS
- **License**: apache-2.0
- **Parameters**: 427.1B
- **Downloads**: 6
- **Stars**: 0
- **Last updated**: 2026-10-23

Source: https://www.modelscope.cn/models/FlagRelease/MiniMax-M3.1-Flash-W8A8-mthreads-FlagOS

---

# Introduction
MiniMax has released MiniMax-M3.1-Flash, its new-generation Flash model. Zhongzhi FlagOS Community has completed Day-0 cross-chip enablement across platforms from nine chip vendors — T-Head, NVIDIA, Huawei Ascend, Hygon, Kunlunxin, MetaX, Moore Threads, Tsingmicro(清微智能) and Iluvatar CoreX — and developers can download and use the model via ModelScope and Hugging Face. Thanks to optimizations in FlagOS 2.2, benchmarks show that on NVIDIA H100 the FlagOS build delivers, out of the box, up to 59.2% lower first-token latency and up to 10.6% higher output throughput than NVIDIA's native stack. With 32K-token inputs, the FlagOS builds on T-Head, Huawei Ascend, Kunlunxin and other platforms reach throughput per unit of compute equal to 165.0%, 99.5% and 85.9% of NVIDIA's native performance — results ranging from close to parity to well above it. The model brings further gains in agent tasks, coding, computer use and cybersecurity, supporting use cases such as complex business processes, software development and operations across applications. It uses a more aggressive sparse-attention architecture to further improve inference efficiency. According to MiniMax, it delivers 200+ tokens/s in everyday use and cuts the total cost of agentic tasks by 70% versus the previous generation.


### Integrated Deployment
- Out-of-the-box inference scripts with pre-configured hardware and software parameters
- Released **FlagOS-Mthreads** container image supporting deployment within minutes
### Consistency Validation
- Rigorously evaluated through benchmark testing: Performance and results from the FlagOS software stack are compared against native stacks on multiple public.

# Evaluation Results
## Benchmark Result
| Metrics | MiniMax-M3.1-Flash-Nvidia-Origin | MiniMax-M3.1-Flash-Mthreads-FlagOS |
|--------------|--------------------------------|--------------------------------------|
| Math_500     | 93.40                            | 94.00                                |
| GPQA_Diamond | 88.89                            | 87.37                                |
| ERQA         | 65.75                            | 65.75                                |
# User Guide
Environment Setup

| Item             | Version              |
|------------------|----------------------|
| Docker Version   | Docker version 29.3.1 |
| Operating System | 22.04.5 LTS |

## Operation Steps

### Download FlagOS Image
```bash
docker pull harbor.baai.ac.cn/flagrelease-public/minimax_m31_flash-mthreads001-gems0.0-tree0.7.0-cx0.13.0-pluginnone-vllm0.10.1-sglang0.5.18-sglangfl0.1.0-cp310-pt29-musa43-x64-3.3.5-server:202610231242
```

### Download Open-source Model Weights
```bash
pip install modelscope
modelscope download --model FlagRelease/MiniMax-M3.1-Flash-mthreads-FlagOS --local_dir /data/MiniMax-M3.1-Flash
```

### Start the Container
```bash
docker run -d --name m31-flash-release-r3-20261023 \
  --label flagos.package_task=m31-flash-worker32082-image-package-20261023 \
  --runtime mthreads --network host --ipc host --shm-size 64g \
  --privileged --security-opt label=disable \
  --ulimit memlock=-1:-1 --ulimit stack=67108864:67108864 \
  -e MTHREADS_VISIBLE_DEVICES=all -e MTHREADS_DRIVER_CAPABILITIES=all \
  --mount type=bind,src=/data/models/MiniMax-M3.1-Flash-W8A8-FlagOS-20261019,dst=/data/models/MiniMax-M3.1-Flash-W8A8-FlagOS-20261019,readonly,bind-propagation=rprivate \
  -v /data/adaptation/MiniMax-M3.1-Flash-W8A8-FlagOS-20261019/sglang/musa-s5000/m31-flash-worker32082-20261020/image-package-20261023/release-r3-logs:/var/log/m31:rprivate \
  -v /data/adaptation/MiniMax-M3.1-Flash-W8A8-FlagOS-20261019/sglang/musa-s5000/m31-flash-worker32082-20261020/image-package-20261023/release-r3-cache:/var/cache/m31:rprivate \
  --entrypoint /bin/bash \
  harbor.baai.ac.cn/flagrelease-public/minimax_m31_flash-mthreads001-gems0.0-tree0.7.0-cx0.13.0-pluginnone-vllm0.10.1-sglang0.5.18-sglangfl0.1.0-cp310-pt29-musa43-x64-3.3.5-server:202610231242 -lc 'exec sleep infinity'
```
### Start the Server
```bash
#!/usr/bin/env bash
set -euo pipefail
docker exec -d m31-flash-release-r3-20261023 /bin/bash -c "$(cat <<'M31_START'
export TORCH_COMPILE_DISABLE=1
export PYTHONDONTWRITEBYTECODE=1
set -euo pipefail
/root/.virtualenvs/sglang-0.5.6/bin/python3 -I -S - <<'GUARD'
import socket
s=socket.socket();s.settimeout(2);rc=s.connect_ex(('127.0.0.1',31131));s.close()
assert rc != 0, '31131 already has a service; refusing duplicate launch'
GUARD
export MEMFRAC=0.90
export CTX=81920
export MODEL_PATH=/data/models/MiniMax-M3.1-Flash-W8A8-FlagOS-20261019
export PORT=31131
export HF_HOME=/var/cache/m31/huggingface
export TVM_FFI_CACHE_DIR=/var/cache/m31/tvm-ffi
export FLAGGEMS_CACHE_DIR=/var/cache/m31/flaggems
export TRITON_CACHE_DIR=/var/cache/m31/triton
export TORCH_EXTENSIONS_DIR=/var/cache/m31/torch_extensions
export XDG_CACHE_HOME=/var/cache/m31/xdg
export HF_HUB_OFFLINE=1
export TRANSFORMERS_OFFLINE=1
export PATH=/root/.virtualenvs/sglang-0.5.6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export VIRTUAL_ENV=/root/.virtualenvs/sglang-0.5.6
export MUSA_HOME=/usr/local/musa
export LD_LIBRARY_PATH=/usr/local/musa/lib:/usr/local/openmpi/lib:/usr/local/musa/mudnn/lib:
export SGLANG_MUSA_FP32_TP_ALLREDUCE=1
export SGLANG_SET_CPU_AFFINITY=1
export SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1
export SGLANG_USE_DEEPGEMM_BMM=0
export SGLANG_USE_MUSA_FUSED_KERNEL=1
export SGLANG_BUILD_RUST_EXTS=none
LOG_DIR="${LOG_DIR:-/var/log/m31}"
mkdir -p "$LOG_DIR"

unset PYTHONPATH
export SGLANG_OPT_USE_MINIMAX_DECODE_TOPK_RADIX=0
export SGLANG_FL_PER_OP=topk=vendor
export GLOO_SOCKET_IFNAME="${GLOO_SOCKET_IFNAME:-bond0}"
export NCCL_SOCKET_IFNAME="${NCCL_SOCKET_IFNAME:-bond0}"
export TP_SOCKET_IFNAME="${TP_SOCKET_IFNAME:-bond0}"
export SGLANG_ROPE_CACHE_FP32=1
export SGLANG_OPT_USE_BF16_ROUTER_GEMM=0
export SGLANG_DISABLE_MSA=1
export USE_FLAGGEMS=1
export SGLANG_MOE_CONFIG_DIR="${SGLANG_MOE_CONFIG_DIR:-/root/.virtualenvs/sglang-0.5.6/lib/python3.10/site-packages/m31_flash_runtime/assets/opt/minimax-m31-c018/runtime/c007/moe-config}"
export SGLANG_FL_FLAGOS_BLACKLIST=broadcast_tensors,slice,eq,eq_scalar,equal,count_nonzero,cumsum,mm,unique,_unique2,unique_dim,unique_consecutive,linear,multinomial,index,sort
export SGLANG_FLAGGEMS_RECORD=1
export SGLANG_FLAGGEMS_LOG_PATH="${LOG_DIR}/flaggems-c018.txt"
export SGLANG_FL_DISPATCH_DEBUG=1
export SGLANG_FL_DISPATCH_LOG="${LOG_DIR}/dispatch-c018.log"
export MCCL_TOPO_ENHANCE=0
export MCCL_MIN_NCHANNELS=8
export MCCL_MAX_NCHANNELS=32
export MCCL_PROTO=LL128
export MCCL_SOCKET_IFNAME="${MCCL_SOCKET_IFNAME:-ens12np0}"
export MCCL_SOCKET_NTHREADS=4
export FLAGCX_PATH=/root/.virtualenvs/sglang-0.5.6/lib/python3.10/site-packages/m31_flash_runtime/assets/opt/minimax-m3-v451/runtime/FlagCX
export FLAGCX_SOCKET_IFNAME="${FLAGCX_SOCKET_IFNAME:-bond0}"
export TOKENIZERS_PARALLELISM=false
export SGLANG_MOE_PADDING=0

MODEL_PATH="${MODEL_PATH:-/data/models/MiniMax-M3.1-Flash-W8A8-FlagOS-20261019}"
PORT="${PORT:-31131}"
LOG_FILE="${LOG_FILE:-${LOG_DIR}/server.log}"
CTX="${CTX:-81920}"
MEMFRAC="${MEMFRAC:-0.80}"

mkdir -p "$(dirname "$LOG_FILE")"
exec >> "$LOG_FILE" 2>&1
echo "[launch] SINGLE-NODE TP8xPP1 model=$MODEL_PATH ctx=$CTX memfrac=$MEMFRAC log=$LOG_FILE"
exec /root/.virtualenvs/sglang-0.5.6/bin/python3 -m sglang.launch_server \
  --model-path "$MODEL_PATH" \
  --served-model-name MiniMax-M3.1-Flash-W8A8 \
  --trust-remote-code \
  --dtype bfloat16 \
  --tp-size 8 \
  --pp-size 1 \
  --nnodes 1 \
  --node-rank 0 \
  --dist-init-addr 127.0.0.1:31132 \
  --host 0.0.0.0 \
  --port "$PORT" \
  --context-length "$CTX" \
  --chunked-prefill-size 8192 \
  --max-prefill-tokens 16384 \
  --prefill-max-requests 1 \
  --mem-fraction-static "$MEMFRAC" \
  --max-running-requests 64 \
  --attention-backend triton \
  --moe-runner-backend triton \
  --cuda-graph-backend-decode full \
  --cuda-graph-bs-decode 1 2 4 8 16 24 32 48 64 \
  --cuda-graph-backend-prefill full \
  --cuda-graph-bs-prefill 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 \
  --cuda-graph-config '{"prefill":{"full_prefill_max_req":64}}' \
  --disable-chunked-prefix-cache \
  --stream-interval 1 \
  --limit-mm-data-per-request '{"image":16}' \
  --enable-mixed-chunk \
  --disable-overlap-schedule \
  --disable-radix-cache \
  --enable-metrics \
  --random-seed 43018883
M31_START
)"


set -euo pipefail
m31_wait_deadline=$((SECONDS + 1500))
until /usr/bin/curl --silent --fail --max-time 5 http://127.0.0.1:31131/health >/dev/null; do
  if (( SECONDS >= m31_wait_deadline )); then
    echo 'Model readiness timed out after 1500 seconds; inspect the service log before restarting.' >&2
    exit 1
  fi
  /bin/sleep 10
done
/usr/bin/curl --silent --fail --max-time 10 http://127.0.0.1:31131/v1/models
```

## Service Invocation
### Invocation Script
```bash
#!/usr/bin/env bash
set -euo pipefail
curl --fail-with-body --max-time 300 http://127.0.0.1:31131/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"MiniMax-M3.1-Flash-W8A8","messages":[{"role":"user","content":"What is the capital of France? Reply only with the city name."}],"temperature":0,"max_tokens":1024,"chat_template_kwargs":{"thinking_mode":"disabled"}}'
```

# Technical Overview
**FlagOS** is a fully open-source system software stack designed to unify the "model–system–chip" layers and foster an open, collaborative ecosystem. It enables a "develop once, run anywhere" workflow across diverse AI accelerators, unlocking hardware performance, eliminating fragmentation among vendor-specific software stacks, and substantially lowering the cost of porting and maintaining AI workloads. With core technologies such as the **FlagScale**, together with vllm-plugin-fl, distributed training/inference framework, **FlagGems** universal operator library, **FlagCX** communication library, and **FlagTree** unified compiler, the **FlagRelease** platform leverages the **FlagOS** stack to automatically produce and release various combinations of \<chip + open-source model\>. This enables efficient and automated model migration across diverse chips, opening a new chapter for large model deployment and application.
## FlagGems
FlagGems is a high-performance, generic operator libraryimplemented in [Triton](https://github.com/openai/triton) language. It is built on a collection of backend-neutralkernels that aims to accelerate LLM (Large-Language Models) training and inference across diverse hardware platforms.
## FlagTree
FlagTree is an open source, unified compiler for multipleAI chips project dedicated to developing a diverse ecosystem of AI chip compilers and related tooling platforms, thereby fostering and strengthening the upstream and downstream Triton ecosystem. Currently in its initial phase, the project aims to maintain compatibility with existing adaptation solutions while unifying the codebase to rapidly implement single-repository multi-backend support. Forupstream model users, it provides unified compilation capabilities across multiple backends; for downstream chip manufacturers, it offers examples of Triton ecosystem integration.
## FlagScale and vllm-plugin-fl
Flagscale is a comprehensive toolkit designed to supportthe entire lifecycle of large models. It builds on the strengths of several prominent open-source projects, including [Megatron-LM](https://github.com/NVIDIA/Megatron-LM) and [vLLM](https://github.com/vllm-project/vllm), to provide a robust, end-to-end solution for managing and scaling large models.
vllm-plugin-fl is a vLLM plugin built on the FlagOS unified multi-chip backend, to help flagscale support multi-chip on vllm framework.
## **FlagCX**
FlagCX is a scalable and adaptive cross-chip communication library. It serves as a platform where developers, researchers, and AI engineers can collaborate on various projects, contribute to the development of cutting-edge AI solutions, and share their work with the global community.

## **FlagEval Evaluation Framework**
 FlagEval is a comprehensive evaluation system and open platform for large models launched in 2023. It aims to establish scientific, fair, and open benchmarks, methodologies, and tools to help researchers assess model and training algorithm performance. It features:
 - **Multi-dimensional Evaluation**: Supports 800+ modelevaluations across NLP, CV, Audio, and Multimodal fields,covering 20+ downstream tasks including language understanding and image-text generation.
 - **Industry-Grade Use Cases**: Has completed horizonta1 evaluations of mainstream large models, providing authoritative benchmarks for chip-model performance validation.

# Contributing

We warmly welcome global developers to join us:

1. Submit Issues to report problems
2. Create Pull Requests to contribute code
3. Improve technical documentation
4. Expand hardware adaptation support

# License
The model weights are derived from MiniMaxAI/MiniMax-M3.1-Flash and are open‑sourced under the Apache License 2.0: https://www.apache.org/licenses/LICENSE-2.0.txt
