Model Card for Model ID

This is a fine-tuned BERT-base-uncased model for sentiment analysis on Amazon reviews. The model classifies reviews as positive or negative based on their textual content. It was fine-tuned using 10,000 training samples and evaluated on 5,000 test samples from the Amazon Polarity dataset.

Model Details

Model Description

This is the model card for BERT-Amazon-Sentiment, a fine-tuned BERT-base-uncased model trained for binary sentiment classification on Amazon reviews. The model was fine-tuned using a subset of the Amazon Polarity dataset (10K training samples, 5K test samples) and can classify reviews as either positive or negative.

Developed by: Usman Ahmad

Funded by: Self-funded

Shared by: Usman Ahmad

Model type: Transformer-based BERT model for text classification

Language(s) (NLP): English

License: MIT License

Fine-tuned from model: bert-base-uncased

Model Sources [optional]

  • Repository: [More Information Needed]
  • Paper [optional]: [More Information Needed]
  • Demo [optional]: [More Information Needed]

Uses

Direct Use

This model can be used directly for sentiment analysis on English text, particularly for Amazon product reviews. It classifies text into positive or negative sentiment without any additional fine-tuning.

Downstream Use [optional]

[More Information Needed]

Out-of-Scope Use

This model is not suitable for:

Non-English text โ€“ It was trained only on English Amazon reviews. Neutral sentiment detection โ€“ The model only classifies reviews as positive or negative. Sarcasm and complex sentiment โ€“ May struggle with sarcastic or mixed-tone reviews. Legal or medical advice โ€“ Not designed for professional or sensitive domains. Hate speech detection โ€“ Not fine-tuned for offensive or harmful content moderation. Misuse of this model for tasks outside its intended scope may lead to inaccurate results.

[More Information Needed]

Bias, Risks, and Limitations

[More Information Needed]

Recommendations

Bias Awareness โ€“ The model is trained on Amazon reviews, so it may not generalize well to other platforms or domains. Domain Adaptation โ€“ Fine-tuning on domain-specific data (e.g., medical, legal) is recommended for better performance. Handling Sarcasm & Mixed Sentiment โ€“ Additional preprocessing or ensemble methods may be needed to improve detection. Use with Confidence Scores โ€“ Always consider model confidence scores to assess prediction reliability. Ethical Use โ€“ Avoid using the model for critical decisions without human oversight Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.

How to Get Started with the Model

Use the code below to get started with the model. from transformers import pipeline

Load the fine-tuned model from Hugging Face

sentiment_pipeline = pipeline("text-classification", model="Asteroid-Destroyer/bert-amazon-sentiment")

Example review

review = "The product quality is amazing, and I love using it!" result = sentiment_pipeline(review)

print(result)

Output: [{'label': 'POSITIVE', 'score': 0.98}]

Training Details

Training Data

The model was fine-tuned on a 10K subset of the Amazon Polarity dataset for training and a 5K subset for testing. The dataset consists of Amazon product reviews labeled as positive (1) or negative (0).

Dataset Source: Amazon Polarity https://huggingface.co/datasets/fancyzhx/amazon_polarity on Hugging Face Preprocessing:

Tokenized using BERT tokenizer (bert-base-uncased). Max sequence length: 512 (truncated if longer). Padding: Applied to match model input size.

Training Procedure

The model was fine-tuned using bert-base-uncased on a 10K subset of the Amazon Polarity dataset with the following setup:

Optimizer: AdamW Learning Rate Scheduler: Linear decay with warm-up Loss Function: CrossEntropyLoss Batch Size: 16 Max Sequence Length: 512 Epochs: 3 Hardware Used: Google Colab with T4 GPU

Preprocessing [optional]

[More Information Needed]

Training Hyperparameters

  • Training regime: [More Information Needed]

Speeds, Sizes, Times [optional]

[More Information Needed]

Evaluation

Testing Data, Factors & Metrics

Testing Data

[More Information Needed]

Factors

[More Information Needed]

Metrics

[More Information Needed]

Results

[More Information Needed]

Summary

Model Examination [optional]

[More Information Needed]

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: [More Information Needed]
  • Hours used: [More Information Needed]
  • Cloud Provider: [More Information Needed]
  • Compute Region: [More Information Needed]
  • Carbon Emitted: [More Information Needed]

Technical Specifications [optional]

Model Architecture and Objective

[More Information Needed]

Compute Infrastructure

[More Information Needed]

Hardware

[More Information Needed]

Software

[More Information Needed]

Citation [optional]

BibTeX:

[More Information Needed]

APA:

[More Information Needed]

Glossary [optional]

[More Information Needed]

More Information [optional]

[More Information Needed]

Model Card Authors [optional]

[More Information Needed]

Model Card Contact

[More Information Needed]

Downloads last month
12
Safetensors
Model size
0.1B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Paper for Asteroid-Destroyer/bert-amazon-sentiment