fabianmmueller
commited on
Commit
•
32e2026
1
Parent(s):
5588683
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
tags:
|
4 |
+
- generated_from_trainer
|
5 |
+
model-index:
|
6 |
+
- name: deep-haiku-gpt-j-6b-8bit
|
7 |
+
results: []
|
8 |
+
---
|
9 |
+
|
10 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
11 |
+
should probably proofread and complete it, then remove this comment. -->
|
12 |
+
|
13 |
+
# deep-haiku-gpt-j-6b-8bit
|
14 |
+
|
15 |
+
This model is a fine-tuned version of [gpt-j-6B-8bit](https://huggingface.co/hivemind/gpt-j-6B-8bit) on the [haiku](https://huggingface.co/datasets/statworx/haiku) dataset.
|
16 |
+
|
17 |
+
## Model description
|
18 |
+
|
19 |
+
The model is a fine-tuned version of GPT-2 for generation of [Haikus](https://en.wikipedia.org/wiki/Haiku). The model, data and training procedure is inspired by a [blog post by Robert A. Gonsalves](https://towardsdatascience.com/deep-haiku-teaching-gpt-j-to-compose-with-syllable-patterns-5234bca9701). Instead of using a 8bit version of GPT-J 6B, we instead used vanilla GPT-2. From what we saw, the model performance comparable but is much easier to fine-tune.
|
20 |
+
|
21 |
+
We used the same multitask training approach as in der post, but significantly extended the dataset (almost double the size of the original on). A prepared version of the dataset can be found [here](https://huggingface.co/datasets/statworx/haiku).
|
22 |
+
|
23 |
+
## Intended uses & limitations
|
24 |
+
|
25 |
+
The model is intended to generate Haikus. To do so, it was trained using a multitask learning approach (see [Caruana 1997](http://www.cs.cornell.edu/~caruana/mlj97.pdf)) with the following four different tasks: :
|
26 |
+
|
27 |
+
- topic2graphemes `(keywords = text)`
|
28 |
+
- topic2phonemes `<keyword_phonemes = text_phonemes>`
|
29 |
+
- graphemes2phonemes `[text = text_phonemes]`
|
30 |
+
- phonemes2graphemes `{text_phonemes = text}`
|
31 |
+
|
32 |
+
To use the model, use an appropriate prompt like `"(dog rain ="` and let the model generate a Haiku given the keyword.
|
33 |
+
|
34 |
+
## Training and evaluation data
|
35 |
+
|
36 |
+
We used a collection of existing haikus for training. Furthermore, all haikus were used in their graphemes version as well as a phonemes version. In addition, we extracted key word for all haikus using [KeyBERT](https://github.com/MaartenGr/KeyBERT) and sorted out haikus with a low text quality according to the [GRUEN score](https://github.com/WanzhengZhu/GRUEN).
|
37 |
+
|
38 |
+
## Training procedure
|
39 |
+
|
40 |
+
### Training hyperparameters
|
41 |
+
|
42 |
+
The following hyperparameters were used during training:
|
43 |
+
- learning_rate: 5e-05
|
44 |
+
- train_batch_size: 2
|
45 |
+
- eval_batch_size: 2
|
46 |
+
- seed: 42
|
47 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
48 |
+
- lr_scheduler_type: linear
|
49 |
+
- lr_scheduler_warmup_steps: 100
|
50 |
+
- num_epochs: 10
|
51 |
+
|
52 |
+
### Training results
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
### Framework versions
|
57 |
+
|
58 |
+
- Transformers 4.19.2
|
59 |
+
- Pytorch 1.11.0+cu102
|
60 |
+
- Datasets 2.2.1
|
61 |
+
- Tokenizers 0.12.1
|