diff --git a/README.md b/README.md index 0492fe4..819e120 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,15 @@ HF_TOKEN=xxxx This file is listed in the `.gitignore` file, so it won't get checked in and your keys stay safe. +### Starting in Week 3, we'll also be using Google Colab for running with GPUs + +The colab links are in the Week folders and also here: +- For week 3 day 1, this Google Colab shows what colab can do [colab](https://colab.research.google.com/drive/1DjcrYDZldAXKJ08x1uYIVCtItoLPk1Wr?usp=sharing) +- For week 3 day 2, here is a colab for the HuggingFace [pipelines API](https://colab.research.google.com/drive/1aMaEw8A56xs0bRM4lu8z7ou18jqyybGm?usp=sharing) +- For week 3 day 3, here's the colab on [Tokenizers](https://colab.research.google.com/drive/1WD6Y2N7ctQi1X9wa6rpkg8UfyA4iSVuz?usp=sharing) +- For week 3 day 4, we go to a colab with HuggingFace [models](https://colab.research.google.com/drive/1hhR9Z-yiqjUe7pJjVQw4c74z_V3VchLy?usp=sharing) +- For week 3 day 5, we return to colab to make our [Meeting Minutes product](https://colab.research.google.com/drive/1KSMxOCprsl1QRpt_Rq0UqCAyMtPqDQYx?usp=sharing) + ## And that's it! Happy coding! ### Alternative Setup Instructions if you're a die-hard virtualenv-er diff --git a/week3/day1.ipynb b/week3/day1.ipynb new file mode 100644 index 0000000..d0ae3f2 --- /dev/null +++ b/week3/day1.ipynb @@ -0,0 +1,45 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "61f56afc-bc15-46a4-8eb1-d940c332cf52", + "metadata": {}, + "source": [ + "# Introducing Colab\n", + "\n", + "To see some of what Colab can do, please follow the link below!\n", + "\n", + "https://colab.research.google.com/drive/1DjcrYDZldAXKJ08x1uYIVCtItoLPk1Wr?usp=sharing" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e9289ba7-200c-43a9-b67a-c5ce826c9537", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.10" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/week3/day2.ipynb b/week3/day2.ipynb new file mode 100644 index 0000000..9c4e01f --- /dev/null +++ b/week3/day2.ipynb @@ -0,0 +1,49 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "1f2ed49d-7873-4a03-bdc8-bda1c23cb979", + "metadata": {}, + "source": [ + "# HuggingFace pipelines\n", + "\n", + "For this session we head to Google Colab and use this Notebook to explore the HuggingFace High Level API, pipelines.\n", + "\n", + "https://colab.research.google.com/drive/1aMaEw8A56xs0bRM4lu8z7ou18jqyybGm?usp=sharing\n", + "\n", + "You can use a low cost (or free) T4 GPU runtime for this notebook - and the results look great!\n", + "\n", + "There are instructions in the notebook for setting up your HuggingFace Token and including it as a secret in the notebook." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d5d84b78-0a02-4a35-8f10-e3f7451d352f", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.10" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/week3/day3.ipynb b/week3/day3.ipynb new file mode 100644 index 0000000..535f3ac --- /dev/null +++ b/week3/day3.ipynb @@ -0,0 +1,45 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "61f56afc-bc15-46a4-8eb1-d940c332cf52", + "metadata": {}, + "source": [ + "# Tokenizers\n", + "\n", + "Please can I bring you back to the wonderful Google Colab where we'll look at different Tokenizers:\n", + "\n", + "https://colab.research.google.com/drive/1WD6Y2N7ctQi1X9wa6rpkg8UfyA4iSVuz?usp=sharing" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e9289ba7-200c-43a9-b67a-c5ce826c9537", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.10" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/week3/day4.ipynb b/week3/day4.ipynb new file mode 100644 index 0000000..d8dfbc4 --- /dev/null +++ b/week3/day4.ipynb @@ -0,0 +1,47 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "61f56afc-bc15-46a4-8eb1-d940c332cf52", + "metadata": {}, + "source": [ + "# Models\n", + "\n", + "And now - this colab unveils the heart (or the brains?) of the transformers library - the models:\n", + "\n", + "https://colab.research.google.com/drive/1WD6Y2N7ctQi1X9wa6rpkg8UfyA4iSVuz?usp=sharing\n", + "\n", + "This should run nicely on a low-cost or free T4 box." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e9289ba7-200c-43a9-b67a-c5ce826c9537", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.10" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/week3/day5.ipynb b/week3/day5.ipynb new file mode 100644 index 0000000..70690f7 --- /dev/null +++ b/week3/day5.ipynb @@ -0,0 +1,51 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "61f56afc-bc15-46a4-8eb1-d940c332cf52", + "metadata": {}, + "source": [ + "# Meeting minutes creator\n", + "\n", + "In this colab, we make a meeting minutes program.\n", + "\n", + "It includes useful code to connect your Google Drive to your colab.\n", + "\n", + "Upload your own audio to make this work!!\n", + "\n", + "https://colab.research.google.com/drive/1KSMxOCprsl1QRpt_Rq0UqCAyMtPqDQYx?usp=sharing\n", + "\n", + "This should run nicely on a low-cost or free T4 box." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e9289ba7-200c-43a9-b67a-c5ce826c9537", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.10" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/week4/day4.ipynb b/week4/day4.ipynb index 415f2fa..710e5db 100644 --- a/week4/day4.ipynb +++ b/week4/day4.ipynb @@ -7,7 +7,11 @@ "source": [ "# Code Generator\n", "\n", - "The requirement: use a Frontier model to generate high performance C++ code from Python code" + "The requirement: use an Open Source model to generate high performance C++ code from Python code\n", + "\n", + "To replicate this, you'll need to set up a HuggingFace endpoint as I do in the video. It's simple to do, and it's quite satisfying to see the results!\n", + "\n", + "It's also an important part of your learning; this is the first example of deploying an open source model to be behind an API. We'll return to this in Week 8, but this should plant a seed in your mind for what's involved in productionizing models." ] }, {