Skip to content

Commit

Permalink
typo & comment
Browse files Browse the repository at this point in the history
- safe -> save
- commenting code: batch_size, seq_len = in_idx.shape
  • Loading branch information
casinca authored Nov 17, 2024
1 parent e95c898 commit 4925790
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ch05/07_gpt_to_llama/converting-gpt-to-llama2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@
"\n",
"mha(example_batch)\n",
"\n",
"del mha # delete to safe memory"
"del mha # delete to save memory"
]
},
{
Expand Down Expand Up @@ -781,7 +781,7 @@
" self.out_head = nn.Linear(cfg[\"emb_dim\"], cfg[\"vocab_size\"], bias=False, dtype=cfg[\"dtype\"])\n",
"\n",
" def forward(self, in_idx):\n",
" batch_size, seq_len = in_idx.shape\n",
" # batch_size, seq_len = in_idx.shape\n",
" tok_embeds = self.tok_emb(in_idx)\n",
" # pos_embeds = self.pos_emb(torch.arange(seq_len, device=in_idx.device))\n",
" x = tok_embeds # + pos_embeds # Shape [batch_size, num_tokens, emb_size]\n",
Expand Down

0 comments on commit 4925790

Please sign in to comment.