sanjanatule commited on
Commit
00d213f
1 Parent(s): 589bb92

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +6 -0
utils.py CHANGED
@@ -4,7 +4,13 @@ import lightning.pytorch as pl
4
  from torch.nn import functional as F
5
 
6
  chars = ['\n', ' ', '!', '$', '&', "'", ',', '-', '.', '3', ':', ';', '?', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
 
7
  vocab_size = len(chars)
 
 
 
 
 
8
 
9
  class Head(nn.Module):
10
  """ one head of self-attention """
 
4
  from torch.nn import functional as F
5
 
6
  chars = ['\n', ' ', '!', '$', '&', "'", ',', '-', '.', '3', ':', ';', '?', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
7
+
8
  vocab_size = len(chars)
9
+ block_size = 32
10
+ n_embd = 64
11
+ n_head = 4
12
+ n_layer = 4
13
+ dropout = 0.1
14
 
15
  class Head(nn.Module):
16
  """ one head of self-attention """