CoolFace
Modelpublic

finmigodeveloper/distilbert-transaction-classifier-lora

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
1likes11downloads
Model Card

Transaction Category Classifier - LoRA Version

This is a LoRA adapter for DistilBERT that classifies bank transactions into 10 categories with 98.53% accuracy.

Model Details

Performance

MetricValue
Accuracy98.53%
Loss0.0221
Training Samples80,000
Validation Samples20,000

Categories

  • Charity & Donations
  • Entertainment & Recreation
  • Financial Services
  • Food & Dining
  • Government & Legal
  • Healthcare & Medical
  • Income
  • Shopping & Retail
  • Transportation
  • Utilities & Services

How to Use

python
from transformers import pipeline

# Load directly
classifier = pipeline("text-classification", 
                     model="finmigodeveloper/distilbert-transaction-classifier-lora")

# Test it
transactions = [
    "Starbucks coffee",
    "Monthly salary deposit", 
    "Uber ride to airport"
]

for text in transactions:
    result = classifier(text)[0]
    print(f"{text}: {result['label']} ({result['score']:.2%})")

Training Details

  • LoRA Rank (r): 8
  • LoRA Alpha: 16
  • Target Modules: qlin, klin, vlin, outlin
  • Dropout: 0.1
  • Epochs: 3
  • Batch Size: 64
  • Learning Rate: 2e-5

Why LoRA?

  • 98.7% smaller than the full model
  • Faster loading (~0.3 seconds vs 2-3 seconds)
  • Same accuracy as the full model
  • Perfect for mobile apps and edge deployment

Files in this repository

  • adapter_model.safetensors: The LoRA adapter weights (2.5 MB)
  • adapter_config.json: LoRA configuration
  • training_stats.json: Detailed training statistics
  • tokenizer.json & tokenizer_config.json: Tokenizer files