0.3 Free compute: Colab, Kaggle, HF Spaces
Describes the free-compute landscape as of August 2026
What this is and why it exists
Deep learning eventually wants a GPU your laptop does not have, and the difference between people who continue and people who stall is knowing that free GPUs exist and how their limits work. Colab, Kaggle and Hugging Face Spaces will carry you through this entire curriculum without a rupee of cloud spend — IF you work in the shape their limits demand.
The vocabulary
- Google Colab — free notebooks on Google's machines with GPU/TPU runtimes; sessions are temporary.
- Runtime — the machine your Colab notebook is currently attached to; changing runtime type is how a GPU is requested.
- Session death — a runtime reclaimed after idle time or a usage cap — with its DISK contents gone.
- Kaggle Notebooks — the competition site's free notebooks: a weekly GPU quota, datasets mounted beside the code.
- Hugging Face Spaces — free hosting for small ML demo apps; where a finished model becomes a link you can show someone.
- Mounting — attaching persistent storage (Google Drive, a Kaggle dataset) into the temporary machine.
The mental model
Free compute is a rented desk, not an office. The machine is genuinely yours to use — a real GPU, better than most laptops — but you may be asked to leave at any time, and the desk is CLEARED when you go: anything saved to the session's own disk is deleted. Everyone loses work to this exactly once. The habit that makes the rented desk workable: code lives in Git (the previous topic), data and outputs live in mounted storage — Google Drive on Colab, datasets on Kaggle — and the notebook must be re-runnable from the top, so that a dead session costs minutes, not days. Checkpoint long training to Drive as it runs; a model that saves every epoch survives any eviction.
The three services have different shapes for different moments. Colab is the everyday notebook: quickest to open, fine for everything in this curriculum's first months; its free GPU time is capped by opaque, shifting limits, so treat a GPU session as a resource to use deliberately, not a tab to leave open. Kaggle gives a stated weekly GPU quota and puts thousands of clean datasets one mount away — the natural home for the data-handling and classical-ML work. Spaces is for AFTER training: wrap a model in a small app and it becomes a public link — the demo a portfolio needs. And the graduation rule, honestly: notebooks are for exploring. When a project becomes real software — modules, tests, long runs — it moves to scripts run from a terminal, and the MLOps module picks up exactly there.
What you should now be able to explain or do
Get a GPU runtime on Colab and prove it with one command. Explain what dies with a session and arrange your work so it survives. State Kaggle's advantage for dataset work and Spaces' role for demos. Say when a project should leave notebooks.
Check yourself
A Colab session died overnight with results saved to its disk. What is lost, and what should have been different?
Everything on the session disk is gone. Results and checkpoints belong in mounted Drive, code in Git, and the notebook re-runnable from the top — then a dead session costs a re-run, not the work.
How do the GPU offers of Colab and Kaggle differ?
Colab's free GPU time is capped by opaque, changing limits; Kaggle states a weekly quota and resets it. Kaggle also mounts its dataset library directly beside your notebook.
What is Hugging Face Spaces for in a learner's toolkit?
Turning a trained model into a small public demo app — the shareable link that makes a portfolio project real to someone who will never open your notebook.
What signals that a project has outgrown notebooks?
It has become software: reusable modules, tests, multi-hour runs, collaborators. That work moves to scripts and a terminal; notebooks stay for exploration and explanation.
Go deeper
We haven't checked most of these for screen reader use yet.
Using a screen reader? 1 resource
- Data science and machine learning with a screen reader · Takashi Hasuo · Docswritten for screen reader users
Back to Free compute: Colab, Kaggle, HF Spaces: work through the checklist