MartialTerran
commited on
Commit
•
fbd5527
1
Parent(s):
14f286e
Create With one layer, n_layer 1, n_embd 4 is failure. but n_embd 6 is marginal success.
Browse files
With one layer, n_layer 1, n_embd 4 is failure. but n_embd 6 is marginal success.
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
At n_embd': 4, there was no coherence obtained.
|
2 |
+
|
3 |
+
At n_embd': 6, 'n_layer': 1, 'n_head': 1, 'n_inner': 64, the Toy Gettysburg GPT-2 model got a good start with "four score and seven years ago our fathers brought forth on this continent , a new nation , conceived in" before some mistakes. But resumed another whole part of the Gettysburg speech: "that all men are created equal . now we are engaged in a great civil war , testing whether that nation , or any nation so conceived and so dedicated , can long endure . we are met on a great battle - field of that war . we have come to dedicate a portion of that field , as a final resting place for those who here gave their lives that that nation might endure "
|
4 |
+
|
5 |
+
Adding a second layer ('n_layer': 2,) did not solve the problem:
|
6 |
+
Epoch 22361/100000, Loss: 0.0054
|
7 |
+
LOSS IS BELOW 0.01
|
8 |
+
Epoch 22362/100000, Loss: 0.0033
|
9 |
+
LOSS IS BELOW 0.01
|
10 |
+
Epoch 22363/100000, Loss: 0.0044
|
11 |
+
LOSS IS BELOW 0.01
|
12 |
+
Epoch 22364/100000, Loss: 0.0032
|
13 |
+
|
14 |
+
|
15 |
+
Epoch 26651/100000, Loss: 0.0024
|
16 |
+
LOSS IS BELOW 0.01
|
17 |
+
Epoch 26652/100000, Loss: 0.0039
|
18 |
+
LOSS IS BELOW 0.01
|
19 |
+
Epoch 26653/100000, Loss: 0.0024
|
20 |
+
LOSS IS BELOW 0.01
|
21 |
+
Epoch 26654/100000, Loss: 0.0034
|
22 |
+
LOSS IS BELOW 0.01
|
23 |
+
|
24 |
+
|
25 |
+
|
26 |
+
#################################### n_embd': 6, 'n_layer': 1, 'n_head': 1, 'n_inner': 64, ###############################################
|
27 |
+
Epoch 99983/100000, Loss: 0.0474
|
28 |
+
Epoch 99984/100000, Loss: 0.1334
|
29 |
+
Epoch 99985/100000, Loss: 0.0775
|
30 |
+
Epoch 99986/100000, Loss: 0.0629
|
31 |
+
Epoch 99987/100000, Loss: 0.1047
|
32 |
+
Epoch 99988/100000, Loss: 0.0988
|
33 |
+
Epoch 99989/100000, Loss: 0.0666
|
34 |
+
Epoch 99990/100000, Loss: 0.0633
|
35 |
+
Epoch 99991/100000, Loss: 0.1468
|
36 |
+
Epoch 99992/100000, Loss: 0.0667
|
37 |
+
Epoch 99993/100000, Loss: 0.1081
|
38 |
+
Epoch 99994/100000, Loss: 0.0680
|
39 |
+
Epoch 99995/100000, Loss: 0.0754
|
40 |
+
Epoch 99996/100000, Loss: 0.0507
|
41 |
+
Epoch 99997/100000, Loss: 0.1052
|
42 |
+
Epoch 99998/100000, Loss: 0.0613
|
43 |
+
Epoch 99999/100000, Loss: 0.2482
|
44 |
+
Epoch 100000/100000, Loss: 0.0892
|
45 |
+
|
46 |
+
# --- Inference Examples --- at script line 431
|
47 |
+
# Example 1: Recite the Gettysburg Address at script line 435
|
48 |
+
Prompt: four score
|
49 |
+
|
50 |
+
Response:
|
51 |
+
four score and seven years ago our fathers brought forth on this continent , a new nation , conceived in nation - to , it gave by that all men are created equal . now we are engaged in a great civil war , testing whether that nation , or any nation so conceived and so dedicated , can long endure . we are met on a great battle - field of that war . we have come to dedicate a portion of that field , as a final resting place for those who here gave their lives that that nation might endure - by civil . these that that that we should do this . but , in a larger sense , we can not dedicate - we can not consecrate - we can not hallow - this ground . the brave men , living and dead , who struggled here , have consecrated it , far above our poor power to add or detract . the world will little note , nor long remember what we say here , but it can never forget what they did here . it is for us the living , rather , to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced . it is rather for us to be here dedicated to the great task brave for dedicate rather who for these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion - that we here highly resolve that these dead shall not have died in vain - that this nation , under god , shall have a new birth of freedom - and that government of the people , by the people , for the people , shall not perish from the earth . apple blossom cantaloupe durian elderberry fig guava honeydew iguana god not gave highly war task detract task task detract larger which detract task detract task detract task which
|
52 |
+
|
53 |
+
# Example 2: Free text generation after encountering <FreetheLLM> at script line 445
|
54 |
+
Prompt: we here highly resolve that these dead shall not have died in vain and that this nation under god shall have a new <FreetheLLM>
|
55 |
+
|
56 |
+
Freestyle Generation:
|
57 |
+
we here highly resolve that these dead shall not have died in vain and that this nation under god shall have a new <pad> <pad> <pad> it it gave portion fought apple rather not it it fitting us a to that that can not score to that nation , or any nation so conceived and so dedicated , can long forth do the but elderberry not not so highly war civil above freedom ground gave for gave final portion . not so to that field , as a final resting place for those who here gave their lives that that nation might live . it is altogether fitting and come to , these hallow for consecrate on birth of - not struggled , we can not
|
58 |
+
HyperParamters = {'vocab_size': 170, 'special_tokens': ['<FreetheLLM>', '<cr>', '<pad>'], 'n_embd': 6, 'n_layer': 1, 'n_head': 1, 'n_inner': 64, 'max_sequence_len': 340, 'epochs': 100000, 'learning_rate': 0.001, 'batch_size': 16, 'dropout': 0.2}
|