rhdang commited on
Commit
38b8857
·
verified ·
1 Parent(s): 6d2c94f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +18 -11
README.md CHANGED
@@ -10,24 +10,31 @@ tags:
10
  - bert
11
  ---
12
 
13
- Model Description
14
 
15
- This model predicts the star rating (1-5) of a Yelp review based on its text content. It was trained using GPT-2 and BERT, with BERT achieving the best performance at 75% validation accuracy. The model addresses class imbalance using weighted loss and optimizes hyperparameters to enhance generalization.
16
 
17
- Training Details
18
 
19
- Dataset: Yelp Reviews dataset (100,000 samples used)
20
 
21
- Preprocessing:
22
 
23
- GPT-2 Tokenizer with Byte-Pair Encoding (BPE) for rare words
 
24
 
25
- Truncation (128 tokens) and padding for uniform input size
26
 
27
- Models Trained:
28
 
29
- GPT-2: Fine-tuned with a custom classification head, achieving 67% validation accuracy
30
 
31
- BERT: Fine-tuned with bidirectional attention, achieving 75% validation accuracy
32
 
33
- Loss Function: Weighted Cross-Entropy Loss to counteract class imbalance
 
 
 
 
 
 
 
10
  - bert
11
  ---
12
 
13
+ # **Model Description**
14
 
15
+ This model predicts the star rating (1 - 5) of a Yelp review based on its text content. It was trained using **GPT-2** and **BERT**, with **BERT** achieving the best performance at **75%** validation accuracy. The model addresses class imbalance using weighted loss and optimizes hyperparameters to enhance generalization.
16
 
17
+ # **Training Details**
18
 
19
+ - **Dataset**: Yelp Reviews dataset (100,000 samples used)
20
 
21
+ - **Preprocessing**:
22
 
23
+ - **GPT-2 Tokenizer** with **Byte-Pair Encoding (BPE)** for rare words
24
+ - Truncation (128 tokens) and padding for uniform input size
25
 
26
+ - **Models Trained**:
27
 
28
+ - **GPT-2**: Fine-tuned with a custom classification head, achieving **67% validation accuracy**
29
 
30
+ - **BERT**: Fine-tuned with bidirectional attention, achieving **75% validation accuracy**
31
 
32
+ - **Loss Function**: Weighted **Cross-Entropy Loss** to counteract class imbalance
33
 
34
+ # **Limitations**
35
+
36
+ - Performance may degrade on **highly informal or extremely short reviews**
37
+
38
+ - **Class imbalance** still affects predictions for underrepresented ratings
39
+
40
+ - Model was trained on **English-language** reviews only