File size: 1,626 Bytes
f07ab92
 
 
 
 
 
 
 
 
 
 
 
 
f306e9f
 
 
 
 
 
 
 
 
 
 
 
f07ab92
f306e9f
f07ab92
f306e9f
 
f07ab92
f306e9f
 
 
 
f07ab92
f306e9f
 
 
f07ab92
f306e9f
f07ab92
 
 
 
 
f306e9f
f07ab92
 
 
f306e9f
f07ab92
 
 
 
f306e9f
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
library_name: transformers
license: apache-2.0
base_model: bert-base-uncased
tags:
- generated_from_trainer
datasets:
- amazon-reviews-2023
model-index:
- name: book_reviews_model
  results: []
---

---
library_name: transformers
license: apache-2.0
base_model: bert-base-uncased
tags:
- generated_from_trainer
datasets:
- amazon-reviews-2023
model-index:
- name: book_reviews_model
  results: []
---

# Book Reviews Classification Model

## Model Description
This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the amazon-reviews-2023 dataset for classifying book reviews into star ratings (1-5).

## Model Details
- **Task**: Single-label Text Classification
- **Input**: Book review text
- **Output**: Star rating (1-5)

## Performance Metrics
- Accuracy: 0.7537
- Evaluation Loss: 0.7654

## Training Hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 3.0

## Framework Versions
- Transformers 4.46.2
- Pytorch 2.5.1+cu121
- Datasets 3.1.0
- Tokenizers 0.20.3

## Intended Uses
Classify book reviews into star ratings based on review content.

## Limitations
- Trained on Amazon book reviews dataset
- Performance may vary on out-of-domain text

## Inference Example
```python
from transformers import pipeline

classifier = pipeline("text-classification", model="your-username/book_reviews_model")
result = classifier("This book was an incredible read!")