Text Generation
Transformers
Safetensors
Turkish
English
phi3
causal-lm
turkish
multilingual
code
from-scratch
text-generation-inference
Instructions to use SykoSLM/SykoLLM-V5.9-Mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SykoSLM/SykoLLM-V5.9-Mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SykoSLM/SykoLLM-V5.9-Mini")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SykoSLM/SykoLLM-V5.9-Mini") model = AutoModelForCausalLM.from_pretrained("SykoSLM/SykoLLM-V5.9-Mini", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SykoSLM/SykoLLM-V5.9-Mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SykoSLM/SykoLLM-V5.9-Mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SykoSLM/SykoLLM-V5.9-Mini", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/SykoSLM/SykoLLM-V5.9-Mini
- SGLang
How to use SykoSLM/SykoLLM-V5.9-Mini 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 "SykoSLM/SykoLLM-V5.9-Mini" \ --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": "SykoSLM/SykoLLM-V5.9-Mini", "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 "SykoSLM/SykoLLM-V5.9-Mini" \ --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": "SykoSLM/SykoLLM-V5.9-Mini", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use SykoSLM/SykoLLM-V5.9-Mini with Docker Model Runner:
docker model run hf.co/SykoSLM/SykoLLM-V5.9-Mini
| license: apache-2.0 | |
| language: | |
| - tr | |
| - en | |
| tags: | |
| - phi3 | |
| - causal-lm | |
| - text-generation | |
| - turkish | |
| - multilingual | |
| - code | |
| - from-scratch | |
| 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 | |
| pipeline_tag: text-generation | |
| library_name: transformers | |
| # SykoLLM-V5.9-Mini | |
| **SykoLLM-V5.9-Mini, sıfırdan (from scratch)** eğitilmiş, Türkçe ve İngilizce destekli, kod anlama kapasitesine sahip **SykoLLM** ailesinin **küçük** bir dil modelidir. **Phi-3 mimarisi** temel alınarak özel BPE tokenizer ile geliştirilmiştir. | |
| --- | |
| ## Model Mimarisi | |
| | Özellik | Değer | | |
| |---|---| | |
| | Mimari | Phi-3 (Phi3ForCausalLM) | | |
| | Toplam Parametre | ~277 Milyon | | |
| | Gizli Katman Boyutu | 1024 | | |
| | Katman Sayısı | 18 | | |
| | Attention Head | 8 (2 KV Head — GQA) | | |
| | Vocabulary Boyutu | 50.000 | | |
| | Maksimum Bağlam | 1024 Token | | |
| | Aktivasyon Fonksiyonu | SiLU | | |
| | Eğitim Adımı | ~3.500 Step | | |
| | Yaklaşık Eğitim Örneği | ~1.500.000+ | | |
| | Yaklaşık Eğitim Token'ı | ~1.500.000.000+ | | |
| | Eğitim Donanımı | 2x NVIDIA Tesla T4 | | |
| --- | |
| ## Tokenizer | |
| Model, sıfırdan eğitilmiş özel bir BPE tokenizer kullanmaktadır. Hugging Face'in hazır tokenizer'larından bağımsız olarak geliştirilmiştir. | |
| - **Tür:** Byte-Level BPE | |
| - **Vocabulary Boyutu:** 50.000 | |
| - **Normalizer:** NFKC | |
| - **Özel Token'lar:** `<|endoftext|>`, `<|user|>`, `<|assistant|>`, `<|end|>`, `<|pad|>` | |
| --- | |
| ## Eğitim Verisi | |
| | Veri Seti | İçerik | Dil | | |
| |---|---|---| | |
| | uonlp/CulturaX | Genel Türkçe web metni | Türkçe | | |
| | HuggingFaceTB/cosmopedia | Sentetik eğitim materyali | İngilizce | | |
| | roneneldan/TinyStories | Kısa hikayeler | İngilizce | | |
| | nampdn-ai/tiny-textbooks | Sentetik ders kitabı | İngilizce | | |
| | nampdn-ai/tiny-codes | Kod örnekleri | Kod | | |
| | ise-uiuc/Magicoder-Evol-Instruct-110K | Kod instruction | Kod | | |
| | theblackcat102/evol-codealpaca-v1 | Kod instruction | Kod | | |
| | turkish-nlp-suite/InstrucTurca | Türkçe instruction | Türkçe | | |
| --- | |
| ## Eğitim Detayları | |
| | Parametre | Değer | | |
| |---|---| | |
| | Optimizer | AdamW 8-bit (bitsandbytes) | | |
| | Learning Rate | 1e-4 | | |
| | LR Scheduler | Cosine | | |
| | Warmup Steps | 200 | | |
| | Batch Size | 8 per device x 2 GPU | | |
| | Gradient Accumulation | 8 (Efektif batch: 128) | | |
| | Max Steps | 3.500 | | |
| | Precision | FP16 | | |
| | Max Grad Norm | 1.0 | | |
| | Weight Decay | 0.05 | | |
| --- | |
| ## Kullanım | |
| ### Kurulum | |
| ```bash | |
| pip install transformers torch | |
| ``` | |
| ### Metin Üretimi | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| import torch | |
| model_id = "SykoSLM/SykoLLM-V5.9-Mini" | |
| tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True) | |
| model = AutoModelForCausalLM.from_pretrained( | |
| model_id, | |
| torch_dtype=torch.float16, | |
| device_map="auto", | |
| trust_remote_code=True | |
| ) | |
| prompt = "Türkiye'nin başkenti" | |
| inputs = tokenizer(prompt, return_tensors="pt").to(model.device) | |
| with torch.no_grad(): | |
| outputs = model.generate( | |
| **inputs, | |
| max_new_tokens=200, | |
| temperature=0.7, | |
| top_p=0.9, | |
| do_sample=True, | |
| eos_token_id=tokenizer.eos_token_id, | |
| pad_token_id=tokenizer.pad_token_id | |
| ) | |
| print(tokenizer.decode(outputs[0], skip_special_tokens=True)) | |
| ``` | |
| ### Sohbet Formatı | |
| Model `<|user|>` / `<|assistant|>` prompt formatıyla eğitilmiştir: | |
| ```python | |
| prompt = "<|user|>\nPython'da Fibonacci dizisini nasıl yazarım?<|end|>\n<|assistant|>\n" | |
| inputs = tokenizer(prompt, return_tensors="pt").to(model.device) | |
| outputs = model.generate( | |
| **inputs, | |
| max_new_tokens=300, | |
| do_sample=True, | |
| temperature=0.7, | |
| top_p=0.9 | |
| ) | |
| print(tokenizer.decode(outputs[0], skip_special_tokens=True)) | |
| ``` | |
| --- | |
| ## Sınırlamalar | |
| - Model araştırma ve geliştirme amaçlıdır; production ortamı için önerilmez. | |
| - Eğitim adımı görece az olduğundan uzun ve karmaşık akıl yürütme görevlerinde hata yapabilir. | |
| - Maksimum bağlam uzunluğu 1024 token ile sınırlıdır. | |
| - Model, zararlı içerik filtrelemesi için hizalanmamıştır (RLHF/DPO uygulanmamıştır). | |
| --- | |
| ## Lisans | |
| Bu model Apache 2.0 lisansı altında yayınlanmıştır. | |
| --- | |
| ## Alıntı | |
| ```bibtex | |
| @misc{sykollm-v5.9-mini-2025, | |
| author = {SykoSLM}, | |
| title = {SykoLLM-V5.9-Mini: A Small Multilingual Causal Language Model Trained from Scratch}, | |
| year = {2025}, | |
| publisher = {HuggingFace}, | |
| url = {https://huggingface.co/SykoSLM/SykoLLM-V5.8-Mini} | |
| } | |
| ``` |