Downloads · 30 days
8
53% of all-time downloads
Harry1001/sme-risk-classifier-distilbert
sme-risk-classifier-distilbert is a machine learning model from Harry1001. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
A fine-tuned DistilBERT model designed to classify Small and Medium Enterprises (SMEs) into Medium Risk or High Risk categories based on structured financial and managerial indicators.
Downloads · 30 days
8
53% of all-time downloads
All-time downloads
15
Public
Parameters
67M
1.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt536 MB · 50%
From the Hugging Face model README
A fine-tuned DistilBERT model designed to classify Small and Medium Enterprises (SMEs) into Medium Risk or High Risk categories based on structured financial and managerial indicators.
This model takes structured SME data (financial literacy, financial risk, risk assessment, management ability, financial analysis, and SME metadata) and converts it into a text representation suitable for transformer-based classification.
It was fine-tuned using:
Dataset Source:
Harvard Dataverse — SME Financial Decision-Making Dataset (2023)
(Republished via Kaggle — CC0 Public Domain)
Dataset Size: 443 total SMEs
Features include:
A risk_score was computed and used to derive the binary risk label.
The model was trained using the Hugging Face Trainer API.
| Pred: Medium | Pred: High | |
|---|---|---|
| Actual Medium | 64 | 0 |
| Actual High | 0 | 3 |
The model performs strongly, though results reflect limited examples of high-risk SMEs.
from transformers import DistilBertForSequenceClassification, DistilBertTokenizerFast
import torch
model = DistilBertForSequenceClassification.from_pretrained("Harry1001/sme-risk-classifier-distilbert")
tokenizer = DistilBertTokenizerFast.from_pretrained("Harry1001/sme-risk-classifier-distilbert")
text = "Established_year: 3 | Sector: 4 | FL1: 3 | RA1: 4 | FA2: 2 | MD1: 3"
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
pred = torch.argmax(logits, dim=1).item()
id2label = {0: "Medium", 1: "High"}
print(id2label[pred])