Use AI for XFor makers
Use AI for X
Choose AI tools with sources, not hype.
Compare side by side For makers

Gemma 4

Source-checked

in Coding · 11 tools compared

Open weights you run and license yourself

Gemma 4 is a family of open-weight models from Google DeepMind that read text and images, plus audio on the smaller sizes, and write text, including code. The weights are free to download under the Apache 2.0 license, which permits commercial use. Five sizes run from E2B for phones to 31B for workstations; at 4-bit precision the weights need about 2.9 GB to 17.5 GB of GPU memory.

  • Free plan0

Free includes: All five sizes in pre-trained and instruction-tuned versions from Hugging Face, Kaggle or Ollama; commercial use permitted; you pay only for your own hardware, storage and power.

Runs on Local on Linux, Windows or macOS · Google AI Studio · Gemini API · Android and edge devices

Works with Hugging Face Transformers · Kaggle · Ollama · llama.cpp · LM Studio

+4 more vLLM · MLX · Keras · Vertex AI

Prices and limits checked against 10 official sources · how we check

Gemma 4 homepage screenshot showing the official landing page
Official sitedeepmind.googleCaptured

Is Gemma 4 your product? Send updates or get featured. Paid placement never changes this profile.

Gemma 4: Apache 2.0 weights you can use commercially, but you supply 2.9 GB to 17.5 GB of GPU memory at 4-bit

Updated September 29, 2026 · By Elias Brandt · Documentation review, not tested hands-on

Pros

  • Permissive license
  • Runs offline
  • Published memory table

Cons

  • Hardware is your cost
  • No paid hosted tier on the Gemini API
  • Older training data
  • Audio on small sizes only

Bottom line

Open weights (Apache 2.0) plan

All five sizes in pre-trained and instruction-tuned versions from Hugging Face, Kaggle or Ollama; commercial use permitted; you pay only for your own hardware, storage and power.

Choose Gemma 4 if

You want a model that runs on your own machines and can be used commercially, because the weights are free and the cost is the hardware you already own or rent.

Skip it if

You want a finished chat or editor assistant, because Gemma 4 is a model you must host and wire up yourself.

Best forDevelopers building local coding toolsTeams that cannot send code or documents to a hosted APIMobile and edge developersNon-technical users wanting a ready chat app

Strengths, limits and who it suits, in full

Strengths

  • Permissive license Apache 2.0 allows commercial use, modification and redistribution without a separate Gemma agreement.
  • Runs offline Downloaded weights work without an account or network connection once installed.
  • Published memory table Google lists approximate memory for every size at 16-bit, 8-bit and 4-bit precision.

Limits

  • Hardware is your cost The 31B model needs 17.5 GB even at 4-bit, before context memory.
  • No paid hosted tier on the Gemini API The pricing page lists only a free tier, and free-tier content is used to improve Google products.
  • Older training data The pre-training data has a January 2025 cutoff, so later events need to be supplied in the prompt.
  • Audio on small sizes only The 26B A4B and 31B models accept text and images but not audio.

Who it suits

  • Developers building local coding tools the larger sizes are positioned by Google for IDE assistants and agents on consumer GPUs.
  • Teams that cannot send code or documents to a hosted API weights run on your own machines, so data stays inside your infrastructure.
  • Mobile and edge developers E2B and E4B are the sizes designed for phones and single-board computers.
  • Non-technical users wanting a ready chat app Gemma 4 is a model, not an app; a hosted assistant is the simpler route.

How much does Gemma 4 cost?

Prices confirmed · checked

Regional prices: On the Gemini API pricing page, Gemma 4 is free of charge on the free tier, and the paid tier is marked not available; free-tier content is used to improve Google products.

Google AI Studio offers the 26B A4B and 31B models for trying prompts. Hosting on Vertex AI, Cloud Run or third-party providers is billed by those services and is not priced here.

