File size: 2,397 Bytes
77fef64 e3fdd24 77fef64 51942b2 a4b2537 51942b2 a4b2537 51942b2 a4b2537 51942b2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | ---
language: en
license: mit
library_name: transformers
tags:
- sentiment-analysis
- classification
- from-scratch
datasets:
- imdb
metrics:
- accuracy
model-index:
- name: CritiqueCore-v1
results:
- task:
type: text-classification
name: Sentiment Analysis
dataset:
name: imdb
type: imdb
metrics:
- type: accuracy
value: 0.9
pipeline_tag: text-classification
---
# CritiqueCore v1
CritiqueCore v1 is a compact Transformer model trained **from scratch** for sentiment analysis. Unlike models that use transfer learning, this model was initialized with random weights and learned the nuances of language (including sarcasm and basic cross-lingual sentiment) exclusively from the IMDb movie reviews dataset.
## Model Description
- **Architecture:** Custom Mini-Transformer (DistilBERT-based configuration)
- **Parameters:** ~9.06 Million
- **Layers:** 2
- **Attention Heads:** 4
- **Hidden Dimension:** 256
- **Training Data:** IMDb Movie Reviews (25,000 samples)
- **Training Duration:** ~10 minutes on NVIDIA T4 GPU
## Capabilities
- **Sentiment Detection:** Strong performance on positive/negative English text.
- **Sarcasm Awareness:** Recognizes negative intent even when positive words are used (e.g., "CGI vomit").
- **Robustness:** Handles minor typos and maintains high confidence on structured feedback.
## Limitations
- **Domain Specificity:** Optimized for reviews. May struggle with complex multi-turn dialogues.
- **Multilingual:** While it shows some intuition for German, it was not explicitly trained on non-English data.
## How to use (Inference Script)
First, you have to download `CritiqueCore_v1_Model.zip` and unpack it. Then, you can use `inference.py` from this repos' files list. Have fun :D
## Examples
### Example 1: Standard movie review
**Input:**
```plaintext
This movie was an absolute masterpiece! The acting was incredible and I loved every second.
```
**Output:** POSITIVE (99.03% confidence)
### Example 2: Sarcasm
**Input:**
```plaintext
Oh great, another superhero movie. Just what the world needed. I loved sitting through 3 hours of CGI vomit.
```
**Output:** NEGATIVE (93.81% confidence)
### Example 3: Negative question
**Input:**
```plaintext
Why did they even produce it?
```
**Output:** NEGATIVE (99.37% confidence)
## Training code
The full training code can be found in this repo as `train.ipynb`. |