Before you start
- A Google account.
- The course portal password.
- Chrome or Firefox.
Nothing to install. Colab runs the notebook on Google's machines, in the browser.
1 — Download the notebook
- On the course portal, click lab_01.ipynb — or right-click it and choose Save link as.
- Sign in with the course password if the browser asks.
- Keep the
.ipynbextension. If your browser saves it aslab_01.ipynb.txt, rename it back.
2 — Open Colab and upload
- Go to colab.research.google.com and sign in.
- File → Upload notebook → Browse, and pick
lab_01.ipynb.
It opens straight into an editable notebook. Colab saves it to your Drive under Colab Notebooks/, so it is there next time.
3 — Pick a runtime and run
- Runtime → Change runtime type. CPU is enough for most of this lab; switch to T4 GPU for the PyTorch and Hugging Face cells at the end.
- Runtime → Run all, or Shift+Enter cell by cell.
The first cell you run also starts the machine, which takes about 15 seconds. After that, cells run immediately.
If a library is missing, install it in a cell:
!pip install -q transformers4 — Save and submit
- The notebook autosaves to Drive as you work.
- For the copy you hand in: File → Download → Download .ipynb, with the cell outputs visible.
/content is then gone — the notebook is the deliverable, not the machine.