Image-Text-to-Text
Transformers
Safetensors
Moroccan Arabic
Arabic
English
qwen3_5
compiwer-ai
mtrini
svl
reasoning
moroccan-darija
conversational
Instructions to use CompiwerAI/Mtrini-SVL-2.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CompiwerAI/Mtrini-SVL-2.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="CompiwerAI/Mtrini-SVL-2.0") 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("CompiwerAI/Mtrini-SVL-2.0") model = AutoModelForMultimodalLM.from_pretrained("CompiwerAI/Mtrini-SVL-2.0", 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 CompiwerAI/Mtrini-SVL-2.0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CompiwerAI/Mtrini-SVL-2.0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CompiwerAI/Mtrini-SVL-2.0", "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/CompiwerAI/Mtrini-SVL-2.0
- SGLang
How to use CompiwerAI/Mtrini-SVL-2.0 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 "CompiwerAI/Mtrini-SVL-2.0" \ --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": "CompiwerAI/Mtrini-SVL-2.0", "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 "CompiwerAI/Mtrini-SVL-2.0" \ --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": "CompiwerAI/Mtrini-SVL-2.0", "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 CompiwerAI/Mtrini-SVL-2.0 with Docker Model Runner:
docker model run hf.co/CompiwerAI/Mtrini-SVL-2.0
Download eval_results.json from CompiwerAI/Mtrini-SVL-2.0: direct link, hf CLI and curl.
- Browser
- Download file 1.31 kB
-
https://huggingface.co/CompiwerAI/Mtrini-SVL-2.0/resolve/main/eval_results.json
- Command line
-
hf download hf://CompiwerAI/Mtrini-SVL-2.0/eval_results.json
-
curl -L -o eval_results.json https://huggingface.co/CompiwerAI/Mtrini-SVL-2.0/resolve/main/eval_results.json
1.31 kB
| { | |
| "base": { | |
| "math500": 0.66, | |
| "darija_mmlu": 0.345, | |
| "identity": 0.0, | |
| "humaneval": 0.9390243902439024 | |
| }, | |
| "previous": { | |
| "livecodebench": 0.475, | |
| "livecodebench/easy": 0.9523809523809523, | |
| "livecodebench/hard": 0.16666666666666666, | |
| "livecodebench/medium": 0.5217391304347826, | |
| "gpqa_diamond": 0.6060606060606061, | |
| "gpqa/biology": 0.42105263157894735, | |
| "gpqa/chemistry": 0.41935483870967744, | |
| "gpqa/physics": 0.8488372093023255, | |
| "aime2025": 0.6208333333333333, | |
| "aime/algebra": 0.7222222222222222, | |
| "aime/combinatorics": 0.5416666666666666, | |
| "aime/geometry": 0.6607142857142857, | |
| "aime/number theory": 0.525, | |
| "darija_mmlu": 0.64, | |
| "identity": 0.9375 | |
| }, | |
| "svl20": { | |
| "livecodebench": 0.4875, | |
| "livecodebench/easy": 0.9523809523809523, | |
| "livecodebench/hard": 0.1388888888888889, | |
| "livecodebench/medium": 0.6086956521739131, | |
| "gpqa_diamond": 0.6212121212121212, | |
| "gpqa/biology": 0.5263157894736842, | |
| "gpqa/chemistry": 0.3870967741935484, | |
| "gpqa/physics": 0.8953488372093024, | |
| "aime2025": 0.6166666666666667, | |
| "aime/algebra": 0.5972222222222222, | |
| "aime/combinatorics": 0.5277777777777778, | |
| "aime/geometry": 0.8392857142857143, | |
| "aime/number theory": 0.5, | |
| "darija_mmlu": 0.6425, | |
| "identity": 0.9375 | |
| } | |
| } |