File size: 9,566 Bytes
d257793
60eee33
d257793
60eee33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d257793
3c866bc
60eee33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28408d1
60eee33
 
9d7815c
33a7f12
9d7815c
60eee33
9d7815c
60eee33
9d7815c
60eee33
 
 
 
9d7815c
60eee33
9e1fa3d
9d7815c
60eee33
9d7815c
60eee33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1932e57
 
 
 
60eee33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2bd18a0
60eee33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e864cd3
60eee33
 
 
e864cd3
60eee33
 
 
 
 
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
---
license: apache-2.0
library_name: transformers
pipeline_tag: text-generation
tags:
- conversational
base_model:
- meta-llama/Llama-3.1-8B-Instruct
language:
- tr
model-index:
- name: wiroai-turkish-llm-8b
  results:
  - task:
      type: multiple-choice
    dataset:
      type: multiple-choice
      name: MMLU_TR_V0.2
    metrics:
    - name: 5-shot
      type: 5-shot
      value: 0.5240
      verified: false
  - task:
      type: multiple-choice
    dataset:
      type: multiple-choice
      name: Truthful_QA_V0.2
    metrics:
    - name: 0-shot
      type: 0-shot
      value: 0.4950
      verified: false
  - task:
      type: multiple-choice
    dataset:
      type: multiple-choice
      name: ARC_TR_V0.2
    metrics:
    - name: 25-shot
      type: 25-shot
      value: 0.5010
      verified: false
  - task:
      type: multiple-choice
    dataset:
      type: multiple-choice
      name: HellaSwag_TR_V0.2
    metrics:
    - name: 10-shot
      type: 10-shot
      value: 0.5400
      verified: false
  - task:
      type: multiple-choice
    dataset:
      type: multiple-choice
      name: GSM8K_TR_V0.2
    metrics:
    - name: 5-shot
      type: 5-shot
      value: 0.5750
      verified: false
  - task:
      type: multiple-choice
    dataset:
      type: multiple-choice
      name: Winogrande_TR_V0.2
    metrics:
    - name: 5-shot
      type: 5-shot
      value: 0.5700
      verified: false
---

<div align="center">
  <img src="https://huggingface.co/WiroAI/wiroai-turkish-llm-9b/resolve/main/wiro_logo.png" width="15%" alt="Wiro AI" />
</div>
<hr>
<div align="center" style="line-height: 1;">
  <a href="https://www.wiro.ai/" target="_blank" style="margin: 2px;">
    <img alt="Homepage" src="https://huggingface.co/WiroAI/wiroai-turkish-llm-9b/resolve/main/homepage.svg" style="display: inline-block; vertical-align: middle;"/>
  </a>
  <a href="https://wiro.ai/tools?search=&categories=chat&tags=&page=0" target="_blank" style="margin: 2px;">
    <img alt="Chat" src="https://huggingface.co/WiroAI/wiroai-turkish-llm-9b/resolve/main/chat.svg" style="display: inline-block; vertical-align: middle;"/>
  </a>
  <a href="https://huggingface.co/WiroAI" target="_blank" style="margin: 2px;">
    <img alt="Hugging Face" src="https://huggingface.co/WiroAI/wiroai-turkish-llm-9b/resolve/main/huggingface.svg" style="display: inline-block; vertical-align: middle;"/>
  </a>
</div>
<div align="center" style="line-height: 1;">
  <a href="https://instagram.com/wiroai" target="_blank" style="margin: 2px;">
    <img alt="Instagram Follow" src="https://img.shields.io/badge/Instagram-wiroai-555555?logo=instagram&logoColor=white&labelColor=E4405F" style="display: inline-block; vertical-align: middle;"/>
  </a>
    <a href="https://x.com/wiroai" target="_blank" style="margin: 2px;">
    <img alt="X Follow" src="https://img.shields.io/badge/X-wiroai-555555?logo=x&logoColor=white&labelColor=000000" style="display: inline-block; vertical-align: middle;"/>
  </a>
</div>
<div align="center" style="line-height: 1;">
  <a href="https://wiro.ai/agreement/terms-of-service" style="margin: 2px;">
    <img alt="License" src="https://img.shields.io/badge/License-apache 2.0-f5de53?&color=f5de53" style="display: inline-block; vertical-align: middle;"/>
  </a>
</div>



# 🚀 Meet with WiroAI/wiroai-turkish-llm-8b! A robust language model with more Turkish language and culture support! 🚀

## 🌟 Key Features

- Fine-tuned with 500,000+ high-quality Turkish instructions
- LoRA method was used for fine-tuning without quantization.
- Adapted to Turkish culture and local context
- Built on Google's cutting-edge LLaMA architecture

📝 Model Details
The model is the Turkish-speaking member of Meta's innovative LLaMA model family. This model has been trained using Supervised Fine-Tuning (SFT) on carefully curated high-quality Turkish instructions. This model demonstrates superior performance in Turkish language processing tasks.

## 🔧 Technical Specifications

- Architecture: Decoder-only transformer
- Base Model: Meta LLaMA 3.1 8B
- Training Data: 500,000+ specially selected Turkish instructions
- Language Support: Turkish (with comprehensive local context understanding) and other common languages.

## 💡 Use Cases

- Text Generation and Editing
- Question Answering
- Summarization
- Analysis and Reasoning
- Content Transformation
- Turkish Natural Language Processing Tasks
- Turkish Culture


## 🚀 Advantages

