Text Generation
Transformers
ONNX
Safetensors
Turkish
qwen3
turkish
türkçe
turkish-language-model
turkish-llm
turkish-slm
small-language-model
language-model
causal-lm
decoder-only
pretrained
pretraining
from-scratch
trained-from-scratch
chat
instruction-following
turkish-nlp
natural-language-processing
conversational
text-generation-inference
Instructions to use TozAI/Toz-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TozAI/Toz-1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TozAI/Toz-1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TozAI/Toz-1") model = AutoModelForCausalLM.from_pretrained("TozAI/Toz-1", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TozAI/Toz-1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TozAI/Toz-1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TozAI/Toz-1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TozAI/Toz-1
- SGLang
How to use TozAI/Toz-1 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 "TozAI/Toz-1" \ --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": "TozAI/Toz-1", "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 "TozAI/Toz-1" \ --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": "TozAI/Toz-1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TozAI/Toz-1 with Docker Model Runner:
docker model run hf.co/TozAI/Toz-1
Töz-1 (toz1-sft-g.pt)
Browse files- README.md +29 -6
- config.json +1 -1
- generation_config.json +1 -1
README.md
CHANGED
|
@@ -71,10 +71,30 @@ Sistem mesajı ile eğitilmedi. Bağlam penceresi 1024 token.
|
|
| 71 |
|
| 72 |
## Değerlendirme
|
| 73 |
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
| set | ne ölçüyor | Töz-1 |
|
| 80 |
|---|---|---|
|
|
@@ -82,7 +102,7 @@ istediğimiz davranışları ölçen setler kullandık.
|
|
| 82 |
| kısıt (230) | talimat takibi (IFEval tarzı): biçim / tam doğru | **%75.2 / %40.4** |
|
| 83 |
| tanım (90) | ham modelin bildiği ama SFT'de görmediği varlıklarda doğru kategori | **%25.6** |
|
| 84 |
|
| 85 |
-
Tek bir eğitim koşusunun rastgeleliği bu setlerde ±3–4 puan oynatabiliyor.
|
| 86 |
|
| 87 |
## Eğitim
|
| 88 |
|
|
@@ -140,7 +160,10 @@ Töz-1 is a 195M-parameter Turkish-only language model trained **from scratch**
|
|
| 140 |
(own tokenizer, 4.42B pre-training tokens on 2× T4 + one RTX 3060 Ti), followed by a
|
| 141 |
101-second SFT on 12.3K mostly programmatically generated examples. It handles casual chat,
|
| 142 |
common facts, follow-up questions, single-digit arithmetic and simple formatting
|
| 143 |
-
instructions, and it confidently makes factual errors
|
|
|
|
|
|
|
|
|
|
| 144 |
experiment, not a knowledge source. The architecture matches Qwen3 exactly (RMSNorm,
|
| 145 |
QK-norm, SwiGLU, RoPE, tied embeddings), so it loads with plain `transformers>=4.51`;
|
| 146 |
the weights are **not** derived from Qwen. License: Apache-2.0.
|
|
|
|
| 71 |
|
| 72 |
## Değerlendirme
|
| 73 |
|
| 74 |
+
### Genel Türkçe benchmark'lar
|
| 75 |
+
|
| 76 |
+
Hepsi aynı scriptle (`mmlu_olc.py`, `turblimp_olc.py`), 0-shot, şıkların/cümlelerin
|
| 77 |
+
olasılığı karşılaştırılarak ölçüldü. Karşılaştırma için ufakzeka-1-base de **aynı scriptle**
|
| 78 |
+
ölçüldü.
|
| 79 |
+
|
| 80 |
+
| benchmark | şans | Töz-1 (sohbet) | Töz-1-Base | ufakzeka-1-base |
|
| 81 |
+
|---|---|---|---|---|
|
| 82 |
+
| **TurBLiMP** — Türkçe dilbilgisi, 16 konu × 1.000 cümle çifti | %50 | %91.2 | **%93.2** | %92.0 |
|
| 83 |
+
| **Turkish MMLU** — alibayram/turkish_mmlu, 6.200 sınav sorusu, 5 şık (cloze, uzunluk normalize) | %20 | %24.1 | %25.0 | — |
|
| 84 |
+
| Turkish MMLU — aynı set, şık harfi (A–E) | %20 | %20.5 | %21.1 | — |
|
| 85 |
+
|
| 86 |
+
* TurBLiMP'te Töz-1-Base, 13.5B tokenla eğitilmiş ufakzeka-1-base'in (151M) önünde; Töz-1 4.42B
|
| 87 |
+
tokenla eğitildi. Dilbilgisi az veriyle doyan bir yetenek; dünya bilgisi gerektiren testlerde
|
| 88 |
+
daha çok token gören modellerin önde olması beklenir.
|
| 89 |
+
* Turkish MMLU (KPSS, TUS, ALES vb.) 195M bir model için çok zor: sonuç şansın üstünde
|
| 90 |
+
(6.200 soruda ±0.5 puan gürültü) ama düşük. Şık harfi biçimi küçük modellerde şans
|
| 91 |
+
seviyesinde kalır. ufakzeka-1 bu seti bizim scriptimizle ölçülmediği için "—".
|
| 92 |
+
* SFT, bilgi testinde (MMLU) skoru korudu; dilbilgisi testinde 2 puan düşürdü.
|
| 93 |
+
|
| 94 |
+
### Kendi donuk setlerimiz
|
| 95 |
+
|
| 96 |
+
Eğitimde hiç görülmeyen, modelin öğrenmesini istediğimiz davranışları ölçen setler
|
| 97 |
+
(veri setinde `olcum/`, puanlayıcılar `uretim/` altında):
|
| 98 |
|
| 99 |
| set | ne ölçüyor | Töz-1 |
|
| 100 |
|---|---|---|
|
|
|
|
| 102 |
| kısıt (230) | talimat takibi (IFEval tarzı): biçim / tam doğru | **%75.2 / %40.4** |
|
| 103 |
| tanım (90) | ham modelin bildiği ama SFT'de görmediği varlıklarda doğru kategori | **%25.6** |
|
| 104 |
|
| 105 |
+
Tek bir eğitim koşusunun rastgeleliği bu küçük setlerde ±3–4 puan oynatabiliyor.
|
| 106 |
|
| 107 |
## Eğitim
|
| 108 |
|
|
|
|
| 160 |
(own tokenizer, 4.42B pre-training tokens on 2× T4 + one RTX 3060 Ti), followed by a
|
| 161 |
101-second SFT on 12.3K mostly programmatically generated examples. It handles casual chat,
|
| 162 |
common facts, follow-up questions, single-digit arithmetic and simple formatting
|
| 163 |
+
instructions, and it confidently makes factual errors. On TurBLiMP (Turkish grammar
|
| 164 |
+
minimal pairs) the base model scores 93.2% vs 92.0% for ufakzeka-1-base (13.5B tokens), both
|
| 165 |
+
measured with the same script; on Turkish MMLU (6,200 exam questions) it scores 25.0%
|
| 166 |
+
(chance 20%). Treat it as a small-model
|
| 167 |
experiment, not a knowledge source. The architecture matches Qwen3 exactly (RMSNorm,
|
| 168 |
QK-norm, SwiGLU, RoPE, tied embeddings), so it loads with plain `transformers>=4.51`;
|
| 169 |
the weights are **not** derived from Qwen. License: Apache-2.0.
|
config.json
CHANGED
|
@@ -46,7 +46,7 @@
|
|
| 46 |
},
|
| 47 |
"sliding_window": null,
|
| 48 |
"tie_word_embeddings": true,
|
| 49 |
-
"transformers_version": "5.
|
| 50 |
"use_cache": true,
|
| 51 |
"use_sliding_window": false,
|
| 52 |
"vocab_size": 32768,
|
|
|
|
| 46 |
},
|
| 47 |
"sliding_window": null,
|
| 48 |
"tie_word_embeddings": true,
|
| 49 |
+
"transformers_version": "5.17.0",
|
| 50 |
"use_cache": true,
|
| 51 |
"use_sliding_window": false,
|
| 52 |
"vocab_size": 32768,
|
generation_config.json
CHANGED
|
@@ -7,5 +7,5 @@
|
|
| 7 |
"repetition_penalty": 1.1,
|
| 8 |
"temperature": 0.7,
|
| 9 |
"top_p": 0.9,
|
| 10 |
-
"transformers_version": "5.
|
| 11 |
}
|
|
|
|
| 7 |
"repetition_penalty": 1.1,
|
| 8 |
"temperature": 0.7,
|
| 9 |
"top_p": 0.9,
|
| 10 |
+
"transformers_version": "5.17.0"
|
| 11 |
}
|