26 1 month ago

This model is a fine-tuned version of Qwen3-0.6B that has been optimized for Indonesian legal domain understanding and generation. The fine-tuning process utilized Low-Rank Adaptation (LoRA) to efficiently adapt the base model while minimizing computation

ollama run alkindi/Qwen3_06B_INDO_LAW

Models

View all →

Readme

Qwen3_06B_INDO_LAW

Indonesian Legal Domain Fine-tuned Model — Optimized for Ollama.

Overview

Property Value
Model Name Qwen3_06B_INDO_LAW
Base Model Qwen3-0.6B (Qwen3ForCausalLM)
Domain Indonesian Legal / Hukum Indonesia
Quantization Q4_K_M (GGUF)
Size 379 MB
Context Length 40,960 tokens
Registry ollama.com/alkindi/Qwen3_06B_INDO_LAW

Quick Start

Pull from Ollama Registry

ollama pull alkindi/Qwen3_06B_INDO_LAW:latest

Run Interactively

ollama run alkindi/Qwen3_06B_INDO_LAW:latest

Example session:

>>> Apa itu Pasal 1365 KUHPerdata tentang perbuatan melawan hukum?
[Model generates Indonesian legal explanation]

Use as API (OpenAI-compatible)

# Start Ollama server (runs on port 11434 by default)
ollama serve

# Query via curl
curl http://localhost:11434/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "alkindi/Qwen3_06B_INDO_LAW:latest",
    "messages": [
      {"role": "user", "content": "Jelaskan unsur-unsur wanprestasi dalam kontrak."}
    ]
  }'

Architecture

  • Layers: 28 transformer blocks
  • Hidden Size: 1024
  • Attention Heads: 16 (8 KV heads for GQA)
  • Vocab Size: 151,936 tokens
  • RoPE Theta: 1,000,000
  • Context Window: 40,960 tokens
  • Quant Strategy: Q4_K_M — balanced quality/size (5.24 BPW)

Conversion Pipeline

Azzindani/Qwen3_0.6B_ID_Legal (HF)
    ↓  convert_hf_to_gguf.py (FP16)
ggml-model-f16.gguf (1.2 GB)
    ↓  llama-quantize Q4_K_M
Q4_K_M.gguf (379 MB)
    ↓  ollama create + push
alkindi/Qwen3_06B_INDO_LAW:latest

Build from Source

If you want to rebuild or re-quantize:

# 1. Download base model
hf download Azzindani/Qwen3_0.6B_ID_Legal --repo-type model --local-dir ./Qwen3_06B_INDO_LAW

# 2. Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git

# 3. Convert HF → GGUF (FP16)
python llama.cpp/convert_hf_to_gguf.py \
  Qwen3_06B_INDO_LAW \
  --outfile Qwen3_06B_INDO_LAW/ggml-model-f16.gguf \
  --outtype f16

# 4. Quantize to Q4_K_M
/usr/local/lib/ollama/llama-quantize \
  Qwen3_06B_INDO_LAW/ggml-model-f16.gguf \
  Qwen3_06B_INDO_LAW/Q4_K_M.gguf \
  Q4_K_M

# 5. Create and push to Ollama
ollama create alkindi/Qwen3_06B_INDO_LAW:latest -f Modelfile
OLLAMA_MODELS=/usr/share/ollama/.ollama/models ollama push alkindi/Qwen3_06B_INDO_LAW:latest

Capabilities

Designed for Indonesian legal domain tasks: - Penjelasan konsep hukum Indonesia (KUHPerdata, KUHP, UU Perkebunan, dll.) - Analisis dokumen hukum dan kontrak - Question answering topik hukum Indonesia - Ringkasan dokumen legal - Legal reasoning dan generasi argumen dalam Bahasa Indonesia

Limitations

  • Smaller model (0.6B params) — limited reasoning depth on complex legal questions
  • Optimized for Indonesian legal text; general task performance varies
  • Fine-tuned domain — out-of-scope queries may produce suboptimal results
  • Q4_K_M quantization introduces minor quality trade-off vs. FP16 (~0.3% perplexity increase)

Links