
<!-- 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
{"license": "apache-2.0", "tags": ["generated_from_keras_callback"], "datasets": ["amazon_us_reviews"], "pipeline_tag": "text-generation", "model-index": [{"name": "praveenseb/product_review_generator", "results": []}]}
transformers tf gpt2 text-generation generated_from_keras_callback dataset:amazon_us_reviews license:apache-2.0 autotrain_compatible endpoints_compatible text-generation-inference region:us
TAGS
#transformers #tf #gpt2 #text-generation #generated_from_keras_callback #dataset-amazon_us_reviews #license-apache-2.0 #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 

praveenseb/product\_review\_generator
=====================================


This model is a fine-tuned version of distilgpt2 on a sample of 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.


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.


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



### Framework versions


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



### 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 ### Framework versions


* Transformers 4.27.3
* TensorFlow 2.11.0
* Datasets 2.10.1
* Tokenizers 0.13.2
TAGS
#transformers #tf #gpt2 #text-generation #generated_from_keras_callback #dataset-amazon_us_reviews #license-apache-2.0 #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
 ### 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 ### Framework versions


* Transformers 4.27.3
* TensorFlow 2.11.0
* Datasets 2.10.1
* Tokenizers 0.13.2
TAGS
#transformers #tf #gpt2 #text-generation #generated_from_keras_callback #dataset-amazon_us_reviews #license-apache-2.0 #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
### 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### Framework versions


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