Downloads ยท 30 days
10
12% of all-time downloads
Baps24/lexai-legal-clause-classifier
lexai-legal-clause-classifier is a text classification model from Baps24. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
Dedicated with love and devotion to ๐ Lord Jagannath, Lord Lingaraj, and Maa Chara Narayani ๐ May this work serve justice for every Indian citizen. Jay Jagannath! Jay Lingaraj! Maa Chara Narayani ki Jai!
Downloads ยท 30 days
10
12% of all-time downloads
All-time downloads
86
Public
Parameters
67M
268 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB ยท 100%
From the Hugging Face model README
Dedicated with love and devotion to
๐ Lord Jagannath, Lord Lingaraj, and Maa Chara Narayani ๐
May this work serve justice for every Indian citizen.
Jay Jagannath! Jay Lingaraj! Maa Chara Narayani ki Jai!
45 crore Indians have no access to legal help.
A lawyer costs โน2,000โ10,000 per hour.
Most citizens don't know their basic rights.
LexAI is being built to change this.
This model is the first brick of LexAI India โ
a free, open-source AI legal assistant for every Indian citizen.
Built for the farmer who doesn't know his land rights.
For the worker whose salary was stolen.
For every citizen who deserves justice.
LexAI Legal Clause Classifier is a fine-tuned
DistilBERT model
for classifying legal contract clauses into categories.
Trained on the LEDGAR dataset โ 60,000+ real commercial
contract clauses from SEC filings.
| Label | Description |
|---|---|
CONFIDENTIALITY | NDA and confidentiality obligations |
INDEMNITY | Indemnification and hold harmless clauses |
TERMINATIONS | Contract termination conditions |
| Metric | Score |
|---|---|
| Validation Accuracy | 99.36% |
| Validation Loss | 0.0275 |
| Test Examples | 466 |
from transformers import pipeline
# Load the classifier
classifier = pipeline(
"text-classification",
model="Baps24/lexai-legal-clause-classifier"
)
# Classify any legal clause
result = classifier(
"The company shall keep all information strictly confidential."
)
print(result)
# [{'label': 'CONFIDENTIALITY', 'score': 0.998}]
| Parameter | Value |
|---|---|
| Base Model | distilbert-base-uncased |
| Dataset | LEDGAR (lex_glue) |
| Training Examples | 3,331 |
| Epochs | 3 |
| Batch Size | 16 |
| Learning Rate | 2e-5 |
| Weight Decay | 0.01 |
| GPU | NVIDIA T4 |
| Training Time | ~10 minutes |
| Framework | HuggingFace Transformers |
This model is Project 1 of 13 in the LexAI India platform.
| Project | Description | Status |
|---|---|---|
| P1 โ Clause Classifier | Classify contract clause types | โ Done |
| P2 โ Audio Transcriber | Voice input for legal documents | ๐ Next |
| P3 โ Legal NER | Extract parties, dates, penalties | ๐ Soon |
| P4 โ Legal QA | Answer questions from contracts | ๐ Soon |
| P5 โ Indian Law Dataset | IPC, CrPC, Constitution corpus | ๐ Soon |
| P6 โ Legal Assistant LoRA | Fast domain-specific LLM | ๐ Soon |
| P7 โ LexAI India LLM | Full Indian legal AI in Hindi+English | ๐ฏ Goal |
Final vision: Any Indian citizen can ask any legal question
in Hindi or English and get a clear, accurate, cited answer. Free. Forever.
Built by Baps24
Part of the LexAI India open-source legal AI initiative
Building AI for justice. One model at a time. โ๏ธ๐ฎ๐ณ
Apache 2.0 โ Free to use, modify, and distribute.
If you use this model, please cite and star the repo. ๐