Mima-Pico-15m-v2 — mima-15m-turkce-bpe8k-v2

A 15.54M-parameter decoder-only language model (tied embeddings) trained from scratch in Turkish. This is mima v2: the 15.5M checkpoint from runs/v2/kayit/son.pt (step 32,750, A3-karma stage). It predates v4 and was trained longer (32.8K steps vs 11.2K for v4), achieving lower validation loss.

It was trained on a single consumer GPU (NVIDIA GeForce MX450, 2 GB VRAM) in fp32, batch 16 × 512 = 8,192 token/step.

Türkçe özet: Türkçe odaklı, sıfırdan eğitilmiş 15.54M parametreli (bağlı embedding) decoder-only dil modeli. Bu mima v2'dür: runs/v2/kayit/son.pt checkpoint'ından (adım 32.750, A3-karma aşaması). v4'den önceki sürüm; daha uzun eğitildi (32.8K adım, v4'te 11.2K adım) ve daha düşük doğrulama kaybına sahip.

Model details / Model detayları

Field Value
Parameters 15,537,792 (~15.54M; tied embedding)
state-dict total 18,683,520 (~18.68M; includes duplicate lm_head copy)
Layers 7
Attention heads 6 (head_dim 64)
Hidden size 384
FFN SwiGLU, 1024 hidden (3 matmuls)
Normalization RMSNorm (pre-norm)
Positional RoPE (θ = 10,000)
Context window 512 tokens
Vocabulary 8192 byte-level BPE (8187 BPE + 5 special tokens), trained on a Turkish corpus
Special tokens <bos>=0, <user>=1, <asst>=2, <end>=3, <pad>=4
File size 74.7 MB (fp32 safetensors)
Checkpoint step 32,750
Training stage A3-karma (mixed)
Validation loss 0.5522

TR: Parametre 15,537,792 (~15,54M); katman 7; dikkat başlığı 6; gizli boyut 384; FFN SwiGLU 1024; RMSNorm; RoPE θ=10.000; bağlam 512 token; sözlük 8192 byte-level BPE; özel tokenlar <bos>=0, <user>=1, <asst>=2, <end>=3, <pad>=4; 74,7 MB fp32; checkpoint adımı 32.750; eğitim aşaması A3-karma (karışık); doğrulama kaybı 0.5522.

Evaluation / Değerlendirme

Metric v2 (this model) v4 (Mima-Pico-15m)
Checkpoint step 32,750 11,185
Training stage A3-karma bitti
Validation loss 0.5522 1.7944
Parameters 15.54M 15.54M

TR: Metrik | v2 (bu model) | v4 (Mima-Pico-15m) | Checkpoint adımı | 32.750 | 11.185 | Eğitim aşaması | A3-karma | bitti | Doğrulama kaybı | 0.5522 | 1.7944 | Parametre | 15,54M | 15,54M.

v2 was trained longer (32.8K steps) and reaches lower validation loss (0.5522 vs 1.7944 for v4). v4 continues from the same v2 checkpoint base but for fewer steps (11,185).

