Text Generation
PEFT
Safetensors
lora
vision-language
qwen3-vl
coding
math
darija
fine-tuned
beginner-friendly
conversational
Instructions to use CompiwerAI/Mtrini-SVL-1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use CompiwerAI/Mtrini-SVL-1.0 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-VL-8B-Instruct") model = PeftModel.from_pretrained(base_model, "CompiwerAI/Mtrini-SVL-1.0") - Notebooks
- Google Colab
- Kaggle
File size: 4,035 Bytes
932dd4c da3498a b3e8008 da3498a 932dd4c b3e8008 932dd4c b3e8008 932dd4c b3e8008 932dd4c da3498a 932dd4c b3e8008 932dd4c da3498a b3e8008 932dd4c b3e8008 932dd4c da3498a 932dd4c b3e8008 932dd4c b3e8008 932dd4c b3e8008 932dd4c b3e8008 932dd4c b3e8008 932dd4c b3e8008 932dd4c b3e8008 932dd4c da3498a 932dd4c b3e8008 932dd4c da3498a 932dd4c b3e8008 da3498a b3e8008 da3498a b3e8008 da3498a b3e8008 da3498a 932dd4c da3498a 932dd4c b3e8008 932dd4c b3e8008 932dd4c da3498a 932dd4c b3e8008 932dd4c da3498a 932dd4c b3e8008 932dd4c b3e8008 932dd4c b3e8008 932dd4c b3e8008 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | ---
base_model: Qwen/Qwen3-VL-8B-Instruct
library_name: peft
pipeline_tag: text-generation
tags:
- base_model:adapter:Qwen/Qwen3-VL-8B-Instruct
- lora
- peft
- vision-language
- qwen3-vl
- coding
- math
- darija
- fine-tuned
- beginner-friendly
license: apache-2.0
---
# ๐ง Mtrini-SVL-1.0 (Adapter)
> **Mtrini** (ู
ุชุฑุจูู) comes from **Darija** โ Moroccan Arabic โ and means
> **"trained"** or **"well-fit."** ๐ช That's exactly what this model is: a
> smart base model that we trained a little further to be great at **coding**
> and **math** โ while still being able to **see images.** ๐
---
## ๐ค What is this, in plain English?
There are two pieces here:
1. **A big, powerful base model** ๐๏ธ โ `Qwen3-VL-8B-Instruct`. It already knows
a lot and can understand both text and images.
2. **A small "adapter"** ๐งฉ โ this is the *Mtrini* part. Instead of retraining
the whole giant model (expensive! ๐ธ), we trained a lightweight add-on that
nudges the base model to be better at coding and math.
**This repo is the adapter** ๐งฉ โ the little piece that plugs into the big model.
---
## ๐ What's in the name?
**Mtrini** (ู
ุชุฑุจูู) in Darija means *trained* or *well-fit* โ the root
*m-r-b* carries the sense of being raised, cultivated, and prepared. ๐ฑ
That's literally what happened here: a capable foundation model, further
trained on focused data to become *well-fit* for reasoning tasks.
๐ฃ๏ธ *Say it like: "em-tree-nee."*
---
## โจ What can it do?
| Skill | Description |
|-------|-------------|
| ๐ป **Coding** | Write functions, fix bugs, explain how code works |
| ๐งฎ **Math** | Solve problems step by step and show its reasoning |
| ๐ **Vision** | Describe images, read screenshots, and answer questions about pictures |
---
## ๐ What was it trained on?
Two public datasets, chosen to make it sharp at reasoning:
| ๐ฆ Dataset | ๐ฏ Focus |
|-----------|----------|
| `Bespoke-Stratos-17k` | Coding & problem-solving |
| `OpenR1-Math-220k` | Mathematical reasoning |
---
## ๐ง Technical details (for the curious)
| Setting | Value |
|---------|-------|
| ๐๏ธ Base model | `Qwen/Qwen3-VL-8B-Instruct` (8.81B params) |
| ๐งฉ Adapter type | LoRA (rank 16) |
| ๐ฏ Target modules | Attention + MLP projections |
| ๐ Context length | 2048 |
| ๐ Learning rate | 2e-4 |
| ๐ข Max steps | 1000 |
> **LoRA** stands for *Low-Rank Adaptation* โ a clever way to fine-tune a big
> model by training only a tiny fraction of its weights. That's why the adapter
> is small and fast to share. ๐ชถ
---
## ๐ How to use it
```python
import torch
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor
from peft import PeftModel
# 1๏ธโฃ Load the big base model
base = Qwen3VLForConditionalGeneration.from_pretrained(
"Qwen/Qwen3-VL-8B-Instruct",
dtype=torch.bfloat16,
device_map="auto",
attn_implementation="sdpa",
)
# 2๏ธโฃ Plug in the Mtrini adapter
model = PeftModel.from_pretrained(base, "CompiwerAI/Mtrini-SVL-1.0")
# 3๏ธโฃ Load the processor (handles text + images)
processor = AutoProcessor.from_pretrained("CompiwerAI/Mtrini-SVL-1.0")
model.eval()
```
---
## ๐ฆ Want to skip the setup? Use the GGUF!
If all that Python looks intimidating, we've got you covered. ๐ We **merged**
the adapter into the base model and **quantized** it into a single file you can
run locally with no Python at all:
๐ **[CompiwerAI/Mtrini-SVL-1.0-GGUF](https://huggingface.co/CompiwerAI/Mtrini-SVL-1.0-GGUF)**
- ๐๏ธ One file, ~8.7 GB
- ๐ฅ๏ธ Runs with [llama.cpp](https://github.com/ggml-org/llama.cpp)
- ๐ผ๏ธ Vision included โ no extra files needed
---
## โ ๏ธ Things to keep in mind
- It's trained for a relatively short schedule (1000 steps) on a focused mix.
- It inherits both the strengths and the limitations of the base model.
- ๐งช Always test on **your** use case before relying on it in production.
## ๐ License
Apache 2.0 โ same as the base model. โ
|