Instructions to use saricles/MiniMax-M2.7-NVFP4-GB10 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use saricles/MiniMax-M2.7-NVFP4-GB10 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="saricles/MiniMax-M2.7-NVFP4-GB10", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("saricles/MiniMax-M2.7-NVFP4-GB10", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("saricles/MiniMax-M2.7-NVFP4-GB10", trust_remote_code=True, device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use saricles/MiniMax-M2.7-NVFP4-GB10 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "saricles/MiniMax-M2.7-NVFP4-GB10" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "saricles/MiniMax-M2.7-NVFP4-GB10", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/saricles/MiniMax-M2.7-NVFP4-GB10
- SGLang
How to use saricles/MiniMax-M2.7-NVFP4-GB10 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 "saricles/MiniMax-M2.7-NVFP4-GB10" \ --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": "saricles/MiniMax-M2.7-NVFP4-GB10", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "saricles/MiniMax-M2.7-NVFP4-GB10" \ --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": "saricles/MiniMax-M2.7-NVFP4-GB10", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use saricles/MiniMax-M2.7-NVFP4-GB10 with Docker Model Runner:
docker model run hf.co/saricles/MiniMax-M2.7-NVFP4-GB10
Corrupted / truncated files?
I don't know if it's just the CDN, but three shards download short of their reported bytes. I've tried with curl, with and without xet:
| Shard | HF Metadata (correct) | CDN serves (corrupt) | Short by |
|---|---|---|---|
| model-00017-of-00027.safetensors | 5,033,633,825 bytes | 4,998,786,780 bytes | 33.2 MB |
| model-00018-of-00027.safetensors | 5,034,950,770 bytes | 5,000,851,964 bytes | 32.4 MB |
| model-00019-of-00027.safetensors | 5,011,011,051 bytes | 4,998,613,792 bytes | 11.8 MB |
for i in 17 18 19; do
shard=\"model-000\${i}-of-00027.safetensors\"
# Follow redirect fully and check Content-Length at the CDN origin
cdn_size=\$(curl -sI -L \"https://huggingface.co/saricles/MiniMax-M2.7-NVFP4-GB10/resolve/main/\$shard\" 2>/dev/null | grep -i '^content-length:' | tail -1 | awk '{print \$2}' | tr -d '\r')
expected=\$(curl -sI \"https://huggingface.co/saricles/MiniMax-M2.7-NVFP4-GB10/resolve/main/\$shard\" 2>/dev/null | grep -i 'x-linked-size' | awk '{print \$2}' | tr -d '\r')
echo \"\$shard: CDN says \$cdn_size bytes, HF metadata says \$expected bytes\"
done
" --become --become-user=root --limit spark1.private.shroop.net -u ansible 2>&1 | tail -8
spark1.private.shroop.net | CHANGED | rc=0 >>
model-00017-of-00027.safetensors: CDN says 4998786780 bytes, HF metadata says X-Repo-Commit,X-Request-Id,X-Error-Code,X-Error-Message,X-Total-Count,ETag,Link,Accept-Ranges,Content-Range,X-Linked-Size,X-Linked-ETag,X-Xet-Hash
5033633825 bytes
model-00018-of-00027.safetensors: CDN says 5000851964 bytes, HF metadata says X-Repo-Commit,X-Request-Id,X-Error-Code,X-Error-Message,X-Total-Count,ETag,Link,Accept-Ranges,Content-Range,X-Linked-Size,X-Linked-ETag,X-Xet-Hash
5034950770 bytes
model-00019-of-00027.safetensors: CDN says 4998613792 bytes, HF metadata says X-Repo-Commit,X-Request-Id,X-Error-Code,X-Error-Message,X-Total-Count,ETag,Link,Accept-Ranges,Content-Range,X-Linked-Size,X-Linked-ETag,X-Xet-Hash
5011011051 bytes
/.MEDIA/tmp/MiniMax-M2.7-NVFP4-GB10$ git lfs pull
Skipped checkout for "model-00018-of-00027.safetensors", content not local. Use fetch to download.
Skipped checkout for "model-00019-of-00027.safetensors", content not local. Use fetch to download.
Skipped checkout for "model-00017-of-00027.safetensors", content not local. Use fetch to download.
Downloading LFS objects: 28% (8/29), 56 GB | 76 MB/s
So there's something wrong with the lfs as well. (although I think it just pulls them from cloudfront as well.)