{ "cells": [ { "cell_type": "markdown", "id": "4a6ab9a2-28a2-445d-8512-a0dc8d1b54e9", "metadata": {}, "source": [ "# Code Generator\n", "\n", "The requirement: use a Frontier model to generate high performance C++ code from Python code\n" ] }, { "cell_type": "markdown", "id": "d5ccb926-7b49-44a4-99ab-8ef20b5778c0", "metadata": {}, "source": [ "
\n",
" ![]() | \n",
" \n",
" Reminder: fetch latest code\n", " I'm continually improving these labs, adding more examples and exercises.\n", " At the start of each week, it's worth checking you have the latest code.\n", " First do a git pull and merge your changes as needed. Any problems? Try asking ChatGPT to clarify how to merge - or contact me! \n", " After you've pulled the code, from the llm_engineering directory, in an Anaconda prompt (PC) or Terminal (Mac), run: \n", " conda env update --f environment.yml --prune \n", " Or if you used virtualenv rather than Anaconda, then run this from your activated environment in a Powershell (PC) or Terminal (Mac): \n", " pip install -r requirements.txt \n",
" \n",
" | \n",
"
\n",
" ![]() | \n",
" \n",
" Important Note\n", " \n", " In this lab, I use GPT-4o and Claude-3.5-Sonnet, which are the slightly higher priced models. The costs are still low, but if you'd prefer to keep costs ultra low, please make the suggested switches to the models (3 cells down from here).\n", " \n", " | \n",
"