make softmax explicit

This commit is contained in:
rasbt
2024-02-11 08:42:21 -06:00
parent 7d86023fc4
commit 352b83d225

View File

@@ -1235,7 +1235,7 @@
" # Apply softmax to get probabilities\n",
" probas = torch.softmax(logits, dim=-1) # (batch, vocab_size)\n",
"\n",
" # Get the idx of the vocab entry with the highest logits value\n",
" # Get the idx of the vocab entry with the highest probability value\n",
" idx_next = torch.argmax(probas, dim=-1, keepdim=True) # (batch, 1)\n",
"\n",
" # Append sampled index to the running sequence\n",