fancyzhx/ag_news
Viewer โข Updated โข 128k โข 124k โข 190
How to use starkdv123/agnews-distilbert-ft with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="starkdv123/agnews-distilbert-ft") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("starkdv123/agnews-distilbert-ft")
model = AutoModelForSequenceClassification.from_pretrained("starkdv123/agnews-distilbert-ft", device_map="auto")This repository contains a DistilBERT model fine-tuned on the AG News dataset.
| Model | Test Accuracy | Macro F1 |
|---|---|---|
| Full Fine-Tune | 0.9426 | 0.9427 |
World Sports Busines Sci/Tec
World 1797 13 42 48
Sports 10 1871 13 6
Busines 39 3 1692 166
Sci/Tec 26 8 62 1804
from transformers import pipeline
clf = pipeline("text-classification", model="starkdv123/agnews-distilbert-ft")
clf(["Markets tumble as central bank raises rates."])
distilbert-base-uncased Karan D Vasa โ https://huggingface.co/starkdv123