padding 50257 -> 50304 vocab_size, the nerest multiple of 64. the biggest deal smallest optimization i've made in recent past, about 25% faster. this is because the last layer is a major latency bottleneck consuming about 40% of latency due to the very high channel count.
This commit is contained in:
1 parent
b3c17c6c6a
commit
77e7e04c26
3 files changed
+5
-5
No files matched your search
@@ -43,8 +43,8 @@ if real_data:
|
||||
return x, y
|
||||
else:
|
||||
# alternatively, if fixed data is desired to not care about data loading
|
||||
x = torch.randint(50257, (batch_size, block_size), device=device)
|
||||
y = torch.randint(50257, (batch_size, block_size), device=device)
|
||||
x = torch.randint(50304, (batch_size, block_size), device=device)
|
||||
y = torch.randint(50304, (batch_size, block_size), device=device)
|
||||
get_batch = lambda split: (x, y)
|
||||
|
||||
# model init
|
||||
|
||||
Reference in new issue
Block a user