HUGGINGFACE_ACCT_NAME/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
- model.safetensors +3 -0
- runs/May26_22-49-23_01c46465b667/events.out.tfevents.1716763774.01c46465b667.229.1 +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.4529
|
| 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.406 | 1.0 | 92 | 3.1840 |
|
| 50 |
+
| 2.8788 | 2.0 | 184 | 3.2090 |
|
| 51 |
+
| 2.92 | 3.0 | 276 | 3.2549 |
|
| 52 |
+
| 2.8856 | 4.0 | 368 | 3.2943 |
|
| 53 |
+
| 2.5725 | 5.0 | 460 | 3.3856 |
|
| 54 |
+
| 2.3395 | 6.0 | 552 | 3.5080 |
|
| 55 |
+
| 2.167 | 7.0 | 644 | 3.6203 |
|
| 56 |
+
| 1.9773 | 8.0 | 736 | 3.7681 |
|
| 57 |
+
| 1.9391 | 9.0 | 828 | 3.8787 |
|
| 58 |
+
| 1.6115 | 10.0 | 920 | 4.0798 |
|
| 59 |
+
| 1.6445 | 11.0 | 1012 | 4.1552 |
|
| 60 |
+
| 1.528 | 12.0 | 1104 | 4.3184 |
|
| 61 |
+
| 1.3714 | 13.0 | 1196 | 4.4737 |
|
| 62 |
+
| 1.269 | 14.0 | 1288 | 4.5747 |
|
| 63 |
+
| 1.0994 | 15.0 | 1380 | 4.6625 |
|
| 64 |
+
| 1.0443 | 16.0 | 1472 | 4.8032 |
|
| 65 |
+
| 0.9456 | 17.0 | 1564 | 4.9048 |
|
| 66 |
+
| 0.8008 | 18.0 | 1656 | 4.9934 |
|
| 67 |
+
| 0.8819 | 19.0 | 1748 | 5.0594 |
|
| 68 |
+
| 0.8631 | 20.0 | 1840 | 5.1399 |
|
| 69 |
+
| 0.7939 | 21.0 | 1932 | 5.1844 |
|
| 70 |
+
| 0.717 | 22.0 | 2024 | 5.2256 |
|
| 71 |
+
| 0.8029 | 23.0 | 2116 | 5.2945 |
|
| 72 |
+
| 0.7064 | 24.0 | 2208 | 5.3211 |
|
| 73 |
+
| 0.6867 | 25.0 | 2300 | 5.3637 |
|
| 74 |
+
| 0.6398 | 26.0 | 2392 | 5.3977 |
|
| 75 |
+
| 0.5992 | 27.0 | 2484 | 5.4118 |
|
| 76 |
+
| 0.5986 | 28.0 | 2576 | 5.4357 |
|
| 77 |
+
| 0.5909 | 29.0 | 2668 | 5.4557 |
|
| 78 |
+
| 0.512 | 30.0 | 2760 | 5.4529 |
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
### Framework versions
|
| 82 |
+
|
| 83 |
+
- Transformers 4.41.1
|
| 84 |
+
- Pytorch 2.3.0+cu121
|
| 85 |
+
- Datasets 2.19.1
|
| 86 |
+
- Tokenizers 0.19.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.41.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.41.1"
|
| 6 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:318a36bb6d957f2affe63cc25e5544278638cc335e1f0aa907de93518c22855c
|
| 3 |
+
size 497774208
|
runs/May26_22-49-23_01c46465b667/events.out.tfevents.1716763774.01c46465b667.229.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6fe250819d4d507456bcd00decbc365cdf79e1e1641e68891a3f27626d4e95fa
|
| 3 |
+
size 129961
|
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:5bf7acb78d32465dc84fd3e9149f6faf517fa365c8d7180b61d29229afcb2c0e
|
| 3 |
+
size 5112
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|