Running Gemma 4 for free on Kaggle: shrinking it from 62 GB to 18 GB
Google Gemma 4 31B takes up about 62 GB in float16, yet the author managed to run it on free Kaggle, which caps disk space at 57.6 GB. The trick: quantize the model to NF4 on the fly, split it across two T4 GPUs with device_map="auto", delete the Hugging Face cache once loading finishes, and push the result straight to the Hub. The final model weighs 18.3 GB.
AI-processed from Habr AI; edited by Hamidun News
Google Gemma 4, a large 31-billion-parameter model, has been squeezed from 62 GB down to 18.3 GB and run for free on Kaggle, even though the platform's disk limit is smaller than the model's original size.
Where can you run Google Gemma 4 for free?
On Kaggle, by quantizing the model down to 18.3 GB. The catch is that Kaggle's disk is capped at 57.6 GB, while the original model weighs 62 GB. On-the-fly quantization and uploading to the Hugging Face Hub solve the problem.
How do you shrink Google Gemma from 62 to 18.3 GB?
Quantize it to 4 bits, delete the cache automatically during execution, and upload the result directly to the Hugging Face Hub.
Can you run the model for free on Kaggle?
Yes. Google Gemma 4 was shrunk from 62 GB to 18.3 GB and run for free on Kaggle, despite the platform's 57.6 GB disk space limit.
- Dec 2, 202650 AI Models Beat 62 Teams at 'Zakovat': 48.3% Correct Answers vs 39.8%
- Dec 2, 2026OpenAI Opens Dots Agent to ChatGPT Plus Subscribers With 10,000+ Plugins
- Dec 2, 2026T-Decision-1 with 9B Parameters Beats Copernicus-57B on Russian: 71.6 vs. 71.2 Points
- Dec 2, 2026A Python Prompt Test in Under 150 Lines Catches Edits That Silently Break AI Answers
Key Questions Answered
Where can you run Google Gemma 4 for free?
On Kaggle, by quantizing the model down to 18.3 GB. The catch is that Kaggle's disk is capped at 57.6 GB, while the original model weighs 62 GB. On-the-fly quantization and uploading to the Hugging Face Hub solve the problem.
How do you shrink Google Gemma from 62 to 18.3 GB?
Quantize it to 4 bits, delete the cache automatically during execution, and upload the result directly to the Hugging Face Hub.
Can you run the model for free on Kaggle?
Yes. Google Gemma 4 was shrunk from 62 GB to 18.3 GB and run for free on Kaggle, despite the platform's 57.6 GB disk space limit.
Ship AI Faster with Founders, Engineers & Weekly Architecture Reviews
Inside Vibe Club (hamidun.com/club) — weekly live masterminds with Zhemal Khamidun, Tech Radar, full LMS access, and 370+ production Claude Code skills.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
