CoolFace
Modelpublic

Ar86Bat/Finance-Document-Text-Classification

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes21downloads
Model Card

๐Ÿ“„ Finance Document Classification

A fine-tuned DistilBERT model for classifying finance-related documents. This model is based on distilbert-base-uncased and fine-tuned on the English subset of the Synthetic PII Finance Multilingual dataset. It is suitable for multi-class document classification tasks in the finance domain.

Model Details

  • โ€”Base Model: distilbert-base-uncased
  • โ€”Task: Multi-class finance document classification
  • โ€”Language: English
  • โ€”Dataset: Synthetic PII Finance Multilingual (English subset)
  • โ€”Framework: Hugging Face Transformers

Metrics

MetricScore
Accuracy98.65%
Precision98.70%
Recall98.65%
F198.65%

How to Use

python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

model_id = "Ar86Bat/Finance-Document-Text-Classification"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)

text = "Client requested details about investment restrictions."
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)

with torch.no_grad():
    outputs = model(**inputs)
    probs = torch.nn.functional.softmax(outputs.logits, dim=-1)
    pred_id = torch.argmax(probs, dim=1).item()

print("Predicted class ID:", pred_id)

Intended Uses & Limitations

  • โ€”Intended use: Automated classification of finance-related documents for compliance, organization, or workflow automation.
  • โ€”Not suitable for: Non-financial or out-of-domain documents without further fine-tuning.

Example API Usage

This model can be served via FastAPI or other REST frameworks. Example request/response:

Request:

json
{
  "text": "Client requested details about investment restrictions."
}

Response:

json
{
  "label": "Investment Restrictions",
  "confidence": 0.987
}

Citation

If you use this model, please cite the repository:

@misc{ar86bat_finance_doc_classification_2025,
  author = {Arif Hizlan},
  title = {Finance Document Text Classification},
  year = {2025},
  howpublished = {\\url{https://huggingface.co/Ar86Bat/Finance-Document-Text-Classification}}
}

License

MIT License