Text Generation
Transformers
Safetensors
English
Chinese
minimax_m2
minimax
nvfp4
4-bit precision
quantized
compressed-tensors
vllm
DGX-Spark
GB10
MoE
conversational
custom_code
8-bit precision
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) 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
| { | |
| "producer": { | |
| "name": "modelopt", | |
| "version": "0.29.0" | |
| }, | |
| "quantization": { | |
| "quant_algo": "NVFP4", | |
| "kv_cache_quant_algo": null, | |
| "group_size": 16, | |
| "exclude_modules": [ | |
| "model.layers.0.block_sparse_moe.gate", | |
| "model.layers.1.block_sparse_moe.gate", | |
| "model.layers.10.block_sparse_moe.gate", | |
| "model.layers.11.block_sparse_moe.gate", | |
| "model.layers.12.block_sparse_moe.gate", | |
| "model.layers.13.block_sparse_moe.gate", | |
| "model.layers.14.block_sparse_moe.gate", | |
| "model.layers.15.block_sparse_moe.gate", | |
| "model.layers.16.block_sparse_moe.gate", | |
| "model.layers.17.block_sparse_moe.gate", | |
| "model.layers.18.block_sparse_moe.gate", | |
| "model.layers.19.block_sparse_moe.gate", | |
| "model.layers.2.block_sparse_moe.gate", | |
| "model.layers.20.block_sparse_moe.gate", | |
| "model.layers.21.block_sparse_moe.gate", | |
| "model.layers.22.block_sparse_moe.gate", | |
| "model.layers.23.block_sparse_moe.gate", | |
| "model.layers.24.block_sparse_moe.gate", | |
| "model.layers.25.block_sparse_moe.gate", | |
| "model.layers.26.block_sparse_moe.gate", | |
| "model.layers.27.block_sparse_moe.gate", | |
| "model.layers.28.block_sparse_moe.gate", | |
| "model.layers.29.block_sparse_moe.gate", | |
| "model.layers.3.block_sparse_moe.gate", | |
| "model.layers.30.block_sparse_moe.gate", | |
| "model.layers.31.block_sparse_moe.gate", | |
| "model.layers.32.block_sparse_moe.gate", | |
| "model.layers.33.block_sparse_moe.gate", | |
| "model.layers.34.block_sparse_moe.gate", | |
| "model.layers.35.block_sparse_moe.gate", | |
| "model.layers.36.block_sparse_moe.gate", | |
| "model.layers.37.block_sparse_moe.gate", | |
| "model.layers.38.block_sparse_moe.gate", | |
| "model.layers.39.block_sparse_moe.gate", | |
| "model.layers.4.block_sparse_moe.gate", | |
| "model.layers.40.block_sparse_moe.gate", | |
| "model.layers.41.block_sparse_moe.gate", | |
| "model.layers.42.block_sparse_moe.gate", | |
| "model.layers.43.block_sparse_moe.gate", | |
| "model.layers.44.block_sparse_moe.gate", | |
| "model.layers.45.block_sparse_moe.gate", | |
| "model.layers.46.block_sparse_moe.gate", | |
| "model.layers.47.block_sparse_moe.gate", | |
| "model.layers.48.block_sparse_moe.gate", | |
| "model.layers.49.block_sparse_moe.gate", | |
| "model.layers.5.block_sparse_moe.gate", | |
| "model.layers.50.block_sparse_moe.gate", | |
| "model.layers.51.block_sparse_moe.gate", | |
| "model.layers.52.block_sparse_moe.gate", | |
| "model.layers.53.block_sparse_moe.gate", | |
| "model.layers.54.block_sparse_moe.gate", | |
| "model.layers.55.block_sparse_moe.gate", | |
| "model.layers.56.block_sparse_moe.gate", | |
| "model.layers.57.block_sparse_moe.gate", | |
| "model.layers.58.block_sparse_moe.gate", | |
| "model.layers.59.block_sparse_moe.gate", | |
| "model.layers.6.block_sparse_moe.gate", | |
| "model.layers.60.block_sparse_moe.gate", | |
| "model.layers.61.block_sparse_moe.gate", | |
| "model.layers.7.block_sparse_moe.gate", | |
| "model.layers.8.block_sparse_moe.gate", | |
| "model.layers.9.block_sparse_moe.gate", | |
| "lm_head" | |
| ] | |
| } | |
| } |