Text Generation
Transformers
Safetensors
Turkish
English
qwen3
turkish
legal
turkish-legal
mecellem
qwen
decoder-only
continual-pretraining
TRUBA
MN5
conversational
text-generation-inference
Instructions to use newmindai/Mecellem-Qwen3-1.7B-TR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use newmindai/Mecellem-Qwen3-1.7B-TR with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="newmindai/Mecellem-Qwen3-1.7B-TR") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("newmindai/Mecellem-Qwen3-1.7B-TR") model = AutoModelForMultimodalLM.from_pretrained("newmindai/Mecellem-Qwen3-1.7B-TR") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use newmindai/Mecellem-Qwen3-1.7B-TR with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "newmindai/Mecellem-Qwen3-1.7B-TR" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "newmindai/Mecellem-Qwen3-1.7B-TR", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/newmindai/Mecellem-Qwen3-1.7B-TR
- SGLang
How to use newmindai/Mecellem-Qwen3-1.7B-TR 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 "newmindai/Mecellem-Qwen3-1.7B-TR" \ --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": "newmindai/Mecellem-Qwen3-1.7B-TR", "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 "newmindai/Mecellem-Qwen3-1.7B-TR" \ --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": "newmindai/Mecellem-Qwen3-1.7B-TR", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use newmindai/Mecellem-Qwen3-1.7B-TR with Docker Model Runner:
docker model run hf.co/newmindai/Mecellem-Qwen3-1.7B-TR
Add library_name and links to paper and GitHub
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,8 +1,11 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
language:
|
| 3 |
- tr
|
| 4 |
- en
|
| 5 |
license: apache-2.0
|
|
|
|
|
|
|
| 6 |
tags:
|
| 7 |
- text-generation
|
| 8 |
- turkish
|
|
@@ -14,14 +17,18 @@ tags:
|
|
| 14 |
- continual-pretraining
|
| 15 |
- TRUBA
|
| 16 |
- MN5
|
| 17 |
-
base_model: Qwen/Qwen3-1.7B
|
| 18 |
-
pipeline_tag: text-generation
|
| 19 |
---
|
| 20 |
|
| 21 |
# Mecellem-Qwen3-1.7B-TR
|
| 22 |
|
| 23 |
[](https://opensource.org/licenses/Apache-2.0)
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
## Model Description
|
| 26 |
|
| 27 |
Mecellem-Qwen3-1.7B-TR is a Turkish legal language model adapted through Continual Pre-training (CPT) on Turkish legal and official texts. The model is based on Qwen3-1.7B decoder architecture (1.7B parameters) and trained using a four-phase curriculum learning strategy specifically designed to account for Turkish linguistic complexity. The CPT process progressively transitions from general-purpose texts to domain-specific legal content, achieving 36.2% perplexity reduction on Turkish legal text compared to the base Qwen3-1.7B model.
|
|
@@ -237,7 +244,7 @@ If you use this model, please cite our paper:
|
|
| 237 |
```bibtex
|
| 238 |
@article{mecellem2026,
|
| 239 |
title={Mecellem Models: Turkish Models Trained from Scratch and Continually Pre-trained for the Legal Domain},
|
| 240 |
-
author={Uğur, Özgür and Göksu, Mahmut and Çimen, Mahmut and Yılmaz, Musa and Şavirdi, Esra and Demir, Alp Talha and Güllüce, Rumeysa and
|
| 241 |
journal={arXiv preprint arXiv:2601.16018},
|
| 242 |
year={2026},
|
| 243 |
month={January},
|
|
@@ -257,6 +264,4 @@ If you use this model, please cite our paper:
|
|
| 257 |
journal={arXiv preprint arXiv:2409.00000},
|
| 258 |
year={2024}
|
| 259 |
}
|
| 260 |
-
```
|
| 261 |
-
|
| 262 |
-
<!-- Updated: 2026-01-15 09:38:29 -->
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: Qwen/Qwen3-1.7B
|
| 3 |
language:
|
| 4 |
- tr
|
| 5 |
- en
|
| 6 |
license: apache-2.0
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
+
library_name: transformers
|
| 9 |
tags:
|
| 10 |
- text-generation
|
| 11 |
- turkish
|
|
|
|
| 17 |
- continual-pretraining
|
| 18 |
- TRUBA
|
| 19 |
- MN5
|
|
|
|
|
|
|
| 20 |
---
|
| 21 |
|
| 22 |
# Mecellem-Qwen3-1.7B-TR
|
| 23 |
|
| 24 |
[](https://opensource.org/licenses/Apache-2.0)
|
| 25 |
|
| 26 |
+
Mecellem-Qwen3-1.7B-TR is a Turkish legal language model presented in [Mecellem Models: Turkish Models Trained from Scratch and Continually Pre-trained for the Legal Domain](https://huggingface.co/papers/2601.16018).
|
| 27 |
+
|
| 28 |
+
**Resources:**
|
| 29 |
+
- **Code:** [GitHub Repository](https://github.com/newmindai/mecellem-models)
|
| 30 |
+
- **Paper:** [arXiv:2601.16018](https://arxiv.org/abs/2601.16018)
|
| 31 |
+
|
| 32 |
## Model Description
|
| 33 |
|
| 34 |
Mecellem-Qwen3-1.7B-TR is a Turkish legal language model adapted through Continual Pre-training (CPT) on Turkish legal and official texts. The model is based on Qwen3-1.7B decoder architecture (1.7B parameters) and trained using a four-phase curriculum learning strategy specifically designed to account for Turkish linguistic complexity. The CPT process progressively transitions from general-purpose texts to domain-specific legal content, achieving 36.2% perplexity reduction on Turkish legal text compared to the base Qwen3-1.7B model.
|
|
|
|
| 244 |
```bibtex
|
| 245 |
@article{mecellem2026,
|
| 246 |
title={Mecellem Models: Turkish Models Trained from Scratch and Continually Pre-trained for the Legal Domain},
|
| 247 |
+
author={Uğur, Özgür and Göksu, Mahmut and Çimen, Mahmut and Yılmaz, Musa and Şavirdi, Esra and Demir, Alp Talha and Güllüce, Rumeysa and İclal Çetin and Sağbaş, Ömer Can},
|
| 248 |
journal={arXiv preprint arXiv:2601.16018},
|
| 249 |
year={2026},
|
| 250 |
month={January},
|
|
|
|
| 264 |
journal={arXiv preprint arXiv:2409.00000},
|
| 265 |
year={2024}
|
| 266 |
}
|
| 267 |
+
```
|
|
|
|
|
|