Downloads · 30 days
4
8% of all-time downloads
jongador/bert-imdb-256
bert-imdb-256 is a text classification model from jongador. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
⚠️ DEPRECATED — kept for legacy compatibility. This model was trained with maxseqlength=256 on a constrained-VRAM laptop GPU as a preliminary step. For new work, use jongador/bert-imdb-512, which covers ~95–98% of IMD…
Downloads · 30 days
4
8% of all-time downloads
All-time downloads
48
Public
Parameters
109M
438 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
⚠️ DEPRECATED — kept for legacy compatibility. This model was trained with
max_seq_length=256on a constrained-VRAM laptop GPU as a preliminary step. For new work, usejongador/bert-imdb-512, which covers ~95–98% of IMDB reviews (vs. ~85–90%) and achieves higher accuracy (94.14% vs. 92.20%).
bert-base-uncased fine-tuned on the IMDB sentiment classification dataset with max_seq_length=256. Trained as a victim model for adversarial NLP research (TextBugger / TextFooler / DeepWordBug-style attacks).
bert-base-uncased (12 layers, 768 hidden, 12 heads, ~110M parameters)Trained from bert-base-uncased on the IMDB train split (25,000 examples) using TextAttack 0.3.x.
| Hyperparameter | Value |
|---|---|
| Epochs | 5 |
| Per-device batch size | 2 |
| Gradient accumulation | 8 (effective batch 16) |
| Learning rate | 2e-5 |
| Weight decay | 0.01 |
| Warmup steps | 500 |
| Random seed | 786 |
| Hardware | NVIDIA RTX 3050 Laptop (4 GB VRAM) |
The aggressive gradient accumulation (batch 2 × accum 8) was a workaround for the 4 GB VRAM ceiling on the laptop GPU used for this preliminary run. The newer jongador/bert-imdb-512 variant uses batch 8 × accum 2 on a cluster RTX 3090 (24 GB).
Best epoch checkpoint on the IMDB test split (25,000 examples):
| Metric | Value |
|---|---|
| Accuracy | 92.20% |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("jongador/bert-imdb-256")
model = AutoModelForSequenceClassification.from_pretrained("jongador/bert-imdb-256")
MIT