Edit model card

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 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

from transformers import pipeline

classifier = pipeline("text-classification", model="your-username/book_reviews_model")
result = classifier("This book was an incredible read!")
Downloads last month
6
Safetensors
Model size
109M params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for Newvel/book_reviews_model_light

Finetuned
(2174)
this model