Text Classification
Transformers
Safetensors
PyTorch
English
distilbert
intent-classification
customer-support
ecommerce
nlp
text-embeddings-inference
Run this model with HF Jobs
Run abdulmuinnn/supportpilot-distilbert on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/abdulmuinnn/supportpilot-distilbert. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/abdulmuinnn/supportpilot-distilbert on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use abdulmuinnn/supportpilot-distilbert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use abdulmuinnn/supportpilot-distilbert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="abdulmuinnn/supportpilot-distilbert")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("abdulmuinnn/supportpilot-distilbert") model = AutoModelForSequenceClassification.from_pretrained("abdulmuinnn/supportpilot-distilbert", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add model card and inference configuration
Browse filesFiles changed (4)
- README.mdAdded+279
- config.jsonAdded+124
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+15
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279---language:- enlibrary_name: transformerspipeline_tag: text-classificationbase_model: distilbert/distilbert-base-uncaseddatasets:- bitext/Bitext-retail-ecommerce-llm-chatbot-training-datasettags:- distilbert- text-classification- intent-classification- customer-support- ecommerce- nlp- pytorch- transformers---
# SupportPilot DistilBERT
SupportPilot DistilBERT is a fine-tuned DistilBERT model for **e-commerce customer support intent classification**.
The model predicts one of **46 customer-support intents** from an English-language support message.
It is the inference model used by the open-source **SupportPilot AI** portfolio project, which exposes the classifier through FastAPI, Streamlit, confidence-aware fallback logic, automated testing, CI, and Docker deployment.
## Model Description
- **Task:** Multi-class text classification- **Domain:** E-commerce customer support- **Language:** English- **Architecture:** DistilBERT- **Number of intents:** 46- **Framework:** PyTorch / Hugging Face Transformers- **Base model:** `distilbert/distilbert-base-uncased`
The model is designed to identify operational support intents such as order tracking, cancellation, refunds, payment issues, account support, delivery issues, product information, and returns.
## Intended Use
The model is intended for:
- customer-support intent routing- support ticket triage- chatbot intent detection- help-desk automation prototypes- NLP and ML engineering demonstrations
For production systems, predictions should be combined with confidence thresholds, fallback handling, monitoring, and human review for uncertain cases.
The SupportPilot AI application uses both prediction confidence and the margin between the top two predictions before accepting an intent.
## Example
Input:
```textWhere is my order?```
Example prediction from the released model:
```textIntent: track_orderConfidence: 99.8182%```
## Evaluation
Three model families were evaluated during development.
| Model | Validation Macro F1 ||---|---:|| Logistic Regression | 98.26% || Linear SVM | 98.74% || DistilBERT | **99.65%** |
The final DistilBERT model achieved the following results on the held-out test set:
| Metric | Result ||---|---:|| Test samples | 4,483 || Correct predictions | 4,471 || Accuracy | **99.73%** || Macro F1 | **99.73%** || Misclassified samples | 12 |
These results were measured on the project's held-out dataset and should **not** be interpreted as guaranteed performance on unseen real-world customer traffic.
## Usage
Install the required libraries:
```bashpip install torch transformers```
Load the model:
```pythonimport torchfrom transformers import AutoTokenizer, AutoModelForSequenceClassification
model_id = "abdulmuinnn/supportpilot-distilbert"
tokenizer = AutoTokenizer.from_pretrained(model_id)model = AutoModelForSequenceClassification.from_pretrained(model_id)
text = "Where is my order?"
inputs = tokenizer( text, return_tensors="pt", truncation=True, max_length=64,)
with torch.no_grad(): logits = model(**inputs).logits probabilities = torch.softmax(logits, dim=-1)
confidence, index = probabilities.max(dim=-1)
intent = model.config.id2label[index.item()]
print("Intent:", intent)print("Confidence:", confidence.item())```
## Intent Labels
The model contains 46 intent labels:
<details><summary>Show all intent labels</summary>
```textadd_productavailabilityavailability_in_storeavailability_onlinecancel_orderchange_accountchange_orderclose_accountcustomer_servicedamaged_deliverydelivery_issuedelivery_timeexchange_productexchange_product_in_storehuman_agentmissing_itemopen_accountorder_historypaypayment_issuepayment_methodsproduct_informationproduct_issuerecover_passwordrefund_policyrefund_statusremove_productrequest_invoicerequest_refundrequest_right_to_rectificationreturn_policyreturn_productreturn_product_in_storereturn_product_onlinesales_periodshipping_costsstore_locationstore_opening_hourssubmit_feedbacksubmit_product_feedbacksubmit_product_ideatechnical_issuetrack_deliverytrack_orderuse_appwrong_item```
</details>
## Confidence and Fallback Behavior
The model itself produces class probabilities.
The SupportPilot AI application adds a separate decision policy with default thresholds:
```textMinimum confidence: 0.70Minimum top-1 / top-2 margin: 0.10```
A prediction is accepted only when both thresholds are satisfied. Otherwise, the application routes the message to a fallback / human-review path.
This fallback behavior is implemented by the application layer rather than embedded directly in the model weights.
## Dataset
The model was fine-tuned using the Bitext Retail eCommerce customer-support dataset.
Dataset repository:
```textbitext/Bitext-retail-ecommerce-llm-chatbot-training-dataset```
The training pipeline used normalized duplicate handling and stratified train, validation, and test splits.
The dataset contains customer-support utterances covering 46 intents across multiple e-commerce support categories.
## Base Model
The model was fine-tuned from:
```textdistilbert/distilbert-base-uncased```
DistilBERT provides a smaller and faster Transformer architecture than the original BERT model while retaining strong text-classification performance.
## Limitations
This model should be treated as a domain-specific classifier rather than a general customer-support intelligence system.
Important limitations include:
- evaluation was performed on the project dataset rather than live production traffic- real customer messages may contain language patterns not represented in the training data- confidence scores are not guarantees of correctness- out-of-domain text may still receive a high-scoring class prediction- the model was designed for English-language support messages- production deployments should include monitoring, fallback behavior, human review, and periodic evaluation
## Model Artifact Integrity
SHA-256 of the released `model.safetensors` artifact:
```text66daf66ab6c5b55cc7d2dccf6b1dc69ef5f5512b513e4d77ab2476b15dc198dc```
This hash can be used to verify the exact model artifact used for this release.
## Source Project
The model is used by SupportPilot AI:
```texthttps://github.com/abdulmuinn/supportpilot-ai```
The application repository demonstrates:
```textDistilBERT inference→ confidence-aware decision policy→ FastAPI→ Streamlit→ automated testing→ CI→ Docker Compose```
## Licensing and Attribution
The application source code in the SupportPilot AI GitHub repository is released separately under the MIT License.
This model was fine-tuned from `distilbert/distilbert-base-uncased` and trained using the Bitext Retail eCommerce dataset.
The base model and dataset have their own licensing and usage terms. Users should review those upstream terms before redistributing or using the model in downstream applications.
No separate license is asserted here for the fine-tuned model weights beyond the applicable upstream terms.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124{
"activation": "gelu",
"architectures": [
"DistilBertForSequenceClassification"
],
"attention_dropout": 0.1,
"bos_token_id": null,
"dim": 768,
"dropout": 0.1,
"dtype": "float32",
"eos_token_id": null,
"hidden_dim": 3072,
"id2label": {
"0": "add_product",
"1": "availability",
"2": "availability_in_store",
"3": "availability_online",
"4": "cancel_order",
"5": "change_account",
"6": "change_order",
"7": "close_account",
"8": "customer_service",
"9": "damaged_delivery",
"10": "delivery_issue",
"11": "delivery_time",
"12": "exchange_product",
"13": "exchange_product_in_store",
"14": "human_agent",
"15": "missing_item",
"16": "open_account",
"17": "order_history",
"18": "pay",
"19": "payment_issue",
"20": "payment_methods",
"21": "product_information",
"22": "product_issue",
"23": "recover_password",
"24": "refund_policy",
"25": "refund_status",
"26": "remove_product",
"27": "request_invoice",
"28": "request_refund",
"29": "request_right_to_rectification",
"30": "return_policy",
"31": "return_product",
"32": "return_product_in_store",
"33": "return_product_online",
"34": "sales_period",
"35": "shipping_costs",
"36": "store_location",
"37": "store_opening_hours",
"38": "submit_feedback",
"39": "submit_product_feedback",
"40": "submit_product_idea",
"41": "technical_issue",
"42": "track_delivery",
"43": "track_order",
"44": "use_app",
"45": "wrong_item"
},
"initializer_range": 0.02,
"label2id": {
"add_product": 0,
"availability": 1,
"availability_in_store": 2,
"availability_online": 3,
"cancel_order": 4,
"change_account": 5,
"change_order": 6,
"close_account": 7,
"customer_service": 8,
"damaged_delivery": 9,
"delivery_issue": 10,
"delivery_time": 11,
"exchange_product": 12,
"exchange_product_in_store": 13,
"human_agent": 14,
"missing_item": 15,
"open_account": 16,
"order_history": 17,
"pay": 18,
"payment_issue": 19,
"payment_methods": 20,
"product_information": 21,
"product_issue": 22,
"recover_password": 23,
"refund_policy": 24,
"refund_status": 25,
"remove_product": 26,
"request_invoice": 27,
"request_refund": 28,
"request_right_to_rectification": 29,
"return_policy": 30,
"return_product": 31,
"return_product_in_store": 32,
"return_product_online": 33,
"sales_period": 34,
"shipping_costs": 35,
"store_location": 36,
"store_opening_hours": 37,
"submit_feedback": 38,
"submit_product_feedback": 39,
"submit_product_idea": 40,
"technical_issue": 41,
"track_delivery": 42,
"track_order": 43,
"use_app": 44,
"wrong_item": 45
},
"max_position_embeddings": 512,
"model_type": "distilbert",
"n_heads": 12,
"n_layers": 6,
"pad_token_id": 0,
"problem_type": "single_label_classification",
"qa_dropout": 0.1,
"seq_classif_dropout": 0.2,
"sinusoidal_pos_embds": false,
"tie_weights_": true,
"tie_word_embeddings": true,
"transformers_version": "5.15.0",
"use_cache": false,
"vocab_size": 30522
}123456789101112131415{
"backend": "tokenizers",
"cls_token": "[CLS]",
"do_lower_case": true,
"is_local": false,
"local_files_only": false,
"mask_token": "[MASK]",
"model_max_length": 512,
"pad_token": "[PAD]",
"sep_token": "[SEP]",
"strip_accents": null,
"tokenize_chinese_chars": true,
"tokenizer_class": "BertTokenizer",
"unk_token": "[UNK]"
}README.mdAdded+279
config.jsonAdded+124
tokenizer.jsonAdded
tokenizer_config.jsonAdded+15