Instructions to use hf-internal-testing/MiniMax-M2-Small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hf-internal-testing/MiniMax-M2-Small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hf-internal-testing/MiniMax-M2-Small")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hf-internal-testing/MiniMax-M2-Small") model = AutoModelForCausalLM.from_pretrained("hf-internal-testing/MiniMax-M2-Small", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hf-internal-testing/MiniMax-M2-Small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hf-internal-testing/MiniMax-M2-Small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hf-internal-testing/MiniMax-M2-Small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hf-internal-testing/MiniMax-M2-Small
- SGLang
How to use hf-internal-testing/MiniMax-M2-Small 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 "hf-internal-testing/MiniMax-M2-Small" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hf-internal-testing/MiniMax-M2-Small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "hf-internal-testing/MiniMax-M2-Small" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hf-internal-testing/MiniMax-M2-Small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hf-internal-testing/MiniMax-M2-Small with Docker Model Runner:
docker model run hf.co/hf-internal-testing/MiniMax-M2-Small
Commit History
-
Upload MiniMaxM2ForCausalLM
Verified signature3eb0ac9 -
Upload MiniMaxM2ForCausalLM
Verified signature2fa6c9d -
Upload MiniMaxM2ForCausalLM
Verified signature0831be1 -
Delete model.safetensors.index.json
Verified signatureeccb1b6 -
Delete model-00004-of-00004.safetensors
Verified signature835e3fd -
Delete model-00003-of-00004.safetensors
Verified signature2071f8c -
Delete model-00002-of-00004.safetensors
Verified signature0a93330 -
Delete model-00001-of-00004.safetensors
Verified signature9c08fae -
Upload MiniMaxM2ForCausalLM
Verified signature1fa1c30 -
Upload MiniMaxM2ForCausalLM
Verified signaturefec1feb -
Upload MiniMaxM2ForCausalLM
Verified signature2826b8f
-
Upload MiniMaxM2ForCausalLM
Verified signature171044a -
Upload MiniMaxM2ForCausalLM
Verified signature7c88b33 -
initial commit
Verified signatured779842