PlanPriceWhat you get
Open weights (Apache 2.0)0 sourceFrom ai.google.dev/gemini-api/docs/pricing, checked Sep 29, 2026 (opens in a new tab)All five sizes in pre-trained and instruction-tuned versions from Hugging Face, Kaggle or Ollama; commercial use permitted; you pay only for your own hardware, storage and power.

How far does it go?

  • What fits on a 24 GB GPU at 4-bit31B: 24 - 17.5 = 6.5 GB left for runtime and context. 26B A4B: 24 - 14.4 = 9.6 GB left. 12B: 24 - 6.7 = 17.3 GB left. At 8-bit, 26B A4B needs 28.8 GB, more than 24 GB. The table includes 20% loading overhead but excludes context memory, so long prompts need more. Arithmetic on published estimates, not a measurement.

Arithmetic from the published allowances above, not a usage test.

Gemma 4 row on the official Gemini API pricing page showing free-tier and paid-tier availability
Official pricing pageai.google.devCaptured

Taxes, currency and promotions can change the price you see at checkout.

Try Gemma 4 free (opens in a new tab)

Key features

FeatureWhat it doesWatch out
Five sizes: E2B, E4B, 12B, 26B A4B (mixture of experts) and 31BActivates about 3.8B of its 25.2B parameters per token, so it generates close to the speed of a 4B model.All parameters must still sit in memory, so it needs 14.4 GB even at 4-bit.
Text and image input on every size; audio on E2B, E4B and 12BE2B, E4B and 12B transcribe and translate speech; all sizes read video as image frames.Audio clips are limited to 30 seconds and video to 60 seconds at one frame per second.
128K context on E2B and E4B, 256K on the larger sizes—
Configurable thinking mode for step-by-step reasoning—
Native function calling and system prompts for agents—
Code generation, completion and correction—
Official 4-bit QAT checkpoints, including GGUF for llama.cpp—
Pre-trained and instruction-tuned weights for fine-tuning—
Quantization-aware checkpointsOfficial Q4_0 GGUF and 4-bit server formats are trained to limit quality loss from compression.The memory table excludes the context window, so long prompts need extra memory on top.
Gemma 4 features page screenshot showing the product interface
Official sitedeepmind.googleCaptured

Is Gemma 4 really free for commercial use?

Yes. The Gemma 4 model card, the license page linked from the documentation and the April 2 launch post all state that Gemma 4 is released under Apache 2.0, a license that permits commercial use, modification and redistribution. The official Hugging Face repositories carry the apache-2.0 tag and are not gated behind an access request.

This is a change from earlier generations. The Gemma Terms of Use, last modified April 1, 2026, say they apply to the older models listed in their appendix and send Gemma 4 users to the Gemma 4 license instead. Apache 2.0 still has conditions: redistributed copies must include the license text and notices, and modified files must say they were changed.

Which Gemma 4 size fits your GPU or laptop?

Google publishes approximate memory needed just to load each size. The figures include 20% overhead for loading but not the context window, which grows with the length of the prompt and reply. The 26B A4B model is a mixture of experts: it activates about 4B parameters per token, but all 26B must be loaded, so it needs almost as much memory as a dense model of that size.

The get-started guide suggests the 26B A4B model as a starting point for many tasks. It lists E2B and E4B for mobile devices and laptops, 12B for laptops, desktops and small servers, and 31B for large servers. The launch post adds that unquantized 16-bit weights of the larger models fit on a single 80 GB NVIDIA H100.

  • E2B: 11.4 GB at 16-bit, 5.7 GB at 8-bit, 2.9 GB at 4-bit, 1.1 GB on mobile.
  • E4B: 17.9 GB, 8.9 GB and 4.5 GB; 2.5 GB on mobile.
  • 12B: 26.7 GB, 13.4 GB and 6.7 GB.
  • 26B A4B: 57.7 GB, 28.8 GB and 14.4 GB.
  • 31B: 69.9 GB, 34.9 GB and 17.5 GB.

