Image-Text-to-Text
Transformers
Safetensors
minimax_m3_vl
multimodal
Mixture of Experts
agent
coding
video
conversational
custom_code
Instructions to use CharyZeng/MiniMax-M3.1-Flash-4layer-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CharyZeng/MiniMax-M3.1-Flash-4layer-bf16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="CharyZeng/MiniMax-M3.1-Flash-4layer-bf16", 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("CharyZeng/MiniMax-M3.1-Flash-4layer-bf16", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("CharyZeng/MiniMax-M3.1-Flash-4layer-bf16", trust_remote_code=True, device_map="auto") 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CharyZeng/MiniMax-M3.1-Flash-4layer-bf16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CharyZeng/MiniMax-M3.1-Flash-4layer-bf16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CharyZeng/MiniMax-M3.1-Flash-4layer-bf16", "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/CharyZeng/MiniMax-M3.1-Flash-4layer-bf16
- SGLang
How to use CharyZeng/MiniMax-M3.1-Flash-4layer-bf16 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 "CharyZeng/MiniMax-M3.1-Flash-4layer-bf16" \ --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": "CharyZeng/MiniMax-M3.1-Flash-4layer-bf16", "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 "CharyZeng/MiniMax-M3.1-Flash-4layer-bf16" \ --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": "CharyZeng/MiniMax-M3.1-Flash-4layer-bf16", "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 CharyZeng/MiniMax-M3.1-Flash-4layer-bf16 with Docker Model Runner:
docker model run hf.co/CharyZeng/MiniMax-M3.1-Flash-4layer-bf16
Download model-00001.safetensors from CharyZeng/MiniMax-M3.1-Flash-4layer-bf16: direct link, hf CLI and curl.
- Browser
- Download file 5.37 GB
-
https://huggingface.co/CharyZeng/MiniMax-M3.1-Flash-4layer-bf16/resolve/main/model-00001.safetensors
- Command line
-
hf download hf://CharyZeng/MiniMax-M3.1-Flash-4layer-bf16/model-00001.safetensors
-
curl -L -o model-00001.safetensors https://huggingface.co/CharyZeng/MiniMax-M3.1-Flash-4layer-bf16/resolve/main/model-00001.safetensors
5.37 GB
- Xet hash:
- eda7cf9c778c3f390de6045a35d7383968351de2e5de39863d780f44db3cba06
- Size of remote file:
- 5.37 GB
- SHA256:
- 4a2fba7be1b0b28870cae3316941c1c039ae00c9f9abfe27458b0800395d9831
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.