Downloads · 30 days
9
9% of all-time downloads
kaitongg/2025-24679-text-distilbert-predictor
2025-24679-text-distilbert-predictor is a text classification model from kaitongg. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This is a text classification model fine-tuned on a dataset containing text examples related to 'Pittsburgh' and 'Shanghai'. The model is based on the DistilBERT architecture and is designed to classify text into one…
Downloads · 30 days
9
9% of all-time downloads
All-time downloads
105
Public
Parameters
67M
2.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
This is a text classification model fine-tuned on a dataset containing text examples related to 'Pittsburgh' and 'Shanghai'. The model is based on the DistilBERT architecture and is designed to classify text into one of these two categories.
The model was trained using a dataset sourced from the Hugging Face Hub: cassieli226/cities-text-dataset.
This dataset contains two splits:
original: 100 examples used for external validation.augmented: 1000 examples used for training, validation, and testing.The dataset consists of text samples with corresponding labels indicating whether the text is related to 'Pittsburgh' or 'Shanghai'.
The text data was preprocessed using the distilbert-base-uncased tokenizer. The preprocessing steps included:
DataCollatorWithPadding.The model was fine-tuned using the Trainer API from the Hugging Face transformers library.
distilbert-base-uncasedaugmented dataset (640 examples).augmented dataset (160 examples), used for evaluation during training.epochepochAutoModelForSequenceClassification)The model was evaluated on the augmented test set and the original external validation set using the following metrics:
The model's performance was evaluated on both the augmented test set and the original external validation set.
| Dataset | Accuracy | Weighted F1 |
|---|---|---|
| Augmented Test Set | 1.0000 | 1.0000 |
| Original Validation Set | 1.0000 | 1.0000 |

A confusion matrix for the external validation set is also available in the notebook to visualize per-class performance.
It is important to use this model responsibly and be aware of its limitations.
The model is licensed under the Apache 2.0 License, which is the default license for models uploaded to the Hugging Face Hub. Please refer to the license file in the repository for full details.
The model was trained on a system with a GPU (indicated by Using device: cuda in the training output). The specific hardware details (e.g., GPU type, memory) are not explicitly logged in the notebook output but were sufficient for training the DistilBERT model on the provided dataset.
This model was developed and trained using publicly available datasets and open-source libraries, including Hugging Face transformers, datasets, scikit-learn, and matplotlib. The training process involved standard deep learning techniques and practices. The notebook was executed within the Google Colab environment.