Downloads · 30 days
0
ArielZamir23/legal-assistant-qwen2_5-1_5b-lora
legal-assistant-qwen2_5-1_5b-lora is a machine learning model from ArielZamir23. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
This model fine-tunes Qwen2.5-1.5B-Instruct using LoRA (Low-Rank Adaptation) on the CUAD dataset for legal contract Q&A. It helps extract clauses and answer questions about contracts, such as termination conditions or…
Downloads · 30 days
0
Access
Public
Updated Aug 28, 2025
Repo size
159 MB
Likes
0
Public
Click a slice to open those files.
.safetensors73.9 MB · 82%
From the Hugging Face model README
This model fine-tunes Qwen2.5-1.5B-Instruct using LoRA (Low-Rank Adaptation) on the CUAD dataset for legal contract Q&A.
It helps extract clauses and answer questions about contracts, such as termination conditions or exclusivity obligations.
from transformers import pipeline
generator = pipeline("text-generation", model="ArielZamir23/legal-assistant-qwen2_5-1_5b-lora")
question = "What is the termination clause in this contract?"
output = generator([{"role": "user", "content": question}], max_new_tokens=256)
print(output[0]["generated_text"])
This Agreement shall terminate automatically at any time upon expiration of 12 months from the date it was executed or if the Parties do not enter into an agreement to continue providing Services pursuant to this Agreement within [***] after such expiration (the "Initial Term").
Base model: Qwen2.5-1.5B-Instruct
Dataset: CUAD (Contract Understanding Atticus Dataset)
Method: LoRA fine-tuning with Hugging Face trl + peft
Hardware: Google Colab (T4 GPU)
Tracking: Weights & Biases
Contract analysis → extract clauses like termination, exclusivity, confidentiality
Legal Q&A → answer questions about contract obligations
Educational tool → show domain adaptation of LLMs
Not a substitute for professional legal advice
Answers are dataset-dependent (may not generalize to all contracts)
Sensitive to prompt phrasing
The full training pipeline, dataset preprocessing, and documentation are available in the GitHub repository:
👉 arielzamir/qwen2.5-finetuned-legal-assistant
Cite TRL as:
@misc{vonwerra2022trl,
title = {{TRL: Transformer Reinforcement Learning}},
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
year = 2020,
journal = {GitHub repository},
publisher = {GitHub},
howpublished = {\url{https://github.com/huggingface/trl}}
}