πŸ“° DistilBERT AG News Classifier

This is a fine-tuned DistilBERT model for news article classification based on the AG News dataset.

It categorizes news articles into four categories:

  • 🌍 World
  • πŸ›οΈ Politics (also known as Business in AG News)
  • πŸ’» Tech
  • 🏈 Sports

🧠 Model Details

  • Base model: distilbert-base-uncased
  • Framework: PyTorch with Hugging Face Transformers
  • Trained on: AG News dataset
  • Use case: Classify news snippets or headlines into one of 4 classes

πŸ—ƒοΈ Dataset

AG News is a news classification dataset with 4 categories:

  1. World
  2. Sports
  3. Business
  4. Sci/Tech

Each sample consists of a title and description.

πŸ“₯ How to Use

With Transformers (Python):

from transformers import pipeline

classifier = pipeline("text-classification", model="sh1fu-0/distilbert-agnews-classifier")

result = classifier("NASA's new telescope discovers water vapor on a distant exoplanet.")
print(result)
Downloads last month
-
Safetensors
Model size
67M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support