Text Generation
Transformers
Safetensors
mistral3
image-text-to-text
ministral
mistral
pixtral
vllm
compressed-tensors
w4a16
bf16vision
ampere
rtx
conversational
Instructions to use useful-quants/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use useful-quants/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="useful-quants/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision") 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("useful-quants/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision") model = AutoModelForMultimodalLM.from_pretrained("useful-quants/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision") 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 useful-quants/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "useful-quants/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "useful-quants/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/useful-quants/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision
- SGLang
How to use useful-quants/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision 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 "useful-quants/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision" \ --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": "useful-quants/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision", "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 "useful-quants/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision" \ --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": "useful-quants/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use useful-quants/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision with Docker Model Runner:
docker model run hf.co/useful-quants/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision
Ministral-3-3B-Instruct-2512 W4A16 BF16Vision
Ampere-friendly serving build of mistralai/Ministral-3-3B-Instruct-2512.
Language-model linears are compressed-tensors W4A16; the Pixtral vision tower and multimodal projector remain BF16.
Stock proof
docker run --rm -it \
--gpus all \
--ipc=host \
-p 8001:8000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
vllm/vllm-openai:latest \
mistralai/Ministral-3-3B-Instruct-2512 \
--served-model-name Ministral-3-3B-Instruct-2512-stock \
--dtype bfloat16 \
--max-model-len 8192 \
--gpu-memory-utilization 0.7
Serve the packaged artifact
docker run --rm -it \
--gpus all \
--ipc=host \
-p 8002:8000 \
-v /path/to/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision:/model \
-v ~/.cache/huggingface:/root/.cache/huggingface \
vllm/vllm-openai:latest \
/model \
--served-model-name Ministral-3-3B-Instruct-2512-W4A16-BF16Vision \
--dtype bfloat16 \
--quantization compressed-tensors \
--max-model-len 8192 \
--gpu-memory-utilization 0.7
Smoke test
python verify.py --url http://localhost:8002/v1/chat/completions
Notes
- Best fit: RTX 30xx/40xx Ampere cards.
- The Pixtral vision tower and multimodal projector remain in BF16; only the language-model decoder is quantized.
- Downloads last month
- 34
Model tree for useful-quants/Ministral-3-3B-Instruct-2512-W4A16-BF16Vision
Base model
mistralai/Ministral-3-3B-Base-2512 Quantized
mistralai/Ministral-3-3B-Instruct-2512