File size: 5,900 Bytes
20d89be
 
 
 
 
 
 
 
 
 
 
 
f5feabf
 
20d89be
5faf680
20d89be
 
 
 
 
 
 
 
 
 
 
f5feabf
20d89be
f5feabf
20d89be
5faf680
 
ce5bdf7
 
 
 
 
 
 
5faf680
 
f5feabf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
language:
  - tr
  - en
license: apache-2.0
library_name: transformers
tags:
  - causal-lm
  - turkish
  - phi3
  - llm
  - text-generation
  - pre-training
  - syko
pipeline_tag: text-generation
inference: false
datasets:
  - uonlp/CulturaX
  - HuggingFaceTB/cosmopedia
  - roneneldan/TinyStories
  - nampdn-ai/tiny-textbooks
  - nampdn-ai/tiny-codes
  - ise-uiuc/Magicoder-Evol-Instruct-110K
  - theblackcat102/evol-codealpaca-v1
  - turkish-nlp-suite/InstrucTurca
---

# 🧠 SykoLLM V5.6

**SykoLLM V5.6**, SykoLLM ailesinin şu ana kadar eğitilmiş en gelişmiş ve en yetenekli modelidir. Bir önceki nesil olan V5.5-Beta'ya kıyasla çok daha fazla veriyle, çok daha güçlü donanımda eğitilmiştir.

## Modeli Canlı Test Edin

<iframe
	src="https://sykoslm-sykollm-v5-6-inference.hf.space"
	frameborder="0"
	width="850"
	height="450"
></iframe>



---

## 📐 Model Mimarisi

| Özellik | Değer |
|---|---|
| **Mimari** | Phi-3 (Causal LM) |
| **Toplam Parametre** | ~447 Milyon |
| **Gizli Katman Boyutu** (`hidden_size`) | 1024 |
| **Ara Katman Boyutu** (`intermediate_size`) | 3072 |
| **Dikkat Başlığı Sayısı** (`num_attention_heads`) | 8 |
| **Katman Sayısı** (`num_hidden_layers`) | 28 |
| **Kelime Hazinesi** (`vocab_size`) | 32.000 |
| **Bağlam Penceresi** | 1024 token |
| **Dikkat Mekanizması** | Flash Attention 2 |
| **Veri Tipi** | bfloat16 |

---

## 📚 Eğitim Veri Setleri

