Text Generation
MLX
Safetensors
Turkish
bailing_hybrid
law
turkish-law
mlx-4bit
ling
pruned
apple-silicon
conversational
custom_code
4-bit precision
Instructions to use webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit"
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 webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit"
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 "webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Ling 3.0 Tiny Budanmış Türkçe Hukuk Modeli (Apple Silicon MLX 4-bit)
Bu depo, budanmış MoE mimarisine (bailing_hybrid) sahip ve 11 Milyonluk Türkiye Mahkeme Kararları Korpusu ile zenginleştirilmiş Ling 3.0 Tiny Budanmış Türkçe Hukuk Modelinin Apple Silicon (M1, M2, M3, M4) çipleri için optimize edilmiş 4-bit MLX sürümüdür.
🚀 Model ve Kuantalama Özellikleri
- Temel Mimari:
bailing_hybrid(Pruned MoE, ~1.3B aktif parametre) - Kuantalama: MLX 4-bit Affine (
q_bits=4,q_group_size=64) - RAM / VRAM Gereksinimi: ~3.0 - 3.5 GB Birleşik Bellek (Unified Memory)
- Hedef Donanım: 8 GB, 16 GB, 24 GB+ Apple Silicon Mac cihazlar (MacBook Air/Pro, Mac mini, Mac Studio)
- Çıkarım Hızı: ÖSYM TRLawBench üzerinde soru başına 0.23 saniye ortalama çıkarım hızı (ultra hızlı!)
💻 Apple Silicon Mac'te Kullanım Rehberi
1. Kütüphaneleri Yükleyin
pip install -U mlx-lm huggingface_hub
2. Hugging Face Girişi (Model Özel/Private Olduğundan)
huggingface-cli login --token <YOUR_HF_TOKEN>
3. Python ile Hızlı Çıkarım
from mlx_lm import load, generate
model_id = "webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit"
model, tokenizer = load(model_id)
prompt = "<|im_start|>system\nSen uzman bir Türk Hukuku asistanısın.<|im_end|>\n<|im_start|>user\nTBK m. 138 aşırı ifa güçlüğünün temel şartları nelerdir?<|im_end|>\n<|im_start|>assistant\n"
response = generate(
model,
tokenizer,
prompt=prompt,
max_tokens=512,
verbose=True
)
print(response)
4. Yerel OpenAI Uyumlu Sunucu Başlatma
python -m mlx_lm server --model webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit --port 8080
📊 Karşılaştırmalı Türk Hukuku Benchmark Sonuçları
1. Resmi ÖSYM TRLawBench Başarısı (97 Soru)
| Sıra | Model | Mimari / Kuantalama | Mod | Toplam Doğru | Başarı (%) | Hız (sn/soru) | Disk Boyutu |
|---|---|---|---|---|---|---|---|
| 🥇 | Qwen 3.8 27B | 27B Dense (UD-Q4_K_M) |
Doğrudan (Düz) | 55 / 97 | %56.70 | 0.44 s | 15.33 GB |
| 🥈 | MiniCPM-V 4.7 35B-A3B | 35B MoE (IQ4_NL A3.6B) |
Doğrudan (Düz) | 51 / 97 | %52.58 | 0.26 s | 18.42 GB |
| 🥉 | Ternary-Bonsai-2-27B ⚡ | 27B Ternary (PQ2_0 2.13bpw) |
Doğrudan (Düz) | 49 / 97 | %50.52 | 0.83 s | 6.71 GB |
| 4 | Gemma-4-12B-it (Base) 🌟 | 12B Dense (Q4_K_M) |
Doğrudan (Düz) | 44 / 97 | %45.36 | 0.76 s | 6.63 GB |
| 5 | Qwen 3.5 9B (Base) 🚀 | 9B Dense (Q4_K_M) |
Doğrudan (Düz) | 43 / 97 | %44.33 | 0.64 s | 5.29 GB |
| 6 | Gemma-4 TR-Hukuk v2 (Pruned) 🇹🇷 | 20.2B MoE (IQ4_NL A3.2B) |
Doğrudan (Düz) | 38 / 97 | %39.18 | 0.23 s | 10.92 GB |
| 7 | Ling-3.0-tiny (Base) ⚡ | 7.9B MoE (Q4_K_M A1.3B) |
Doğrudan (Düz) | 31 / 97 | %31.96 | 0.77 s | 4.49 GB |
| 8 | ling3-tr-tiny-pruned-hukuk 🇹🇷 | Pruned MoE (MLX 4-bit & GGUF) | Doğrudan (Düz) | 29 / 97 | %29.90 | 0.23 s | 2.84 GB / 3.5 GB |
| 9 | Ternary-Bonsai-2-9B ⚡ | 9B Ternary (PQ2_0 2.13bpw) |
Doğrudan (Düz) | 29 / 97 | %29.90 | 0.38 s | 2.25 GB |
2. Türk Hukuku Mevzuat & Terminoloji Hakimiyeti (Held-out 750 Soru Cloze Testi)
| Model | Taban (Pre-train) | Fine-Tuned (Post-train) | Net İlerleme / Artış |
|---|---|---|---|
| Qwen 3.5 9B Türkçe Hukuk 🚀 | %41.87 (314 / 750) | %47.47 (356 / 750) | +5.60 puan (+42 Soru) |
| Gemma-4 26B-A4B Pruned Hukuk v2 | %27.60 (207 / 750) | %30.40 (228 / 750) | +2.80 puan (+21 Soru) |
⚖️ Lisans
Özel Mülkiyet (proprietary-private). Yetkisiz dağıtımı yasaktır.
- Downloads last month
- 7
Model size
5B params
Tensor type
BF16
·
F32 ·
U32 ·
Hardware compatibility
Log In to add your hardware
4-bit
Model tree for webbrain-one/ling3-tr-tiny-pruned-hukuk-MLX-4bit
Base model
webbrain-one/ling3-turkish-tiny-pruned