File size: 2,309 Bytes
e8dce21
 
 
 
 
 
 
4b11f03
 
 
e8dce21
 
 
 
 
 
 
4b11f03
e8dce21
 
 
4b11f03
e8dce21
4b11f03
67667e2
e8dce21
4b11f03
e8dce21
4b11f03
 
e8dce21
 
 
67667e2
4b11f03
e8dce21
 
 
 
 
 
 
 
 
 
 
d4fae90
e8dce21
 
 
 
 
 
 
4b11f03
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
---
license: apache-2.0
tags:
- generated_from_keras_callback
model-index:
- name: praveenseb/product_review_generator
  results: []
datasets:
- amazon_us_reviews
pipeline_tag: text-generation
---

<!-- This model card has been generated automatically according to the information Keras had access to. You should
probably proofread and complete it, then remove this comment. -->

# praveenseb/product_review_generator

This model is a fine-tuned version of [distilgpt2](https://huggingface.co/distilgpt2) on a sample of [amazon_us_reviews](https://huggingface.co/datasets/amazon_us_reviews) dataset. The sample was drawn from 'Apparel_v1_00' subset.

## Model description

This model can auto generate review text for apparel products on providing product title, review rating (1-5) and review headline as an input prompt.

The input prompt should be in the format <|BOS|>product_title<|SEP|>product_rating<|SEP|>review_title<|SEP|>. For example,
<|BOS|>Columbia Women's Benton Springs Full-Zip Fleece Jacket<|SEP|>5<|SEP|>Awesome jacket!<|SEP|>. You can find the complete code in my [GitHub repository](https://github.com/praveenseb/product-review-generator).

## Intended uses & limitations

This model is only intended to demonstrate the text generation capabilities of transformer-based models. Do not use it commercially or for any real-life purpose .
The model is trained specifically on 'Apparel_v1_00' dataset. So, using non-apparel product titles in the input prompt may yield  inconsistent results. 

## Training procedure

Code used for training can found in my [GitHub repository](https://github.com/praveenseb/product-review-generator).

### Training hyperparameters

The following hyperparameters were used during training:
- optimizer: {'name': 'AdamWeightDecay', 'learning_rate': {'class_name': 'ExponentialDecay', 'config': {'initial_learning_rate': 0.0002, 'decay_steps': 1000, 'decay_rate': 0.95, 'staircase': True, 'name': None}}, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False, 'weight_decay_rate': 0.0}
- training_precision: float32

### Training results

| Train Loss | Epoch |
|:----------:|:-----:|
| 0.7579     | 0     |
| 0.6720     | 1     |


### Framework versions

- Transformers 4.27.3
- TensorFlow 2.11.0
- Datasets 2.10.1
- Tokenizers 0.13.2