Phase 0 · Start Here/
Lesson 0.3foundation2 h

Set up your lab

Python, uv, PyTorch, free GPUs, Hugging Face, API keys and cost hygiene

Every practice item from 1.1 Vectors, dot products and norms onward assumes you can open a notebook, run NumPy and PyTorch, and — from Phase 4 — use a GPU. Setting this up once, properly, removes the single biggest source of friction in self-study. You will also create the accounts you need later (Hugging Face for models and datasets, an API key for a frontier model) and learn the cost hygiene that keeps experimentation cheap when you reach 8.13 Project: fine-tune a small LLM with LoRA and ship a chat app, 9.11 Project: a cited RAG assistant over your own documents, with evals and 10.12 Project: build a research agent with tools, an MCP server and an eval harness.

You'll be able to

  • Install Python 3.12+ and manage project environments with uv
  • Run PyTorch on a GPU — locally if you have one, otherwise on Colab or Kaggle — and verify it
  • Create and secure Hugging Face and model-API accounts, storing keys in environment variables with spending limits
  • Use a consistent project template with Git from day one

Key ideas

  1. Minimal stack: Python 3.12+, uv for environments, VS Code + Jupyter, Git/GitHub, and a reachable GPU (local or Colab/Kaggle).
  2. One environment per project with a lockfile; install the GPU build of PyTorch using the official selector.
  3. Explore in notebooks, keep anything you run twice in .py modules, and restart the kernel before trusting a result.
Show 3 more key ideas
  1. You do not need to buy a GPU: Colab and Kaggle cover every exercise through Phase 7 and small fine-tunes in Phase 8; VRAM is the number that matters locally.
  2. Keys live in environment variables or a git-ignored .env file; set a monthly spending limit before the first API call.
  3. Use coding assistants for scaffolding and debugging, but write the practice solutions yourself first.

Suggested path through this lesson