TR: v2 daha uzun eğitildi (32.8K adım) ve daha düşük doğrulama kaybına ulaştı (0.5522, v4'te 1.7944). v4, aynı v2 checkpoint tabanından devam eder ancak daha az adımda (11.185).

Basit Token-Tahmin Testi (15M'ye Uygun) / Simple Token Prediction Test

Modelin prompt'tan sonraki token'ın softmax olasılığını ölçen basit Türkçe test:

Soru Doğru Cevap V2 (en yüksek olasılık) V4 (en yüksek olasılık)
Türkiye'nin başkenti Ankara İstanbul (0.0400) İstanbul (0.0018)
Güneş ...'dan doğar doğudan güneydoğudan (0.0002) doğudan (0.0018)
2+2 = dört / 4 4 (0.0021) 4 (0.0000)
Elma ... kırmızı kırmızı (0.0001) mavi (0.0000)
Günde ... saat 24 6 (0.0005) 6 (0.0003)

TR: Modelin prompt'tan sonraki token'ının softmax olasiligi. 15M parametre ile bu basit bilgi sorularinda da dusuk olasilik — bu olcek icin beklenen bir sonuc. V4'te "Gunes dogudan" dogru cevaba en yuksek olasilik veriliyor ancak deger cok dusuk.

MMLU-TR (Q-bert/mmlu-turkish, validation)

Türkçe MMLU (Q-bert/mmlu-turkish, validation) üzerinde koşullu log-likelihood harf skorlamasıyla değerlendirildi. CPU’da çalıştırılan hızlı tur (n=50):

Model n Doğruluk Doğru/Toplam
Mima-Pico-15m-v2 (bu model) 50 20.0% 10/50
Mima-Pico-15m (v4) 50 12.0% 6/50
Rastgele taban çizgisi — 25.0% —
Çoğunluk-sınıf taban çizgisi — 38.0% —

TR: Türkçe MMLU (Q-bert/mmlu-turkish, validation) üzerinde koşullu log-likelihood harf skorlamasıyla değerlendirildi. CPU’da çalıştırılan hızlı tur (n=50).

15.5M parametre ile çoktan seçmeli bilgi testi üzerinde zayıf (rastgele tabanın altında) — bu ölçekte beklenen bir sonuç. Modelin gerçek gücü sohbet tarzı dil modellemesi kısmındadır.

Training methodology / Eğitim yöntemi

Stage Steps Data focus
A0-dil 28,000 Turkish text (235.9M tokens)
A1-kavram ~6,500 Concept knowledge
A2-sohbet ~2,900 Dialog
A3-karma ~32,750 total Mixed

TR: Aşama | Adımlar | Veri odaklı | A0-dil | 28.000 | Türkçe metin (235.9M token) | A1-kavram | ~6.500 | Kavram bilgisi | A2-sohbet | ~2.900 | Dialog | A3-karma | ~32.750 toplam | Karışık.

Optimization: AdamW, cosine LR schedule, fp32, batch 16 × 512 = 8,192 token/step. Loss: standard next-token cross-entropy.

TR: Optimizasyon: AdamW, cosine LR planı, fp32, batch 16×512 = 8.192 token/adım. Kayıp: standart sonraki-token çapraz entropy.

Usage / Kullanım

The architecture is custom (transformers does not know it) — loading requires trust_remote_code=True:

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

tok = AutoTokenizer.from_pretrained(".", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(".", trust_remote_code=True)
model.eval()

# Chat format: <bos><user>...<asst>...<end>
ids = [0] + [1] + tok.encode("merhaba", add_special_tokens=False).tolist() + [2]
out = model.generate(torch.tensor([ids]), max_new_tokens=100,
                     temperature=0.85, top_k=40)
print(tok.decode(out[0, len(ids):].tolist()))

sohbet.py is a runnable terminal chat (python sohbet.py). The architecture code lives in modeling_mima.py and is identical to src/model.py in the training repository.

TR: Mimari custom — trust_remote_code=True şart. Yukarıdaki kodörnek. sohbet.py terminal sohbetini içerir; mimari modeling_mima.py içinde ve eğitim deposundaki src/model.py ile birebir aynı.

Example conversations / Örnek konuşmalar (Türkçe)

Generated with temperature=0.85, top_k=40, up to 120 new tokens, stopping at <end>. Outputs are from the trained checkpoint; judge the style, not factual accuracy.

TR: Aşağıdaki örnekler temperature=0.85, top_k=40, en fazla 120 yeni token ve <end> durma koşuluyla eğitilmiş checkpoint'ından üretilmiştir. Çıktılar modelin çıktısıdır; tarzı değerlendirin, gerçek doğruluğu değil.

Q (user): Fransa'nın başkenti nedir? A (model): Fransa'nın başkenti Paris'tir.

Q: Üç temel renk nedir? A: Üç temel renk soğandır.

Q: DNA ne anlama geliyor? A: DNA, insan yapımı görevlere veya görevlere yardım edebilir. Nörofiller, hücrelerin insan vücudunda depolanmalarına izin veren hücrelerin hücrelerine bağlanan bir protein döngüsüdür.

Q: "Özür dilemek" anlamına gelen üç fiil üretin. A: Tarif, bir cümleyi bir "hayır" olarak düşünmek, daha sonra cümlenin kendisinin "kes" olduğunu ve konuşmacının kelimeye olan yakını olması gerektiğini öğrenip "kes" olarak tanımlandığını söyledi.

Q: Aşağıdaki cümleyi etken çatı kullanarak yeniden yazın. Haber raporu kaptan tarafından okundu. A: Şüpheli olarak kişi başı 5 sessizlik bir fırtına geçirdi.

Limitations and risks / Sınırlılıklar ve riskler

  • Only 15.5M parameters. Factual errors, repetition and inconsistency are frequent; coherence degrades over long contexts (512 tokens).
  • No safety alignment. Trained on unfiltered web text; may produce misleading, inappropriate, or offensive content. Add filters for production use.
  • 8,192 BPE vocabulary. Rare proper nouns / place names get fragmented.
  • Training corpus may contain mojibake (double-encoded UTF-8); a known data-quality boundary.
  • Does not give medical / legal / financial advice.

TR: 15,5M parametre çok küçüktür — yanlış bilgi, tekrar, tutarsızlık sık görülür; uzun bağlamda tutarlılık düşer. Güvenlik hizalaması yoktur; filtresiz web verisiyle eğitilmiştir, yanıltıcı/uygunsuz/rahatsız edici çıktı üretebilir, üretimde ek filtre gerekir. 8192 BPE sözlüğü nadir isimleri parçalar. Korpus mojibake içerebilir. Tıbbi/hukuki/finansal tavsiye vermez.

License / Lisans

  • Model weights and architecture code: Apache-2.0.
  • Training data follows the original sources' licenses.

TR: Model ağırlıkları ve mimari kodu Apache-2.0. Eğitim verisi kaynak lisanslarına tabidir.

Original project (Mima18); training dumps and code live in /home/root_sys-n/Projeler/AI/Mima18.

TR: Özgün proje (Mima18). Eğitim dökümü ve kodu /home/root_sys-n/Projeler/AI/Mima18 deposunda.

Downloads last month
34
Safetensors
Model size
15.5M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support