Mtrini-SVL-1.0 / README.md
CompiwerAI's picture
Upload README.md with huggingface_hub
b3e8008 verified
|
Raw History Blame Contribute Delete
4.04 kB
---
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. โœ