Downloads · 30 days
0
imvbhuvan/qwen3-4b-cuad-clause-cls-lora
qwen3-4b-cuad-clause-cls-lora is a text generation model from imvbhuvan. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
bf16 LoRA fine-tune of Qwen/Qwen3-4B on [CUAD v1 clause classification] (https://huggingface.co/datasets/ashwinofflproject/CUADclauseclassificationwithnegatives) — 13.2k clauses, 509 contracts, contract-level train/te…
Downloads · 30 days
0
Access
Public
Updated Jul 8, 2026
Repo size
276 MB
Likes
0
Public
Click a slice to open those files.
.safetensors132 MB · 92%
From the Hugging Face model README
bf16 LoRA fine-tune of Qwen/Qwen3-4B on [CUAD v1 clause classification]
(https://huggingface.co/datasets/ashwinofflproject/CUAD_clause_classification_with_negatives) — 13.2k clauses, 509 contracts,
contract-level train/test split (no leakage).
| Metric | Score |
|---|---|
| Accuracy | 0.2639 |
| Micro-F1 | 0.3955 |
| Macro-F1 | 0.3773 |
from vllm import LLM, SamplingParams
from vllm.sampling_params import GuidedDecodingParams
LABELS = ['Affiliate License-Licensee', 'Affiliate License-Licensor', 'Agreement Date', 'Anti-Assignment', 'Audit Rights', 'Cap On Liability', 'Change Of Control', 'Competitive Restriction Exception', 'Covenant Not To Sue', 'Document Name', 'Effective Date', 'Exclusivity', 'Expiration Date', 'Governing Law', 'Insurance', 'Ip Ownership Assignment', 'Irrevocable Or Perpetual License', 'Joint Ip Ownership', 'License Grant', 'Liquidated Damages', 'Minimum Commitment', 'Most Favored Nation', 'No-Solicit Of Customers', 'No-Solicit Of Employees', 'Non-Compete', 'Non-Disparagement', 'Non-Transferable License', 'None Of The Above', 'Notice Period To Terminate Renewal', 'Parties', 'Post-Termination Services', 'Price Restrictions', 'Renewal Term', 'Revenue/Profit Sharing', 'Rofr/Rofo/Rofn', 'Source Code Escrow', 'Termination For Convenience', 'Third Party Beneficiary', 'Uncapped Liability', 'Unlimited/All-You-Can-Eat-License', 'Volume Restriction', 'Warranty Duration']
SYSTEM = (
"You are a legal contract clause classifier. "
"Classify the given clause into exactly one of these categories:\n"
+ "\n".join(f"- {l}" for l in LABELS)
+ "\n\nRespond with only the category name, nothing else."
)
llm = LLM(model="imvbhuvan/qwen3-4b-cuad-clause-cls", max_model_len=2048)
params = SamplingParams(temperature=0.0, max_tokens=12,
guided_decoding=GuidedDecodingParams(choice=LABELS))
out = llm.chat([[{"role": "system", "content": SYSTEM},
{"role": "user", "content": "<clause text>"}]],
sampling_params=params)
print(out[0].outputs[0].text)