TL;DR
Gemini 1.5 is a family of multimodal models from Google. Gemini 1.5 Pro is a sparse mixture-of-experts Transformer that can read and reason over up to 10 million tokens, which is text, video or audio in one input. The report shows near-perfect recall on synthetic "find the hidden fact" tests up to 1 million tokens, and reports that core skills such as math, code and reasoning improved over the 1.0 generation. Gemini 1.5 Flash is a smaller, faster sibling distilled from Pro.
Builds on: Mixture of Experts, Knowledge Distillation, In-Context Learning, Transformer · Leads to: Retrieval-Augmented Generation, RULER
Why it mattered
The report says Gemini 1.5 Pro went well past the 200k-token ceiling it attributes to Claude 3, and did so across text, video and audio, not only text.
The practical effect is that a model can take a whole collection in one prompt. The report's examples include long-document question answering over about 700,000 words of material and question answering over videos of 40 to 105 minutes. It also reports that Gemini 1.5 learned to translate English into Kalamang, a language with fewer than 200 speakers, from a reference grammar, a dictionary and about 400 parallel sentences placed in the prompt.
For a reader, the report is a useful marker. It shows what a long context buys, and it lists the evaluations a team should run before trusting one.
The problem
Standard Transformers have to compare every token with every other token, so their cost grows fast with the length of the input. A model that reads one million tokens at once has to keep and attend to a very large amount of state. Earlier systems handled long inputs by cutting them into chunks, by summarizing them, or by retrieving a few passages from an external index with Retrieval-Augmented Generation. Each of these loses information that a single long context could keep.
Two further problems came with longer contexts. The first is quality: the model must still find and use a fact placed deep inside a long input. The second is cost: a model that is large in every layer is too slow and expensive to serve at this length. The report addresses both through architecture, training and serving choices.
How it works
The report describes its architecture and serving in prose rather than as one diagram, so this walkthrough follows the stages it describes (mainly its Section 3). Think of a single long query, such as a question about a long video.
- Input. The user supplies a long mixed input: a video, its audio and a question. Each part is converted to tokens and placed in one sequence. Check: the model sees one long list of tokens, not three separate inputs.
- Attention over the full context. Transformer layers let every token read the others, so the model can connect a fact in minute 3 of the video with a question about minute 90. Check: the cost of this step grows with the length of the sequence.
- Sparse experts. In each mixture-of-experts layer, a small router looks at a token and sends it to only a few expert sub-networks. The other experts stay idle for that token. Check: the model can have many parameters in total while each token uses only a fraction of them.
- Serving. The paper reports that Gemini 1.5 Flash was distilled from Pro, meaning a smaller model was trained to match a larger teacher, and that it was tuned for lower latency. Check: Flash is the faster option, Pro the more capable one.
- Output. The model writes its answer token by token. Check: the answer is produced from the whole context, not from a retrieved summary.
Tiny instance of step 3. Suppose there are four experts and the router gives one token the scores 0.1, 0.6, 0.2 and 0.1. With top-2 routing, only experts 2 and 3 run. Their weights, renormalized, are 0.6 / 0.8 = 0.75 and 0.2 / 0.8 = 0.25. Check: the two weights add to 1.
flowchart LR In[Long mixed input in one sequence] --> Tok[Tokens of text, audio and video] Tok --> Att[Attention over the full context] Att --> Rt[Router picks a few experts per token] Rt --> Out[Answer, token by token]
The math
The report does not give the router equations in full, so this section uses the standard form of a sparse mixture-of-experts layer. For one token with input x, let E_1 through E_N be the expert networks and let g_i(x) be the router weight for expert i. Only the top-k weights are kept; the rest are set to zero.
The output for a token x is the weighted sum of the selected experts. Here S(x) is the set of the k experts with the largest router scores, and the weights are renormalized over that set.
Step 3 in symbols
With N = 4 experts and k = 2, the tiny instance above is S(x) = {2, 3}, with \tilde{g}_2 = 0.75 and \tilde{g}_3 = 0.25. The output is y(x) = 0.75 E_2(x) + 0.25 E_3(x). Only 2 of the 4 expert networks run for this token. Total parameters grow with N, but the compute per token grows only with k. This is the idea the paper describes: the total parameter count can grow while the number of parameters activated for any given input stays fixed.
Converting tokens to words
The report gives one ratio that is useful for planning. Ten million tokens is about 7 million words of text. That is a ratio of 0.7 words per token. Applied to a 500,000-token document, the same ratio gives 350,000 words. The report's own example is "War and Peace", which it says is 587,287 words. At the same ratio that is about 839,000 tokens, so the whole novel fits in one 1-million-token window.
Results
The main results are these, as the report states them.
- Needle recall. Gemini 1.5 Pro reaches above 99.7% recall up to 1 million tokens of "haystack" in text, video and audio. For the text haystack task, it reaches 100% recall up to 530,000 tokens. The report also reports recall maintained at 10 million tokens of text, about 9.7 million audio tokens (up to 107 hours) and about 9.9 million video tokens (up to 10.5 hours). These needle tests are synthetic: a fact is placed in a long context and the model is asked to retrieve it.
- Core capabilities. Against Gemini 1.0 Pro, the report counts wins on 44 of 50 benchmarks for Gemini 1.5 Pro and 41 of 50 for Gemini 1.5 Flash. Against Gemini 1.0 Ultra, Pro wins on 35 of 45 benchmarks. Flash wins on 21 of 44 benchmarks against 1.0 Ultra, which the report presents as a notable result for a smaller, faster model. Math, science and reasoning improve by 49.6% over 1.0 Pro, according to the report's own percentages.
- Against its own earlier release. Compared with the February 1.5 Pro, the updated model wins on 25 of 32 core benchmarks (78.1%) and on 12 of 13 vision benchmarks (92.3%). The report says audio and translation performance stayed roughly neutral in the update.
- The February-to-May update. The updated Pro raises MATH from 58.5% to 67.7% and GPQA from 41.5% to 46.2%, the report says.
- Serving speed. In the report's Table 3, Gemini 1.5 Flash spends 1.5 ms per output character in English, and Gemini 1.5 Pro spends 4.3 ms. Flash is the fastest of all the models the report tests, in all four languages.
The limits are the report's own and the reader's. The needle tests are synthetic and measure retrieval, not reasoning over long inputs. Passing one at 1 million tokens says nothing about whether the model reasons correctly across many scattered facts in that same window; the report's realistic tasks are the test for that, and they are harder to score. Most numbers are Google's own evaluations, and the benchmark scores are summaries rather than per-task results.
Reading guide
- Section 1, Introduction. Read first. Needs In-Context Learning and the idea of a context window. Figure 1 is the single most important picture in the report.
- Section 2, An Improved Gemini 1.5 Pro. Post-release gains. Needs nothing new.
- Section 3, Model Architecture. Needs Mixture of Experts for 3.1 and Knowledge Distillation for 3.2. Section 3.3 on latency needs the idea of time per output character.
- Section 4, Training Infrastructure. Hardware and data, mostly referenced to the 1.0 report. Light reading.
- Section 5, Evaluation Results. The long-context section. 5.2.1 covers diagnostic tests such as perplexity and needle recall. 5.2.2 covers realistic tasks that need retrieval plus reasoning. Needs In-Context Learning.
- Section 6, Core Capability Evaluations. Benchmark tables for math, code, multilinguality and vision. Read the summaries, not every table.
- Sections 7 to 10. Math results, the Flash-8B model, safety, and the discussion. Section 10 summarizes the claims.
Check yourself
QuestionIn a needle-in-a-haystack test, what is the 'needle' and what does the test measure?Show answer
The needle is a specific fact placed somewhere inside a long context, and the haystack is the rest of that context. The test measures whether the model can retrieve the fact when asked about it, at a given context length and position.
QuestionUsing the report's ratio of 10 million tokens to about 7 million words, how many words is a 500,000-token input?Show answer
The ratio is 7,000,000 / 10,000,000 = 0.7 words per token. So 500,000 tokens is about 500,000 x 0.7 = 350,000 words.
QuestionWhy can a sparse mixture-of-experts model have many more parameters than a dense model of the same compute cost?Show answer
Because a router sends each token to only a few experts. Total parameters grow with the number of experts, but each token activates only k of them, so the compute per token depends on k, not on the total.
QuestionA team wants to use a 10-million-token context to answer questions over an archive. Why should it still test recall on its own data before trusting the answers?Show answer
The report's needle results are on synthetic tasks, and its realistic results are on specific benchmarks. The team's data and questions can differ, and recall on a planted fact does not guarantee correct reasoning over many facts. A test on its own data, with planted facts placed at several depths, shows whether the long context works for this use.
Sources
- Gemini Team, Google (2024). Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context. arXiv:2403.05530. https://arxiv.org/abs/2403.05530
- DOI: https://doi.org/10.48550/arXiv.2403.05530