Instructions to use thealper2/MiniCPM5-1B-Turkish with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thealper2/MiniCPM5-1B-Turkish with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="thealper2/MiniCPM5-1B-Turkish") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("thealper2/MiniCPM5-1B-Turkish") model = AutoModelForCausalLM.from_pretrained("thealper2/MiniCPM5-1B-Turkish", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use thealper2/MiniCPM5-1B-Turkish with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf thealper2/MiniCPM5-1B-Turkish:Q4_K_M # Run inference directly in the terminal: llama cli -hf thealper2/MiniCPM5-1B-Turkish:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf thealper2/MiniCPM5-1B-Turkish:Q4_K_M # Run inference directly in the terminal: llama cli -hf thealper2/MiniCPM5-1B-Turkish:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf thealper2/MiniCPM5-1B-Turkish:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf thealper2/MiniCPM5-1B-Turkish:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf thealper2/MiniCPM5-1B-Turkish:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf thealper2/MiniCPM5-1B-Turkish:Q4_K_M
Use Docker
docker model run hf.co/thealper2/MiniCPM5-1B-Turkish:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use thealper2/MiniCPM5-1B-Turkish with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thealper2/MiniCPM5-1B-Turkish" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thealper2/MiniCPM5-1B-Turkish", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/thealper2/MiniCPM5-1B-Turkish:Q4_K_M
- SGLang
How to use thealper2/MiniCPM5-1B-Turkish 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 "thealper2/MiniCPM5-1B-Turkish" \ --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": "thealper2/MiniCPM5-1B-Turkish", "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 "thealper2/MiniCPM5-1B-Turkish" \ --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": "thealper2/MiniCPM5-1B-Turkish", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use thealper2/MiniCPM5-1B-Turkish with Ollama:
ollama run hf.co/thealper2/MiniCPM5-1B-Turkish:Q4_K_M
- Unsloth Studio
How to use thealper2/MiniCPM5-1B-Turkish with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for thealper2/MiniCPM5-1B-Turkish to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for thealper2/MiniCPM5-1B-Turkish to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for thealper2/MiniCPM5-1B-Turkish to start chatting
- Pi
How to use thealper2/MiniCPM5-1B-Turkish with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf thealper2/MiniCPM5-1B-Turkish:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "thealper2/MiniCPM5-1B-Turkish:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use thealper2/MiniCPM5-1B-Turkish with Docker Model Runner:
docker model run hf.co/thealper2/MiniCPM5-1B-Turkish:Q4_K_M
- Lemonade
How to use thealper2/MiniCPM5-1B-Turkish with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull thealper2/MiniCPM5-1B-Turkish:Q4_K_M
Run and chat with the model
lemonade run user.MiniCPM5-1B-Turkish-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use thealper2/MiniCPM5-1B-Turkish with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf thealper2/MiniCPM5-1B-Turkish:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default thealper2/MiniCPM5-1B-Turkish:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use thealper2/MiniCPM5-1B-Turkish with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf thealper2/MiniCPM5-1B-Turkish:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "thealper2/MiniCPM5-1B-Turkish:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
MiniCPM5-1B-Turkish
openbmb/MiniCPM5-1B tabanlı, Türkçe talimat takibi ve kod üretimi için tam ince ayar (full fine-tuning) yapılmış bir sohbet modeli.
A fully fine-tuned (not LoRA/QLoRA) chat model derived from openbmb/MiniCPM5-1B, targeting Turkish instruction following and Turkish-instructed code generation.
Özet / At a glance
| Taban model / Base model | openbmb/MiniCPM5-1B |
| Mimari / Architecture | LlamaForCausalLM (MiniCPM5) |
| Parametre / Parameters | 1,080,632,832 |
| Eğitilen parametre / Trained | 1,080,632,832 (100.0%) |
| Yöntem / Method | Supervised fine-tuning (SFT), full-parameter |
| Diller / Languages | Türkçe (birincil), İngilizce (korunmuş) |
| Bağlam / Context | eğitim 2048 token (taban model 131k) |
| Precision | torch.bfloat16 |
| Lisans / License | apache-2.0 |
Kullanım / Usage
Transformers
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "thealper2/MiniCPM5-1B-Turkish"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id, dtype=torch.bfloat16, device_map="auto"
)
messages = [
{"role": "user", "content": "Python'da bir CSV dosyasını okuyup eksik değerleri temizleyen bir fonksiyon yaz."}
]
inputs = tokenizer.apply_chat_template(
messages, add_generation_prompt=True, return_tensors="pt"
).to(model.device)
# do_sample=True sarttir - asagidaki nota bakin / see the decoding note below
out = model.generate(inputs, max_new_tokens=512, do_sample=True, temperature=0.7, top_p=0.95)
print(tokenizer.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
Sohbet şablonu taban modelin ChatML türevidir (
<|im_start|>role\n...<|im_end|>). Her zamanapply_chat_templatekullanın; prompt'u elle kurmayın.
Model, yanıtlarına boş bir düşünme bloğu (<think>\n\n</think>) ile başlayacak şekilde eğitildi; bu, taban modelin enable_thinking=False biçimiyle uyumludur. Uzun zincirleme akıl yürütme (CoT) verisiyle eğitilmedi.
llama.cpp / GGUF
llama-cli -hf thealper2/MiniCPM5-1B-Turkish -p "Merhaba, kendini tanıt."
# veya yerel dosyayla:
llama-cli -m MiniCPM5-1B-Turkish-Q8_0.gguf -cnv
| dosya / file | tür / type | boyut / size |
|---|---|---|
MiniCPM5-1B-Turkish-BF16.gguf |
BF16 | 2066 MB |
MiniCPM5-1B-Turkish-Q4_K_M.gguf |
Q4_K_M | 656 MB |
MiniCPM5-1B-Turkish-Q5_K_M.gguf |
Q5_K_M | 750 MB |
MiniCPM5-1B-Turkish-Q8_0.gguf |
Q8_0 | 1100 MB |
Eğitim verisi / Training data
Tüm kaynaklar tek bir konuşma şemasına (messages) normalize edildi; ardından temizleme, tüm veri setleri arasında birebir tekrar temizliği (exact dedup) ve kategori bazlı ağırlıklı örnekleme uygulandı. Veri setleri körlemesine birleştirilmedi.
| kaynak / source | kategori | ham satır | temizlik sonrası | seçilen |
|---|---|---|---|---|
AlicanKiraz0/Turkce-Atlas-Instruct |
general_turkish | 336,146 | 336,099 | 55,000 |
tascib/turkish-instruction |
general_turkish | 324,080 | 311,627 | 55,000 |
sixfingerdev/turkish-qa-multi-dialog-dataset |
qa_dialog | 21,282 | 18,790 | 20,000 |
berhaan/Turkish-CodeAlpaca-20k |
coding | 19,996 | 19,565 | 19,474 |
alztrk/turkish-code-instructions |
coding | 2,676 | 1,895 | 1,895 |
bysismo/Turkish-Python-instruction-500k |
coding | 335,286 | 330,668 | 48,631 |
- Birebir tekrar silinen / exact duplicates removed: 27,709
- Eğitim örneği / train examples: 195,876
- Doğrulama örneği / validation examples: 3,960
- Eğitim token'ı / training tokens: 82,165,802 (bunun 42,684,848 tanesi kayıp hesabına giriyor)
- Hedef dağılım / target mix: general_turkish 55%, coding 35%, qa_dialog 10%
Eğitim yöntemi / Training procedure
| ayar / setting | değer / value |
|---|---|
| Yöntem | Full fine-tuning (LoRA/QLoRA kullanılmadı) |
| Kayıp / Loss | Yalnızca asistan token'ları (kullanıcı ve sistem token'ları -100 ile maskelendi) |
| Epoch | 1 |
| Learning rate | 2e-05 |
| Scheduler | cosine (warmup 0.03) |
| Optimizer | paged_adamw_8bit |
| Weight decay | 0.1 |
| Grad clipping | 1.0 |
| Batch | 1 x 16 accum |
| Sekans uzunluğu | 2048 |
| Sequence packing | True |
| Gradient checkpointing | True |
| Precision | torch.bfloat16 |
| Donanım / Hardware | NVIDIA GeForce RTX 5060 Ti |
Eğitim metrikleri / Training metrics
- İlk kayıp / first loss:
2.0483232498168946 - Son kayıp / last loss:
1.3010472297668456 - En iyi doğrulama kaybı / best eval loss:
1.276915431022644 - Zirve GPU belleği / peak VRAM:
5.435 GB
Değerlendirme / Evaluation
Değerlendirme, taban model ile ince ayarlı model üzerinde aynı prompt'lar ve aynı çözümleme ayarlarıyla yapıldı. Türkçe kazanımının genel bir iyileşme anlamına gelmediğini görebilmek için İngilizce ve akıl yürütme yetenekleri de ayrıca ölçüldü (regresyon testi).
| sonuç / verdict | prompt |
|---|---|
| improved | 9 |
| not auto-scored | 9 |
| possible regression | 2 |
| unchanged | 10 |
Olası gerilemeler / possible regressions
code_js_01(code_generation): 0/1 vs 1/1 checksen_code_02(english_coding): 0/2 vs 2/2 checks
Sınırlar ve riskler / Limitations
- 1B parametreli küçük bir modeldir; olgusal doğruluk sınırlıdır ve halüsinasyon görülebilir.
- Eğitim verisi büyük ölçüde sentetik/derlenmiş Türkçe talimat setlerinden gelir; kaynaklardaki hatalar modele geçmiş olabilir.
- Kaynaklardan biri (
alztrk/turkish-code-instructions) Türkçe karakterleri ASCII'ye indirgenmiş metin içerir; bu nedenle katkısı bilinçli olarak düşük tutuldu. - Kod çıktıları çalıştırılmadan doğrulanmamıştır; üretime almadan önce test edin.
- Tam ince ayar yapıldığı için taban modelin bazı yetenekleri (ör. araç çağırma, uzun bağlam, 2048 token üstü davranış) zayıflamış olabilir.
- Güvenlik hizalaması ayrıca eğitilmedi; taban modelden gelen davranış korunmaya çalışıldı ancak garanti edilmez.
- Model tıbbi, hukuki veya finansal tavsiye için kullanılmamalıdır.
Yeniden üretim / Reproduction
python scripts/inspect_datasets.py
python scripts/prepare_datasets.py
python scripts/train.py --dry_run
python scripts/train.py
python scripts/compare_models.py --run
Tüm hiperparametreler config/training.yaml içindedir ve eğitim çıktısıyla birlikte config.yaml, dataset_report.json, training_summary.json olarak kaydedilir.
Atıf / Citation
@misc{minicpm5_turkish,
title = {MiniCPM5-1B-Turkish},
note = {Full supervised fine-tune of openbmb/MiniCPM5-1B for Turkish instruction following and coding},
year = {2026}
}
Taban model / base model: openbmb/MiniCPM5-1B
- Downloads last month
- 454