mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2025-08-28 18:40:01 +00:00
Remove duplicated cell (#212)
* add a suggestion since code snippet has been repeated. * remove duplicated cell --------- Co-authored-by: Shuyib <benmainye@gmail.com>
This commit is contained in:
parent
a796b9d657
commit
fcf8bcab0d
@ -390,32 +390,6 @@
|
||||
"print(\"Token IDs:\\n\", token_ids)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"id": "f08e4efc-e897-4d35-91f7-9a77b6dde953",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Token IDs:\n",
|
||||
" tensor([[[16657],\n",
|
||||
" [ 339],\n",
|
||||
" [42826]],\n",
|
||||
"\n",
|
||||
" [[49906],\n",
|
||||
" [29669],\n",
|
||||
" [41751]]])\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"token_ids = torch.argmax(probas, dim=-1, keepdim=True)\n",
|
||||
"print(\"Token IDs:\\n\", token_ids)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "cee4072c-21ed-4df7-8721-dd2535362573",
|
||||
@ -2480,7 +2454,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.4"
|
||||
"version": "3.10.6"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
Loading…
x
Reference in New Issue
Block a user