Instructions to use webbrain-one/qwen3.5-9b-tr-hukuk-v2.1-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use webbrain-one/qwen3.5-9b-tr-hukuk-v2.1-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/qwen3.5-9b-tr-hukuk-v2.1-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/qwen3.5-9b-tr-hukuk-v2.1-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/qwen3.5-9b-tr-hukuk-v2.1-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/qwen3.5-9b-tr-hukuk-v2.1-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use webbrain-one/qwen3.5-9b-tr-hukuk-v2.1-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/qwen3.5-9b-tr-hukuk-v2.1-MLX-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "webbrain-one/qwen3.5-9b-tr-hukuk-v2.1-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/qwen3.5-9b-tr-hukuk-v2.1-MLX-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use webbrain-one/qwen3.5-9b-tr-hukuk-v2.1-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/qwen3.5-9b-tr-hukuk-v2.1-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/qwen3.5-9b-tr-hukuk-v2.1-MLX-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use webbrain-one/qwen3.5-9b-tr-hukuk-v2.1-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/qwen3.5-9b-tr-hukuk-v2.1-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/qwen3.5-9b-tr-hukuk-v2.1-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"
Qwen 3.5 9B Türkçe Hukuk v2.1 (Apple Silicon MLX 4-bit)
Not: PekBilen uygulaması Apple Silicon'da bu paket yerine 5-bit paketi kullanır:
webbrain-one/qwen3.5-9b-tr-hukuk-v2.1-MLX-5bit. Uygulamanın MLX motoruyla aynı 139 işte bu 4-bit paket 80, aynı ağırlıkların GGUF IQ4_XS'i 97 aldı; 5-bit paket GGUF düzeyinde. Ayrıntılar 5-bit paketin kartında.
PekBilen masaüstü uygulamasının Apple Silicon Mac'lerde (MLX motoru) kullandığı varsayılan hukuk modeli. Ağırlıklar
webbrain-one/qwen3.5-9b-tr-hukuk-v2.1-GGUF ile aynıdır: Qwen/Qwen3.5-9B tabanı, v2 LoRA ve v2.1 (DPO) LoRA bf16'da
sırayla birleştirildi; belirteç ve sohbet şablonu tabandandır. Yalnız metin modelidir (görüntü katmanı yoktur).
- v2: uygulamanın kendi istem biçiminde (belgeler kaynak olarak istemde, uygulamanın kuralları, dilekçe iskeletleri, şablon adımları) üretilmiş 6.013 örnekle LoRA (r 32, α 64). Her hedef yanıt uygulamanın atıf ve görev denetçilerinden geçmiştir.
- v2.1: v2 üzerine DPO (202 tercih çifti). Reddedilen yanıt, v2'nin yeni işlerde denetimden geçemeyen kendi yanıtı (çoğunlukla kaynakta olmayan mahkeme atfı); seçilen yanıt aynı istem için denetimden geçen yanıt.
Dosyalar
| Dosya | Açıklama | Boyut |
|---|---|---|
model.safetensors |
4 bit affine, grup 64 (mlx-lm 0.32.2; v1 MLX paketiyle aynı ayar) |
5,04 GB |
config.json, generation_config.json |
model_type: qwen3_5_text; durdurma belirteçleri <|im_end|> ve <|endoftext|> |
|
tokenizer.json, tokenizer_config.json, chat_template.jinja |
Qwen/Qwen3.5-9B ile aynı |
16 GB ve üstü birleşik belleği olan Apple Silicon Mac önerilir.
Kullanım
pip install "mlx-lm==0.32.2"
from mlx_lm import load, generate
# mlx-lm 0.32.x "qwen3_5_text" türünü tanımaz; model qwen3_5 yükleyicisiyle açılır (uygulama da böyle yükler).
model, tokenizer = load("webbrain-one/qwen3.5-9b-tr-hukuk-v2.1-MLX-4bit", model_config={"model_type": "qwen3_5"})
messages = [{"role": "user", "content": "TMK m. 2'deki dürüstlük kuralının temel unsurlarını kısaca açıkla."}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False, enable_thinking=False)
print(generate(model, tokenizer, prompt=prompt, max_tokens=512))
Düşünme enable_thinking=True|False ile açılıp kapatılır. Uygulamanın örnekleme ayarları: sıcaklık 0,3, top-p 0,9.
Değerlendirme
Ölçümler aynı ağırlıkların GGUF sürümüyle (IQ4_XS, llama.cpp) yapıldı; MLX paketi uygulama işlerinde ayrıca ölçülmedi. Eğitimde olmayan 20 güncel (2026) karar üzerinde uygulamanın 139 tek çağrılık işi ve eğitimde kullanılmayan maddelerle 40 mevzuat sorusu; her yanıt uygulamanın atıf ve görev denetçileriyle puanlandı.
| v1 | v2 | v2.1 | |
|---|---|---|---|
| Uygulama işleri, düşünme açık (varsayılan) | 82 / 139 | 96–97 | 102 |
| Uygulama işleri, düşünme kapalı | 87 / 139 | 89–93 | 97 |
| Mevzuat soru-cevap | 5 / 40 | 39 | 38 |
| TRLawBench (97 ÖSYM sorusu, düşünme kapalı) | 44 | 46 | 47 |
| HukukBERT cloze (750 soru) | %47,7 | %47,3 | %47,7 |
TRLawBench'te 97 soruyla ±5 soru gürültü sınırındadır; sürümler arasında fark yoktur. Eğitim verisi ve ayrıntılı
sonuçlar: webbrain-one/hukuk-dataset-v2.
Uyarı: Çıktılar hukuki görüş yerine geçmez; kanun maddesi, karar künyesi ve tutarlar birincil kaynaktan doğrulanmalıdır.
⚖️ Lisans
Özel Mülkiyet (proprietary-private). Yetkisiz dağıtımı yasaktır.
- Downloads last month
- 41
4-bit