kurcontko's picture
Update README.md
28b78c8 verified
metadata
language: en
license: apache-2.0
tags:
  - text-classification
  - news
  - bert
  - modernbert
  - transformers
  - supervised
datasets:
  - heegyu/news-category-dataset
metrics:
  - accuracy
  - f1
model-index:
  - name: ModernBERT News Classifier
    results:
      - task:
          name: Text Classification
          type: text-classification
        dataset:
          name: HuffPost News Category
          type: heegyu/news-category-dataset
        metrics:
          - name: Accuracy
            type: accuracy
            value: 0.72
          - name: Macro F1
            type: f1
            value: 0.63
base_model:
  - answerdotai/ModernBERT-large

ModernBERT — News Classifier

Fine-tuned ModernBERT for classifying news text into multiple categories.

  • Base model: answerdotai/ModernBERT-large
  • Task: Text classification
  • Dataset: HuffPost News Category
  • Input: headline + short description
  • Output: predicted category (top-k supported)

Usage

from transformers import pipeline

classifier = pipeline(
    "text-classification",
    model="kurcontko/modernbert-news-classifier",
    top_k=3
)

print(classifier("Apple unveils new AI models on latest iPhone"))

Evaluation

Metric Score
Accuracy 0.72
Macro F1 0.63

Evaluated on the validation split of the HuffPost News Category dataset.

Training

Max sequence length: 512
Batch size: 32
Epochs: 3 Early stopping enabled

Input was constructed as headline + short_description.