Published: May 20, 2026

On-Device LLM Deployment Guide: MiMo INT4 Quantization & Optimization

Deploying large language models on edge devices is a core differentiator of the MiMo family. While most model developers treat on-device deployment as an afterthought β€” quantize and hope it works β€” MiMo was designed for edge from the ground up. This guide walks through the practical techniques, tools, and architectures for deploying MiMo-7B on phones, smart speakers, and car cockpits.

Why Deploy on Device?

Three driving factors make on-device deployment attractive for AI applications:

Step 1: Model Selection

For on-device deployment, MiMo-7B is the recommended starting point. At 7B parameters, it fits within the memory constraints of modern mobile hardware after quantization. MiMo-V2-Flash (309B total, 15B active) is deployable on edge servers with GPU acceleration but is too large for phones or smart speakers.

Step 2: INT4 Quantization

INT4 weight-only quantization reduces model size by approximately 4Γ— with minimal accuracy impact. MiMo-7B in FP16 requires ~14GB of memory; INT4 brings this down to ~3.5GB β€” deployable on flagship phone hardware.

# Install quantization toolkit
pip install mimo-quant

# Quantize MiMo-7B to INT4
mimo-quant quantize \
  --model XiaomiMiMo/MiMo-7B-Instruct \
  --output ./miMo-7b-int4 \
  --bits 4 \
  --group-size 128

The quantization process takes approximately 30 minutes on an A100 and produces a model that retains 98-99% of the original FP16 accuracy on reasoning benchmarks.

Step 3: TransAct Pruning

TransAct is a pruning method developed by Xiaomi AI Lab that removes redundant transformer activations. Unlike weight pruning (which removes parameters), TransAct removes redundant computations during inference, reducing latency by 15-25% without fine-tuning.

# Apply TransAct pruning (no training required)
mimo-quant prune \
  --model ./miMo-7b-int4 \
  --sparsity 0.2 \
  --method transact

TransAct works by analyzing activation patterns across a calibration dataset (100-500 samples) and marking attention heads and feed-forward neurons that contribute minimally to output quality. These are skipped during inference via a learned mask.

Step 4: Hardware Acceleration

Xiaomi's NPU (Neural Processing Unit) provides dedicated hardware for Transformer inference:

For non-Xiaomi hardware, the recommended path is ONNX Runtime with the following backend priority:

  1. CoreML (Apple devices) β€” best performance on iPhone/iPad
  2. QNN (Qualcomm devices) β€” Hexagon DSP acceleration on Snapdragon
  3. XNNPACK (ARM CPUs) β€” fallback that works everywhere

Step 5: Hybrid Edge-Cloud Architecture

For production deployments, a hybrid architecture is recommended:

  1. Local (on-device) inference: MiMo-7B INT4 handles simple Q&A, text classification, code completion, and wake-word responses.
  2. Edge proxy: For complex queries, the device sends a lightweight embedding to a local edge server (e.g., a Raspberry Pi 5 with a Coral TPU or a Xiaomi smart speaker with NPU).
  3. Cloud fallback: Multi-turn reasoning and tasks requiring V2-Flash/V2.5-Pro route to the cloud API.

The routing decision is made by a ~30M parameter classifier running on-device. In practice, this achieves:

Performance Benchmarks

DeviceChipFormatFirst TokenMemory
Xiaomi 16 ProSnapdragon 8 Gen 4INT4~180ms3.5 GB
iPhone 17 ProA19INT4 (CoreML)~160ms3.2 GB
Xiaomi Speaker ProXiaomi NPU v2INT4~320ms2.8 GB
Raspberry Pi 5 + Coral TPUARM + Edge TPUINT8~1.2s3.8 GB

Practical Tips

Resources