Case Analysis InLegalBERT
A legal case analysis model fine-tuned based on InLegalBERT, specialized for legal text processing tasks
Downloads 18
Release Time : 5/10/2024
Model Overview
This model is a fine-tuned version of InLegalBERT on legal domain datasets, primarily used for legal text classification and case analysis tasks. It demonstrates high accuracy and recall rates in evaluations.
Model Features
High Accuracy
Achieves 82.18% accuracy and 82.18% recall on the evaluation set
Legal Domain Optimization
Fine-tuned based on InLegalBERT specifically for legal texts
Multi-metric Evaluation
Provides comprehensive evaluation metrics, including macro and weighted metrics
Model Capabilities
Legal Text Classification
Case Analysis
Legal Document Processing
Use Cases
Legal Analysis
Case Classification
Classify and categorize legal cases
82.18% accuracy
Legal Document Analysis
Analyze legal document content and extract key information
Macro F1 score 66.9%
🚀 case-analysis-InLegalBERT
This model is a fine - tuned version of [law - ai/InLegalBERT](https://huggingface.co/law - ai/InLegalBERT) on an unknown dataset. It offers valuable insights and performance metrics for case analysis.
✨ Features
- Fine - Tuned: Based on the pre - trained
law - ai/InLegalBERT
model, optimized for a specific case - analysis task. - Multiple Metrics: Evaluated using a comprehensive set of metrics including accuracy, precision, recall, etc.
📚 Documentation
Metrics
The model achieves the following results on the evaluation set:
Metric | Value |
---|---|
Loss | 1.0434 |
Accuracy | 0.8218 |
Precision | 0.8145 |
Recall | 0.8218 |
Precision Macro | 0.6439 |
Recall Macro | 0.6295 |
Macro Fpr | 0.0890 |
Weighted Fpr | 0.0674 |
Weighted Specificity | 0.8544 |
Macro Specificity | 0.9191 |
Weighted Sensitivity | 0.8218 |
Macro Sensitivity | 0.6295 |
F1 Micro | 0.8218 |
F1 Macro | 0.6335 |
F1 Weighted | 0.8106 |
Training and evaluation data
The documentation does not provide detailed information about the training and evaluation data.
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
learning_rate
: 5e - 05train_batch_size
: 8eval_batch_size
: 8seed
: 42optimizer
: Adam withbetas=(0.9,0.999)
andepsilon = 1e - 08
lr_scheduler_type
: linearnum_epochs
: 30mixed_precision_training
: Native AMP
Training results
Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | Precision Macro | Recall Macro | Macro Fpr | Weighted Fpr | Weighted Specificity | Macro Specificity | Weighted Sensitivity | Macro Sensitivity | F1 Micro | F1 Macro | F1 Weighted |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
No log | 1.0 | 224 | 0.6546 | 0.8018 | 0.7632 | 0.8018 | 0.5777 | 0.6106 | 0.0978 | 0.0761 | 0.8432 | 0.9112 | 0.8018 | 0.6106 | 0.8018 | 0.5936 | 0.7820 |
No log | 2.0 | 448 | 0.6831 | 0.8129 | 0.7732 | 0.8129 | 0.5845 | 0.6154 | 0.0923 | 0.0712 | 0.8554 | 0.9171 | 0.8129 | 0.6154 | 0.8129 | 0.5996 | 0.7926 |
0.607 | 3.0 | 672 | 0.7626 | 0.8263 | 0.8060 | 0.8263 | 0.6773 | 0.6341 | 0.0885 | 0.0655 | 0.8464 | 0.9182 | 0.8263 | 0.6341 | 0.8263 | 0.6362 | 0.8105 |
0.607 | 4.0 | 896 | 0.7839 | 0.8085 | 0.7991 | 0.8085 | 0.6391 | 0.6306 | 0.0896 | 0.0732 | 0.8754 | 0.9210 | 0.8085 | 0.6306 | 0.8085 | 0.6314 | 0.8017 |
0.316 | 5.0 | 1120 | 0.9381 | 0.8263 | 0.8127 | 0.8263 | 0.6688 | 0.6573 | 0.0822 | 0.0655 | 0.8780 | 0.9261 | 0.8263 | 0.6573 | 0.8263 | 0.6514 | 0.8161 |
0.316 | 6.0 | 1344 | 1.0434 | 0.8218 | 0.8145 | 0.8218 | 0.6907 | 0.6533 | 0.0897 | 0.0674 | 0.8528 | 0.9187 | 0.8218 | 0.6533 | 0.8218 | 0.6690 | 0.8159 |
0.1513 | 7.0 | 1568 | 1.2182 | 0.8018 | 0.8066 | 0.8018 | 0.6382 | 0.6399 | 0.0916 | 0.0761 | 0.8802 | 0.9205 | 0.8018 | 0.6399 | 0.8018 | 0.6375 | 0.8030 |
0.1513 | 8.0 | 1792 | 1.3193 | 0.8285 | 0.8070 | 0.8285 | 0.6566 | 0.6280 | 0.0882 | 0.0645 | 0.8521 | 0.9202 | 0.8285 | 0.6280 | 0.8285 | 0.6376 | 0.8152 |
0.0491 | 9.0 | 2016 | 1.3169 | 0.8330 | 0.8180 | 0.8330 | 0.6950 | 0.6555 | 0.0828 | 0.0627 | 0.8653 | 0.9246 | 0.8330 | 0.6555 | 0.8330 | 0.6687 | 0.8235 |
0.0491 | 10.0 | 2240 | 1.4460 | 0.8307 | 0.8109 | 0.8307 | 0.6584 | 0.6291 | 0.0868 | 0.0636 | 0.8533 | 0.9210 | 0.8307 | 0.6291 | 0.8307 | 0.6398 | 0.8184 |
0.0491 | 11.0 | 2464 | 1.4100 | 0.8419 | 0.8166 | 0.8419 | 0.6718 | 0.6399 | 0.0806 | 0.0589 | 0.8642 | 0.9265 | 0.8419 | 0.6399 | 0.8419 | 0.6464 | 0.8263 |
0.0148 | 12.0 | 2688 | 1.5364 | 0.8218 | 0.8105 | 0.8218 | 0.6661 | 0.6340 | 0.0903 | 0.0674 | 0.8505 | 0.9181 | 0.8218 | 0.6340 | 0.8218 | 0.6469 | 0.8137 |
0.0148 | 13.0 | 2912 | 1.5380 | 0.8307 | 0.8118 | 0.8307 | 0.6596 | 0.6304 | 0.0870 | 0.0636 | 0.8512 | 0.9205 | 0.8307 | 0.6304 | 0.8307 | 0.6409 | 0.8185 |
0.0031 | 14.0 | 3136 | 1.6139 | 0.8218 | 0.8108 | 0.8218 | 0.6451 | 0.6353 | 0.0860 | 0.0674 | 0.8685 | 0.9226 | 0.8218 | 0.6353 | 0.8218 | 0.6396 | 0.8159 |
0.0031 | 15.0 | 3360 | 1.6356 | 0.8263 | 0.8117 | 0.8263 | 0.6626 | 0.6477 | 0.0842 | 0.0655 | 0.8700 | 0.9241 | 0.8263 | 0.6477 | 0.8263 | 0.6529 | 0.8183 |
0.0043 | 16.0 | 3584 | 1.6745 | 0.8241 | 0.7994 | 0.8241 | 0.6244 | 0.6229 | 0.0884 | 0.0664 | 0.8543 | 0.9196 | 0.8241 | 0.6229 | 0.8241 | 0.6231 | 0.8108 |
0.0043 | 17.0 | 3808 | 1.7867 | 0.8085 | 0.7946 | 0.8085 | 0.6221 | 0.6336 | 0.0906 | 0.0732 | 0.8678 | 0.9191 | 0.8085 | 0.6336 | 0.8085 | 0.6229 | 0.7996 |
0.0008 | 18.0 | 4032 | 1.7511 | 0.8151 | 0.7971 | 0.8151 | 0.6110 | 0.6216 | 0.0901 | 0.0703 | 0.8644 | 0.9199 | 0.8151 | 0.6216 | 0.8151 | 0.6145 | 0.8046 |
0.0008 | 19.0 | 4256 | 1.5909 | 0.8441 | 0.8079 | 0.8441 | 0.6260 | 0.6374 | 0.0792 | 0.0580 | 0.8670 | 0.9278 | 0.8441 | 0.6374 | 0.8441 | 0.6311 | 0.8249 |
0.0008 | 20.0 | 4480 | 1.5721 | 0.8463 | 0.8212 | 0.8463 | 0.6727 | 0.6546 | 0.0761 | 0.0571 | 0.8753 | 0.9304 | 0.8463 | 0.6546 | 0.8463 | 0.6547 | 0.8316 |
0.0039 | 21.0 | 4704 | 1.5819 | 0.8396 | 0.8054 | 0.8396 | 0.6337 | 0.6200 | 0.0843 | 0.0599 | 0.8527 | 0.9231 | 0.8396 | 0.6200 | 0.8396 | 0.6245 | 0.8199 |
0.0039 | 22.0 | 4928 | 1.5906 | 0.8486 | 0.8236 | 0.8486 | 0.6814 | 0.6512 | 0.0770 | 0.0562 | 0.8680 | 0.9291 | 0.8486 | 0.6512 | 0.8486 | 0.6570 | 0.8333 |
0.0005 | 23.0 | 5152 | 1.7133 | 0.8263 | 0.8047 | 0.8263 | 0.6403 | 0.6431 | 0.0831 | 0.0655 | 0.8745 | 0.9252 | 0.8263 | 0.6431 | 0.8263 | 0.6367 | 0.8143 |
0.0005 | 24.0 | 5376 | 1.7813 | 0.8241 | 0.8022 | 0.8241 | 0.6515 | 0.6290 | 0.0894 | 0.0664 | 0.8490 | 0.9183 | 0.8241 | 0.6290 | 0.8241 | 0.6348 | 0.8108 |
0.0033 | 25.0 | 5600 | 1.7983 | 0.8218 | 0.8001 | 0.8218 | 0.6485 | 0.6281 | 0.0902 | 0.0674 | 0.8486 | 0.9176 | 0.8218 | 0.6281 | 0.8218 | 0.6328 | 0.8088 |
0.0033 | 26.0 | 5824 | 1.8070 | 0.8218 | 0.8001 | 0.8218 | 0.6485 | 0.6281 | 0.0902 | 0.0674 | 0.8486 | 0.9176 | 0.8218 | 0.6281 | 0.8218 | 0.6328 | 0.8088 |
0.0 | 27.0 | 6048 | 1.8198 | 0.8218 | 0.8024 | 0.8218 | 0.6439 | 0.6295 | 0.0890 | 0.0674 | 0.8544 | 0.9191 | 0.8218 | 0.6295 | 0.8218 | 0.6335 | 0.8106 |
0.0 | 28.0 | 6272 | 1.8243 | 0.8218 | 0.8024 | 0.8218 | 0.6439 | 0.6295 | 0.0890 | 0.0674 | 0.8544 | 0.9191 | 0.8218 | 0.6295 | 0.8218 | 0.6335 | 0.8106 |
0.0 | 29.0 | 6496 | 1.8277 | 0.8218 | 0.8024 | 0.8218 | 0.6439 | 0.6295 | 0.0890 | 0.0674 | 0.8544 | 0.9191 | 0.8218 | 0.6295 | 0.8218 | 0.6335 | 0.8106 |
0.0003 | 30.0 | 6720 | 1.8292 | 0.8218 | 0.8024 | 0.8218 | 0.6439 | 0.6295 | 0.0890 | 0.0674 | 0.8544 | 0.9191 | 0.8218 | 0.6295 | 0.8218 | 0.6335 | 0.8106 |
Framework versions
Transformers
4.39.3Pytorch
2.2.1+cu121Datasets
2.19.1Tokenizers
0.15.2
📄 License
This model is released under the MIT license.
Distilbert Base Uncased Finetuned Sst 2 English
Apache-2.0
Text classification model fine-tuned on the SST-2 sentiment analysis dataset based on DistilBERT-base-uncased, with 91.3% accuracy
Text Classification English
D
distilbert
5.2M
746
Xlm Roberta Base Language Detection
MIT
Multilingual detection model based on XLM-RoBERTa, supporting text classification in 20 languages
Text Classification
Transformers Supports Multiple Languages

X
papluca
2.7M
333
Roberta Hate Speech Dynabench R4 Target
This model improves online hate detection through dynamic dataset generation, focusing on learning from worst-case scenarios to enhance detection effectiveness.
Text Classification
Transformers English

R
facebook
2.0M
80
Bert Base Multilingual Uncased Sentiment
MIT
A multilingual sentiment analysis model fine-tuned based on bert-base-multilingual-uncased, supporting sentiment analysis of product reviews in 6 languages
Text Classification Supports Multiple Languages
B
nlptown
1.8M
371
Emotion English Distilroberta Base
A fine-tuned English text emotion classification model based on DistilRoBERTa-base, capable of predicting Ekman's six basic emotions and neutral category.
Text Classification
Transformers English

E
j-hartmann
1.1M
402
Robertuito Sentiment Analysis
Spanish tweet sentiment analysis model based on RoBERTuito, supporting POS(positive)/NEG(negative)/NEU(neutral) three-class sentiment classification
Text Classification Spanish
R
pysentimiento
1.0M
88
Finbert Tone
FinBERT is a BERT model pre-trained on financial communication texts, specializing in the field of financial natural language processing. finbert-tone is its fine-tuned version for financial sentiment analysis tasks.
Text Classification
Transformers English

F
yiyanghkust
998.46k
178
Roberta Base Go Emotions
MIT
A multi-label sentiment classification model based on RoBERTa-base, trained on the go_emotions dataset, supporting recognition of 28 emotion labels.
Text Classification
Transformers English

R
SamLowe
848.12k
565
Xlm Emo T
XLM-EMO is a multilingual sentiment analysis model fine-tuned based on the XLM-T model, supporting 19 languages and specifically designed for sentiment prediction in social media texts.
Text Classification
Transformers Other

X
MilaNLProc
692.30k
7
Deberta V3 Base Mnli Fever Anli
MIT
DeBERTa-v3 model trained on MultiNLI, Fever-NLI, and ANLI datasets, excelling in zero-shot classification and natural language inference tasks
Text Classification
Transformers English

D
MoritzLaurer
613.93k
204
Featured Recommended AI Models