Four real options, and what each costs you
This lesson is deliberately specific, because “use a GPU” is useless advice to somebody who does not have one, and the free tiers are usable if you know their edges.
Google Colab, free tier. A T4 with 16 GB of GPU memory, about 12 GB of system RAM, and a session that ends after roughly a few hours: sooner if the tab is idle, and availability is not guaranteed when demand is high. Good for: fine-tuning a small model with LoRA, running anything up to about a 7B model in 4-bit, exploring a dataset. The T4 predates bfloat16 support, so use float16 and watch for the overflow failure.
Kaggle Notebooks. Around 30 hours of GPU per week, with a choice of a P100 or two T4s, and sessions up to nine or twelve hours. The weekly quota and the longer sessions make it the better free option for anything that needs to run overnight. Datasets can be attached from Kaggle or pulled from the Hub.
Hugging Face Spaces, CPU Basic. This hardware has no hourly compute charge and provides 2 vCPUs and 16 GB RAM. Creating or duplicating a Gradio or Docker Space on it currently requires an eligible subscription. Static Spaces are free to create, and Gradio can also run on your own machine. Check the current account rules before choosing a hosted setup. Current Spaces access
ZeroGPU on Spaces. Shared GPU time is allocated to a decorated Gradio function within quotas. Using existing ZeroGPU demos and hosting your own have different conditions. Eligible free personal accounts can currently host a limited number; other account types have their own limits. Check the current hardware, supported versions and account rules. ZeroGPU requirements
Working with a session that will end
Everything about free compute follows from one fact: the machine is temporary. Write code that assumes it.
- Save to the Hub, not to the session. A private model or dataset repository is durable storage that costs nothing.
trainer.push_to_hub() # or
api.upload_folder(folder_path="./out", repo_id="you/run-1")- Checkpoint often and resume.
save_stepsset to something you can afford to lose, andresume_from_checkpoint=Trueon restart. - Mount Drive on Colab for intermediate files if you prefer, but the Hub survives the notebook and is easier to share.
- Do not download datasets you will stream. The disk is small and the download is repeated on every restart.
The thing that wastes most free GPU time
Installing packages. A fresh session spends several minutes on pip install before any work happens, and if you are iterating on a bug you pay it repeatedly. Two habits help: pin versions so resolution is fast and reproducible, and get the code correct on CPU with a tiny model first, then switch the model name and the device. A script debugged on a 0.5B model on CPU almost always runs unchanged on a 7B model on GPU.
Costs, when free runs out
Rental prices move constantly, so treat these as orders of magnitude rather than quotes. Community GPU marketplaces rent a 24 GB card for something in the region of a few tens of US cents per hour, and an 80 GB card for a small number of dollars per hour. Hugging Face’s own hosted options and the large clouds sit above that, buying reliability and integration.
The arithmetic that matters more than the rate: a LoRA fine-tune of a 7B model on a few thousand examples is a matter of hours, not days. At those rates it is a few dollars. People assume fine-tuning is expensive because full training of a foundation model is expensive; adapting one is not, and the training module returns to this.
The rules you must not break
Free tiers are offered on terms. Mining cryptocurrency, running a public service off a notebook, chaining accounts to evade quotas, and leaving jobs running with nobody watching are all against the terms of one or more of these providers and get accounts suspended. The quotas exist because the compute is scarce.
Do this now
Open a free Colab or Kaggle notebook and run !nvidia-smi. Write down the GPU name and the memory. Then compute, from the previous lessons, the largest model you could serve on it at bfloat16, at 8-bit and at 4-bit. That is your working envelope, and knowing it stops you starting projects that were never going to fit.
Check your understanding
A learner fine-tunes on free Colab and loses six hours of work when the session ends. What change most directly prevents a repeat?
Pick the one you would defend. Your answer stays private.
Your place and first choices stay on this browser. Classroom credit is recorded separately.
Every lesson here is open. Your progress is recorded once you pass the Image Generation, in Practice exam.
Stuck on something?Ask Arjun, your AI tutor