zenlm/zen-legal

🤗 Hugging Face 来源text-generationapache-2.08.2B 参数16 GBsafetensors✓ 5 个校验和今天更新
需要做种者 →

Zen Legal

Fine-tuned from Qwen/Qwen3-8B (Apache-2.0) with Hanzo identity training, agentic-data fine-tuning, and abliteration.

Base: Qwen3-8B | Parameters: 8B | Context: 32K native (131K via YaRN) | License: Apache 2.0

Legal AI for contract analysis, case research, regulatory compliance, and legal document synthesis.

Designed for legal technology developers and researchers. Not legal advice.

from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("zenlm/zen-legal", torch_dtype="auto")
tokenizer = AutoTokenizer.from_pretrained("zenlm/zen-legal")
messages = [{"role": "user", "content": "Your domain-specific prompt here"}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=1024)
print(tokenizer.decode(output[0][inputs.input_ids.shape[-1]:], skip_special_tokens=True))

Base Model & Credits

Built on Qwen3-8B by the Qwen team (Alibaba Cloud), licensed under Apache-2.0. Hanzo adds identity training, agentic-data fine-tuning, and abliteration on top of the upstream weights.


The Zen LM Family

Joint research between Hanzo AI (Techstars '17), Zoo Labs Foundation (501c3), and Lux Partners Limited.

All weights Apache 2.0. Download, run locally, fine-tune, deploy commercially.

HuggingFace · Chat · API · Docs