Downloads · 30 days
20
2% of all-time downloads
zenlm/zen-legal
zen-legal is a text generation model from zenlm. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Fine-tuned from Qwen/Qwen3-8B (Apache-2.0) with Hanzo identity training, agentic-data fine-tuning, and abliteration.
Downloads · 30 days
20
2% of all-time downloads
All-time downloads
836
Public
Parameters
8.2B
16.4 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors16.4 GB · 100%
From the Hugging Face model README
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))
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.
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