File size: 2,182 Bytes
af534f1
 
d47afd7
 
 
 
 
 
 
 
 
 
 
af534f1
 
d47afd7
af534f1
d47afd7
 
 
 
 
 
 
 
 
af534f1
 
d47afd7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
library_name: peft
license: apache-2.0
language:
- en
metrics:
- accuracy
pipeline_tag: text-classification
tags:
- opensource
- finetunning
- llm
- sentiment-analysis
---

## Model Description

This repository contains a fine-tuned sentiment analysis model based on the `distilbert-base-uncased` architecture, trained on the "shawhin/imdb-truncated" dataset. The model is designed for text classification tasks in the English language.

## Model Performance

The model's performance is evaluated based on accuracy, a common metric for text classification tasks. The specific performance metrics may vary depending on the use case and dataset.

## Training Procedure

### Framework Versions

- PEFT 0.5.0

### Dataset

The model is trained on the "shawhin/imdb-truncated" dataset, which is a truncated version of the IMDb movie review dataset. It contains labeled movie reviews with binary sentiment labels (positive or negative).

## Fine-Tuning Details

The model is fine-tuned using the `distilbert-base-uncased` architecture, a smaller and faster version of BERT, well-suited for various NLP tasks.

## How to Use

You can use this fine-tuned sentiment analysis model for various text classification tasks, including sentiment analysis, text categorization, and more. To use the model, you can easily load it with the Hugging Face Transformers library and integrate it into your Python applications.

Here's an example of how to load and use the model:

```python
from transformers import AutoModelForSequenceClassification, AutoTokenizer

# Load the fine-tuned model
model = AutoModelForSequenceClassification.from_pretrained("samadpls/sentiment-analysis")

# Load the tokenizer
tokenizer = AutoTokenizer.from_pretrained("your-model-name")

# Perform inference
text = "This is a great movie!"
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
predicted_label = outputs.logits.argmax().item()

# Print the predicted sentiment label
print("Predicted Sentiment: Positive" if predicted_label == 1 else "Predicted Sentiment: Negative")
```
# License
This model is distributed under the Apache License 2.0. For more details, see the [LICENSE](LICENSE) file.