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

# suarkadipa/GPT-2-finetuned-papers

This model is a fine-tuned version of [distilgpt2](https://huggingface.co/distilgpt2) on an CShorten/ML-ArXiv-Papers dataset. Based on https://python.plainenglish.io/i-fine-tuned-gpt-2-on-100k-scientific-papers-heres-the-result-903f0784fe65
It achieves the following results on the evaluation set:
- Train Loss: 2.4225
- Validation Loss: 2.2164
- Epoch: 0

## Model description

More information needed

## Intended uses & limitations

# How to run in Google Colab

```python
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer_fromhub = AutoTokenizer.from_pretrained("suarkadipa/GPT-2-finetuned-papers")
model_fromhub = AutoModelForCausalLM.from_pretrained("suarkadipa/GPT-2-finetuned-papers", from_tf=True)

text_generator = pipeline(
    "text-generation",
    model=model_fromhub,
    tokenizer=tokenizer_fromhub,
    framework="tf",
    max_new_tokens=3000
)

// change with your text
test_sentence = "the role of recommender systems"
res=text_generator(test_sentence)[0]["generated_text"].replace("\n", " ")
res
```

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

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

### Training results

| Train Loss | Validation Loss | Epoch |
|:----------:|:---------------:|:-----:|
| 2.4225     | 2.2164          | 0     |


### Framework versions

- Transformers 4.28.1
- TensorFlow 2.12.0
- Datasets 2.11.0
- Tokenizers 0.13.3
{"license": "apache-2.0", "tags": ["generated_from_keras_callback"], "datasets": ["CShorten/ML-ArXiv-Papers"], "model-index": [{"name": "suarkadipa/GPT-2-finetuned-papers", "results": []}]}
transformers tf gpt2 text-generation generated_from_keras_callback dataset:CShorten/ML-ArXiv-Papers license:apache-2.0 autotrain_compatible endpoints_compatible text-generation-inference region:us
TAGS
#transformers #tf #gpt2 #text-generation #generated_from_keras_callback #dataset-CShorten/ML-ArXiv-Papers #license-apache-2.0 #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 

suarkadipa/GPT-2-finetuned-papers
=================================


This model is a fine-tuned version of distilgpt2 on an CShorten/ML-ArXiv-Papers dataset. Based on URL
It achieves the following results on the evaluation set:


* Train Loss: 2.4225
* Validation Loss: 2.2164
* Epoch: 0


Model description
-----------------


More information needed


Intended uses & limitations
---------------------------


How to run in Google Colab
==========================


Training and evaluation data
----------------------------


More information needed


Training procedure
------------------


### Training hyperparameters


The following hyperparameters were used during training:


* optimizer: {'name': 'AdamWeightDecay', 'learning\_rate': {'class\_name': 'ExponentialDecay', 'config': {'initial\_learning\_rate': 0.0005, 'decay\_steps': 500, 'decay\_rate': 0.95, 'staircase': False, 'name': None}}, 'decay': 0.0, 'beta\_1': 0.9, 'beta\_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False, 'weight\_decay\_rate': 0.01}
* training\_precision: float32


### Training results



### Framework versions


* Transformers 4.28.1
* TensorFlow 2.12.0
* Datasets 2.11.0
* Tokenizers 0.13.3



### Training hyperparameters


The following hyperparameters were used during training:


* optimizer: {'name': 'AdamWeightDecay', 'learning\_rate': {'class\_name': 'ExponentialDecay', 'config': {'initial\_learning\_rate': 0.0005, 'decay\_steps': 500, 'decay\_rate': 0.95, 'staircase': False, 'name': None}}, 'decay': 0.0, 'beta\_1': 0.9, 'beta\_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False, 'weight\_decay\_rate': 0.01}
* training\_precision: float32 ### Training results ### Framework versions


* Transformers 4.28.1
* TensorFlow 2.12.0
* Datasets 2.11.0
* Tokenizers 0.13.3
TAGS
#transformers #tf #gpt2 #text-generation #generated_from_keras_callback #dataset-CShorten/ML-ArXiv-Papers #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.0005, 'decay\_steps': 500, 'decay\_rate': 0.95, 'staircase': False, 'name': None}}, 'decay': 0.0, 'beta\_1': 0.9, 'beta\_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False, 'weight\_decay\_rate': 0.01}
* training\_precision: float32 ### Training results ### Framework versions


* Transformers 4.28.1
* TensorFlow 2.12.0
* Datasets 2.11.0
* Tokenizers 0.13.3
TAGS
#transformers #tf #gpt2 #text-generation #generated_from_keras_callback #dataset-CShorten/ML-ArXiv-Papers #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.0005, 'decay\_steps': 500, 'decay\_rate': 0.95, 'staircase': False, 'name': None}}, 'decay': 0.0, 'beta\_1': 0.9, 'beta\_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False, 'weight\_decay\_rate': 0.01}
* training\_precision: float32### Training results### Framework versions


* Transformers 4.28.1
* TensorFlow 2.12.0
* Datasets 2.11.0
* Tokenizers 0.13.3