Which sizes handle audio, images and long documents?

Every size accepts text and images, and all of them can read video as a sequence of frames. Audio input for speech recognition and speech translation is limited to E2B, E4B and the 12B model. The model card caps audio at 30 seconds and video at 60 seconds when processed at one frame per second, so longer recordings must be split.

Context is 128K tokens on E2B and E4B and 256K on 12B, 26B A4B and 31B. For images, a configurable visual token budget from 70 to 1,120 trades detail for speed: the model card recommends higher budgets for OCR and small text, and lower ones for captioning or many video frames.

Can you use Gemma 4 without your own GPU?

Google AI Studio offers the 26B A4B and 31B models for trying prompts in a browser, according to the launch post. On the Gemini API pricing page, Gemma 4 input, output and context caching are free of charge on the free tier, while the paid tier is marked not available. The same row says free-tier content is used to improve Google products.

That last point matters more than price. Code, contracts or customer data sent through the free API tier fall under that improvement clause, while the same weights run locally never leave your machine. For production hosting, the launch post points to Vertex AI, Cloud Run and GKE, each billed under its own Google Cloud pricing rather than a Gemma fee.

Where do you download the official weights?

The documentation links Kaggle and the google/gemma-4 collection on Hugging Face as download sources, and the DeepMind page adds Ollama, LM Studio and Docker. On Hugging Face, each size has a base model, an instruction-tuned -it version and an -assistant draft model used for faster speculative decoding. Search results also show unofficial sites offering Gemma 4 downloads; use only the sources Google links.

The Ollama guide pulls the default model with ollama pull gemma4 and lists the tags gemma4:e2b, gemma4:e4b, gemma4:26b and gemma4:31b. For llama.cpp or LM Studio, the memory page points to the official quantization-aware GGUF checkpoints, which are trained to keep quality close to the full-precision model at 4-bit.

Which settings does Google recommend for coding and reasoning?

The model card gives one sampling configuration for all use cases: temperature 1.0, top_p 0.95 and top_k 64. Thinking mode is switched on by placing the think control token at the start of the system prompt, and the model then writes its reasoning in a separate channel before the answer. Libraries such as Transformers and llama.cpp apply the chat template for you.

In multi-turn chats, earlier reasoning should not be sent back to the model; only the final answers belong in the history, except for tool-call turns. Put images before the text of a prompt and audio after it. Ignoring these rules does not break the model, but results can differ from the published benchmarks.

Can the E4B model write a tested function offline on a laptop?

Proposed evaluation · not performed yet

On a laptop with at least 8 GB of free memory, install Ollama and pull gemma4:e4b, then disconnect from the network. No account, API key or paid service is involved. Use a short specification you wrote yourself: a Python function that parses dates in three stated formats and rejects everything else.

  1. Record the machine, operating system, Ollama version and model tag.
  2. Ask for the function and five pytest cases, with thinking mode left at its default.
  3. Save both files and run pytest locally without editing the code.
  4. Ask once for a fix if any test fails, then run the tests again.
  5. Note the total wall-clock time and whether the network stayed disconnected.

Accept code that passes its own tests and three extra cases you add by hand, including one invalid date. Reject answers that call external packages you did not request, invent date formats or never produce runnable code. No code quality or speed result is reported until the exercise is run.

If you want a finished assistant inside your editor rather than a model to host, compare GitHub Copilot and Cursor. For a hosted general assistant with no hardware to manage, see Claude or ChatGPT.

Is Gemma 4 worth it?

Documentation review plus dated public user reports. Documentation review, not tested hands-on. Not scored.

Worth it if

  • You want a model that runs on your own machines and can be used commercially, because the weights are free and the cost is the hardware you already own or rent.
  • Your code or documents cannot go to a hosted API, since local weights keep the data inside your infrastructure.
  • You build for phones or edge devices, where the E2B and E4B sizes are the ones designed for that.

