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 adapter file: README.md
Browse files
README.md
CHANGED
|
@@ -1,80 +1,62 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
| 3 |
tags:
|
|
|
|
| 4 |
- lora
|
| 5 |
-
-
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
- reasoning
|
| 11 |
-
- darija
|
| 12 |
-
- arabic
|
| 13 |
-
library_name: peft
|
| 14 |
---
|
| 15 |
|
| 16 |
-
#
|
| 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 |
-
|
|
|
|
| 23 |
|
| 24 |
-
|
| 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 |
-
|
|
|
|
| 37 |
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
-
|
| 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 |
-
|
| 56 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 57 |
-
from peft import PeftModel
|
| 58 |
|
| 59 |
-
|
| 60 |
-
"Qwen/Qwen3.8-27B",
|
| 61 |
-
torch_dtype="auto",
|
| 62 |
-
device_map="auto",
|
| 63 |
-
)
|
| 64 |
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
-
|
| 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 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: Qwen/Qwen3.8-27B
|
| 3 |
+
library_name: peft
|
| 4 |
+
model_name: mtrini-27b-tellus-adapter
|
| 5 |
tags:
|
| 6 |
+
- base_model:adapter:Qwen/Qwen3.8-27B
|
| 7 |
- lora
|
| 8 |
+
- sft
|
| 9 |
+
- transformers
|
| 10 |
+
- trl
|
| 11 |
+
licence: license
|
| 12 |
+
pipeline_tag: text-generation
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# Model Card for mtrini-27b-tellus-adapter
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
+
This model is a fine-tuned version of [Qwen/Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B).
|
| 18 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 19 |
|
| 20 |
+
## Quick start
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
+
```python
|
| 23 |
+
from transformers import pipeline
|
| 24 |
|
| 25 |
+
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
| 26 |
+
generator = pipeline("text-generation", model="None", device_map="auto")
|
| 27 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 28 |
+
print(output["generated_text"])
|
| 29 |
+
```
|
| 30 |
|
| 31 |
+
## Training procedure
|
| 32 |
|
| 33 |
+
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
|
|
|
| 36 |
|
| 37 |
+
This model was trained with SFT.
|
|
|
|
|
|
|
| 38 |
|
| 39 |
+
### Framework versions
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
+
- PEFT 0.21.0
|
| 42 |
+
- TRL: 1.14.0
|
| 43 |
+
- Transformers: 5.17.0
|
| 44 |
+
- Pytorch: 2.11.0
|
| 45 |
+
- Datasets: 5.0.1
|
| 46 |
+
- Tokenizers: 0.23.2
|
| 47 |
|
| 48 |
+
## Citations
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
|
|
|
| 50 |
|
|
|
|
| 51 |
|
| 52 |
+
Cite TRL as:
|
| 53 |
+
|
| 54 |
+
```bibtex
|
| 55 |
+
@software{vonwerra2020trl,
|
| 56 |
+
title = {{TRL: Transformers Reinforcement Learning}},
|
| 57 |
+
author = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif and Gallouédec, Quentin},
|
| 58 |
+
license = {Apache-2.0},
|
| 59 |
+
url = {https://github.com/huggingface/trl},
|
| 60 |
+
year = {2020}
|
| 61 |
+
}
|
| 62 |
+
```
|