mirror of
https://github.com/osmarks/nanogpt-experiments.git
synced 2024-12-18 06:00:29 +00:00
Fix the position of a comma
This commit is contained in:
parent
55c5069696
commit
c2531159c7
2
model.py
2
model.py
@ -61,7 +61,7 @@ class CausalSelfAttention(nn.Module):
|
|||||||
B, T, C = x.size() # batch size, sequence length, embedding dimensionality (n_embd)
|
B, T, C = x.size() # batch size, sequence length, embedding dimensionality (n_embd)
|
||||||
|
|
||||||
# calculate query, key, values for all heads in batch and move head forward to be the batch dim
|
# calculate query, key, values for all heads in batch and move head forward to be the batch dim
|
||||||
q, k ,v = self.c_attn(x).split(self.n_embd, dim=2)
|
q, k, v = self.c_attn(x).split(self.n_embd, dim=2)
|
||||||
k = k.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs)
|
k = k.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs)
|
||||||
q = q.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs)
|
q = q.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs)
|
||||||
v = v.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs)
|
v = v.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs)
|
||||||
|
Loading…
Reference in New Issue
Block a user