fancyzhx/ag_news
Viewer • Updated • 128k • 123k • 189
How to use genaibook/classifier-chapter4 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="genaibook/classifier-chapter4") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("genaibook/classifier-chapter4")
model = AutoModelForSequenceClassification.from_pretrained("genaibook/classifier-chapter4")# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("genaibook/classifier-chapter4")
model = AutoModelForSequenceClassification.from_pretrained("genaibook/classifier-chapter4")This model is a fine-tuned version of distilbert-base-uncased on the ag_news dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|---|---|---|---|---|---|
| No log | 1.0 | 313 | 0.2816 | 0.9046 | 0.9042 |
| 0.2967 | 2.0 | 626 | 0.2713 | 0.9130 | 0.9130 |
Base model
distilbert/distilbert-base-uncased
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="genaibook/classifier-chapter4")