/ Модель

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

Контекст
512 токенов
Параметры
137 млн
Лицензия
Apache 2.0
Архитектура
bert · dense
Базовая модель
bert-base-uncased
Библиотека
transformers
Опубликована
25 сен 2026

u2t01-bert-agnews

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

Дообученный BERT классифицирует короткие англоязычные новости по четырём темам: мир, спорт, бизнес и наука/технологии.

113скачиваний за 30 дней0лайковвеса обновлены25 сен 2026

Бенчмарки

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

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

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

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

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

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

Модель abelcetina/u2t01-bert-agnews — англоязычный классификатор коротких новостных текстов по четырём темам: World, Sports, Business и Sci/Tech. Её разработала команда U2T01 для университетского задания по адаптации BERT; модель получена полным дообучением google-bert/bert-base-uncased с линейной классификационной головой. Архитектура — BERT для классификации последовательностей, около 136,7 млн параметров по метаданным. Контекст BERT составляет 512 токенов, однако при обучении и применении вход обрезается до 128 токенов.

Модель предназначена для классификации коротких англоязычных заголовков и вводных абзацев новостей, а также для учебного воспроизведения сравнения методов адаптации BERT. На тестовом наборе AG News указаны accuracy и macro-F1 по 0,9293; обучение проводилось на подвыборке из 19 000 примеров и с одним seed, поэтому результат не следует считать оценкой устойчивости или качества на других доменах. Модель унаследовала смещения обучающих данных BERT и AG News; её не следует применять для решений, влияющих на людей. Репозиторий модели лицензирован по Apache-2.0, но README отдельно указывает, что условия использования исходного корпуса AG News ограничивают его некоммерческими исследовательскими целями; перед распространением следует проверить лицензию данных.

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

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

Ограничения

Модель обучена на подвыборке AG News и оценена на одном запуске; качество на других языках и доменах не проверялось. Вход обрезается до 128 токенов, а классификации может наследовать смещения обучающих данных; не предназначена для решений, влияющих на людей.

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

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

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

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

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

Открыть на Hugging Face

BERT adapted to topic classification (4 classes) — full fine-tuning

abelcetina/u2t01-bert-agnews — bert-base-uncased adapted to topic classification (4 classes) with full fine-tuning.

Produced for the university assignment U2T01: Adapting BERT for NLP tasks. The companion repository contains the training code, the raw results file behind every number below, and the comparison against the alternative adaptation methods.

Model description

  • Base encoder: bert-base-uncased (109,485,316 parameters in total).
  • Task: topic classification (4 classes).
  • Adaptation method: full fine-tuning. Every parameter of the encoder and of the task head received gradients, with a small learning rate on the body and a larger one on the randomly initialised head.
  • Head: a linear classification head over the pooled sentence representation.
  • Label set: 4 topics: World, Sports, Business, Sci/Tech
  • Trained by: U2T01 team · generated 2026-09-25.

Intended use

  • Research and teaching: reproducing the feature-based versus fine-tuning comparison of BERT section 5.3 across four task types.
  • Inference on English text that resembles the training domain (short English news headlines and lead sentences).
  • Usage:
from transformers import pipeline
clf = pipeline("text-classification", model="abelcetina/u2t01-bert-agnews")
print(clf("Stocks rallied as the central bank held rates steady."))

Out-of-scope use

  • Any decision affecting a person (hiring, moderation with consequences, credit, legal or medical decisions). This is a coursework model validated on one academic benchmark with a single seed.
  • Languages other than English, and domains far from short English news headlines and lead sentences — performance is not characterised there and is expected to drop.
  • Extracting facts about the world: for the QA model, the answer is a span copied from the context passage it is given, never knowledge the model holds.
  • Commercial redistribution without checking the training-data licence below.

Training data

DatasetAG News
Identifier used in codefancyzhx/ag_news
Licencethe Hub card carries the terms of the original AG news corpus used by Zhang, Zhao & LeCun (2015): free for non-commercial research use
Splitstrain 120,000 · test 7,600 (a subsample was used for training, see below)
Training examples actually used19,000
Evaluation split reported belowvalidation

Only a subsample of the training split was used, so absolute accuracy is below the published state of the art; the point of the experiment is the comparison between adaptation methods at a fixed data size.