| Veri Seti | İçerik Türü | Dil |
|---|---|---|
| [uonlp/CulturaX](https://huggingface.co/datasets/uonlp/CulturaX) | Genel web metinleri (tr bölümü) | 🇹🇷 Türkçe |
| [HuggingFaceTB/cosmopedia](https://huggingface.co/datasets/HuggingFaceTB/cosmopedia) | Sentetik eğitici içerik | 🇬🇧 İngilizce |
| [roneneldan/TinyStories](https://huggingface.co/datasets/roneneldan/TinyStories) | Kısa, sade hikayeler | 🇬🇧 İngilizce |
| [nampdn-ai/tiny-textbooks](https://huggingface.co/datasets/nampdn-ai/tiny-textbooks) | Ders kitabı tarzı içerik | 🇬🇧 İngilizce |
| [nampdn-ai/tiny-codes](https://huggingface.co/datasets/nampdn-ai/tiny-codes) | Kod örnekleri ve açıklamalar | 💻 Çokdil |
| [ise-uiuc/Magicoder-Evol-Instruct-110K](https://huggingface.co/datasets/ise-uiuc/Magicoder-Evol-Instruct-110K) | Gelişmiş kodlama talimatları | 💻 Çokdil |
| [theblackcat102/evol-codealpaca-v1](https://huggingface.co/datasets/theblackcat102/evol-codealpaca-v1) | Kodlama talimatları | 💻 Çokdil |
| [turkish-nlp-suite/InstrucTurca](https://huggingface.co/datasets/turkish-nlp-suite/InstrucTurca) | Türkçe instruction/yanıt çiftleri | 🇹🇷 Türkçe |

> Toplamda yaklaşık **~1.7 Milyon örnek** ile eğitilmiştir.

---

## ⚙️ Eğitim Detayları

| Parametre | Değer |
|---|---|
| **Kullanılan Donanım** | NVIDIA A100 |
| **Önceki Nesil Donanım** | 2× Tesla T4 (V5.5-Beta) |
| **Batch Boyutu (cihaz başına)** | 16 |
| **Gradyan Birikimi** | 4 (efektif batch: 64) |
| **Öğrenme Hızı** | 5e-5 |
| **LR Zamanlayıcı** | Cosine |
| **Optimizatör** | AdamW (Fused) |
| **Çerçeve** | HuggingFace Transformers + Trainer |

---

## 🗣️ Sohbet Formatı ve Özel Token'lar

Bu model aşağıdaki sohbet şablonuyla eğitilmiştir:

```
<|user|>
Kullanıcının mesajı<|end|>
<|assistant|>
Modelin yanıtı<|end|>
```

### Önemli Notlar

- **BOS token yoktur.** Model direkt `<|user|>` ile başlar, başa `<s>` veya herhangi bir başlangıç token'ı **ekleme.**
- **Cümleyi bitiren token `<|end|>`'dir** (ID: 3), `<|endoftext|>` değil. Generate ederken `eos_token_id=3` vermeyi unutma, yoksa model durmaz.
- `<|endoftext|>` (ID: 0) yalnızca vocab'ın 0. slotunu doldurmak için vardır, eğitimde hiç kullanılmamıştır.

### Token ID Tablosu

| Token | ID | Görevi |
|---|---|---|
| `<|endoftext|>` | 0 | Sadece vocab doldurucu, kullanılmıyor |
| `<|user|>` | 1 | Kullanıcı konuşma turunu açar |
| `<|assistant|>` | 2 | Modelin yanıt turunu açar |
| `<|end|>` | 3 | Her konuşma turunu kapatır (gerçek EOS) |
| `<|pad|>` | 4 | Batch padding için |

---

## 🚀 Kullanım

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "SykoSLM/SykoLLM-V5.6"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto"
)

def chat(user_message):
    # BOS YOK — direkt <|user|> ile başlıyoruz
    prompt = f"<|user|>\n{user_message}<|end|>\n<|assistant|>\n"
    
    inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
    
    with torch.no_grad():
        outputs = model.generate(
            **inputs,
            max_new_tokens=256,
            do_sample=True,
            temperature=0.7,
            top_p=0.9,
            repetition_penalty=1.1,
            eos_token_id=3,      # <|end|> gelince dur
            pad_token_id=4       # <|pad|>
        )
    
    # Sadece modelin ürettiği kısmı al, prompt'u çıkar
    generated = outputs[0][inputs["input_ids"].shape[1]:]
    return tokenizer.decode(generated, skip_special_tokens=True)


print(chat("Merhaba! Kendini tanıtır mısın?"))
```

---

## 🗺️ SykoLLM Ailesi

| Versiyon | Durum | Veri Miktarı | Donanım |
|---|---|---|---|
| SykoLLM V5.5-Beta | ✅ Yayında | ~300K örnek | 2× Tesla T4 |
| **SykoLLM V5.6** | ✅ **Yayında** | **~1.7M örnek** | **A100** |

---

## ⚠️ Sınırlamalar

- Bağlam penceresi **1024 token** ile sınırlıdır.
- Model yalnızca **ön-eğitim (pre-training)** görmüştür; RLHF veya DPO gibi hizalama adımları uygulanmamıştır. Zaman zaman tutarsız yanıtlar üretebilir.
- Kritik, tıbbi, hukuki veya güvenlik gerektiren uygulamalarda kullanımı önerilmez.

---

## 📄 Lisans

Apache 2.0 — Ticari kullanım serbesttir, modelin kaynağının belirtilmesi beklenir.

---

*SykoSLM tarafından geliştirilmiştir.*