Instructions to use CompiwerAI/Mtrini-27B-Tellus-Adapter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use CompiwerAI/Mtrini-27B-Tellus-Adapter with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.8-27B") model = PeftModel.from_pretrained(base_model, "CompiwerAI/Mtrini-27B-Tellus-Adapter") - Transformers
How to use CompiwerAI/Mtrini-27B-Tellus-Adapter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CompiwerAI/Mtrini-27B-Tellus-Adapter") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("CompiwerAI/Mtrini-27B-Tellus-Adapter", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CompiwerAI/Mtrini-27B-Tellus-Adapter with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CompiwerAI/Mtrini-27B-Tellus-Adapter" # 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-27B-Tellus-Adapter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/CompiwerAI/Mtrini-27B-Tellus-Adapter
- SGLang
How to use CompiwerAI/Mtrini-27B-Tellus-Adapter 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-27B-Tellus-Adapter" \ --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-27B-Tellus-Adapter", "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 "CompiwerAI/Mtrini-27B-Tellus-Adapter" \ --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-27B-Tellus-Adapter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use CompiwerAI/Mtrini-27B-Tellus-Adapter with Docker Model Runner:
docker model run hf.co/CompiwerAI/Mtrini-27B-Tellus-Adapter
Add professional model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- lora
|
| 5 |
+
- qlora
|
| 6 |
+
- adapter
|
| 7 |
+
- qwen
|
| 8 |
+
- coding
|
| 9 |
+
- mathematics
|
| 10 |
+
- reasoning
|
| 11 |
+
- darija
|
| 12 |
+
- arabic
|
| 13 |
+
library_name: peft
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# Mtrini-27B-Tellus-Adapter
|
| 17 |
+
|
| 18 |
+
This repository contains the **LoRA/QLoRA adapter** for Mtrini-27B-Tellus, developed by CompiwerAI.
|
| 19 |
+
|
| 20 |
+
> **CompiwerAI — Building AI For Everyone.**
|
| 21 |
+
|
| 22 |
+
## Model Information
|
| 23 |
+
|
| 24 |
+
- Base model: **Qwen3.8-27B**
|
| 25 |
+
- Training method: **QLoRA**
|
| 26 |
+
- Training quantization: **4-bit NF4**
|
| 27 |
+
- Compute dtype: **BF16**
|
| 28 |
+
- LoRA rank: **32**
|
| 29 |
+
- LoRA alpha: **64**
|
| 30 |
+
- LoRA dropout: **0.05**
|
| 31 |
+
- Context length: **4096**
|
| 32 |
+
- Training steps: **700**
|
| 33 |
+
- Learning rate: **0.00015**
|
| 34 |
+
- Effective batch size: **16**
|
| 35 |
+
|
| 36 |
+
## Training Mix
|
| 37 |
+
|
| 38 |
+
- OpenCodeInstruct — 35%
|
| 39 |
+
- Magicoder — 10%
|
| 40 |
+
- OpenR1-Math — 25%
|
| 41 |
+
- Moroccan Darija — 20%
|
| 42 |
+
- Aya Arabic / Moroccan Arabic — 10%
|
| 43 |
+
|
| 44 |
+
Total: **11,200 examples**
|
| 45 |
+
|
| 46 |
+
## Training Result
|
| 47 |
+
|
| 48 |
+
- Final loss: **0.4302458722250802**
|
| 49 |
+
- Runtime: approximately **3.15 hours**
|
| 50 |
+
- Epoch: **1**
|
| 51 |
+
- Hardware: **NVIDIA RTX PRO 6000 Blackwell Server Edition**
|
| 52 |
+
|
| 53 |
+
## Loading the Adapter
|
| 54 |
+
|
| 55 |
+
```python
|
| 56 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 57 |
+
from peft import PeftModel
|
| 58 |
+
|
| 59 |
+
base_model = AutoModelForCausalLM.from_pretrained(
|
| 60 |
+
"Qwen/Qwen3.8-27B",
|
| 61 |
+
torch_dtype="auto",
|
| 62 |
+
device_map="auto",
|
| 63 |
+
)
|
| 64 |
+
|
| 65 |
+
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3.8-27B")
|
| 66 |
+
|
| 67 |
+
model = PeftModel.from_pretrained(
|
| 68 |
+
base_model,
|
| 69 |
+
"CompiwerAI/Mtrini-27B-Tellus-Adapter",
|
| 70 |
+
)
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
Use the exact compatible base-model configuration associated with this release.
|
| 74 |
+
|
| 75 |
+
## Related Releases
|
| 76 |
+
|
| 77 |
+
- Merged: `CompiwerAI/Mtrini-27B-Tellus-Merged`
|
| 78 |
+
- F16 GGUF: `CompiwerAI/Mtrini-27B-Tellus-GGUF`
|
| 79 |
+
- IQ2_XS: `CompiwerAI/Mtrini-27B-Tellus-IQ2_XS`
|
| 80 |
+
- Imatrix: `CompiwerAI/Mtrini-27B-Tellus-IQ2_XS-Imatrix`
|