Instructions to use Sebesky/MiniMax-M3-W4A16-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sebesky/MiniMax-M3-W4A16-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Sebesky/MiniMax-M3-W4A16-GPTQ") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Sebesky/MiniMax-M3-W4A16-GPTQ") model = AutoModelForMultimodalLM.from_pretrained("Sebesky/MiniMax-M3-W4A16-GPTQ") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Sebesky/MiniMax-M3-W4A16-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Sebesky/MiniMax-M3-W4A16-GPTQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sebesky/MiniMax-M3-W4A16-GPTQ", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/Sebesky/MiniMax-M3-W4A16-GPTQ
- SGLang
How to use Sebesky/MiniMax-M3-W4A16-GPTQ with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Sebesky/MiniMax-M3-W4A16-GPTQ" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sebesky/MiniMax-M3-W4A16-GPTQ", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Sebesky/MiniMax-M3-W4A16-GPTQ" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sebesky/MiniMax-M3-W4A16-GPTQ", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use Sebesky/MiniMax-M3-W4A16-GPTQ with Docker Model Runner:
docker model run hf.co/Sebesky/MiniMax-M3-W4A16-GPTQ
MiniMax-M3 — W4A16 (GPTQ)
4-bit weight quantization of MiniMax-M3 produced with GPTQ via
llm-compressor, stored in the
compressed-tensors pack-quantized format for serving with vLLM / SGLang. Routed-expert
weights keep the base w1/w2/w3 naming, so the checkpoint loads against the native M3
architecture.
Quantization
| Scheme | W4A16 (4-bit weights, 16-bit activations) |
| Weights | int4, symmetric, group size 128 |
| Embeddings | int4, group size 64 |
lm_head |
bf16 (kept full precision) |
| Left in bf16 | router gates, lightning-indexer projections, RMSNorms, vision tower |
| KV cache | bf16 |
| Method | GPTQ — Hessian error minimization with cross-layer error propagation |
| Format | compressed-tensors (pack-quantized) |
All 60 decoder layers are quantized (3 dense + 57 sparse/MoE, 128 experts each).
Calibration
Calibrated on deployment-realistic agentic trajectories — 427 multi-turn tool-use rollouts (~8M tokens) rendered through the M3 chat template at up to 32k sequence length, padded with a small amount of general-instruction data. The goal is to match the model's real serving distribution (multi-turn, tool-calling) rather than generic web text.
Quality
Mean weight-reconstruction error vs the bf16 base is ≈0.125 relative (cosine ≈ 0.993) — the expected magnitude for int4 group-128 quantization. This is a weight-space measure; evaluate downstream quality on your own target benchmark.
Usage
# requires a vLLM build with MiniMax-M3 support
vllm serve Sebesky/MiniMax-M3-W4A16-GPTQ
from transformers import AutoModelForImageTextToText, AutoTokenizer
model = AutoModelForImageTextToText.from_pretrained("Sebesky/MiniMax-M3-W4A16-GPTQ", device_map="auto")
tok = AutoTokenizer.from_pretrained("Sebesky/MiniMax-M3-W4A16-GPTQ")
License
Inherits the MiniMax Community License from the base model (non-commercial use).
- Downloads last month
- 1,472
Model tree for Sebesky/MiniMax-M3-W4A16-GPTQ
Base model
MiniMaxAI/MiniMax-M3