MartialTerran commited on
Commit
6a120f9
1 Parent(s): fbd5527

Update 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. CHANGED
@@ -2,7 +2,7 @@ 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
@@ -21,7 +21,67 @@ Epoch 26653/100000, Loss: 0.0024
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
 
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 to the 6-float model (n_embd': 6, 'n_layer': 2, 'n_head': 1, 'n_inner': 64,) did solve the glitch, after almost 60,000 epochs:
6
  Epoch 22361/100000, Loss: 0.0054
7
  LOSS IS BELOW 0.01
8
  Epoch 22362/100000, Loss: 0.0033
 
21
  Epoch 26654/100000, Loss: 0.0034
22
  LOSS IS BELOW 0.01
23
 
24
+ Epoch 35255/100000, Loss: 0.0017
25
+ LOSS IS BELOW 0.01
26
+ Epoch 35256/100000, Loss: 0.0018
27
+ LOSS IS BELOW 0.01
28
+ Epoch 35257/100000, Loss: 0.0015
29
+ LOSS IS BELOW 0.01
30
+ Epoch 35258/100000, Loss: 0.0024
31
+ LOSS IS BELOW 0.01
32
+ Epoch 35259/100000, Loss: 0.0021
33
+ LOSS IS BELOW 0.01
34
+ Epoch 35260/100000, Loss: 0.0042
35
+ LOSS IS BELOW 0.01
36
+
37
+ Epoch 44408/100000, Loss: 0.0015
38
+ LOSS IS BELOW 0.01
39
+ Learning rate reduced to 0.000034
40
+ Epoch 44408/100000, Loss: 0.0015, Learning Rate: 0.000034
41
+ Epoch 44409/100000, Loss: 0.0014
42
+ LOSS IS BELOW 0.01
43
+ Epoch 44410/100000, Loss: 0.0065
44
+ LOSS IS BELOW 0.01
45
+ Epoch 44411/100000, Loss: 0.0028
46
+
47
+
48
+ Epoch 55978/100000, Loss: 0.0016
49
+ LOSS IS BELOW 0.01
50
+ Epoch 55979/100000, Loss: 0.0020
51
+ LOSS IS BELOW 0.01
52
+ Learning rate reduced to 0.000011
53
+ Epoch 55979/100000, Loss: 0.0020, Learning Rate: 0.000011
54
+ Epoch 55980/100000, Loss: 0.0016
55
+ LOSS IS BELOW 0.01
56
+ Epoch 55981/100000, Loss: 0.0014
57
+ LOSS IS BELOW 0.01
58
+
59
+
60
+ Epoch 58992/100000, Loss: 0.0014
61
+ LOSS IS BELOW 0.01
62
+ Epoch 58993/100000, Loss: 0.0030
63
+ LOSS IS BELOW 0.01
64
+ Epoch 58994/100000, Loss: 0.0014
65
+ LOSS IS BELOW 0.01
66
+ Epoch 58995/100000, Loss: 0.0010
67
+ LOSS IS BELOW 0.01
68
+ LOSS IS BELOW 0.001
69
+ Early stopping: Average loss 0.0010 is below the threshold (0.001).
70
+
71
+ # --- Inference Examples --- at script line 431
72
+ # Example 1: Recite the Gettysburg Address at script line 435
73
+ Prompt: four score
74
+
75
+ Response:
76
+ four score and seven years ago our fathers brought forth on this continent , a new nation , conceived in liberty , and dedicated to the proposition 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 live . it is altogether fitting and proper 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 remaining before us - that from 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 iguana iguana iguana iguana iguana iguana iguana iguana measure god apple . we we we we we we we
77
+
78
+ # Example 2: Free text generation after encountering <FreetheLLM> at script line 445
79
+ 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>
80
+
81
+ Freestyle Generation:
82
+ 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> vain to to 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 live . it is altogether fitting and proper that we should do this . but , in a larger sense , we can not
83
+ HyperParamters = {'vocab_size': 170, 'special_tokens': ['<FreetheLLM>', '<cr>', '<pad>'], 'n_embd': 6, 'n_layer': 2, 'n_head': 1, 'n_inner': 64, 'max_sequence_len': 340, 'epochs': 100000, 'learning_rate': 0.001, 'batch_size': 16, 'dropout': 0.2}
84
+
85
 
86
  #################################### n_embd': 6, 'n_layer': 1, 'n_head': 1, 'n_inner': 64, ###############################################
87
  Epoch 99983/100000, Loss: 0.0474