cassieli226/cities-text-dataset
Viewer • Updated • 1.1k • 5
How to use aslan-ng/finetuned_model with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="aslan-ng/finetuned_model") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("aslan-ng/finetuned_model")
model = AutoModelForSequenceClassification.from_pretrained("aslan-ng/finetuned_model")This model is a fine-tuned version of distilbert-base-uncased on the None dataset. It achieves the following results on the evaluation set:
It is a finetuned model for binary classification of description of city. It will result in either Pittsburgh or Shanghai.
This is for education and demonstration purposes.
The data for finetuning the model comes from this HF dataset: cassieli226/cities-text-dataset
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
|---|---|---|---|---|---|---|---|
| 0.1213 | 1.0 | 80 | 0.0831 | 0.975 | 0.9750 | 0.9762 | 0.975 |
| 0.006 | 2.0 | 160 | 0.0034 | 1.0 | 1.0 | 1.0 | 1.0 |
| 0.002 | 3.0 | 240 | 0.0017 | 1.0 | 1.0 | 1.0 | 1.0 |
| 0.0016 | 4.0 | 320 | 0.0016 | 1.0 | 1.0 | 1.0 | 1.0 |
| 0.0014 | 5.0 | 400 | 0.0012 | 1.0 | 1.0 | 1.0 | 1.0 |
Base model
distilbert/distilbert-base-uncased