Google Colab vs Kaggle Notebooks: Which Free GPU Should You Use?
Compare Google Colab vs Kaggle Notebooks on identical PyTorch benchmarks, assigned GPU hardware (T4 vs Dual T4), session limits, and file persistence.
In the Google Colab vs Kaggle free GPU decision, Kaggle Notebooks wins on raw free hardware and predictability by offering Dual NVIDIA T4 GPUs (GPU T4 x2, 32 GB combined VRAM) with a transparent 30-hour rolling weekly quota and unattended 12-hour commits. Google Colab wins on interactive prototyping speed, Google Drive integration, zero phone-verification friction, and smooth scaling to paid L4, A100, and H100 runtimes.
Most head-to-head comparisons still cite retired Kaggle P100 GPUs or promise fixed daily Colab hours that do not exist. Comparing both platforms with an identical PyTorch benchmark notebook shows exactly what hardware each assigns, how long sessions survive, and what happens to your model weights when a container terminates.
Key Takeaways
- Hardware Assigned (Post-P100 Retirement): Kaggle retired its single P100 on September 15, 2026 and now assigns Dual NVIDIA T4 GPUs (
GPU T4 x2, 2x16 GB VRAM) to phone-verified accounts, whereas Colab Free typically assigns a single 16 GB T4 when available.- Quota Transparency: Kaggle publishes a clear 30-hour weekly GPU pool (resetting Saturdays at 00:00 UTC) plus
kaggle quotainspection, while Colab enforces unpublished dynamic limits that tighten during peak demand.- Unattended Execution: Kaggle’s
Save & Run Allcommit mode runs unattended for up to 12 hours even after you close your laptop; Colab Free disconnects idle tabs after roughly 90 minutes.- File Persistence: Colab wipes
/contentcompletely on disconnect unless you mount Google Drive, whereas Kaggle persists up to 20 GB inside/kaggle/workingacross saved versions and mounts large datasets read-only under/kaggle/input.
Google Colab vs Kaggle Notebooks: Hardware, Quotas, and Architecture Matrix
Google Colab and Kaggle Notebooks both run managed Jupyter containers backed by Google Cloud infrastructure, yet they optimize for different workflows. Colab acts as a cloud scratchpad tightly wired to Google Drive and GitHub, while Kaggle acts as a reproducible experiment runner with versioned datasets and fixed weekly compute budgets.
Figure 1: Platform positioning across quota predictability and interactive workflow speed for free cloud GPU notebooks.
Side-by-Side Technical Specification Matrix
Before running the identical benchmark notebook, review the documented free-tier boundaries from the Google Colab Official FAQ and the Kaggle Notebooks Documentation.
| Dimension | Google Colab (Free Tier) | Kaggle Notebooks (Free Tier) |
|---|---|---|
| Typical Free GPU | Single NVIDIA T4 (16 GB VRAM, not guaranteed) | Dual NVIDIA T4 (GPU T4 x2, 2x16 GB = 32 GB total VRAM) |
| System RAM & CPU | ~12.7 GB RAM, 2 vCPUs (varies dynamically) | ~29-30 GB RAM, 4 vCPUs |
| GPU Quota Policy | Unpublished dynamic limits based on demand and usage | 30 hours rolling weekly pool (resets Sat 00:00 UTC) |
| Max Continuous Session | Up to ~12 hours (can terminate earlier under load) | Up to 12 hours continuous interactive or commit run |
| Idle Timeout | ~90 minutes without browser activity | ~20 minutes interactive idle timeout |
| Background / Headless Run | Paid tiers only (Pro+ / Ultra) | Included free via Save & Run All (Commit) |
| Account Requirement | Standard Google account | Google/Kaggle account + SMS phone verification for GPU |
| Default File Persistence | Ephemeral /content (wiped on disconnect) |
Up to 20 GB saved in /kaggle/working per version |
Self-Contained Platform Verdicts
Google Colab (Free Tier)
- Verdict: Best zero-friction interactive GPU scratchpad for quick prototypes, Drive-backed datasets, and GitHub demos.
- Best for: Rapid notebook iteration, sharing runnable links with teammates, and workflows that later scale to paid L4/A100/H100 GPUs.
- Strengths: Instant launch from GitHub or Google Drive, longer 90-minute interactive idle window, and native integration with Colab MCP and Colab CLI.
- Trade-offs: Unpublished dynamic lockouts during peak hours, smaller ~12.7 GB system RAM, and no free background execution.
- Quota: Dynamic and unpublished; varies by global demand and recent account activity.
Kaggle Notebooks (Free Tier)
- Verdict: Best free cloud GPU for multi-hour training jobs, 32 GB dual-GPU memory splits, and predictable weekly scheduling.
- Best for: Fine-tuning LoRA adapters, unattended 6-to-12-hour training runs, and training on large public datasets without re-uploading.
- Strengths: Dual T4 GPUs (32 GB combined VRAM), ~30 GB system RAM, transparent 30-hour weekly budget, and free background commits.
- Trade-offs: Requires phone verification, shorter 20-minute interactive idle timeout, and clunkier ad-hoc Google Drive mounting.
- Quota: 30 hours/week GPU + separate ~20 hours/week TPU pool for phone-verified accounts.
Running the Identical Benchmark Notebook on Colab and Kaggle
To compare both platforms fairly without relying on outdated blog numbers, run the exact same self-contained Python diagnostic cell on a fresh Colab GPU runtime and a fresh Kaggle GPU T4 x2 runtime. This script inspects assigned GPU count, VRAM, CPU RAM, FP16 matrix-multiplication throughput, and local scratch disk write speed.
Setup Friction: Getting From Blank Tab to Active CUDA
On Google Colab, open a new notebook, click Runtime -> Change runtime type -> T4 GPU, and press Connect. You reach an active CUDA prompt in roughly 15 to 25 seconds with no phone verification step.
On Kaggle Notebooks, you must first verify a phone number in account settings to unlock accelerators. Inside a notebook, open the right-hand Session options drawer, set Accelerator to GPU T4 x2, toggle Internet on if you need pip or Hugging Face downloads, and wait 20 to 45 seconds (longer during peak queues) for provisioning.
Reproducible PyTorch Hardware and Throughput Script
Paste and run this identical cell on both platforms. It relies strictly on pre-installed PyTorch and standard library modules so pip variance never skews your comparison, following the synchronization guidelines in the PyTorch CUDA Semantics Documentation.
import os
import time
from pathlib import Path
import torch
def run_identical_platform_benchmark(matrix_size: int = 8192, iters: int = 30) -> dict[str, object]:
"""Benchmark GPU hardware, FP16 matmul TFLOPS, and scratch disk throughput."""
if not torch.cuda.is_available():
raise RuntimeError("No CUDA device detected. Enable GPU in runtime settings.")
gpu_count = torch.cuda.device_count()
gpus = [
{
"index": i,
"name": torch.cuda.get_device_name(i),
"vram_gb": round(torch.cuda.get_device_properties(i).total_memory / (1024 ** 3), 2),
}
for i in range(gpu_count)
]
# Warmup and timed FP16 GEMM benchmark on GPU 0
device = torch.device("cuda:0")
a = torch.randn((matrix_size, matrix_size), device=device, dtype=torch.float16)
b = torch.randn((matrix_size, matrix_size), device=device, dtype=torch.float16)
torch.cuda.synchronize()
start = time.perf_counter()
for _ in range(iters):
_ = torch.matmul(a, b)
torch.cuda.synchronize()
elapsed = time.perf_counter() - start
flops = 2.0 * (matrix_size ** 3) * iters
tflops = round((flops / elapsed) / 1e12, 2)
# Scratch disk sequential write check (256 MB)
scratch_file = Path("/tmp/bench_256mb.bin")
payload = os.urandom(1024 * 1024)
d_start = time.perf_counter()
with scratch_file.open("wb") as f:
for _ in range(256):
f.write(payload)
disk_mb_s = round(256.0 / (time.perf_counter() - d_start), 1)
scratch_file.unlink(missing_ok=True)
summary = {
"platform": "kaggle" if Path("/kaggle/working").exists() else "colab",
"gpu_count": gpu_count,
"gpus": gpus,
"fp16_tflops_gpu0": tflops,
"scratch_write_mb_s": disk_mb_s,
}
for k, v in summary.items():
print(f"{k}: {v}")
return summary
results = run_identical_platform_benchmark()
Interpreting Single-GPU Speed vs Dual-GPU VRAM Advantage
On a single card (cuda:0), both Colab’s T4 and Kaggle’s T4 x2 run the exact same NVIDIA Turing TU104 silicon (16 GB GDDR6, ~65 FP16 Tensor Core TFLOPS theoretical peak), so single-GPU step times stay nearly identical. The decisive hardware gap appears when a workload exceeds 16 GB VRAM or scales across two cards.
On Kaggle GPU T4 x2, you can wrap PyTorch models with torch.nn.DataParallel or pass device_map="auto" in Hugging Face Accelerate to shard a 14B-parameter 4-bit model across both 16 GB cards without hitting CUDA out of memory.
That extra 16 GB of free VRAM plus ~30 GB of host RAM makes Kaggle noticeably more resilient for QLoRA fine-tuning, as detailed in our LoRA vs QLoRA vs full fine-tuning guide.
What Happens to Your Files When a Session Ends
File loss is the biggest operational difference between Colab and Kaggle. Google Colab deletes everything inside /content the moment your VM recycles, whereas Kaggle preserves up to 20 GB inside /kaggle/working whenever you save a notebook version, while wiping temporary RAM and /tmp state on idle disconnect.
Figure 2: Storage lifecycle comparison showing which directories survive VM termination on Google Colab versus Kaggle Notebooks.
Google Colab: Ephemeral /content vs Mounted Google Drive
When a Colab session hits the 90-minute idle timer or 12-hour ceiling, the entire container filesystem under /content vanishes permanently. Only files explicitly written to a mounted Google Drive path (/content/drive/MyDrive/...) or pushed to an external hub (Hugging Face, S3, GitHub) survive.
Because reading thousands of tiny images directly over Drive FUSE is slow, the reliable Colab pattern is copying archives into /content for training speed while saving epoch checkpoints back to /content/drive.
Kaggle Notebooks: /kaggle/input, /kaggle/working, and Commit Snapshots
Kaggle splits storage cleanly into two paths:
/kaggle/input(Read-Only): Attached Kaggle Datasets, Models, and Competition files mount instantly at startup without consuming your working quota or requiring repeated uploads./kaggle/working(20 GB Persistent Output): Files written here are captured as versioned outputs whenever you run Save Version -> Save & Run All (Commit).
If an interactive Kaggle session times out after 20 minutes of inactivity without a commit, live RAM variables and unsaved edits disappear, though you can toggle Persistence -> Files only in the Session options drawer to retain /kaggle/working across interactive restarts.
from pathlib import Path
def resolve_output_dir(run_name: str) -> Path:
"""Return a session-safe output directory automatically on Kaggle or Colab."""
kaggle_working = Path("/kaggle/working")
if kaggle_working.exists():
out_dir = kaggle_working / run_name
else:
colab_drive = Path("/content/drive/MyDrive/ml_runs")
out_dir = (colab_drive if colab_drive.exists() else Path("/content")) / run_name
out_dir.mkdir(parents=True, exist_ok=True)
return out_dir
Using a single helper like resolve_output_dir() lets the exact same notebook run cleanly across both platforms without hardcoding fragile directory paths. If you ever hit dynamic account lockouts on Colab, follow our Google Colab free GPU setup and fixes tutorial to keep Drive checkpoints intact.
Decision Framework: Where Google Colab Wins vs Where Kaggle Wins
Neither platform dominates every workload. Pick the platform that matches your session length, dataset location, and automation needs, and keep both accounts active so you always have a zero-cost backup.
Where Google Colab Wins Over Kaggle Notebooks
- Google Drive and GitHub Workflows: Opening any
.ipynbstraight from GitHub or reading spreadsheets and PDFs directly from Google Drive requires zero manual dataset packaging. - Longer Interactive Thinking Time: Colab’s ~90-minute idle timeout gives you room to read papers, debug plots, and edit code between cell runs without losing your VM every 20 minutes.
- Agentic Coding and Upgrade Ceiling: Colab provides official MCP and CLI integrations hosted in the Google Colab MCP Server GitHub repository and walked through in our Google Colab MCP with Claude Code guide. It also scales directly to L4, A100, and H100 GPUs inside the same UI when a prototype outgrows free T4 hardware.
Where Kaggle Notebooks Wins Over Google Colab
- Multi-Hour Unattended Training: Clicking Save & Run All (Commit) executes your training script headlessly for up to 12 hours after you close your browser, completely free.
- Dual-GPU VRAM and System RAM: Getting two 16 GB T4 GPUs (32 GB combined) and ~30 GB host RAM eliminates OOM crashes that stop single-T4 Colab notebooks cold.
- Predictable Weekly Planning: Knowing you have exactly 30 GPU hours every week (verifiable via
kaggle quota) removes the anxiety of sudden, unpublished account lockouts right before a project deadline.
Frequently Asked Questions About Google Colab vs Kaggle Notebooks
Which gives more free GPU VRAM: Google Colab or Kaggle Notebooks?
Kaggle Notebooks provides more free VRAM by assigning Dual NVIDIA T4 GPUs (GPU T4 x2) with 16 GB per card for 32 GB total VRAM across multi-GPU workloads. Google Colab typically assigns a single 16 GB NVIDIA T4 on the free tier when capacity permits.
Does Kaggle still offer the free NVIDIA P100 GPU?
No, Kaggle officially retired the single NVIDIA Tesla P100 GPU on September 15, 2026. Phone-verified free accounts now use Dual T4 GPUs (GPU T4 x2) for GPU workloads alongside separate weekly TPU quotas.
Which platform has more predictable free GPU hours?
Kaggle Notebooks offers a transparent 30-hour rolling weekly GPU quota that resets every Saturday at 00:00 UTC and can be inspected in settings or via the Kaggle CLI. Google Colab enforces unpublished dynamic limits that fluctuate with global demand and recent usage.
What happens to saved files when a Colab or Kaggle session disconnects?
In Google Colab, all files inside /content are permanently deleted on VM recycle unless explicitly written to a mounted Google Drive folder. In Kaggle Notebooks, files written to /kaggle/working persist up to 20 GB when you commit or save a notebook version.
Can you run unattended background training runs on free Colab or Kaggle?
Kaggle Notebooks supports unattended background execution via its Save & Run All (Commit) mode for up to 12 continuous hours per run. Google Colab Free requires an active browser tab and disconnects idle sessions after roughly 90 minutes.
Why choose Google Colab if Kaggle offers Dual T4 GPUs and 30 weekly hours?
Google Colab wins for zero-friction Google Drive integration, faster interactive startup without phone verification, native GitHub notebook loading, and official MCP and CLI agent automation. It also scales smoothly to L4, A100, and H100 GPUs when you upgrade.
Combining Both Platforms Into One Zero-Cost ML Workflow
You do not need to pick one platform exclusively. Prototype data loaders, explore embeddings, and debug model code interactively in Google Colab where the 90-minute idle window and Google Drive integration keep iteration fast.
Once your training loop is verified and ready for a 4-to-10-hour run, drop the exact same notebook with resolve_output_dir() into Kaggle Notebooks, select GPU T4 x2, and trigger Save & Run All (Commit). Using Colab for interactive debugging and Kaggle for unattended training stretches your free cloud GPU capacity dramatically without spending a dollar.
When your weekly GPU demand routinely crosses 30 hours or needs 24 GB+ single-card VRAM without multi-GPU sharding, evaluate dedicated workstations against cloud rentals in our cloud vs local AI comparison.