Downloads · 30 days
5
9% of all-time downloads
Vedant0824/legal-contract-clause-analyzer
legal-contract-clause-analyzer is a text generation model from Vedant0824. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
Fine-tuned Qwen2.5-3B-Instruct for legal contract clause classification (41 types) and plain-English rewriting using QLoRA + Unsloth on the CUAD dataset.
Downloads · 30 days
5
9% of all-time downloads
All-time downloads
55
Public
Repo size
131 MB
Likes
0
Public
Click a slice to open those files.
.safetensors120 MB · 91%
From the Hugging Face model README
Fine-tuned Qwen2.5-3B-Instruct for legal contract clause classification (41 types) and plain-English rewriting using QLoRA + Unsloth on the CUAD dataset.
Given any legal contract text, the model performs 5 tasks simultaneously:
Document Name, Parties, Agreement Date, Effective Date, Expiration Date, Renewal Term, Notice Period To Terminate Renewal, Governing Law, Most Favored Nation, Non-Compete, Exclusivity, No-Solicit Of Customers, Competitive Restriction Exception, No-Solicit Of Employees, Non-Disparagement, Termination For Convenience, Rofr/Rofo/Rofn, Change Of Control, Anti-Assignment, Revenue/Profit Sharing, Price Restrictions, Minimum Commitment, Volume Restriction, Ip Ownership Assignment, Joint Ip Ownership, License Grant, Non-Transferable License, Affiliate License-Licensor, Affiliate License-Licensee, Unlimited/All-You-Can-Eat-License, Irrevocable Or Perpetual License, Source Code Escrow, Post-Termination Services, Audit Rights, Uncapped Liability, Cap On Liability, Liquidated Damages, Warranty Duration, Insurance, Covenant Not To Sue, Third Party Beneficiary.
Input:
This Agreement shall be governed by and construed in accordance with
the laws of the State of Delaware, without regard to its conflict of
laws principles.
Output:
{
"clause_type": "Governing Law",
"found": true,
"relevant_text": "This Agreement shall be governed by and construed in accordance with the laws of the State of Delaware...",
"key_terms": ["governing law"],
"risk_level": "LOW",
"plain_english": "This specifies which state's laws will be used to interpret the contract if there's a dispute."
}
| Metric | Value |
|---|---|
| Training Loss (start) | 0.74 |
| Training Loss (final) | 0.52 |
| Training Steps | 500 |
| Training Time | 60 minutes |
| Peak GPU Memory | 4.2 GB / 15 GB |
| Training Examples | 16,270 |
| Validation Examples | 500 |
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-3B-Instruct")
model = PeftModel.from_pretrained(base_model, "Vedant0824/legal-contract-clause-analyzer")
tokenizer = AutoTokenizer.from_pretrained("Vedant0824/legal-contract-clause-analyzer")