MiniMax-M2.5-GGUF

11.5K
35
ik_llama.cpp
by
ubergarm
Language Model
OTHER
2.5B params
Fair
12K downloads
Community-tested
Edge AI:
Mobile
Laptop
Server
6GB+ RAM
Mobile
Laptop
Server
Quick Summary

AI model with specialized capabilities.

Device Compatibility

Mobile
4-6GB RAM
Laptop
16GB RAM
Server
GPU
Minimum Recommended
3GB+ RAM

Code Examples

IQ5_K 157.771 GiB (5.926 BPW)bash
custom="
# 61 Repeating Layers [0-61]

# Attention [0-61] GPU
blk\..*\.attn_q.*=q8_0
blk\..*\.attn_k.*=q8_0
blk\..*\.attn_v.*=q8_0
blk\..*\.attn_output.*=q8_0

# Routed Experts Layers [0-61] CPU
blk\..*\.ffn_down_exps\.weight=iq6_k
blk\..*\.ffn_(gate|up)_exps\.weight=iq5_k

# Non-Repeating Layers
token_embd\.weight=q8_0
output\.weight=q8_0
"

custom=$(
  echo "$custom" | grep -v '^#' | \
  sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
)

numactl -N ${SOCKET} -m ${SOCKET} \
./build/bin/llama-quantize \
    --custom-q "$custom" \
    --imatrix /mnt/data/models/ubergarm/MiniMax-M2.5-GGUF/imatrix-MiniMax-M2.5-BF16.dat \
    /mnt/data/models/ubergarm/MiniMax-M2.5-GGUF/MiniMax-M2.5-256x4.9B-BF16-00001-of-00010.gguf \
    /mnt/data/models/ubergarm/MiniMax-M2.5-GGUF/MiniMax-M2.5-IQ5_K.gguf \
    IQ5_K \
    128
61 Repeating Layers [0-61]bash
#!/usr/bin/env bash

custom="
# 61 Repeating Layers [0-61]

# Attention [0-61] GPU
blk\..*\.attn_q.*=q8_0
blk\..*\.attn_k.*=q8_0
blk\..*\.attn_v.*=q8_0
blk\..*\.attn_output.*=q8_0

# Routed Experts Layers [0-61] CPU
blk\..*\.ffn_down_exps\.weight=iq4_nl
blk\..*\.ffn_(gate|up)_exps\.weight=iq4_nl

# Non-Repeating Layers
token_embd\.weight=iq4_k
output\.weight=iq6_k
"

custom=$(
  echo "$custom" | grep -v '^#' | \
  sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
)

numactl -N ${SOCKET} -m ${SOCKET} \
./build/bin/llama-quantize \
    --custom-q "$custom" \
    --imatrix /mnt/data/models/ubergarm/MiniMax-M2.5-GGUF/imatrix-MiniMax-M2.5-BF16.dat \
    /mnt/data/models/ubergarm/MiniMax-M2.5-GGUF/MiniMax-M2.5-256x4.9B-BF16-00001-of-00010.gguf \
    /mnt/data/models/ubergarm/MiniMax-M2.5-GGUF/MiniMax-M2.5-IQ4_NL.gguf \
    IQ4_NL \
    128
Quick Startbashllama.cpp
# Clone and checkout
$ git clone https://github.com/ikawrakow/ik_llama.cpp
$ cd ik_llama.cpp

# Build for hybrid CPU+CUDA
$ cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON
$ cmake --build build --config Release -j $(nproc)

# Download Desired Quant
$ pip install huggingface_hub
$ hf download --local-dir ./MiniMax-M2.5-GGUF/ --include=smol-IQ3_KS/*.gguf ubergarm/MiniMax-M2.5-GGUF

# Hybrid CPU and Single GPU
echo TODO or look at my Step-3.5-Flash for rough example for now using --cpu-moe or --n-cpu-moe XX etc

# Multi GPU Full Offload 128k context 96GB VRAM!!!
model=MiniMax-M2.5-IQ2_KS-00001-of-00003.gguf
_GLIBCXX_REGEX_STATE_LIMIT=1000000 \
CUDA_VISIBLE_DEVICES="0,1" \
./build/bin/llama-sweep-bench \
    --model "$model" \
    --alias ubergarm/MiniMax-M2.5 \
    -khad -ctk q6_0 -ctv q8_0 \
    -c 131072 \
    -ger \
    -sm graph \
    -ngl 99 \
    -ub 4096 -b 4096 \
    -ts 47,48 \
    --threads 1 \
    --host 127.0.0.1 \
    --port 8080 \
    --no-mmap \
    --jinja

# CPU-Only
numactl -N "$SOCKET" -m "$SOCKET" \
./build/bin/llama-server \
    --model "$model"\
    --alias ubergarm/MiniMax-M2.5 \
    --ctx-size 65536 \
    -ger \
    --merge-qkv \
    -ctk q8_0 -ctv q8_0 \
    -ub 4096 -b 4096 \
    --parallel 1 \
    --threads 96 \
    --threads-batch 128 \
    --numa numactl \
    --host 127.0.0.1 \
    --port 8080 \
    --no-mmap \
    --jinja

Deploy This Model

Production-ready deployment in minutes

Together.ai

Instant API access to this model

Fastest API

Production-ready inference API. Start free, scale to millions.

Try Free API

Replicate

One-click model deployment

Easiest Setup

Run models in the cloud with simple API. No DevOps required.

Deploy Now

Disclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.