Launching refreshed version of LLM Engineering weeks 1-4 - see README

This commit is contained in:
Edward Donner
2025-10-11 15:58:39 -04:00
parent 3286cfb395
commit c7257b9ae6
68 changed files with 16583 additions and 3756 deletions

View File

@@ -18,18 +18,45 @@
"This should run nicely on a low-cost or free T4 box."
]
},
{
"cell_type": "markdown",
"id": "501aa674",
"metadata": {},
"source": [
"### BUT FIRST - Something cool - really showing you how \"model inference\" works via OpenAI"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e9289ba7-200c-43a9-b67a-c5ce826c9537",
"metadata": {},
"outputs": [],
"source": [
"from visualizer import TokenPredictor, create_token_graph, visualize_predictions\n",
"\n",
"message = \"In one sentence, describe the color orange to someone who has never been able to see\"\n",
"model_name = \"gpt-4.1-mini\"\n",
"\n",
"predictor = TokenPredictor(model_name)\n",
"predictions = predictor.predict_tokens(message)\n",
"G = create_token_graph(model_name, predictions)\n",
"plt = visualize_predictions(G)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "540a8255",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": ".venv",
"language": "python",
"name": "python3"
},
@@ -43,7 +70,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.11"
"version": "3.12.9"
}
},
"nbformat": 4,