- Local Understanding: Ability to comprehend Turkish culture, idioms, and current events
- Resource Efficiency: Effective operation even with limited hardware resources
- Flexible Deployment: Usable on desktop, laptop, or custom cloud infrastructure
- Open Model: Transparent and customizable architecture

## 📈 Performance and Limitations
While the model demonstrates high performance in Turkish language tasks, users should consider the following:

- Use clear and structured instructions for best results.
- Verify model outputs for critical applications.
- Evaluate resource requirements before deployment.
- Be aware that benchmarks below are represented in certain conditions and results can be replicated. Condition choices are explained below the table.

### Benchmark Scores


| Models                                                    | MMLU TR | TruthfulQA TR | ARC TR | HellaSwag TR | GSM8K TR | WinoGrande TR | Average | 
|-----------------------------------------------------------|:-------:|:-------------:|:------:|:------------:|:--------:|:-------------:|:-------:|
| **WiroAI/wiroai-turkish-llm-9b**                          | **59.8**    | 49.9          | **53.7**   | **57.0**         | 66.8     | **60.6**          | **58.0**    |
| selimc/OrpoGemma-2-9B-TR                                  | 53.0    | 54.3          | 52.4   | 52.0         | 64.8     | 58.9          | 55.9    |
| Metin/Gemma-2-9b-it-TR-DPO-V1                             | 51.3    | 54.7          | 52.6   | 51.2         | 67.1     | 55.2          | 55.4    |
| CohereForAI/aya-expanse-8b                                | 52.3    | 52.8          | 49.3   | 56.7         | 61.3     | 59.2          | 55.3    |
| ytu-ce-cosmos/Turkish-Llama-8b-DPO-v0.1                   | 52.0    | 57.6          | 51.0   | 53.0         | 59.8     | 58.0          | 55.2    |
| google/gemma-2-9b-it                                      | 51.8    | 53.0          | 52.2   | 51.5         | 63.0     | 56.2          | 54.6    |
| Eurdem/Defne-llama3.1-8B                                  | 52.9    | 51.2          | 47.1   | 51.6         | 59.9     | 57.5          | 53.4    |
| **WiroAI/wiroai-turkish-llm-8b**                          | 52.4    | 49.5          | 50.1   | 54           | 57.5     | 57.0          | 53.4    |
| meta-llama/Meta-Llama-3-8B-Instruct                       | 52.2    | 49.2          | 44.2   | 49.2         | 56.0     | 56.7          | 51.3    |


Models Benchmarks are tested with 
```python
lm_eval --model_args pretrained=<model_path> --tasks mmlu_tr_v0.2,arc_tr-v0.2,gsm8k_tr-v0.2,hellaswag_tr-v0.2,truthfulqa_v0.2,winogrande_tr-v0.2
```
Please see https://github.com/malhajar17/lm-evaluation-harness_turkish and note that we move forward with default language inference which is the same approach in OpenLLMLeaderboard v2.0

## Usage

### Transformers Pipeline

```python
import transformers
import torch


model_id = "WiroAI/wiroai-turkish-llm-8b"

pipeline = transformers.pipeline(
    "text-generation",
    model=model_id,
    model_kwargs={"torch_dtype": torch.bfloat16},
    device_map="auto",
)

pipeline.model.eval()

messages = [
    {"role": "system", "content": "Sen Wiro AI tarafından eğitilmiş Türkçe konuşan bir dil modelisin."},
    {"role": "user", "content": "Bana İstanbul ile alakalı bir sosyal medya postu hazırlar mısın?"
  },
]

terminators = [
    pipeline.tokenizer.eos_token_id,
    pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>")
]

outputs = pipeline(
    messages,
    max_new_tokens=512,
    eos_token_id=terminators,
    do_sample=True,
    temperature=0.9,
)

print(outputs[0]["generated_text"][-1]['content'])
```

```markdown
İstanbul'un büyüsüne kapılın! :city_sunset:
Halk arasında "dünyanın masalı şehri" olarak bilinen İstanbul, her köşesinde tarih, kültür ve modern yaşamın bir araya geldiği eşsiz bir şehir.
Yüzyıllardır farklı medeniyetlerin izlerini taşıyan İstanbul, tarihi mekanlarından, müzelerinden, çarşılarından ve restoranlarından oluşan zengin kültürel mirasa sahiptir.
Boğaz'ın eşsiz manzarasında tekne turu yapmak, Topkapı Sarayı'nı ziyaret etmek, Grand Bazaar'da alışveriş yapmak, Mısır Çarşısı'nın canlı atmosferinde kaybolmak, Galata Kulesi'nden muhteşem bir manzara deneyimlemek veya Beyoğlu'nun hareketli sokaklarında yürüyüş yapmak İstanbul'da unutulmaz anılar yaratmak için fırsatlar sunar.
İstanbul'un büyülü atmosferini kendiniz yaşamak için hemen planınızı yapın! :flag-tr: #İstanbul #Türkiye #Seyahat #Tarih #Kültür #Gezi
```

## 🤝 License and Usage
This model is provided under apache 2.0 license. Please review and accept the license terms before use.

## 📫 Contact and Support
For questions, suggestions, and feedback, please open an issue on HuggingFace or contact us directly from our website.


## Citation



```none
@article{WiroAI,
  title={WiroAI/wiroai-turkish-llm-8b},
  author={Abdullah Bezir, Furkan Burhan Türkay, Cengiz Asmazoğlu},
  year={2024},
  url={https://huggingface.co/WiroAI/wiroai-turkish-llm-8b}
}
```