Adaptation method and what was frozen

  • Method flag: --method full
  • Trainable components: the whole BERT encoder (embeddings + 12 layers) and the task head
  • Frozen components: nothing
ParametersValue
Total109,485,316
Trainable109,485,316
Trainable share100 %

Hyper-parameters

Hyper-parameterValue
Epochs2
Batch size32
Head learning rate0.001
Body learning rate0.00002
Weight decay0.01
Max sequence length128
Top layers unfrozenall 12 encoder layers (full fine-tuning)
Seed42

Evaluation results

Metrics computed by src/metrics.py; the raw values live in agnews__full__seed42.json.

Evaluation split (validation)

MetricValue
loss0.2608
accuracy0.9190
macro_f10.9194

Test split

MetricValue
loss0.2277
accuracy0.9293
macro_f10.9293

Headline number: accuracy = 0.919 (macro_f1 = 0.9194).

The comparison against the other adaptation methods of this task, with the gap in percentage points and the noise flag, is in report/results_tables.md of the companion code repository (Table 1, Table 2.agnews and Table 3). A gap below one point there is reported as noise, not as an improvement.

Limitations and bias

  • Dataset bias. AG News is a news-wire corpus: the four topics reflect an editorial taxonomy from the mid-2000s, and entities, events and phrasing are those of that period and of English-language news. The model inherits both that domain skew and the social biases of the bert-base-uncased pre-training corpus (BookCorpus and English Wikipedia), which is known to encode gender, ethnic and occupational stereotypes. Nothing here mitigates or measures them.
  • Single seed. Every number on this card comes from one run with seed 42. No variance estimate exists, so a difference of roughly one point against another configuration must be read as noise rather than as an improvement.
  • Subsampling. Training used 19,000 examples (hyperparams.train_size). Only a subsample of the training split was used, so absolute accuracy is below the published state of the art; the point of the experiment is the comparison between adaptation methods at a fixed data size.
  • Sequence truncation. Inputs were truncated to 128 tokens; longer inputs lose their tail at inference too.
  • Frozen-encoder caveat (feature-based models only). Not applicable: this model was fine-tuned, so the encoder weights moved.
  • Only a validation (and where available test) split was measured. No robustness, adversarial, out-of-domain or fairness evaluation was performed.

Environmental and compute footprint

Hardware1 × Tesla T4 (Google Colab), CUDA 12.8
Training wall time213.8 s (~3.6 min) over 1,188 steps
Seconds per step0.18
Peak GPU memory3104.5 MB
Softwaretransformers 5.16.1 · torch 2.11.0+cu128 · datasets 4.8.5
Run timestamp2026-09-25T07:05:06

A single short fine-tuning run on one T4 is a small footprint in absolute terms, and that is the point of this assignment: the cost-versus-quality table in the companion report shows how much of the quality survives when only a fraction of the parameters is trained, which is the part that scales. No CO₂e figure is claimed here, because the energy mix of the Colab region is unknown.

References and citation

  • Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. NAACL-HLT. arXiv:1810.04805. Section 5.3 is the feature-based versus fine-tuning comparison this model is part of.
  • Zhang, X., Zhao, J., & LeCun, Y. (2015). Character-level Convolutional Networks for Text Classification. NeurIPS. arXiv:1509.01626.
  • Tunstall, L., von Werra, L., & Wolf, T. (2022). Natural Language Processing with Transformers, chapters 1–3. O'Reilly.
  • Hugging Face, Fine-tuning a pretrained model: https://huggingface.co/docs/transformers/training
@inproceedings{devlin2019bert,
  title     = {BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding},
  author    = {Devlin, Jacob and Chang, Ming-Wei and Lee, Kenton and Toutanova, Kristina},
  booktitle = {Proceedings of NAACL-HLT},
  pages     = {4171--4186},
  year      = {2019},
  url       = {https://arxiv.org/abs/1810.04805}
}

Cite this adapted model as:

@misc{u2t01_agnews_full,
  title  = {BERT adapted to topic classification (4 classes) — full fine-tuning},
  author = {U2T01 team},
  year   = {2026},
  note   = {U2T01: Adapting BERT for NLP tasks. Adaptation method: full. Seed 42.},
  url    = {https://huggingface.co/abelcetina/u2t01-bert-agnews}
}

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
BertForSequenceClassification
Ревизия весов
0892704

0 моделей