mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2026-04-10 12:33:42 +00:00
Rename variable to context_length to make it easier on readers (#106)
* rename to context length * fix spacing
This commit is contained in:
committed by
GitHub
parent
a940373a14
commit
2de60d1bfb
@@ -201,7 +201,7 @@
|
||||
"torch.manual_seed(123)\n",
|
||||
"\n",
|
||||
"d_out = 1\n",
|
||||
"mha = MultiHeadAttentionWrapper(d_in, d_out, block_size, 0.0, num_heads=2)\n",
|
||||
"mha = MultiHeadAttentionWrapper(d_in, d_out, context_length, 0.0, num_heads=2)\n",
|
||||
"\n",
|
||||
"context_vecs = mha(batch)\n",
|
||||
"\n",
|
||||
@@ -247,11 +247,11 @@
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"```python\n",
|
||||
"block_size = 1024\n",
|
||||
"context_length = 1024\n",
|
||||
"d_in, d_out = 768, 768\n",
|
||||
"num_heads = 12\n",
|
||||
"\n",
|
||||
"mha = MultiHeadAttention(d_in, d_out, block_size, 0.0, num_heads)\n",
|
||||
"mha = MultiHeadAttention(d_in, d_out, context_length, 0.0, num_heads)\n",
|
||||
"```"
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user