Refreshed notebooks, particularly with new Week 1
This commit is contained in:
@@ -31,6 +31,21 @@
|
||||
"import modal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "ab5c8533-9f66-448f-b9b2-133d1ff50639",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Setting up the modal tokens\n",
|
||||
"\n",
|
||||
"The first time you run this, please uncomment the next line and execute it. \n",
|
||||
"This is the same as running `modal setup` from the command line. It connects with Modal and installs your tokens.\n",
|
||||
"\n",
|
||||
"A student on Windows mentioned that on Windows, you might also need to run this command from a command prompt afterwards: \n",
|
||||
"`modal token new` \n",
|
||||
"(Thank you Ed B. for that!)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
@@ -38,6 +53,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Remove the '# ' from the next line and run the cell\n",
|
||||
"# !modal setup"
|
||||
]
|
||||
},
|
||||
@@ -86,7 +102,7 @@
|
||||
"\n",
|
||||
"1. Go to modal.com, sign in and go to your dashboard\n",
|
||||
"2. Click on Secrets in the nav bar\n",
|
||||
"3. Create new secret, click on Hugging Face\n",
|
||||
"3. Create new secret, click on Hugging Face, this new secret needs to be called **hf-secret** because that's how we refer to it in the code\n",
|
||||
"4. Fill in your HF_TOKEN where it prompts you\n",
|
||||
"\n",
|
||||
"### And now back to business: time to work with Llama"
|
||||
@@ -219,7 +235,7 @@
|
||||
"\n",
|
||||
"I've added a utility called `keep_warm.py` that will keep our Modal warm by pinging it every 30 seconds.\n",
|
||||
"\n",
|
||||
"To use the utliity, bring up a new Terminal (Mac) or Anaconda prompt (Windows), ensure the environment is activated with `conda activate llms\\\n",
|
||||
"To use the utliity, bring up a new Terminal (Mac) or Anaconda prompt (Windows), ensure the environment is activated with `conda activate llms`\n",
|
||||
"\n",
|
||||
"Then run: `python keep_warm.py` from within the week8 drectory.\n",
|
||||
"\n",
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
"# It is very fun turning this up to 400_000 and seeing the full dataset visualized,\n",
|
||||
"# but it almost crashes my box every time so do that at your own risk!! 10_000 is safe!\n",
|
||||
"\n",
|
||||
"MAXIMUM_DATAPOINTS = 10_000"
|
||||
"MAXIMUM_DATAPOINTS = 30_000"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -135,7 +135,7 @@
|
||||
" x=reduced_vectors[:, 0],\n",
|
||||
" y=reduced_vectors[:, 1],\n",
|
||||
" mode='markers',\n",
|
||||
" marker=dict(size=2, color=colors, opacity=0.7),\n",
|
||||
" marker=dict(size=3, color=colors, opacity=0.7),\n",
|
||||
")])\n",
|
||||
"\n",
|
||||
"fig.update_layout(\n",
|
||||
@@ -148,6 +148,14 @@
|
||||
"\n",
|
||||
"fig.show()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "5e4ae088-3d29-45d3-87a2-fea805fe2c65",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
"source": [
|
||||
"# Turn this up at your own risk! 10_000 is safe..\n",
|
||||
"\n",
|
||||
"MAXIMUM_DATAPOINTS = 10_000"
|
||||
"MAXIMUM_DATAPOINTS = 20_000"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user