Text Generation
Transformers
Safetensors
minimax_m2
vLLM
AWQ
conversational
custom_code
4-bit precision
awq
Instructions to use QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ
- SGLang
How to use QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ 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 "QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ" \ --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": "QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ", "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 "QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ" \ --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": "QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ with Docker Model Runner:
docker model run hf.co/QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ
Download config.json from QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ: direct link, hf CLI and curl.
- Browser
- Download file 3.16 kB
-
https://huggingface.co/QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ/resolve/main/config.json
- Command line
-
hf download hf://QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ/config.json
-
curl -L -o config.json https://huggingface.co/QuantTrio/MiniMax-M2-REAP-162B-A10B-AWQ/resolve/main/config.json
3.16 kB
| { | |
| "name_or_path": "tclf90/MiniMax-M2-REAP-162B-A10B-AWQ", | |
| "architectures": [ | |
| "MiniMaxM2ForCausalLM" | |
| ], | |
| "attention_dropout": 0.0, | |
| "attn_type_list": [ | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1, | |
| 1 | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "configuration_minimax_m2.MiniMaxM2Config", | |
| "AutoModelForCausalLM": "modeling_minimax_m2.MiniMaxM2ForCausalLM" | |
| }, | |
| "bos_token_id": null, | |
| "dtype": "bfloat16", | |
| "eos_token_id": null, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 3072, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 1536, | |
| "layernorm_full_attention_beta": 1.0, | |
| "layernorm_linear_attention_beta": 1.0, | |
| "layernorm_mlp_beta": 1.0, | |
| "max_position_embeddings": 196608, | |
| "mlp_intermediate_size": 8192, | |
| "model_type": "minimax_m2", | |
| "mtp_transformer_layers": 1, | |
| "num_attention_heads": 48, | |
| "num_experts_per_tok": 8, | |
| "num_hidden_layers": 62, | |
| "num_key_value_heads": 8, | |
| "num_local_experts": 180, | |
| "num_mtp_modules": 3, | |
| "output_router_logits": false, | |
| "partial_rotary_factor": 0.5, | |
| "qk_norm_type": "per_layer", | |
| "quantization_config": { | |
| "quant_method": "awq", | |
| "bits": 4, | |
| "group_size": 128, | |
| "version": "gemm", | |
| "zero_point": true, | |
| "modules_to_not_convert": [ | |
| "model.layers.0.", | |
| "model.layers.1.self_attn", | |
| "model.layers.2.self_attn", | |
| "model.layers.3.self_attn", | |
| "model.layers.4.self_attn", | |
| "model.layers.5.self_attn", | |
| "model.layers.6.self_attn", | |
| "model.layers.7.self_attn", | |
| "model.layers.8.self_attn", | |
| "model.layers.9.self_attn", | |
| "model.layers.10.self_attn", | |
| "model.layers.11.self_attn", | |
| "model.layers.12.self_attn", | |
| "model.layers.13.self_attn", | |
| "model.layers.14.self_attn", | |
| "model.layers.15.self_attn", | |
| "model.layers.47.self_attn", | |
| "model.layers.48.self_attn", | |
| "model.layers.49.self_attn", | |
| "model.layers.50.self_attn", | |
| "model.layers.51.self_attn", | |
| "model.layers.52.self_attn", | |
| "model.layers.53.self_attn", | |
| "model.layers.54.self_attn", | |
| "model.layers.55.self_attn", | |
| "model.layers.56.self_attn", | |
| "model.layers.57.self_attn", | |
| "model.layers.58.self_attn", | |
| "model.layers.59.self_attn", | |
| "model.layers.60.self_attn", | |
| "model.layers.61.self_attn" | |
| ] | |
| }, | |
| "rms_norm_eps": 1e-06, | |
| "rope_theta": 5000000, | |
| "rotary_dim": 64, | |
| "router_aux_loss_coef": 0.001, | |
| "router_jitter_noise": 0.0, | |
| "scoring_func": "sigmoid", | |
| "shared_intermediate_size": 0, | |
| "shared_moe_mode": "sigmoid", | |
| "sliding_window": null, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "4.57.1", | |
| "use_cache": true, | |
| "use_mtp": true, | |
| "use_qk_norm": true, | |
| "use_routing_bias": true, | |
| "vocab_size": 200064, | |
| "torch_dtype": "float16" | |
| } |