Image-Text-to-Text
Transformers
Safetensors
minimax_m3_vl
multimodal
Mixture of Experts
agent
coding
video
conversational
custom_code
Instructions to use unsloth/MiniMax-M3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/MiniMax-M3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="unsloth/MiniMax-M3", trust_remote_code=True) 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("unsloth/MiniMax-M3", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("unsloth/MiniMax-M3", trust_remote_code=True) 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 unsloth/MiniMax-M3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unsloth/MiniMax-M3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/MiniMax-M3", "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/unsloth/MiniMax-M3
- SGLang
How to use unsloth/MiniMax-M3 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 "unsloth/MiniMax-M3" \ --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": "unsloth/MiniMax-M3", "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 "unsloth/MiniMax-M3" \ --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": "unsloth/MiniMax-M3", "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 unsloth/MiniMax-M3 with Docker Model Runner:
docker model run hf.co/unsloth/MiniMax-M3
Add files using upload-large-folder tool
Browse files- model-00003-of-00059.safetensors +3 -0
- model-00004-of-00059.safetensors +3 -0
- model-00005-of-00059.safetensors +3 -0
- model-00006-of-00059.safetensors +3 -0
- model-00007-of-00059.safetensors +3 -0
- model-00008-of-00059.safetensors +3 -0
- model-00009-of-00059.safetensors +3 -0
- model-00010-of-00059.safetensors +3 -0
- model-00011-of-00059.safetensors +3 -0
- model-00012-of-00059.safetensors +3 -0
- model-00013-of-00059.safetensors +3 -0
- model-00014-of-00059.safetensors +3 -0
- model-00015-of-00059.safetensors +3 -0
- model-00016-of-00059.safetensors +3 -0
- model-00017-of-00059.safetensors +3 -0
- model-00018-of-00059.safetensors +3 -0
- model-00019-of-00059.safetensors +3 -0
- model-00020-of-00059.safetensors +3 -0
- model-00021-of-00059.safetensors +3 -0
- model-00022-of-00059.safetensors +3 -0
- model-00023-of-00059.safetensors +3 -0
- model-00024-of-00059.safetensors +3 -0
- model-00026-of-00059.safetensors +3 -0
- model-00029-of-00059.safetensors +3 -0
- model-00030-of-00059.safetensors +3 -0
- model-00031-of-00059.safetensors +3 -0
- model-00033-of-00059.safetensors +3 -0
- model-00059-of-00059.safetensors +3 -0
model-00003-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:db80e5edf8169e3c5cc098e032d556381c1a84b1738f84ac376ed7b39cafffb5
|
| 3 |
+
size 16079479008
|
model-00004-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:97990b9a6477674a32acbbcb8b9ae5ead5eff93e882e31c8da36c95b3e1c62b8
|
| 3 |
+
size 16079479000
|
model-00005-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:109c0245ed614bf8502edc1e83ef9575ec4aa210cb99fc34bf2db03245f3c305
|
| 3 |
+
size 16079479000
|
model-00006-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d787b2366131f8fb9175aec5bb986d0b3f3fa3a6433b73124b089fe78a765bbb
|
| 3 |
+
size 16079479000
|
model-00007-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c6ec7f70426ab2ee7decd771c1db66f231a57110fd382dc07c8a00d2b28b79a5
|
| 3 |
+
size 16079479000
|
model-00008-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6463a6c079529088be571dff7d49714e5ba53e8be91d0365c85861f8e24813c5
|
| 3 |
+
size 16079479000
|
model-00009-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b40f0eb7c619e133498a5e7c08cb5dc19e7d7ba410bbec95604af2d7a60560ea
|
| 3 |
+
size 16079479000
|
model-00010-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dda2800d133243292ddc513c6840965719bf9be56b8e0688f1e0976f9a1f8718
|
| 3 |
+
size 16079479408
|
model-00011-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2b9034b9465cc74d7597f772bebb2ab2a11927bccbafe3c945d83fe416b18b31
|
| 3 |
+
size 16079479408
|
model-00012-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:428bd21d923d485be8f3a9c07c05f11d4cbb17663b116501f7ce70920928e0ae
|
| 3 |
+
size 16079479408
|
model-00013-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:63e7bccc9bfde81758dbbc8f3c1d489265e5e7b8090cbd3c680f716169238d02
|
| 3 |
+
size 16079479408
|
model-00014-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2bb43609c1f96762ff37e1ea96e5de13042e7ca449f456b6f8e8177adf3c7a6e
|
| 3 |
+
size 16079479408
|
model-00015-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e8a996b3b76b09d956f38c37ec7a0849068ac4cf42da2b449055d6ab452d422a
|
| 3 |
+
size 16079479408
|
model-00016-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:468d354425f54ad3f8f4f434d611fa27c1164e5362610acf2e58a491c41157f5
|
| 3 |
+
size 16079479408
|
model-00017-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6698280d2df1837e76674b1b93825b397390c80ff4790f5a3cc12fb555e4b86e
|
| 3 |
+
size 16079479408
|
model-00018-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:52982932f6fb23d4805317bf9785582b9e6db13d034669f45d8b186df7110b6e
|
| 3 |
+
size 16079479408
|
model-00019-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:999ed59667d5546aa47ed447c63d3a7523e1c011c0406c3db27248fb88789aa8
|
| 3 |
+
size 16079479408
|
model-00020-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:465b4c6a0b2aa62ee77364d885d25fc05348704fc721baec8a68be99ce96b2a9
|
| 3 |
+
size 16079479408
|
model-00021-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:10f62f292fe4914b80ba3b1304c88152d25dbb811a89ead2609ce7f831e80fc4
|
| 3 |
+
size 16079479408
|
model-00022-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7a2a1e556b9dfe3915ceb28a0a6394372957c63063f692c740349a74b6aa177a
|
| 3 |
+
size 16079479408
|
model-00023-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f8294c392c4daff5deca1fd3c0c22de13bbc79078a18986e8865a49527dbe275
|
| 3 |
+
size 16079479408
|
model-00024-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5c54a7513a720e7d1a9709be756d5f78fa97d14b0e7ce9877494cebad681852f
|
| 3 |
+
size 16079479408
|
model-00026-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:92d4b0199b5bfc57337d15ab057d9056bad11d37788274a1727a69d929d7caac
|
| 3 |
+
size 15302516656
|
model-00029-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1c912118399e767c7eaf5d7096d78a91610df7a67ee1d11de141777d2a5c3797
|
| 3 |
+
size 14833765536
|
model-00030-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:20553bba3fd11ae151b2160c1b33f6dc5a7da0a6e9c6bd408fb300fcde4727eb
|
| 3 |
+
size 14833765536
|
model-00031-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:03d00987b21643b8a5821641dd829473433c9b0b8f98b48732ca25fcf27c5e48
|
| 3 |
+
size 14833765536
|
model-00033-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:316fe078370010b9d95ff1d9bc7c21c6198610da8ed5d2d84d0415fc24bee642
|
| 3 |
+
size 14833765536
|
model-00059-of-00059.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:719c66930446908e42fd4f34535c375fe677f450276421ab506a97a219b10013
|
| 3 |
+
size 16099232552
|