Run this model with HF Jobs
Run coderian/TanAi-turkish-29M on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/coderian/TanAi-turkish-29M. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/coderian/TanAi-turkish-29M on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/coderian/TanAi-turkish-29M. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/coderian/TanAi-turkish-29M. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use coderian/TanAi-turkish-29M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use coderian/TanAi-turkish-29M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="coderian/TanAi-turkish-29M", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("coderian/TanAi-turkish-29M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use coderian/TanAi-turkish-29M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "coderian/TanAi-turkish-29M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "coderian/TanAi-turkish-29M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/coderian/TanAi-turkish-29M
- SGLang
How to use coderian/TanAi-turkish-29M 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 "coderian/TanAi-turkish-29M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "coderian/TanAi-turkish-29M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "coderian/TanAi-turkish-29M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "coderian/TanAi-turkish-29M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use coderian/TanAi-turkish-29M with Docker Model Runner:
docker model run hf.co/coderian/TanAi-turkish-29M
TanAi-turkish-29M
TanAI mimarisiyle sıfırdan eğitilmiş, 28.9M parametreli deneysel bir Türkçe dil modeli. Ethosoft/Turkish_corpus veri setinin streaming ile okunan ilk 30.000 örneği üzerinde 2 epoch eğitilmiştir.
Model Detayları
| Özellik | Değer |
|---|---|
| Parametre sayısı | 28.9M (28.923.904) |
| Mimari | TanAI (decoder-only Transformer, GPT benzeri) |
| Katman sayısı | 4 |
| Embedding boyutu | 256 |
| Bağlam uzunluğu | 128 token |
| Vocab boyutu | 50.257 (GPT-2 tokenizer) |
| Eğitim verisi | Ethosoft/Turkish_corpus, ilk 30.000 örnek |
| Epoch | 2 |
| Optimizer | AdamW, lr 3e-4 |
| Batch / blok boyutu | 16 / 128 |
Kullanım
Model özel bir mimari kullandığı için trust_remote_code=True gerekir. İlk kullanımda
model kodu ve ağırlıklar otomatik olarak indirilir.
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "coderian/TanAi-turkish-29M"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(repo_id, trust_remote_code=True)
inputs = tokenizer("Türkiye'nin en kalabalık şehri", return_tensors="pt")
outputs = model.generate(
**inputs,
max_new_tokens=50,
do_sample=True,
top_k=50,
temperature=0.8,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
pipeline ile:
from transformers import pipeline
generator = pipeline("text-generation", model=repo_id, trust_remote_code=True)
print(generator("Bugün hava", max_new_tokens=30)[0]["generated_text"])
İndirme (isteğe bağlı, from_pretrained modeli zaten otomatik indirir):
huggingface-cli download coderian/TanAi-turkish-29M
Eğitim
- Veri,
streaming=Trueile okundu; yalnızca ilk 30.000 örnek kullanıldı. - Tokenizer:
GPT2TokenizerFast; belgeler arasınaeostoken'ı eklendi. - Kayıp: token bazlı cross-entropy (causal language modeling).
- Hiperparametreler: 2 epoch, batch 16, blok 128, AdamW, lr 3e-4.
Sınırlamalar
- Küçük ölçekli ve deneysel bir modeldir; çıktılar tekrarlı veya anlamsız olabilir.
- Talimat takibi için eğitilmemiştir (instruction tuning yoktur).
- Bağlam uzunluğu 128 tokendır; prompt + üretilen token toplamı 128'i geçemez.
- Yalnızca Türkçe metin için eğitilmiştir.
- Downloads last month
- 24