mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2026-04-10 12:33:42 +00:00
committed by
GitHub
parent
6cbe6520a2
commit
08040f024c
File diff suppressed because one or more lines are too long
@@ -46,8 +46,8 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"tiktoken version: 0.6.0\n",
|
||||
"torch version: 2.2.2\n"
|
||||
"tiktoken version: 0.7.0\n",
|
||||
"torch version: 2.4.0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -127,7 +127,7 @@
|
||||
"\n",
|
||||
"# Then load pretrained weights\n",
|
||||
"device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n",
|
||||
"model.load_state_dict(torch.load(\"review_classifier.pth\", map_location=device))\n",
|
||||
"model.load_state_dict(torch.load(\"review_classifier.pth\", map_location=device, weights_only=True))\n",
|
||||
"model.eval();"
|
||||
]
|
||||
},
|
||||
@@ -241,7 +241,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.12.2"
|
||||
"version": "3.11.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
Reference in New Issue
Block a user