JA EN
LearnModel Families
·★ MEMBER·PAPER·10 min read

The Gemma Family from Scratch — Lineage, Inventions, and Where It Fits

Google's open-weight LLM family, walked generation by generation. Distillation, local attention, effective parameters — the invention behind each release — plus the licensing detail that turns into an incident if you miss it, and how to actually run one on your own machine with Ollama.

ModalitytextTaskmodel-guideModel familygemma

Gemma: Open Models Based on Gemini Research and Technology

Primary source — what this article is built on

undefined2026-08-12

Gemma: Open Models Based on Gemini Research and TechnologyarXiv:2403.08295Paper page·PDF
Gemma 2: Improving Open Language Models at a Practical SizearXiv:2408.00118Paper page·PDF
Gemma 3 Technical ReportarXiv:2503.19786Paper page·PDF

Restaurants and loaves of bread — what "open weight" means

ChatGPT and Gemini are restaurants. The food — the answers — is good, but you never get into the kitchen and you cannot take the recipe home. When the place closes, whether that means a shutdown or a price hike, that is the end of it.

Gemma, which Google has been shipping since 2024, is closer to handing out loaves that have already been baked. The recipe — the training data and the training procedure — stays private, but the bread itself, the trained weights, comes home with you. Slice it and eat it (inference), knead it back into dough and rebake it (fine-tuning), or serve it in your own shop (ship it inside a product). Models distributed this way are called open-weight models.

Gemma is the younger sibling of Gemini, spun out of the same research and technology, and it has shipped at roughly one generation a year — the first in 2024, Gemma 4 in 2026. This article walks that lineage in order: what each generation actually invented, the licensing detail that turns into an incident if you miss it, and how to put one to work on your own machine with Ollama.

Groundwork: how to read "7B", and what a family is

The "2B" and "7B" in a model's name are parameter counts. B is billion, so 7B means a gigantic function with seven billion tunable numbers inside it. Whether it fits on your machine comes down to how many bytes you keep each one in. At 16 bits (two bytes), 7B is about 14GB; compressed down to 4 bits (quantized), about 3.5GB plus overhead. So memory ≈ parameter count × bytes per parameter — one multiplication is enough to estimate what you need.

A "family" is the set of siblings — different sizes, different specialities — built from one design philosophy and one training pipeline. Within a generation the tokenizer and the conventions are shared, which makes it cheap to prototype on the small one and swap the large one in later.

Generation 1: Gemma 1 (2024) — entry and foundations

The first Gemma arrived in February 2024 in two sizes, 2B and 7B. Inside was a standard decoder-only Transformer built from stacked attention, with an 8K-token context. Meta's Llama models already had a head start in open weights; this was Google entering with "small, high-quality models built on Gemini's technology."

The conventions set here are still in force. Every size ships in two flavours: a base version, the raw thing that does nothing but predict what comes next, and an instruct version — the one carrying the -it suffix — tuned to follow instructions. For chat you always want the -it side. This is also where the pattern of side branches growing off the trunk began: CodeGemma for code, PaliGemma for image-plus-language.

Generation 2: Gemma 2 (2024) — the invention of distillation

June 2024 brought Gemma 2 at 27B and 9B, with a 2B added later. Its defining feature is that the smaller models were trained by knowledge distillation.

The analogy: instead of studying alone from past exam papers and their single correct answers, you get to watch how your tutor hesitates. Ordinary training teaches one point — "the next word is cat." Distillation has the student copy the entire probability distribution a large teacher model emits: cat 70%, kitten 20%, dog 5%, and so on. The teacher's knowledge lives precisely in how it spreads probability across the candidates that are not the answer.

The knob controlling how smooth that distribution is is the temperature TT.

pi=exp(zi/T)jexp(zj/T)p_i = \frac{\exp(z_i / T)}{\sum_j \exp(z_j / T)}
(1)

In equation (1), ziz_i is the raw score the model produces — the logit — and TT is the temperature. T=1T=1 is plain softmax; raise TT and every score shrinks toward its neighbours until the gaps stop mattering, flattening the distribution out. In words: score every candidate word, divide each score by the temperature, push it through exp\exp so nothing comes out negative, then divide by the total of all of them so the whole set adds up to 1 — percentages, in other words. Dividing by a larger TT before that comparison is what narrows the gap between first place and second, which says the same thing as the model gets less certain. Distillation turns TT up to smooth the teacher's distribution before the student copies it, pushing the information carried by the second-place and lower candidates through to the student.

FIG 1Move the temperature T and the distribution goes from spiky to flat. What a distilled student learns is the teacher's distribution after T has smoothed it — hesitation included, right down to how probability gets spread across the candidates that are not the answer

What distillation buys translates directly into "smarter at the same size." Learning from a distribution a large model has already digested is more sample-efficient than a small model working through raw data on its own — and Gemma 2's 2B and 9B rode exactly that to a reputation for punching above their weight.

What's behind this

§

Members-only from here

371 walkthroughs, 26 textbook chapters, 48 student units and 6 close readings — all included for $4.99/mo, with three new explainers every day. Cancel any time; access runs to the end of the period.

Already a member? Sign in to keep reading

References

  1. Gemma: Open Models Based on Gemini Research and Technology. arXiv:2403.08295Paper page·PDF
  2. Gemma 2: Improving Open Language Models at a Practical Size. arXiv:2408.00118Paper page·PDF
  3. Gemma 3 Technical Report. arXiv:2503.19786Paper page·PDF

This article is written from the source paper above. Where they differ, the original is authoritative.

Comments

Sign in to comment