Google Colab (Colaboratory) is a free, browser-based Jupyter notebook environment made by Google, with no local setup and a free tier that includes GPU/TPU access. It ranks around #13 among collaboration tools with roughly 7% usage share, and it's the standard way students, researchers, and ML engineers share runnable Python notebooks โ anyone with the link can open, run, and comment on the same notebook like a Google Doc. Teams and classrooms reach for it because it removes the "works on my machine" problem entirely.
A Colab notebook is a sequence of cells. A common first cell installs a package that isn't preinstalled, then a code cell imports and uses it โ here, checking for GPU access and running a small PyTorch tensor operation.
# Cell 1 โ install a package not preinstalled in the Colab image
!pip install -q torch torchvision
# Cell 2 โ confirm the free GPU runtime is attached, then run a quick tensor op
import torch
print("CUDA available:", torch.cuda.is_available())
x = torch.rand(3, 3).to("cuda" if torch.cuda.is_available() else "cpu")
y = x @ x.T
print(y)
No install is required. Open Colab in any browser, create a new notebook, and switch on a free GPU/TPU runtime before running compute-heavy cells.
# 1. Go to colab.research.google.com and sign in with a Google account
# 2. File -> New notebook
# 3. Runtime -> Change runtime type -> select GPU (or TPU) -> Save
# 4. Share the notebook link the same way you'd share a Google Doc