Downloads · 30 days
21
2% of all-time downloads
Abogatic/qwen35-9b-legal-sft-es-v1-merged
qwen35-9b-legal-sft-es-v1-merged is a text generation model from Abogatic. 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.
Merged full model derived from a LoRA adapter on Qwen/Qwen3.5-9B tuned for Spanish legal assistant behavior over statutes and case law, with emphasis on prudence, grounding, and faithful handling of visible legal text.
Downloads · 30 days
21
2% of all-time downloads
All-time downloads
934
Public
Parameters
9B
17.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors17.9 GB · 100%
From the Hugging Face model README
Merged full model derived from a LoRA adapter on Qwen/Qwen3.5-9B tuned for Spanish legal assistant behavior over statutes and case law, with emphasis on prudence, grounding, and faithful handling of visible legal text.
This repository contains merged weights. It can be served directly as a standalone model.
The fine-tuning objective was behavioral, not encyclopedic. The target model should:
The adapter was designed for RAG-style systems over Spanish legal sources, especially where the retrieved context may include:
The training corpus was built from anonymized Spanish Supreme Court judgments and transformed into chat-format SFT examples focused on:
The dataset was designed to reduce these failure modes:
Qwen/Qwen3.5-9Bgold20452587477.95 seconds2.4783r: 16160.0noneq_projk_projv_projo_projgate_projup_projdown_projAn internal 60-case benchmark compared the base model against this adapter on Spanish legal behavior. The benchmark measured:
Summary:
5.317 -> 5.5000.917 -> 1.0000.767 -> 0.8830.950 -> 1.000Observed improvements in this benchmark:
1 to 0;4 to 0;3 to 0.Benchmark artifacts included in this repository:
benchmark_summary.jsonBENCHMARK.mdKnown limitation:
Best fit:
Recommended guardrails:
no consta when the context is partial;This adapter is not a substitute for:
It should not be used to assert current legal validity unless the current statutory text is explicitly present in the retrieved context.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
base_model = "Qwen/Qwen3.5-9B"
model_id = "REPO_ID_OR_LOCAL_PATH"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
torch_dtype=torch.bfloat16,
device_map="auto",
)
model.eval()
vllm serve Abogatic/qwen35-9b-legal-sft-es-v1-merged \
--trust-remote-code \
--generation-config vllm \
--default-chat-template-kwargs '{"enable_thinking": false}'
The adapter was trained from anonymized judicial material transformed into behavioral SFT examples. Review the legal and organizational requirements applicable to the source corpus before redistribution or downstream commercial use.
This merged model remains subject to the base model license and the legal constraints applicable to the training corpus.