File size: 2,256 Bytes
46b55af
 
 
 
 
 
 
55e8dc5
 
55090b3
 
 
 
46b55af
 
 
 
 
 
 
b06a6b3
46b55af
 
 
 
 
 
 
 
 
 
 
b06a6b3
dfc664a
1d57f1e
dfc664a
 
 
 
 
 
 
 
 
 
 
 
fefad8d
dfc664a
 
 
1d57f1e
46b55af
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55e8dc5
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
license: apache-2.0
tags:
- generated_from_keras_callback
model-index:
- name: suarkadipa/GPT-2-finetuned-papers
  results: []
datasets:
- CShorten/ML-ArXiv-Papers
language:
- en
base_model:
- distilbert/distilgpt2
---

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