/ Модель

Характеристики

Контекст
512 токенов
Параметры
212 млн
Лицензия
MIT
Архитектура
deberta-v2 · dense
Базовая модель
deberta-v3-base
Опубликована
14 сен 2026

ag-news-classifier

Классификация текстаТекст → label3 профессии

Англоязычная модель на DeBERTa-v3-base для распределения коротких новостных текстов по категориям «Спорт», «Бизнес» и «Наука и технологии».

302скачиваний за 30 дней5лайковвеса обновлены16 сен 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Bubunur/ag-news-classifier — англоязычный классификатор новостных текстов, созданный дообучением DeBERTa-v3-base. Модель содержит 211,6 млн параметров, использует архитектуру DeBERTa-v2 для классификации последовательностей и принимает текст длиной до 512 токенов.

Она относит новость к одной из трёх категорий: Sports, Business или Sci/Tech. Это вариант AG News без категории World; метки перенумерованы в 0–2. На тестовой выборке из 5 700 примеров AG News без World указаны accuracy 0,9574 и macro F1 0,9573.

Модель предназначена для категоризации коротких англоязычных новостных заголовков и описаний. Её качество на социальных сетях, длинных статьях, текстах вне новостной тематики и других языках не проверялось; данные обучения относятся к новостным материалам начала 2000-х. Аудит смещений не проводился. Лицензия — MIT.

Сценарии применения

  • автоматическая категоризация англоязычных новостных заголовков
  • разметка коротких описаний новостей по темам спорта, бизнеса и науки с технологиями
  • фильтрация новостной ленты по трём тематическим категориям

Ограничения

Модель обучалась на англоязычных данных AG News начала 2000-х без категории World; качество на других источниках, длинных текстах, социальных сетях и иных языках не проверено и может быть ниже. Аудит смещений не проводился.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

ag-news-classifier

A DeBERTa-v3-base model fine-tuned to classify English news text into three topics: Sports, Business, and Sci/Tech.

This is a 3-class model, not the standard 4-class AG News setup. The World category was removed from both the training and evaluation splits, and the remaining labels were remapped to 0, 1, 2.

Labels

idlabel
0Sports
1Business
2Sci/Tech

Usage

from transformers import pipeline

clf = pipeline("text-classification", model="Bubunur/ag-news-classifier")
clf("The stock market rallied after the central bank's decision")

Or directly:

import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification

model_id = "Bubunur/ag-news-classifier"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id).eval()

labels = ["Sports", "Business", "Sci/Tech"]
text = "Researchers unveiled a chip that runs models on-device"

inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=128)
with torch.no_grad():
    probs = model(**inputs).logits.softmax(-1)[0]

print(labels[probs.argmax()], probs.max().item())

Training data

AG News, filtered to remove the World class.

splitexamples
train90,000
test5,700

Classes are perfectly balanced: 30,000 training and 1,900 test examples each. Each example is a news title concatenated with a short description. Texts are short — truncation at 128 tokens affects almost no examples.

Training procedure

Fine-tuned from microsoft/deberta-v3-base using the HuggingFace Trainer.

hyperparametervalue
epochs3
batch size16
learning rate2e-5
optimizerAdamW
weight decay0.01
LR schedulelinear with 6% warmup
max sequence length128 (dynamic padding)
precisionfp16 mixed precision
seed42
hardwaresingle GPU (Google Colab)
wall-clock time~50 min

Per-epoch results:

epochtraining lossvalidation lossaccuracymacro F1
10.14390.14290.95420.9542
20.16450.14050.95630.9563
30.10450.17450.95740.9573

The epoch-3 checkpoint was selected on accuracy. Note that validation loss rose sharply at epoch 3 while accuracy continued to climb — a typical sign that the model is becoming overconfident on examples it already gets right. The accuracy gain over epoch 2 (+0.11 pp) is small enough to fall within run-to-run noise.

Implementation note: microsoft/deberta-v3-base ships fp16 weights. Loading it without forcing dtype=torch.float32 raises ValueError: Attempting to unscale FP16 gradients when fp16=True is enabled.

Evaluation

Measured on the 5,700-example AG News test split (World removed).

metricvalue
accuracy0.9574
macro F10.9573

Because the classes are perfectly balanced, accuracy and macro F1 coincide.

An earlier run of the same architecture under a slightly different configuration reached 0.9560 accuracy, with this per-class breakdown:

classprecisionrecallF1support
Sports0.990.990.991900
Business0.950.920.941900
Sci/Tech0.930.950.941900
              Sports  Business  Sci/Tech
Sports          1888        6        6
Business          11     1752      137
Sci/Tech          12       79     1809

The overall shape is expected to hold for the current checkpoint, but these per-class figures come from the earlier run and have not been recomputed.

Domain and period. AG News was collected from news wires in the early 2000s. Performance on social media text, long-form articles, non-news prose, or non-English text is untested and expected to be worse. Terminology that emerged after the collection period was never seen during training. The model has not been evaluated on any corpus other than AG News, so its ability to generalize to other news sources is unknown.

Inherited bias. Any bias present in microsoft/deberta-v3-base or in the AG News corpus carries over. No bias audit was performed.

Citation

@misc{zhang2015character,
  title={Character-level Convolutional Networks for Text Classification},
  author={Xiang Zhang and Junbo Zhao and Yann LeCun},
  year={2015},
  eprint={1509.01626},
  archivePrefix={arXiv}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · text-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
DebertaV2ForSequenceClassification
Ревизия весов
0e654f9

0 моделей