Google gives Gemini 1.5 Pro a 2-million-token window
Neutral Google By What The Future Newsroom · May 14, 2024 · 5 min read

Google gives Gemini 1.5 Pro a 2-million-token window

Google announced a private preview of Gemini 1.5 Pro with support for up to 2 million tokens, double its previous maximum. The update lets the model analyze much larger documents, codebases, videos and audio recordings, while Gemini 1.5 Flash targets faster, narrower workloads.

Google is expanding how much information its Gemini AI models can process at once, with a new version of Gemini 1.5 Pro that can take in up to 2 million tokens. The company announced the private preview during a keynote at the Google I/O 2024 developer conference Tuesday.

“A larger context window makes AI more capable, but this is mainly a routine model capability update without clear harm or societal degradation.”Why it scores Neutral

The change matters because a larger context window lets a model work across much bigger inputs, including long documents, codebases, videos and audio recordings. Google says the new Gemini 1.5 Pro doubles the model’s previous maximum input size.

What 2 million tokens means

In AI systems, tokens are small pieces of raw data. The source article gives a simple example: the word “fantastic” can be split into pieces such as “fan,” “tas” and “tic.” Models process inputs through these units rather than as full words in the way people usually read text.

At 2 million tokens, Gemini 1.5 Pro can handle the equivalent of around 1.4 million words, two hours of video or 22 hours of audio. Google says that gives the new version the largest input of any commercially available model. The next-largest model named in the source, Anthropic’s Claude 3, tops out at 1 million tokens.

For developers, that scale changes the kinds of prompts and files that can be sent to a model. Instead of breaking a large source into many smaller pieces, a developer may be able to provide a much larger body of material in one interaction, then ask the model to analyze, summarize or reason across it.

Why larger context can improve results

A larger input limit is not only about file size. The source article notes that models with more tokens can sometimes achieve better performance, because they have more of the relevant material available while generating an answer.

Models with small maximum token inputs, also called context, can lose track of very recent conversation details and move away from the topic. A model with a much larger context window is less likely to run into that specific problem because more of the conversation or source material can remain inside the active input.

Large-context models can also better grasp the flow of the data they receive, at least hypothetically. That can lead to responses that are richer in context, because the model can connect details across a longer document, a larger codebase, a longer video or an extended audio recording.

Google is making the 2-million-token version of Gemini 1.5 Pro available through a waitlist in Google AI Studio, its generative AI developer tool. Gemini 1.5 Pro with a 1-million-token context is set to launch in general availability across Google’s developer services and surfaces in the next month.

Gemini 1.5 Pro is also getting broader improvements

Beyond the larger context window, Google says Gemini 1.5 Pro has been “enhanced” over the last few months through algorithmic improvements. The company says the model is better at code generation, logical reasoning and planning, multi-turn conversation, and audio and image understanding.

In the Gemini API and AI Studio, Gemini 1.5 Pro can now reason across audio as well as images and video. It can also be “steered” through a capability called system instructions.

That combination is important for developers working with multimodal AI. The model is not limited to text-only inputs, and the source article says it can analyze audio, video and images as well as text. For teams building tools around large files or mixed media, the context window and multimodal support are closely linked.

Gemini 1.5 Flash targets speed and cost

Google is also launching Gemini 1.5 Flash in public preview. Flash is described as a “distilled” version of Gemini 1.5 Pro: smaller, more efficient and built for “narrow,” “high-frequency” generative AI workloads.

Flash can also support up to a 2-million-token context window. Like Gemini 1.5 Pro, it is multimodal and can analyze audio, video and images as well as text, but it generates only text.

“Gemini Pro is for much more general or complex, often multi-step reasoning tasks,” Josh Woodward, VP of Google Labs, one of Google’s experimental AI divisions, said during a briefing with reporters. “[But] as a developer, you really want to use [Flash] if you care a lot about the speed of the model output.”

Woodward said Flash is especially suited for summarization, chat apps, image and video captioning and data extraction from long documents and tables. The source article frames Flash as Google’s answer to smaller, low-cost models served through APIs, such as Anthropic’s Claude 3 Haiku.

Gemini 1.5 Flash and Gemini 1.5 Pro are widely available, now in over 200 countries and territories including the European Economic Area, U.K. and Switzerland. The 2-million-token version remains gated behind a waitlist.

New tools aim to make long context cheaper

Google is also introducing features aimed at cost-conscious developers. One is context caching, which will soon apply to all Gemini models, not only Flash.

Context caching lets developers store large amounts of information, such as a knowledge base or database of research papers, in a cache that Gemini models can access quickly and relatively cheaply from a per-usage standpoint. For long-context use cases, that could make repeated analysis more practical.

The Batch API, available in public preview today in Vertex AI, offers another cost-focused route. Vertex AI is Google’s enterprise-focused generative AI development platform, and the Batch API lets developers send multiple prompts to Gemini models in a single request. The source article lists classification and sentiment analysis, data extraction and description generation as examples of workloads it can support.

Another feature, controlled generation, is arriving later in the month in preview in Vertex. Woodward suggests it could bring further cost savings by letting users define Gemini model outputs according to specific formats or schemas, such as JSON or XML.

“You’ll be able to send all of your files to the model once and not have to resend them over and over again,” Woodward said. “This should make the long context [in particular] way more useful — and also more affordable.”

Taken together, the updates show Google pushing Gemini in two directions at once: larger inputs for complex analysis through Gemini 1.5 Pro, and faster, lower-cost handling of narrower tasks through Gemini 1.5 Flash. For developers, the practical question is no longer only what a model can understand, but how much material it can keep in view while doing the work.

← Back to the wire

Read next