Views
No views yet
bert-base-uncased model for binary sentiment classification on the IMDb movie reviews dataset.BERTForSequenceClassificationpositive or negative classification.1from transformers import pipeline
2
3classifier = pipeline("sentiment-analysis", model="ShubhamSwarnakar/bert-imdb-colab-model")
4classifier("This movie was surprisingly entertaining!")
5
6
7
8
9🧠 Training Details
10Training Data
11Dataset: IMDb Dataset
12
13Format: Binary sentiment (positive = 1, negative = 0)
14
15Training Procedure
16Preprocessing: Tokenized with BertTokenizerFast
17
18Epochs: 3
19
20Optimizer: AdamW
21
22Scheduler: Linear LR
23
24Batch size: 8
25
26Trained using Colab with limited GPU resources
27
28📊 Evaluation
29Metrics
30
31Final test accuracy: 93.47%
32
33Results Summary
34Epoch Validation Accuracy
351 91.80%
362 92.04%
373 92.92%
38
39Final test accuracy on held-out IMDb test split: 93.47%
40
41🌱 Environmental Impact
42Estimated based on lightweight training:
43
44Hardware Type: Google Colab GPU (T4)
45
46Training Duration: ~2 hours
47
48Cloud Provider: Google
49
50Region: Unknown
51
52Emissions Estimate: ~0.15 kg CO₂eq
53
54Estimate via ML CO2 Impact Calculator
55
56🏗️ Technical Specifications
57Architecture
58BERT-base (12-layer, 768-hidden, 12-heads, 110M parameters)
59
60Compute Infrastructure
61Hardware: Google Colab with GPU
62
63Software:
64
65Python 3.11
66
67Transformers 4.x
68
69Datasets
70
71PyTorch 2.x
72
73📚 Citation
74
75@misc{shubhamswarnakar_bert_imdb_2025,
76 author = {Shubham Swarnakar},
77 title = {BERT IMDb Sentiment Classifier},
78 year = 2025,
79 publisher = {Hugging Face},
80 howpublished = {\url{https://huggingface.co/ShubhamSwarnakar/bert-imdb-colab-model}},
81}
82
83🙋 More Info
84For questions or collaboration, contact @ShubhamSwarnakar.