Google drops CodeGemma for lightweight code completion
Google just released CodeGemma in collaboration with Hugging Face, bringing a family of open-access code specialists built on Gemma. Trained on an extra 500 billion tokens, the lineup includes an infilling-focused 2B model that runs on consumer hardware alongside 7B base and instruct variants. Why it matters: It offers developers fast, private code completion without needing massive cloud infrastructure.

CodeGemma is Google's new open-access code model family, built in collaboration with Hugging Face to handle code completion, code generation, and developer chat right on your machine.
The lineup builds on Gemma's 2B and 7B checkpoints, trained on an extra 500 billion tokens focused on code, mathematics, and English text, all retaining an 8K context window.
Three models built for different jobs
Google splits CodeGemma into three distinct variants with very specific duties.
The 2B base model was trained exclusively on code infilling. It is designed specifically for fast, low-latency completions where data privacy and local execution matter most.
The 7B base model devotes 80% of its training mix to infilling alongside natural language data, making it useful for both code completion and language understanding. The 7B Instruct model adds instruction tuning on top for conversational programming help and math reasoning.
Under the hood, CodeGemma handles completion using a fill-in-the-middle approach. You pass the code before and after your cursor wrapped in dedicated prefix and suffix tokens, and the model writes what belongs in between, with multi-file separator support built in.
On benchmarks, CodeGemma 7B beat Code Llama 7B and StarCoder 2 7B on HumanEval and MultiPL-E across Python, Java, JavaScript, and C++, trailing only DeepSeek-Coder-7B. According to the technical report, it also logged the top GSM8K score among 7B models.
Hardware specs and how to run it
Hardware requirements are light enough for ordinary developer setups.
The 2B model runs code completion using roughly 6 GB of RAM in float16 precision, making it an easy fit for consumer GPUs or even on-device applications. The 7B model can be loaded with 4-bit quantization on about 9 GB of memory, which fits inside standard consumer cards and standard Google Colab GPU instances.
The checkpoints, safetensors, and GGUF files are already available on the Hugging Face Hub, with direct integration in Transformers 4.39. Google also added compatibility across JAX, PyTorch, Gemma.cpp, and TensorRT-LLM, plus one-click deployment via Vertex AI and Hugging Face Inference Endpoints.
One quirk to keep in mind: the 7B model can be chatty during completions, sometimes spitting out extra lines after finishing the job. You will want to register the infilling delimiter tokens as stopping criteria in your pipeline.
Why it matters
If you want an offline, private code completion engine running directly inside your IDE without paying cloud API fees, CodeGemma 2B is an immediate download. It fits neatly on a laptop while keeping latency low enough for real-time keystroke suggestions.
While DeepSeek-Coder still edges it out on pure benchmark numbers, CodeGemma arrives with massive tooling support across the Google and Hugging Face ecosystems. We think its real appeal is convenience: an officially backed, highly efficient base model that makes local coding assistants practical for everyday developers.
Sources (2)
- huggingface.co(opens in a new tab)Originalhuggingface.co
- developers.googleblog.com(opens in a new tab)Reportdevelopers.googleblog.com
Topic trackerGoogle Gemma model family
- Google drops Gemma 2 with giant-killing 27B model
- Google unlocks 2M context and code execution for Gemini
- Google drops CodeGemma for lightweight code completionThis story
- Google drops Gemma, a powerful open-source model you can run locally