Probably not if

  • You want a finished chat or editor assistant, because Gemma 4 is a model you must host and wire up yourself.
  • Your GPU has less than about 17.5 GB free and you want the 31B size, since that figure excludes context memory and long prompts need more.
  • You plan to send sensitive data through the free Gemini API tier, where free-tier content is used to improve Google products.

Gemma 4 alternatives

Other coding tools checked with the same method. Pick by the job, not by a score.

All AI coding toolsCompare tools side by side

Used Gemma 4? Write the first review. Visitor opinions are moderated and kept separate from our source checks.

Frequently asked questions

Is Gemma 4 the same thing as Gemini?

No. Google describes Gemma 4 as open models built from the same research and technology as Gemini 3, but Gemma weights are downloaded and run by you, while Gemini models are proprietary and used through Google apps or the API. Gemma 4 complements Gemini rather than replacing it, according to the launch post.

Can I fine-tune Gemma 4 on my own data?

Yes. The documentation includes guides for QLoRA and full fine-tuning with Hugging Face Transformers, plus vision tuning, and the launch post mentions Colab and Vertex AI. Memory needs for tuning are far higher than for inference and depend on batch size and method, so the inference table is not a guide to the hardware required.

How current is what Gemma 4 knows?

The model card gives a pre-training data cutoff of January 2025. The model has no knowledge of later releases, prices or events unless you supply that information in the prompt or connect a search tool through function calling. Check library versions and API details in generated code against current documentation before relying on them.

Can Gemma 4 run on a phone?

The E2B and E4B models are the sizes built for phones and edge devices. Mobile versions using LiteRT-LM need about 1.1 GB and 2.5 GB of memory, according to the memory table, and the launch post describes offline use on phones, Raspberry Pi and NVIDIA Jetson Orin Nano. Google AI Edge Gallery offers a way to try them.

Does the 31B model beat the smaller sizes on every task?

On the published instruction-tuned benchmarks it scores highest, for example 80.0% on LiveCodeBench v6 against 77.1% for 26B A4B. The gap is small for the extra memory, and the MoE model generates faster. Benchmarks are the provider's figures, not our measurements, and results on your own code can differ.

Is Gemma 4 free?

Yes, the weights are free to download and use. All five sizes, including 26B A4B and 31B, are released under Apache 2.0, which permits commercial use, and there is no subscription. The cost is hardware: at 4-bit, 26B A4B needs about 14.4 GB and 31B about 17.5 GB of GPU memory, before context memory. The Gemini API pricing page lists only a free tier for Gemma 4.

Is Google Gemma free?

Gemma 4 is: its weights are free under Apache 2.0, including commercial use. Earlier Gemma generations fall under the separate Gemma Terms of Use, so read that page before using an older model. Running any Gemma model costs your own hardware or the rates of the cloud service that hosts it.

Sources and method10 official sources · 7 details checked · Sep 29, 2026

How we checked this profile

7 details on this page were checked against Gemma 4's own pages and help documentation (Sep 29, 2026).

See the checks by section7 documented
SectionChecksLast checkedSources
Article text1 documentedai.google.dev/apache_2
Features2 documentedai.google.dev/model_card_4
Plans and prices2 documentedai.google.dev/coreai.google.dev/pricing
Other details1 documentedai.google.dev/terms
Strengths and limits1 documentedai.google.dev/model_card_4

Sources for this profile

All 10 sources

The model card, license page and launch post state Apache 2.0 for Gemma 4; the Gemma Terms of Use page says it covers earlier Gemma models and points Gemma 4 users to the Gemma 4 license. The April 2 launch post lists four sizes; the 12B model appears in later documentation (updated July 2026) and on Hugging Face from May 2026. The Ollama page lists tags for four sizes, without 12B. Memory figures are Google estimates that may vary by tool.

Sources checked Sep 29, 2026. Found something out of date? See how we correct profiles.

Back to top