Full fine-tuning of bert-base-uncased for 4-class news topic classification, delivered as part of assignment U2T01 (Adapting BERT for NLP tasks — Trends in Data Science, Unit 2, Universidad Politécnica de Yucatán). bert-base-uncased with a linear classification head on top of the [CLS] token's last hidden state, mapping to 4 topic classes: World, Sports, Business, Sci/Tech. - 10% of the official train split was held out as validation; the official test split was left untouched. - 4 balanced classes. Two adaptation methods were trained and compared; full fine-tuning is the delivered model, since it beat the feature-based baseline by a margin well above the run-to-run noise floor (±1–3 points…
Open-weight model · Text classification
topic-classification-bert
by KC karencardiel/topic-classification-bert
topic-classification-bert is an open-weight model for text classification from KC. It has 109M parameters and a 512-token context. At 16-bit it needs about 0.3 GB of GPU memory, which fits on 1x MI300X from $1.85 an hour, at the lowest prices in the SAVRN Index.
This model was fine-tuned on the AG News dataset (fancyzhx/agnews) for four-class news topic classification: The dataset was divided into 108,000 training examples, 12,000 validation examples, and 7,600 test examples. A random seed of 42 was used.
Runs On
What it takes to serve topic-classification-bert (109M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.
| Precision | Weights | Memory needed | Cheapest setup | Per hour | Also fits |
|---|---|---|---|---|---|
| 16-bit | 0.2 GB | 0.3 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 8-bit | 0.1 GB | 0.1 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 4-bit | 0.1 GB | 0.1 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Oct 9, 2026.
topic-classification-bert on every accelerator the SAVRN Index prices, at every precision
Model Card
This model was fine-tuned on the AG News dataset (fancyzhx/agnews) for four-class news topic classification: The dataset was divided into 108,000 training examples, 12,000 validation examples, and 7,600 test examples. A random seed of 42 was used. This model is intended for English news topic classification into the four AG News categories: World, Sports, Business, and Sci/Tech. It was developed for educational purposes and experimentation with BERT adaptation methods. The model is trained on English news data and may not generalize well to other domains or languages. It only supports the four categories present in AG News. Performance on real-world data may differ from the reported…
Excerpt from the card by KC.
Configuration
- Architecture
- BertForSequenceClassification
- Context length (tokens)
- 512
- Layers
- 12
- Hidden size
- 768
- Feed-forward size
- 3,072
- Attention heads
- 12
- Vocabulary size
- 30,522
- Model type
- bert
Identity and Version
- Repository
- karencardiel/topic-classification-bert
- Publisher
- KC
- Task
- Text classification
- Modality
- Text
- Library
- transformers
- Parameters
- 109M parameters
- Languages
- en
- Revision
- ed0488e43b29bfa1b6fffd6c6b0986f15db5026b
- First published
- 2026-09-25
- Last updated
- 2026-09-25
Files and Weights
7 files, 438.7 MB in total. The weights are 2 files totalling 438.0 MB in bin, safetensors.
Every file
| File | Type | Size | SHA-256 |
|---|---|---|---|
| model.safetensors | Weights | 438.0 MB | b328bb829053 |
| training_args.bin | Weights | 5.2 KB | c0f31705d0d4 |
| config.json | Configuration | 1.0 KB | — |
| README.md | Documentation | 2.5 KB | — |
| .gitattributes | Repository | 1.5 KB | — |
| tokenizer.json | Tokenizer | 711.5 KB | — |
| tokenizer_config.json | Tokenizer | 322 B | — |
License and Download
- License
- Not stated by the source
- Access
- Open weights, no gate
- Download size
- 438.0 MB
Released by KC through its official repository on Hugging Face.
Built From
- Derived from google-bert/bert-base-uncased
- Described by arXiv:1509.01626
- Described by arXiv:1810.04805
- Trained on (disclosed) fancyzhx/ag_news
Memory Requirements
| Precision | Weights in memory |
|---|---|
| As published | 438.0 MB |
| 16-bit | 0.2 GB |
| 8-bit | 0.1 GB |
| 4-bit | 0.1 GB |
Weights only, from the published parameter count; the key-value cache and runtime add to this.
Questions About topic-classification-bert
How much GPU memory does topic-classification-bert need?
About 0.3 GB at 16-bit and 0.1 GB at 4-bit: the weights (109M parameters) plus a working margin. A long context needs more.
What is the cheapest GPU to run topic-classification-bert on?
At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.
What is topic-classification-bert's context length?
512 tokens, from the maximum position embeddings in its published configuration.
Similar Models
This model is a fine-tuned version of bert-base-uncased on an unknown dataset. It achieves the following results on the evaluation set: The following hyperparameters were used during training: - learningrate: 5e-05 - trainbatchsize: 32 - evalbatchsize: 64 - lrschedulertype: linear - numepochs: 2 - Transformers 5.16.1 - Pytorch 2.11.0+cu128 - Datasets 4.8.5 - Tokenizers 0.23.1
This is the model card of a transformers model that has been pushed on the Hub. Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. Use the code below to get started with the model. Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
libraryname: transformers - autotrain - text-classification basemodel: google-bert/bert-base-uncased f1macro: 0.7533020080884588 f1micro: 0.7533333333333333 f1weighted: 0.7533020080884587 precisionmacro: 0.7551310982162045 precisionmicro: 0.7533333333333333 precisionweighted: 0.7551310982162046 recallmacro: 0.7533333333333333 recallmicro: 0.7533333333333333 recallweighted: 0.7533333333333333
1. bert-log-anomaly-detection is a BERT-based NLP model fine-tuned for single SQL transaction log anomaly detection. 2. The model classifies each database transaction log as either Normal or Anomaly, with the goal of supporting AI-powered fraud detection and cybersecurity monitoring systems. 3. This model was developed as part of the Samsung × KBTG Digital Fraud Cybersecurity Hackathon (Thailand) under the AI-Powered Fraud Detection & Prevention track. This model analyzes individual SQL database transaction logs and detects abnormal patterns that may indicate fraudulent, malicious, or suspicious behavior. - Developed by Waris Sripatoomrak, this model integrates with an n8n workflow to…
This model is a fine-tuned version of google/electra-base-discriminator on an unknown dataset. It achieves the following results on the evaluation set: The following hyperparameters were used during training: - learningrate: 2e-05 - trainbatchsize: 8 - evalbatchsize: 8 - gradientaccumulationsteps: 2 - totaltrainbatchsize: 16 - lrschedulertype: linear - lrschedulerwarmupsteps: 50 - numepochs: 10 - Transformers 5.2.0 - Pytorch 2.10.0+cu128 - Datasets 4.5.0 - Tokenizers 0.22.2