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
Add language tags (ary, ar, en) and links to the GGUF versions
Browse files
README.md
CHANGED
|
@@ -3,6 +3,10 @@ base_model: Qwen/Qwen3.5-9B
|
|
| 3 |
library_name: transformers
|
| 4 |
pipeline_tag: image-text-to-text
|
| 5 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
tags: [compiwer-ai, mtrini, svl, reasoning, moroccan-darija, qwen3_5]
|
| 7 |
datasets: [simplescaling/s1K-1.1, GAIR/LIMO, open-r1/codeforces-cots, open-thoughts/OpenThoughts3-1.2M, MBZUAI-Paris/Darija-SFT-Mixture]
|
| 8 |
---
|
|
@@ -40,6 +44,19 @@ Three rounds of LoRA SFT, each merged before the next:
|
|
| 40 |
|
| 41 |
Use it like Qwen3.5-9B. Thinking is on by default; pass `enable_thinking=False` to the chat template for direct answers.
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
## Status
|
| 44 |
|
| 45 |
Experimental. Check the base model's card for limitations, and verify important answers.
|
|
|
|
| 3 |
library_name: transformers
|
| 4 |
pipeline_tag: image-text-to-text
|
| 5 |
license: apache-2.0
|
| 6 |
+
language:
|
| 7 |
+
- ary
|
| 8 |
+
- ar
|
| 9 |
+
- en
|
| 10 |
tags: [compiwer-ai, mtrini, svl, reasoning, moroccan-darija, qwen3_5]
|
| 11 |
datasets: [simplescaling/s1K-1.1, GAIR/LIMO, open-r1/codeforces-cots, open-thoughts/OpenThoughts3-1.2M, MBZUAI-Paris/Darija-SFT-Mixture]
|
| 12 |
---
|
|
|
|
| 44 |
|
| 45 |
Use it like Qwen3.5-9B. Thinking is on by default; pass `enable_thinking=False` to the chat template for direct answers.
|
| 46 |
|
| 47 |
+
## Run it on your computer
|
| 48 |
+
|
| 49 |
+
GGUF versions for llama.cpp, LM Studio and Ollama, made by [mradermacher](https://huggingface.co/mradermacher) (thank you!), including the vision projector (`mmproj`) for images:
|
| 50 |
+
|
| 51 |
+
- [mradermacher/Mtrini-SVL-2.0-GGUF](https://huggingface.co/mradermacher/Mtrini-SVL-2.0-GGUF)
|
| 52 |
+
- [mradermacher/Mtrini-SVL-2.0-i1-GGUF](https://huggingface.co/mradermacher/Mtrini-SVL-2.0-i1-GGUF) (imatrix quants)
|
| 53 |
+
|
| 54 |
+
```bash
|
| 55 |
+
ollama run hf.co/mradermacher/Mtrini-SVL-2.0-GGUF:Q4_K_M
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
In LM Studio, search for **Mtrini-SVL-2.0**. Q4_K_M (5.6 GB) is a good default.
|
| 59 |
+
|
| 60 |
## Status
|
| 61 |
|
| 62 |
Experimental. Check the base model's card for limitations, and verify important answers.
|