Chris Alexiuk commited on
Commit ·
1a7923a
1
Parent(s): 94fd977
ai-maker-space/Transformers-Workshop-GPT-Generation
Browse files- README.md +86 -0
- added_tokens.json +3 -0
- config.json +42 -0
- generation_config.json +6 -0
- merges.txt +0 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +12 -0
- tokenizer.json +0 -0
- tokenizer_config.json +28 -0
- training_args.bin +3 -0
- vocab.json +0 -0
README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
base_model: gpt2
|
| 4 |
+
tags:
|
| 5 |
+
- generated_from_trainer
|
| 6 |
+
model-index:
|
| 7 |
+
- name: lyric-gpt
|
| 8 |
+
results: []
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 12 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 13 |
+
|
| 14 |
+
# lyric-gpt
|
| 15 |
+
|
| 16 |
+
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on the None dataset.
|
| 17 |
+
It achieves the following results on the evaluation set:
|
| 18 |
+
- Loss: 5.4526
|
| 19 |
+
|
| 20 |
+
## Model description
|
| 21 |
+
|
| 22 |
+
More information needed
|
| 23 |
+
|
| 24 |
+
## Intended uses & limitations
|
| 25 |
+
|
| 26 |
+
More information needed
|
| 27 |
+
|
| 28 |
+
## Training and evaluation data
|
| 29 |
+
|
| 30 |
+
More information needed
|
| 31 |
+
|
| 32 |
+
## Training procedure
|
| 33 |
+
|
| 34 |
+
### Training hyperparameters
|
| 35 |
+
|
| 36 |
+
The following hyperparameters were used during training:
|
| 37 |
+
- learning_rate: 0.0001
|
| 38 |
+
- train_batch_size: 8
|
| 39 |
+
- eval_batch_size: 8
|
| 40 |
+
- seed: 42
|
| 41 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 42 |
+
- lr_scheduler_type: linear
|
| 43 |
+
- num_epochs: 30
|
| 44 |
+
|
| 45 |
+
### Training results
|
| 46 |
+
|
| 47 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
| 48 |
+
|:-------------:|:-----:|:----:|:---------------:|
|
| 49 |
+
| 3.5327 | 1.0 | 92 | 3.1885 |
|
| 50 |
+
| 2.8988 | 2.0 | 184 | 3.1986 |
|
| 51 |
+
| 3.0192 | 3.0 | 276 | 3.2477 |
|
| 52 |
+
| 2.5232 | 4.0 | 368 | 3.3318 |
|
| 53 |
+
| 2.3098 | 5.0 | 460 | 3.3899 |
|
| 54 |
+
| 2.1412 | 6.0 | 552 | 3.5328 |
|
| 55 |
+
| 2.3526 | 7.0 | 644 | 3.6322 |
|
| 56 |
+
| 2.06 | 8.0 | 736 | 3.7834 |
|
| 57 |
+
| 1.9477 | 9.0 | 828 | 3.8887 |
|
| 58 |
+
| 1.6156 | 10.0 | 920 | 4.0527 |
|
| 59 |
+
| 1.5496 | 11.0 | 1012 | 4.2364 |
|
| 60 |
+
| 1.5933 | 12.0 | 1104 | 4.3163 |
|
| 61 |
+
| 1.3698 | 13.0 | 1196 | 4.4754 |
|
| 62 |
+
| 1.308 | 14.0 | 1288 | 4.5911 |
|
| 63 |
+
| 1.1803 | 15.0 | 1380 | 4.6902 |
|
| 64 |
+
| 1.0212 | 16.0 | 1472 | 4.7977 |
|
| 65 |
+
| 0.9838 | 17.0 | 1564 | 4.9419 |
|
| 66 |
+
| 1.0065 | 18.0 | 1656 | 4.9470 |
|
| 67 |
+
| 0.8158 | 19.0 | 1748 | 5.0347 |
|
| 68 |
+
| 0.8352 | 20.0 | 1840 | 5.1256 |
|
| 69 |
+
| 0.8759 | 21.0 | 1932 | 5.1902 |
|
| 70 |
+
| 0.7176 | 22.0 | 2024 | 5.2542 |
|
| 71 |
+
| 0.7457 | 23.0 | 2116 | 5.2947 |
|
| 72 |
+
| 0.6683 | 24.0 | 2208 | 5.3511 |
|
| 73 |
+
| 0.6095 | 25.0 | 2300 | 5.3680 |
|
| 74 |
+
| 0.6247 | 26.0 | 2392 | 5.3916 |
|
| 75 |
+
| 0.5827 | 27.0 | 2484 | 5.4273 |
|
| 76 |
+
| 0.5742 | 28.0 | 2576 | 5.4394 |
|
| 77 |
+
| 0.5334 | 29.0 | 2668 | 5.4477 |
|
| 78 |
+
| 0.6028 | 30.0 | 2760 | 5.4526 |
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
### Framework versions
|
| 82 |
+
|
| 83 |
+
- Transformers 4.34.1
|
| 84 |
+
- Pytorch 2.1.0+cu118
|
| 85 |
+
- Datasets 2.14.6
|
| 86 |
+
- Tokenizers 0.14.1
|
added_tokens.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"[PAD]": 50257
|
| 3 |
+
}
|
config.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "gpt2",
|
| 3 |
+
"activation_function": "gelu_new",
|
| 4 |
+
"architectures": [
|
| 5 |
+
"GPT2LMHeadModel"
|
| 6 |
+
],
|
| 7 |
+
"attn_pdrop": 0.1,
|
| 8 |
+
"bos_token_id": 50256,
|
| 9 |
+
"embd_pdrop": 0.1,
|
| 10 |
+
"eos_token_id": 50256,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"layer_norm_epsilon": 1e-05,
|
| 13 |
+
"model_type": "gpt2",
|
| 14 |
+
"n_ctx": 1024,
|
| 15 |
+
"n_embd": 768,
|
| 16 |
+
"n_head": 12,
|
| 17 |
+
"n_inner": null,
|
| 18 |
+
"n_layer": 12,
|
| 19 |
+
"n_positions": 1024,
|
| 20 |
+
"reorder_and_upcast_attn": false,
|
| 21 |
+
"resid_pdrop": 0.1,
|
| 22 |
+
"scale_attn_by_inverse_layer_idx": false,
|
| 23 |
+
"scale_attn_weights": true,
|
| 24 |
+
"summary_activation": null,
|
| 25 |
+
"summary_first_dropout": 0.1,
|
| 26 |
+
"summary_proj_to_labels": true,
|
| 27 |
+
"summary_type": "cls_index",
|
| 28 |
+
"summary_use_proj": true,
|
| 29 |
+
"task_specific_params": {
|
| 30 |
+
"text-generation": {
|
| 31 |
+
"do_sample": true,
|
| 32 |
+
"max_length": 200,
|
| 33 |
+
"min_length": 100,
|
| 34 |
+
"temperature": 1.0,
|
| 35 |
+
"top_p": 0.95
|
| 36 |
+
}
|
| 37 |
+
},
|
| 38 |
+
"torch_dtype": "float32",
|
| 39 |
+
"transformers_version": "4.34.1",
|
| 40 |
+
"use_cache": true,
|
| 41 |
+
"vocab_size": 50257
|
| 42 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 50256,
|
| 4 |
+
"eos_token_id": 50256,
|
| 5 |
+
"transformers_version": "4.34.1"
|
| 6 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f5364a44fbd9330e6562136e57d9cf610c499633c7dd589fd8e2cc641f6c57b2
|
| 3 |
+
size 497807706
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<|endoftext|>",
|
| 3 |
+
"eos_token": "<|endoftext|>",
|
| 4 |
+
"pad_token": {
|
| 5 |
+
"content": "[PAD]",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": false,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false
|
| 10 |
+
},
|
| 11 |
+
"unk_token": "<|endoftext|>"
|
| 12 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"added_tokens_decoder": {
|
| 4 |
+
"50256": {
|
| 5 |
+
"content": "<|endoftext|>",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": true,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
},
|
| 12 |
+
"50257": {
|
| 13 |
+
"content": "[PAD]",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": false,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false,
|
| 18 |
+
"special": true
|
| 19 |
+
}
|
| 20 |
+
},
|
| 21 |
+
"bos_token": "<|endoftext|>",
|
| 22 |
+
"clean_up_tokenization_spaces": true,
|
| 23 |
+
"eos_token": "<|endoftext|>",
|
| 24 |
+
"model_max_length": 1024,
|
| 25 |
+
"pad_token": "[PAD]",
|
| 26 |
+
"tokenizer_class": "GPT2Tokenizer",
|
| 27 |
+
"unk_token": "<|endoftext|>"
|
| 28 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dda8595efafcd969c4b078852a34e0bbd7040b6cbb7709a10bb091fd3504ef03
|
| 3 |
+
size 4536
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|