Kestrel-Explainer-4B v3 (HK PDPO Cap. 486 Compliance Analyst)
Standalone Qwen3ForCausalLM (BF16, native Qwen3 enable_thinking=False chat template) compliance analyst for Hong Kong's Personal Data (Privacy) Ordinance (Cap. 486) (DPP1–DPP6, Part 6A direct marketing, Part 8 exemptions, s.64 doxxing).
Model Family (udomain)
- Full BF16 weights (
udomain/kestrel-explainer-4b-v3): 7.6 GB on disk (~8.1 GB VRAM,>=10 GBGPU recommended). - 4-bit GPTQ W4A16 (
vLLMedition) (udomain/kestrel-explainer-4b-v3-w4a16): 2.5 GB on disk (2.62 GiB weights / 3.52 GiB total VRAM invLLM, fits 6 GB / 8 GB GPUs). - GGUF Q5_K_M (
Ollama/llama.cppedition) (udomain/kestrel-explainer-4b-v3-gguf): 2.7 GB on disk (Q5_K_M, fits 6 GB / 8 GB GPUs without CPU offload).
Official eval_v2/locked (N=944) Summary (kestrel / v4_legacy)
- Hard Blockers: 3/3 PASSED (
myth_rate=0,gold_span_leak=0,schema_ok=100.0% / 100.0%) - Verdict Accuracy (
if_violate): 96.72% (913/944) / 97.03% (916/944) - Primary DPP Accuracy (
label): 93.43% (882/944) / 96.08% (907/944) - Long-context L4 (
2k/4k/6k): 100% at every needle position (start/middle/end)
Quick Start (transformers)
import json
import torch
from pathlib import Path
from huggingface_hub import hf_hub_download
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "udomain/kestrel-explainer-4b-v3"
tok = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(repo_id, torch_dtype=torch.bfloat16, device_map="auto")
sys_p_path = hf_hub_download(repo_id=repo_id, filename="system_prompt.txt")
system_prompt = Path(sys_p_path).read_text(encoding="utf-8")
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": "<your text to audit>"},
]
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=False)
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=1024, do_sample=False, repetition_penalty=1.05)
reply = tok.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True).strip()
print(json.loads(reply))
Quick Start (vLLM Server)
vllm serve udomain/kestrel-explainer-4b-v3 \
--dtype bfloat16 \
--max-model-len 8192