Text Classification
Transformers
Safetensors
English
distilbert
legal
PyTorch
text-embeddings-inference
Instructions to use Sajawal024/legal-document-classifier-distilbert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sajawal024/legal-document-classifier-distilbert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Sajawal024/legal-document-classifier-distilbert")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Sajawal024/legal-document-classifier-distilbert") model = AutoModelForSequenceClassification.from_pretrained("Sajawal024/legal-document-classifier-distilbert", device_map="auto") - Notebooks
- Google Colab
- Kaggle
βοΈ Legal Document Category Classification Model
π Model Details
- Developed by: M SAJAWAL ABBAS
- Model Type: Fine-tuned Transformer for Multi-Class Text Classification
- Base Architecture:
distilbert-base-uncased - Language: English (en)
π― Intended Use
Classifies legal texts into 4 primary functional categories:
- Civil / Constitutional Law (ID: 0)
- Criminal Law / Procedure (ID: 1)
- Business / Corporate Law (ID: 2)
- Regulatory / Administrative Law (ID: 3)
π Dataset & Training Details
- Dataset:
lex_glue(SCOTUS subset) - Framework: PyTorch & Hugging Face Transformers
- Epochs: 3 | Batch Size: 16 | Learning Rate: 2e-5
π€ Author Metadata
- Author: M SAJAWAL ABBAS
- Environment: Google Colab (GPU) & Hugging Face Hub
- Downloads last month
- 67