Persuasion Atlas Persuasion, named and mapped — from proverbs to propaganda to AI

Home · AI & Algorithms

AI & Algorithms

Open Weights, Tokens and Context Windows

Three terms that decide what an AI model is worth: who may hold its trained weights, the tokens its text is cut into, and how many fit in its context window at once.

Contents References ↓
Contents ▾0% read
  1. 1. What it is
  2. 2. Open weights — what holding the numbers lets you do
  3. 3. Tokens — the units text is cut into
  4. 4. Context windows — how much the model can hold in view
  5. 5. The three terms together
  6. 6. How to spot misuse of the terms
  7. 7. What you can do
  8. References

Open weights are a model’s trained parameters — the numbers that embody what it has learned — released for anyone to download, run, inspect and modify under a stated licence. A token is the unit into which a tokeniser cuts text before a model can work on it: a subword chunk, neither a character nor a whole word, and the unit in which usage is limited and billed. A context window is the maximum number of tokens — input and output together — that a model can attend to in a single run: everything outside it does not exist for that run.

What it is

Three terms that describe one working machine

This piece is about three terms that are usually explained separately and understood badly in isolation. Open weights describes who may hold a copy of a trained model. A token is the unit into which text is cut before a model can work on it at all. A context window is the amount of that tokenised text the model can take in and work with at one time. The three belong in one piece because a model’s usefulness in practice is the product of all three: the weights determine what the model can do, the window determines how much material it can do it over in a single pass, and tokens are the currency in which both the window and, in commercial services, the bill are measured.

The companion piece to this one, Closed Weights, gives the negative case in full: a release in which the trained parameters stay with the maker and outsiders receive only a service. This piece gives the positive account of the other arrangement, and then goes on to the two measurement terms that apply to open and closed models alike. Where the closed case is needed here it is stated briefly and the reader is referred to Closed Weights for the argument at length.

Weights: the trained numbers

A language model has two parts that are often confused because they travel under one name. The first part is a design: an architecture, in almost all modern cases a form of the transformer introduced by Vaswani and colleagues in 2017, together with code that can build, train and run that architecture.1 The second part is a very large set of numbers produced by training that design on text. Those numbers are the weights, also called parameters. A model described as having seven billion parameters holds seven billion numerical values. Stored at ordinary precision they occupy roughly two bytes each, so a seven-billion-parameter model is a file, or a set of files, of the order of fourteen gigabytes; a model of several hundred billion parameters runs to hundreds of gigabytes.1

Training is what fills the design with behaviour. The untrained network begins with weights at random or near-random values. It is shown text, it predicts a continuation, the prediction is compared with what actually followed, and the weights are adjusted by a small amount in the direction that would have made the prediction less wrong. Repeated billions of times over a corpus measured in trillions of tokens, that process leaves the weights encoding the regularities of the training material: grammar, vocabulary, facts as they appeared in the text, styles, and the patterns of worked reasoning the corpus contained. Nothing else in the system stores what was learned. The architecture is the same before and after training; only the numbers changed. That is the sense, literal rather than metaphorical, in which the weights are the model.1

It follows that holding the weights is holding the trained capability itself, in a portable file. A holder can load that file onto computers they control and run the model there. The maker is not involved in each use, cannot observe each use, and cannot withdraw that copy. Closed Weights sets out what the opposite arrangement gives the maker — monitoring, patching, revocation, version control — and what it withholds from the user. Here the point is only the starting fact from which everything in the second half of this piece follows: an open-weights release hands over the numbers, and the numbers are where the learning is.

One precision matters before going further. Weights are not the training data, and they are not a compressed copy of it in any ordinary sense. A holder does not thereby hold the corpus the model was trained on and cannot simply read it back out of the file. What the holder has is the trained result, not the ingredients or the full recipe — the gap where most of the argument about the word “open” later in this piece takes place.

Tokens: the unit text is cut into

A model does not read words, sentences or characters as a person does. Before any text reaches the network it is passed through a tokeniser, a fixed procedure that cuts the text into pieces called tokens and replaces each piece with a number from a fixed vocabulary. The network works entirely on those numbers. It takes a sequence of token numbers in, and it produces token numbers out, which the tokeniser’s other half converts back into text. A token is therefore not a linguistic unit. It is a unit of a particular model’s processing, defined by that model’s tokeniser, and the same passage of English will be cut differently by different tokenisers.2

The cutting method in widespread use descends from byte pair encoding, adapted for neural models by Sennrich, Haddow and Birch in a paper first posted in 2015 and published in 2016. The method begins with individual characters and repeatedly merges the most frequent adjacent pair into a single new unit, building a vocabulary of pieces that reflect how the training text actually runs.2 The result has a characteristic shape. Very common short words, together with a leading space, are often single tokens, because they occur so often that merging them whole was worthwhile. Longer or rarer words are split into two or more pieces, usually along recognisable fragments. Numbers are commonly split into individual digits or short groups. Punctuation, capitalisation and spacing all affect the count, because they change which pieces the text matches. Code, mathematics, and languages whose scripts the tokeniser’s training data covered thinly tend to cost more tokens per unit of meaning than ordinary English prose, because fewer of their sequences were merged into single pieces.2

Three practical consequences follow, and each is regularly missed in public discussion.

First, a token is not a word. Rules of thumb that equate the two — a token is roughly three-quarters of an English word, in one common approximation — are serviceable for estimating the cost or fit of ordinary English prose and wrong in both directions elsewhere. A short function word may be one token; a long technical term may be four; a word in a less-represented language may be many more. Any calculation that matters, such as whether a document fits a window or what an API call will cost, has to be done with the tokeniser of the model in question, not with a word count.2

Second, tokens are the unit of account. Hosted services have generally priced use by the token, with input tokens — the prompt, the documents supplied, the conversation history — and output tokens counted and often priced separately. Training runs are likewise described in tokens, and the compute used is a function of the parameter count and the token count together. When a laboratory reports training on fifteen trillion tokens, that figure is a tokeniser-relative measure of how much text passed through training, not a count of words or documents.514

Third, tokens are the unit of the window, which is the third term of this piece. A context window advertised as 128,000 tokens is a budget in tokeniser pieces, not in pages or words, and a user who fills it with material that tokenises expensively — dense code, tables, a language the tokeniser handles poorly — will fit noticeably less meaning into it than a user filling it with plain English prose.23

The context window: how much the model can work with at once

The context window, also called the context length, is the maximum number of tokens a model can process in a single pass: the instruction, any documents or conversation supplied with it, and the answer being generated all draw on the same budget. The limit is a property of the model’s design and training. The transformer’s central mechanism, self-attention, lets each position in a sequence take account of the positions around it, which is what makes working over a supplied text possible at all; the cost of that mechanism rises steeply with sequence length, which is why windows were small in early models and why extending them has been a distinct engineering effort rather than a free consequence of larger models generally.1

The growth has been fast by any measure. The models of the early 2020s commonly worked with windows of a few thousand tokens — enough for a short document or a brief conversation. Successive releases pushed the figure through tens of thousands to hundreds of thousands, and the open releases discussed below state their windows as headline specifications: OpenAI’s gpt-oss models of August 2025 were released with a 128,000-token context length, stated in the same announcement as their parameter counts and licence.8 A window of that size holds, in plain English, a text of the order of a long novel in a single pass.

Two boundaries define what a window is not, and both are sources of persistent confusion.

A window is not memory. Material inside the current window is available to the model while it processes that input. Material outside it — an earlier conversation beyond the window’s edge, a document supplied last week, a fact the user assumes the system retains — is not available unless it is supplied again, or unless a surrounding product stores it and inserts it into a later window. Products can and do build memory-like behaviour around a model, by keeping records and feeding selected parts back in as tokens. That is the product’s doing, not the window’s. The window itself holds nothing between one pass and the next. A model with a million-token window and a model with an eight-thousand-token window are equally without recall once the pass ends; the first simply forgets more at a time.

A window is also not a guarantee of use. A model may accept a long input and still work unevenly over it. The best-known measurement of this is the study by Liu and colleagues, posted in 2023 and published in the Transactions of the Association for Computational Linguistics, which tested models on tasks requiring them to find and use a piece of information placed at varying positions in a long input. Performance was highest when the relevant information stood at the beginning or the end of the context and degraded significantly when it stood in the middle, in some conditions falling below the same model’s performance with no documents supplied at all. The authors’ conclusion was that models of the period did not robustly use long contexts merely because they could accept them.3 The finding has been replicated in form, if not in every detail, by later long-context evaluations, and it states the correct way to read a window figure: as a capacity limit, not as a promise that everything within the limit will be weighed equally.

Why the three belong together

Put the three definitions together and a release announcement becomes legible in a way that none of the terms allows alone.

The weights state the capability on offer and who may hold it. The window states the scale of task the model can attempt in one pass — whether a contract, a codebase or a book can be worked on whole, or must be chopped and summarised in stages. The token states the unit in which the window is measured, the training was counted and, in a hosted service, the use is billed. A small model with a large window and open weights is a different practical object from a large model with a small window behind an API, and neither is described adequately by the single word “model” that headlines use for both.

The boundaries, stated plainly

Four confusions recur often enough to be worth ruling on directly.

Open weights is not open source. The first term describes the availability of one artefact, the parameter file. The second is a defined standard, maintained by the Open Source Initiative, which for AI systems requires more than the parameters, as the section on the Open Source AI Definition below sets out. Some open-weights releases meet that standard; many prominent ones do not; and the releasers and the Initiative have disagreed in public about the wording. Using the terms interchangeably hides exactly the facts a reader needs.1112

A token is not a word, a character or a syllable, though it overlaps all three. It is a piece from a fixed vocabulary, learned from data by a merging procedure, and its size varies by model, language and material.2

A context window is not memory, not storage and not understanding. It is a per-pass input limit, measured in tokens, inside which use is uneven.3

And an open-weights model is not a free model in every sense that matters. The file may cost nothing to download, but running it costs hardware and electricity, and operating it safely in a product costs the evaluation and monitoring work a hosted supplier would otherwise do invisibly. What openness removes is the maker’s continuing permission and per-use charge, not the costs of the work itself.15

Open weights — what holding the numbers lets you do

What a release actually includes, and what it usually excludes

An open-weights release, examined as a set of files rather than as an announcement, typically contains the following. The parameter files themselves, in a standard format, sized consistently with the stated parameter count. A configuration file describing the architecture those parameters belong to — layer counts, dimensions, the window size — without which the numbers cannot be run. The tokeniser files, defining the vocabulary and merges that cut text for this model. A model card or equivalent document stating what the model is, how it was evaluated and what its intended uses and known limits are. Usually, either inference code for loading and running the model or compatibility with the standard open frameworks that do so. And a licence, which is legally the most important file in the set and the one least often read.67

What the typical release excludes is as consistent, and listing it is not a criticism but a description. The training data is almost never included, and detailed information about it — its composition, sources, selection and processing — is usually summary at best. The training code, meaning the full apparatus that turned data into these weights, is usually not included, even where inference code is. The evaluation code and the internal test sets behind published benchmark figures are included in some releases and not others. The intermediate checkpoints from during training, which would let a researcher watch capabilities develop, are almost never included outside the deliberately scientific releases described below. And the reinforcement-learning or instruction-tuning data that shaped the model’s conversational behaviour, as distinct from its base knowledge, is generally described in prose rather than released.91011

The pattern has a logic. The weights are the component whose release is both cheap for the maker — the file exists and copying it costs little — and transformative for the holder. The data is the component whose release is most legally and commercially difficult, because large corpora are assembled from licensed, contested and personal material that the maker may have no right to redistribute. A reader who knows which of these a given release contains knows where on the spectrum it sits, from weights alone to the fully documented end examined below.911

Running locally, and offline

The first thing a holder can do is run the model on their own machines. For a small model that means a single capable personal computer; for a large one, a rack of accelerators in a data centre the holder rents or owns. Either way, generation happens where the holder chooses. Prompts are not sent to the maker’s servers, because there is no need for the maker’s servers to be involved at all. A model downloaded today runs tomorrow in a building with no network connection, on an aircraft, in a clinic whose rules forbid patient text leaving the premises, or in a jurisdiction the maker does not serve.15

The consequences are practical rather than rhetorical. Data that cannot lawfully or prudently be transmitted to an outside service — medical records, privileged legal material, unpublished research — can be processed by a model that comes to the data instead of the data going to the model. Use continues during outages, service withdrawals and the maker’s changes of terms, because none of those events reaches a copy already held. And the marginal cost of a query is the holder’s own electricity and hardware wear, which for a heavily used local model can be far below per-token pricing, and for a lightly used one far above it: the economics invert depending on volume.15

Fine-tuning: continuing the training

The second capability is adaptation. To fine-tune a model is to continue its training, briefly and on narrower material, starting from the released weights rather than from random values. Because the general learning is already in the file, a fine-tune that teaches a speciality — a firm’s documents and house style, a medical or legal vocabulary, a low-resource language, a particular output format — costs a small fraction of the original training run. Techniques in wide use reduce the cost further by training a small set of additional parameters rather than the whole network, and the resulting adapted model is itself a set of weights the holder owns outright.1617

Fine-tuning is also where the safety argument enters, and it is stated here mechanically because the later section weighs it. The behaviour a maker installs late in training — in particular the refusal behaviour taught so that a model declines certain classes of request — resides in the weights like everything else. Further training can strengthen it, redirect it or remove it. Studies discussed below measured how cheaply that removal can be done. The mechanical fact itself is neutral between the camps: the same capability that lets a hospital adapt a model to its records lets an individual strip a model’s refusals, and any honest account of holding the weights has to carry both.1617

Inspection: studying the inside of the model

A holder can study the artefact directly, in ways that no amount of querying a hosted service permits. The weights themselves can be examined statistically and compared between versions, so that a claim that a model changed can be tested against the files rather than inferred from behaviour. The internal activations produced as the model processes a chosen input can be recorded and analysed, which is the working method of the research field concerned with how networks represent and compute — work that requires weight access by definition, because its object is the inside of the network.910

Inspection also has an audit function. An evaluator holding the weights can run test sets the maker has never seen, at whatever scale their hardware allows, without rate limits, per-query charges or the risk that the object of study is altered between the experiment and its replication, and can test whether a capability is absent or merely suppressed by a refusal layer. None of this establishes that open models are in fact audited more thoroughly than closed ones in every case. It establishes that the ceiling on outside scrutiny is set by the evaluator’s resources rather than by the maker’s permission.915

Quantisation, merging and keeping a version forever

Three further holder capabilities are less discussed and heavily used.

Quantisation reduces the precision with which the weights are stored — from two bytes per parameter to one, or to half a byte — shrinking the file and the hardware needed to run it, at some cost in quality that careful methods keep small. It is quantised versions that put capable models onto laptops and telephones.

Model merging combines the weights of two or more models — typically fine-tunes of a common base — by averaging or otherwise blending their parameters, producing a model that can carry parts of each parent’s adaptation without further training. It exists only because the numbers are available to be blended.

Keeping a version is the quietest capability and, for institutions, often the decisive one. A downloaded release is fixed: a research result obtained with it can be re-run in five years on the identical artefact, and a regulator or a court can be shown the exact system that produced an output. The corresponding property of a hosted service — that the supplier can patch the model for every user at once — is a real benefit of the closed arrangement, and Closed Weights gives it its due.15

Finally, there is no per-query metering. A holder’s use is not counted by the maker, cannot be throttled by the maker, and does not appear in the maker’s logs. For a researcher running a million test prompts, or a public body that cannot accept a supplier observing the pattern of its enquiries, that absence of metering is not a discount. It is the substance of the arrangement.15

The licence spectrum

Everything above describes what holding the file makes technically possible. What a holder may lawfully do with it is set by the licence, and licences for open-weights releases fall into a small number of families whose differences matter more than the shared word “open” suggests.

Permissive licences: Apache 2.0 and MIT

At the permissive end, releasers apply standard open-source software licences to the weights. The Apache License 2.0 grants a perpetual, worldwide, royalty-free licence to reproduce, prepare derivative works and distribute the work, together with an express patent licence, and it imposes no restriction on field of use and no threshold on the size of the user. The MIT License is shorter and similarly permissive in effect. A holder under either licence may use the model commercially, modify it, redistribute it and build products on it, subject to keeping notices and, under Apache 2.0, the patent terms.48

The documented examples are prominent. Mistral AI, a Paris laboratory founded by researchers from Meta and Google DeepMind, released Mistral 7B on 27 September 2023 under Apache 2.0, reporting that the 7.3-billion-parameter model outperformed the larger Llama 2 13B on the benchmarks the team published, and free for deployment without a user threshold or an acceptable-use policy attached by the releaser.4 Its sparse mixture-of-experts model Mixtral 8x7B followed in December 2023 under the same licence. DeepSeek, a Hangzhou laboratory backed by the quantitative fund High-Flyer, released DeepSeek-V3 in December 2024 and, on 20 January 2025, DeepSeek-R1, a reasoning model whose weights — for the full model, its R1-Zero variant and six smaller distilled versions — were published under the MIT License, expressly permitting commercial use, modification and distillation into other models.5 R1’s reported performance on mathematics and coding benchmarks was comparable to OpenAI’s o1, then available only as a closed service — the factual point neither side of the openness argument disputes: by January 2025 a downloadable model under a permissive licence could sit at or near the capability frontier in at least one important dimension.5

OpenAI’s gpt-oss release belongs in the same family and is significant for its source. On 5 August 2025 OpenAI, whose frontier models had been closed since the GPT-3 era, released two open-weight models, gpt-oss-120b and gpt-oss-20b, under Apache 2.0, with a stated 128,000-token context length, downloadable from public hubs, while its frontier line remained a hosted service. A single laboratory thereby occupied two positions at once — permissive download for these models, closed service for its most capable systems — which is the normal pattern in the industry and a reason to describe releases, not companies, as open or closed.8

The community licence: Llama

The middle family is the bespoke community licence, and Meta’s Llama licences are its developed example. The Llama 3.1 Community License, dated 23 July 2024, grants a royalty-free, non-exclusive licence to use, reproduce, distribute and create derivatives of the Llama materials, including commercially — and then adds conditions that Apache 2.0 and MIT do not contain.6

The most discussed is the size threshold. If, on the release date, the monthly active users of the licensee’s products or services exceeded 700 million in the preceding calendar month, the licensee must request a separate licence from Meta, which Meta may grant or withhold at its discretion. In practice the clause binds a handful of the largest platforms in the world and no one else; every researcher, start-up and ordinary company is below it. But its existence means the grant is not made to all comers on equal terms, which becomes central to the naming argument below.612

The other conditions are of the same kind. Derivatives must carry the Llama name at the start of their own names, distributed copies must display “Built with Llama” and retain the licence notice, and use of the model’s outputs to improve other large language models is restricted, with the 3.1 revision expressly permitting outputs to be used to improve Llama derivatives themselves. All use is subject to Meta’s Acceptable Use Policy, which prohibits specified categories of use including certain weapons, critical-infrastructure and content applications. Later Llama versions kept the structure with variations, including, in some multimodal releases, withholding rights from persons and companies in the European Union.6

The practical meaning is double, and both halves are true of the same documents. For the overwhelming majority of users the licence is broad, free and permanent for the version downloaded, and the Llama ecosystem of fine-tunes, quantised versions and tools built on the family is correspondingly large. At the same time, Meta retains levers — over its largest rivals, over prohibited fields of use, over naming — that a permissive licence would have surrendered. Whether that combination may be called open source is contested below. That it is a genuine transfer of the artefact is not contested by any party to that argument.614

Gated downloads

Between an unrestricted download and a closed service sits gating: the files exist for download, but only after the would-be holder completes a step the releaser controls. On Hugging Face, the largest public model hub, the mechanism is documented in the hub’s own guidance. A model author may enable access requests, after which a user must be logged in, submit a request and, in the usual configuration, agree to share their Hugging Face username and email address with the author and to any licence terms the gate presents. Approval may be automatic, in which case access follows immediately on submission, or manual, in which case the author reviews each request and may accept, reject or later revoke it. Downloads from scripts require an authenticated user token belonging to an approved account.7

Gating serves documented purposes. It records acceptance of a licence by an identifiable person, which an anonymous download does not, and it lets a releaser restrict access by territory — the hub provides a specific mechanism for excluding users in European Union countries where a licence withholds rights there. It also means that “downloadable” is not a single fact: a release behind manual approval is available to whom the author approves, and the gate, unlike the file, can be closed again for future applicants even though copies already downloaded cannot be recalled.7

Research-only licences

A fourth family completes the spectrum: weights released for inspection and experiment under terms that forbid commercial use. The original LLaMA release of February 2023 was of this kind, distributed to approved researchers; its weights leaked and spread by torrent within days, an episode Closed Weights treats as the standing demonstration that distribution, once made, is not retractable in practice. Research-only releases serve science without serving competitors, and conflating them with permissive releases is a common error in coverage of the field.615

The fully documented end: OLMo and Pythia

Two releases mark the far end of the spectrum, where the weights are accompanied by the means to understand and reproduce the work, and they matter to this piece as calibration: they show what a release contains when outside study, rather than distribution or market position, is the purpose.

The Allen Institute for AI, a non-profit research institute in Seattle, released OLMo in February 2024 and OLMo 2 in late 2024 under Apache 2.0, publishing together the weights, the full pretraining corpus known as Dolma, the training code, intermediate checkpoints and evaluation suites. The stated purpose was to let researchers study how language models are built and behave with every stage open to inspection — including the data, the component almost every other release withholds.9

EleutherAI, a decentralised research collective, built its Pythia suite, released in 2023, for a narrower scientific purpose: a family of models of graduated sizes, from 70 million to 12 billion parameters, all trained on the same documented data in the same order, with 154 intermediate checkpoints published per model. Because size, data and data order were held constant and checkpoints were dense, researchers could measure how capabilities and biases develop during training, rather than inferring development from finished models alone.10

Neither family competed at the commercial frontier, and neither was intended to. Their evidential role is that they exist: the fully documented release is not a theoretical standard but a thing two organisations have actually done, at the cost of years of legal and curatorial work on data they had rights to share. A laboratory trained on licensed and contested corpora may be unable, rather than merely unwilling, to match that standard for its own data — a difficulty the standard’s keeper does not accept as a reason to lower it.91011

Does weights alone qualify? The Open Source AI Definition and the argument over it

The naming argument has a fixed point, a published definition, and documented positions on each side. It is presented here without a verdict, because the disagreement is not about any fact of any release — the parties’ descriptions of the Llama files and licence agree — but about what the words “open source” should require.

The Open Source Initiative, the body that has maintained the Open Source Definition for software since 1998, published the Open Source AI Definition 1.0 on 28 October 2024, at the All Things Open conference, after a two-year drafting process. The definition requires that an AI system be usable, studyable, modifiable and shareable for any purpose, and it specifies the preferred form for making modifications as three components together: data information — sufficiently detailed information about the training data, including its provenance and how it was sourced, selected and processed, so that a skilled person could build a substantially equivalent system; the complete code used to train and run the system; and the parameters, meaning the weights and configuration. It does not require publication of the training data itself where the data cannot lawfully be shared. It does require the detailed information.11

Judged against that standard, the Initiative’s validation work found that most prominent releases fell short, and that OLMo and Pythia were among the small number that met it. Llama was classed as not meeting it, on two independent grounds: the detailed data information was absent, and the licence restricts classes of user and fields of use, which the definition’s any-purpose requirement forbids.11 The objection predated the definition. In July 2023, days after Llama 2 was announced as open source, the Initiative’s executive director Stefano Maffulli wrote that the Llama 2 licence was not open source, because it discriminated against persons and groups — the 700-million-user clause — and against fields of endeavour, through its acceptable-use restrictions, contrary to points 5 and 6 of the original Open Source Definition, and that the Initiative had asked Meta to correct the description.12

Meta’s disagreement is equally on the record. Announcing Llama 3.1 on 23 July 2024, Mark Zuckerberg published a long letter, “Open Source AI Is the Path Forward”, comparing the technology’s trajectory with the history of Unix and Linux, arguing that open release spreads capability, prevents a small group from controlling the technology, and is safer in aggregate because more people can inspect and correct problems — and describing Meta as committed to open source AI, with Llama as its vehicle.14 When the Initiative’s definition appeared that October, Meta’s spokespeople stated that the company disagreed with it, that there is no single agreed definition of open source AI, and that releasing weights and code for broad use delivers what the term should mean for models. The position has been repeated since: that a definition built around software source code fits a system whose central artefact is trained weights badly, and that the practical test is what working developers can download and use.1114

A third position, stronger than the definitional one, has been pressed by academic critics. David Gray Widder, Sarah West and Meredith Whittaker argued in a 2023 paper, “Open (For Business)”, that openness claims by large technology companies should be assessed against the concentration of the resources — data, compute and talent — that producing frontier models requires, and that the rhetoric of openness can coexist with, and reinforce, that concentration. In November 2024 the same authors published a Perspective in Nature, “Why ‘open’ AI systems are actually closed, and why this matters”, arguing that systems offering little more than an API, or a downloadable model under restrictive terms and without its training data, are better understood as closed, and that calling them open — for which they use the term open-washing — obstructs scrutiny and can secure regulatory advantage without the substance of openness.13 Meta and other releasers dispute the characterisation. The Nature piece is the strongest published form of the sceptical case; it is a contested argument by named authors, flagged here as such, not a settled finding.13

The factual residue, on which all three positions rest, is small and checkable: what files a release contains, what its licence permits and forbids, and whether those facts meet a stated standard. “Open weights”, used carefully, claims only the first — that the parameters can be downloaded and kept — without taking a side in the argument above.

Safety: the documented arguments both ways

The safety argument about open weights turns on a mechanism already described: refusal behaviour lives in the weights, and a holder can train it away. What the published studies establish, and what they do not establish, are different things, and the distinction is where the honest argument is conducted.

The foundational study is by Qi and colleagues, “Fine-Tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!”, presented at ICLR 2024. Fine-tuning Llama-2-7B-Chat directly, as its weights allowed, on ten adversarially chosen examples raised the model’s harmfulness on the authors’ policy test set from near zero to about half of responses; a hundred examples raised it to about four fifths. The same paper also fine-tuned GPT-3.5 Turbo through OpenAI’s own fine-tuning API, at a cost of less than twenty cents, with a larger effect still — a result that cuts in both directions, since it shows that a closed supplier offering fine-tuning as a service had handed over much of the same capability through its own doorway. The authors further found that fine-tuning on ordinary benign instruction data, with no harmful intent, degraded safety measurably, though less severely.16

The open-weights-specific result is by Lermen, Rogers-Smith and Ladish, who in 2023 applied low-rank adaptation — a cheap fine-tuning method — to Llama 2-Chat 70B and reported reducing its refusal rate on harmful-request benchmarks to around 1 per cent, using a single graphics processor and a budget under 200 dollars, while general capability on standard benchmarks was largely retained. Companion work by substantially the same team, on a 13-billion-parameter Llama 2 chat model, reached comparable results at a similar reported cost.17 Stated at the strength the papers support, the cumulative finding is that, for a model whose weights circulate, refusal training as currently practised is removable cheaply, by a competent individual, without the maker’s knowledge, and no licence term prevents the removal. What the studies do not show — and their authors do not claim — is the further step: a realised harm, of the gravest feared kinds, that would not otherwise have occurred. Evaluations of the biological and chemical assistance current models provide, by laboratories and by outside assessors, have generally found limited uplift beyond what existing published material provides for the models tested to date, with the explicit warning that the finding is capability-dependent and must be retested as models improve.1516

The most substantial official examination is the report of the United States National Telecommunications and Information Administration, “Report on the Benefits, Risks, and Implications of Dual Use Foundation Models with Widely Available Model Weights”, published on 30 July 2024, commissioned under Executive Order 14110 after 332 public comments and extensive consultation. Its method was to assess marginal risk: not whether a capability is dangerous in the abstract, but what additional risk widely available weights create relative to the alternatives already in the world — closed models by API, smaller models, conventional software and the open scientific literature. Its risk inventory records the loss of monitoring and recall, the removability of safeguards, the potential proliferation of capable models to actors of concern, and the difficulty of assigning accountability downstream. Its benefit inventory records wider participation in research, independent inspection and audit, competition, use on sensitive data without transmitting it, and adaptation for languages and purposes large suppliers neglect. Its conclusion was that the evidence at the time was not sufficient to determine definitively either that restrictions on widely available weights were warranted or that they would never be appropriate; it recommended against restricting them at that time, and instead recommended a standing programme of evidence collection, with capacity to act if defined indicators crossed thresholds. Both camps quote the report, each accurately in part: restrictionists cite its risk inventory and its refusal to rule out future restriction, openness advocates its marginal-risk framing and its recommendation. Its findings are indexed to the capabilities of the models existing in mid-2024, a caveat the report itself states.15

The counter-arguments at full strength, beyond the NTIA inventory, are these. Auditability is itself a safety property: a science of AI safety that can study only the systems their makers choose to expose is not independent, and evaluation, red-teaming and interpretability all deepen with weight access. And determined attackers’ access is less decisively changed by closure than defenders’, because state-backed and well-resourced actors can train, buy or steal capability through other channels. Against these, the restrictionist case in its best form is not that open models are the sole source of risk, but that irreversibility changes the standard of proof: a release cannot be recalled, so the decision must weigh the model’s capability over its whole circulating lifetime, in the hands of its most motivated user, combined with every future elicitation technique the research community publishes. On that view the absence of a realised catastrophe with the models of 2024 is weak evidence about later models, and the remedy proposed is pre-release evaluation against thresholds — machinery the NTIA report itself recommended building — rather than permanent closure of everything. The two strongest forms converge on that machinery and disagree on the default while it is incomplete: release unless a threshold is crossed, or withhold until safety is shown.151617

Competition: the documented arguments both ways

The competition argument is shorter because its mechanism is direct. A downloadable model can be built on without the maker’s permission, pricing or continuing involvement. An entrant can take Llama, Mistral or DeepSeek weights, fine-tune them for a niche, and sell a product whose core capability does not route its margin through an incumbent’s API. The NTIA report records this as a principal benefit of widely available weights: they lower dependence on a few suppliers, and allow public bodies, researchers and firms to work without transmitting their data or their business to a potential competitor.15 Britain’s Competition and Markets Authority, in its foundation-models programme beginning with its initial report of September 2023 and continuing through its later updates, treated the openness of models as a variable affecting competition in the market, examining how access to models — by API, by licence or by download — shapes the position of the largest technology firms and of the firms building on them. The United States Federal Trade Commission raised the corresponding concern in its 2023 analysis of generative AI, warning that control over key inputs, including models themselves, could entrench incumbents, and that open availability of models was among the factors bearing on whether new competitors could enter. Zuckerberg’s letter makes the commercial form of the same argument from inside an incumbent: that open release prevents a small group from controlling the technology. The interest he has in commoditising a layer his own business sits above is plain, and does not by itself answer the argument’s merits.141518

The documented counter-arguments are of two kinds. The first is the Widder, West and Whittaker point already met in the naming section: that openness at the weights layer coexists with concentration at the layers that produce weights — data, compute and talent remain held by few hands, and a large firm can afford to give away a model precisely because its advantage lies elsewhere. On that account, counting downloads overstates the dispersal of power, and the competition question has to be asked about the whole stack, not the file.13 The second is a caution rather than a rebuttal: the authorities’ own reports treat openness as one variable among several — alongside chips, data, cloud capacity and distribution — and neither the CMA’s programme nor the FTC’s analysis amounts to a finding that open weights alone secure a competitive market. The evidence supports the narrower claim that downloadable weights remove one specific permission point — the model’s maker as gatekeeper to every downstream product — as the derivative ecosystems around the Llama, Mistral and DeepSeek families show in practice.561518

Tokens — the units text is cut into

Neither characters nor words

A language model never reads the text on the page. Before any model sees a prompt, a separate piece of software called a tokeniser cuts the text into a sequence of units called tokens, and replaces each unit with a number — an index into a fixed list, the tokeniser’s vocabulary. The model receives the numbers, works with the numbers, and produces numbers in reply, which the tokeniser then translates back into text. Everything a model does — reading, writing, remembering, being billed — happens in these units, so almost every practical fact about using one is, underneath, a fact about how the cutting is done.2133

A token is not a character and not a word. It is a subword unit: a chunk of text that may be a whole common word, part of a long or rare word, a single letter, a digit, a punctuation mark, or a word together with the space that precedes it. OpenAI’s own explanation puts the scale plainly: for ordinary English text, one token is roughly four characters, or about three-quarters of a word, so 100 tokens correspond to roughly 75 words.21 That is a rule of thumb for English prose, not a definition, and OpenAI states it as an approximation whose ratio changes with the language and the kind of text.21

The reason for cutting at this intermediate size is a trade-off. Cutting into characters would make every sequence very long: a model would have to learn that letters combine into words before it could learn what the words mean, and every document would occupy several times as many input positions. Cutting into whole words would make the vocabulary unmanageable: English alone has hundreds of thousands of word forms once plurals, tenses, compounds, names and misspellings are counted, and a word-level system cannot represent a word it has never seen — it must substitute a generic unknown symbol, losing the word entirely. Subword units sit between the two. Common words survive whole, because they are frequent enough to earn their own entry. Rare words are assembled from pieces seen in other words, so nothing is unrepresentable: in the worst case, a tokeniser falls back to individual bytes and spells anything out.2022

That fallback matters more than it may seem. It means a modern tokeniser is lossless and universal in a specific sense: any string of text — a name invented yesterday, a line of code, a word in a script the tokeniser’s makers barely considered — can be encoded into tokens and decoded back exactly. Byte-pair encoding has exactly these properties: it is reversible and lossless, it works on arbitrary text including text outside the tokeniser’s training data, and it compresses, producing a token sequence shorter than the byte sequence of the original.2022 What varies is not whether a text can be encoded, but how many tokens the encoding costs — and that variation, as later sections show, is where the money and the unfairness enter.

The word “token” is used elsewhere in computing for unrelated things — security credentials, units of a cryptocurrency, symbols in a compiler. In this piece it means only the subword unit described above. When a laboratory says a model was “trained on 15 trillion tokens”, when an API charges for “input tokens”, and when a model card lists a “context window of 128,000 tokens”, all three statements use the word in this one sense — but not necessarily with the same tokeniser, so the units are not automatically interchangeable between models.2431

Where the cut comes from: byte-pair encoding

The algorithm that produces most modern tokenisers began as a data-compression method with no connection to language at all. In February 1994, Philip Gage published “A New Algorithm for Data Compression” in the C Users Journal, describing what he called byte pair encoding, or BPE. Gage’s problem was shrinking files. His method was simple: scan the data for the most frequently occurring pair of adjacent bytes, replace every occurrence of that pair with a single byte that does not occur in the data, and record the substitution in a table. Then repeat — find the new most frequent pair, replace it, record it — until no pair occurs more than once or no unused bytes remain. Because a replacement byte can itself be paired and replaced in a later pass, short codes come to stand for long, common sequences, and the file gets smaller. Decompression is the table read backwards.19

Twenty-two years later, the same counting-and-merging idea was adapted to the central problem of neural machine translation. Translation systems of the period worked with fixed vocabularies, typically limited to some tens of thousands of words, but translation is an open-vocabulary task: names, compounds and rare words constantly appear that no fixed word list contains. In a paper presented at the Association for Computational Linguistics conference in 2016, Rico Sennrich, Barry Haddow and Alexandra Birch of the University of Edinburgh proposed encoding rare and unknown words as sequences of subword units, adapting Gage’s byte pair encoding to word segmentation. Their reasoning was that the translation of many rare words is transparent from their parts: a novel German compound can be translated piece by piece, a name can be carried across letter by letter, and a word with a familiar stem and ending can be handled as stem plus ending. Their subword models improved on a back-off dictionary baseline by up to 1.1 BLEU points on English-to-German and 1.3 on English-to-Russian in the WMT 15 translation tasks they tested.20

The adaptation changed the object the algorithm works on. Gage merged pairs of bytes in a file to be compressed. A BPE tokeniser is instead trained, once, on a large corpus of text, and what it learns is a vocabulary and an ordered list of merges. Training runs roughly as follows. The corpus is first split into small pieces — in the original formulation, words split into individual characters, with a marker for the end of a word; in later byte-level versions, the starting pieces are the 256 possible bytes. The trainer then counts adjacent pairs across the corpus, merges the most frequent pair into a new unit, adds that unit to the vocabulary, and repeats, thousands or tens of thousands of times, until the vocabulary reaches the size chosen in advance. Each merge is recorded in order, and that order is part of the tokeniser: to encode new text, the tokeniser starts from characters or bytes and applies the merges in the learned order, so frequent sequences collapse into single tokens and infrequent ones stay in pieces.20

Two consequences follow from the way the vocabulary is built. The first is that it is fixed. Once training stops, the list of tokens and the merge order do not change; a tokeniser shipped with a model is a finished artefact, as much a part of the model as its weights, and the model has learned its internal representations for exactly those token numbers. Feeding a model text cut by a different tokeniser is not a neutral substitution — the numbers would refer to different chunks of text, and the result would be gibberish. The second consequence is that the vocabulary is a portrait of its training corpus. Merges are awarded by frequency, so the text the tokeniser was trained on decides what gets to be a single token. A corpus dominated by English gives English words, English stems and English endings their own tokens, and gives the common sequences of other languages fewer and shorter ones. A corpus heavy with program code gives common code fragments — indentation patterns, frequent keywords, standard punctuation runs — tokens of their own. Nothing in the algorithm is about meaning. A token is a frequent sequence, no more: the vocabulary records what the corpus contained often, in the proportions in which it contained it.2027

Later variants start from bytes rather than characters, a change with a practical purpose. Text in most systems is stored and transmitted as UTF-8 bytes, and many characters — most scripts other than basic Latin among them — occupy two, three or four bytes each. A byte-level tokeniser takes the 256 bytes as its alphabet, so every possible character is representable as a short byte sequence even if the tokeniser has no dedicated token for it, and the unknown-word problem disappears entirely rather than being managed. GPT-2, released by OpenAI in 2019, used a byte-level version of BPE with a vocabulary of 50,257 entries, and the approach became the default for the GPT family and for many models after it.22

A sentence, cut three ways

The mechanics are easiest to see on ordinary text. Take the sentence “Tokenisation is not the same as counting words.” — nine words and a full stop, 47 characters including spaces. Run through OpenAI’s tokenisers, it comes out as ten tokens in each of the three encodings checked for this piece: “Token”, “isation”, ” is”, ” not”, ” the”, ” same”, ” as”, ” counting”, ” words”, “.”.21

Several features of real tokenisation are visible in that one line. The first word is split, because “tokenisation” is not frequent enough to have earned a single entry, while its ending — “isation”, a suffix shared with thousands of other words — has one. Every later word carries its leading space as part of its token: the token is not “is” but ” is”. This is why the rule of thumb says a token is about three-quarters of a word rather than exactly a word — the spaces are inside the tokens, and split words consume more than one. Punctuation stands alone. And the count, ten tokens for nine words, sits close to the published English ratio without matching it exactly, because the ratio is an average over large amounts of text, not a property of any one sentence.21

Change the word and the encodings begin to disagree, which is the point that matters for everything that follows. The word “strawberry” is three tokens in all three encodings, but not the same three: the GPT-2-era encoding and the GPT-4o-era encoding cut it as “st”, “raw”, “berry”, while the GPT-4 encoding cuts it as “str”, “aw”, “berry”. The word “unbelievably” is four tokens in the oldest of the three encodings — “un”, “bel”, “iev”, “ably” — and three in each of the two newer ones, cut differently in each case. These splits were produced with OpenAI’s published tiktoken library for this piece, and any reader can reproduce them in the online tokeniser or in a few lines of code; they are not illustrations of what tokenisation is like, they are what three specific tokenisers actually do.21

The example deliberately does not show token numbers. Each token has one — its position in the vocabulary — checkable in the same tools. But a number quoted without its encoding is meaningless, since the same number denotes different text in different vocabularies, and the pieces of text and their count are the parts with consequences.

Tokenisers differ between models

There is no standard tokeniser. Each model family ships its own, trained on its maker’s corpus, to its maker’s chosen vocabulary size, and the sizes have grown with the models. GPT-2’s byte-level BPE vocabulary in 2019 held 50,257 entries.22 OpenAI’s later encodings roughly doubled that and doubled it again: the encoding used by GPT-3.5 and GPT-4, named cl100k_base in tiktoken, has about 100,000 ordinary tokens plus a handful of special ones, and the encoding introduced with GPT-4o, o200k_base, has about 200,000.21 Meta’s Llama line moved the other way and then jumped: Llama 2 used a vocabulary of 32,000 tokens, while Llama 3 expanded to 128,000 — built, its technical report states, by combining 100,000 tokens from OpenAI’s tiktoken tokeniser with 28,000 additional tokens intended to support non-English languages better, a change the report credits with improving encoding efficiency over the Llama 2 tokeniser.24 Mistral 7B, released by Mistral AI in 2023, stayed at 32,000.25

The method varies as well as the size. Most of the models named above use BPE or its byte-level form, but a second family of methods is in wide use through Google’s SentencePiece library, described by Taku Kudo and John Richardson in 2018. SentencePiece differs from the earlier subword tools in that it needs no language-specific pre-splitting of text into words: it trains directly on raw sentences, treating the space character as an ordinary symbol to be learned like any other, which makes it usable in the same form for languages that do not separate words with spaces at all. Inside that framework it implements two different segmentation algorithms: BPE, and a unigram language model method, also developed by Kudo, which starts from a large candidate vocabulary and progressively discards the units whose removal least damages the probability the model assigns to the training corpus, keeping the target number of most useful pieces. Where BPE builds up by merging the most frequent pairs, the unigram method prunes down by likelihood — the two can produce noticeably different cuts of the same sentence, and models in the T5 and Llama traditions, among others, have used SentencePiece tokenisers of one kind or the other.2324

Vocabulary size is a genuine design trade-off, not a score. A larger vocabulary cuts text into fewer, longer tokens, so a given document takes fewer positions, less computation and less money to process, and languages and notations that were previously fragmented get pieces of their own. But every entry in the vocabulary needs its own learned representation inside the model — a row in the input embedding table, and usually a corresponding part of the output layer that scores candidate next tokens — so doubling the vocabulary adds parameters that are spent on the dictionary rather than on the model’s other machinery, and rare tokens, seen seldom in training, are learned less well than common ones. A smaller vocabulary is cheaper in parameters and trains every entry thoroughly, at the price of longer sequences for everything. The spread of published choices — 32,000 for Llama 2 and Mistral 7B, 50,257 for GPT-2, about 100,000 for GPT-4, 128,000 for Llama 3, about 200,000 for GPT-4o — is the visible record of different laboratories weighing that trade-off at different dates, for different mixtures of languages and code.222425

The practical consequence is that token counts are not portable. The same document, counted by two models’ tokenisers, gives two different numbers — sometimes close, as with the sentence above, sometimes far apart, as the next section shows for other languages. A prompt that fits inside one model’s limit may exceed another’s. A cost estimate made with the wrong tokeniser is wrong by the difference between the two vocabularies’ habits. And a statement like “this text is 10,000 tokens long” is incomplete in the way “this weighs 10,000” would be without a unit: it needs the tokeniser named before it means anything exact.27

The language inequality

The vocabulary is a portrait of its corpus, and most large corpora are portraits of English. The result is measurable, has been measured repeatedly, and is large.

The earliest of the three studies this section rests on asked the question from the direction of quality rather than cost. Phillip Rust and colleagues, in a paper presented at the ACL conference in 2021, compared multilingual models with monolingual models across nine typologically diverse languages and five tasks, and set out to separate two possible causes of the multilingual models’ weaker performance: less training data per language, and the shared tokeniser. They found both mattered, and that the tokeniser mattered as much as the data: a dedicated monolingual tokeniser played an equally important role in downstream performance as pretraining data size, languages adequately represented in the multilingual model’s vocabulary showed negligible performance loss against their monolingual counterparts, and replacing a multilingual tokeniser with a specialised monolingual one improved the multilingual model’s performance on almost every task and language they tested. A tokeniser that fragments a language’s words into many small pieces does not merely make the text longer; the fragments are worse units for the model to learn from, because the regularities of the language are buried inside sequences of pieces rather than carried by the pieces themselves.26

The cost side was quantified in 2023 by Aleksandar Petrov, Emanuele La Malfa, Philip Torr and Adel Bibi at the University of Oxford, in a paper presented at the NeurIPS conference that year. Their method was direct. They took the FLORES-200 corpus — the same set of sentences, professionally translated into some 200 languages, so that the content is held constant and only the language varies — and counted the tokens each of several tokenisers needed for each version. The ratio between a language’s token count and the English count for the same sentences is what they call the tokenisation premium. On the tokeniser used by ChatGPT and GPT-4 at the time, the same text needed about 1.6 times as many tokens in Italian as in English, 2.6 times as many in Bulgarian, and 3 times as many in Arabic; for Shan, a language of the Shan State in Myanmar, the difference could be as high as 15 times. Across languages generally they found differences of up to 15 times, and they found that the disparity persisted even for tokenisers intentionally trained for multilingual support; even character-level and byte-level schemes, which might be expected to treat all languages alike, showed differences of over 4 times in encoding length for some language pairs, because a character in one script may take one byte in UTF-8 and a character in another script three or four.27

The same team spelt out the three channels through which the premium becomes an injury rather than a curiosity. Cost: commercial services charge per token, so users of some languages pay at least 2.5 times more than English users for the same task, and at the extremes far more than that. Latency: a model reads its input and generates its output token by token, so a text that takes twice the tokens takes roughly twice the processing. Context: a model’s context window holds a fixed number of tokens, so a user whose language carries a premium of three gets a third as much of their own text into the same window as an English user — the Oxford paper notes that users of languages such as Burmese or Dzongkha could fit less than a tenth as much content as English users. Their conclusion was a design demand: that future language models should be trained with multilingually fair subword tokenisers, treating parity of encoded length across languages as a property to be engineered rather than an accident to be regretted.27

A second 2023 study reached the same territory from the direction of an actual bill. Orevaoghene Ahia and colleagues at the University of Washington and Carnegie Mellon University analysed OpenAI’s commercial API across 22 typologically diverse languages, on multilingual benchmarks, asking whether speakers of all the languages the service supports pay the same for the same work. They found that they do not: speakers of a large number of the supported languages were overcharged relative to English while obtaining poorer results, and the speakers affected tended to come from regions where the APIs were less affordable to begin with. Their illustrative figure, widely quoted since, is that a user writing Telugu — a language with some 96 million speakers in southern India — might pay around five times more than an English user in the United States for an equivalent use of the model. The study also established that the disparity is not explained by data imbalance alone: part of it is rooted in properties of the languages themselves and in how their scripts are represented in Unicode, which is why simply adding more training text does not by itself close the gap.28

Two cautions belong with these figures, and both papers support them. First, the premium is a property of a language paired with a tokeniser, not of a language on its own. The older GPT-2 tokeniser was worse for most languages than the GPT-4 tokeniser that succeeded it — Hindi carried a premium of about 7.5 on the former and about 4.8 on the latter in the Oxford tables — and tokenisers built deliberately for many languages, such as the one built for the NLLB translation project, compressed the premiums substantially without eliminating them: Shan’s premium fell from about 15 on the ChatGPT tokeniser to under 2 on NLLB’s, while every multilingual tokeniser tested still left some language above a premium of 2.5. The measurements are therefore dated to the tokenisers they measured; a figure quoted for one model in 2023 should not be carried to another model without re-measuring.27

Second, the premium compounds. It is not only that a non-English text costs more to send. The same text also fills the context window faster, is answered more slowly, and — on the evidence of the Rust study — is handled by a model whose units for that language are intrinsically less serviceable, so the user pays more for a worse result through at least four separate mechanisms that all trace back to the same merge table. Tokenisation is usually described as plumbing, a preliminary to the real work. For most of the world’s languages it is one of the places where the real distribution of cost and quality is decided.262728

Tokens as money

Because the token is the unit of work, it became the unit of sale. Commercial language-model APIs are priced per million tokens, with separate rates for the two directions of travel: input tokens, the text a customer sends — prompt, system instructions, documents, conversation history — and output tokens, the text the model generates in reply. OpenAI’s published table in its prompt-caching announcement of 1 October 2024 gives a clean dated example: for GPT-4o, input cost $2.50 per million tokens and output $10.00 per million; for the smaller GPT-4o mini, $0.15 per million input and $0.60 per million output; for the o1 reasoning model, $15.00 in and $60.00 out. Anthropic’s pricing for its Claude models follows the same structure, with output set at a multiple of input — five times the input rate across its range in recent price lists. Prices change, models are retired, and any figure in this piece should be read as a dated example of the structure rather than a current quote; the structure — per million tokens, input and output priced separately, output dearer — has been stable across suppliers and years.3132

The arithmetic is worth doing once, because the per-million unit disguises how small the sums per conversation are and how large they become at scale. At the GPT-4o rates above, a request carrying a 2,000-token prompt and producing a 500-token answer costs half a cent for the input and half a cent for the output — one cent in total. The same request run a million times, an unremarkable volume for a customer-facing product, costs $10,000. Token pricing makes the first figure possible: no subscription, no minimum, metering fine enough to sell a single question for a cent. It also makes costs hard to forecast, because the meter runs on a unit the customer cannot see by looking at their text, and which varies with the language the text is in and the model it is sent to.2731

Output costs more than input for a mechanical reason. Input tokens are processed together, in parallel: the model reads the whole prompt in a single pass, and modern accelerators are efficient at exactly that kind of batch arithmetic. Output tokens are generated one at a time, in sequence, because each new token is chosen from the model’s prediction given all the tokens before it — the second word of an answer cannot be computed until the first exists. Generating 500 tokens therefore means 500 successive passes through the model, each far less parallelisable than the single pass that read the prompt, and the provider’s price reflects that asymmetry: in the examples above, output is priced at four times the input rate at OpenAI and five times at Anthropic. The same asymmetry explains a feature of reasoning models that surprises first-time users of their APIs: the tokens a model spends on internal reasoning before answering are generated tokens, and are billed as output, so a customer can pay for considerably more text than they ever see.3132

The largest discount in the system is for not doing the same work twice. In ordinary use, successive requests repeat themselves: the same system prompt, the same documents, the same opening turns of a conversation are sent again and again, and without caching the provider reprocesses every token of them every time. Prompt caching stores the processed form of a repeated opening stretch — a prefix — and charges a reduced rate when a later request begins with the same tokens. OpenAI introduced the facility on 1 October 2024 with a 50 per cent discount on cached input tokens, applied automatically to prompts longer than 1,024 tokens, with caches typically cleared after five to ten minutes of inactivity and always within an hour; its table put cached GPT-4o input at $1.25 per million against $2.50 uncached. Its later documentation reports discounts of up to 90 per cent on newer models, with cached input on some models priced at a tenth of the standard rate.31 Anthropic’s version is more manual and, on its long-standing terms, deeper: the customer marks the material to be cached, a cache write costs 1.25 times the base input price for a five-minute lifetime or twice the base price for a one-hour lifetime, and a cache read costs a tenth of the base input price — so the first use of a long system prompt costs a quarter more than usual, and every reuse within the lifetime costs a tenth as much. Both schemes reward the same behaviour: put the unchanging material first, keep it byte-for-byte identical, and let the variable part of the request come last.32

Running a model oneself abolishes the token price and replaces it with the older currencies of computing: hardware and time. A downloaded open-weight model — the subject of the companion parts of this piece — costs nothing per token at the point of use. What it costs is the machine: enough memory to hold the weights, enough computation to generate at an acceptable speed, and the electricity and the waiting. The exchange is favourable exactly where the API’s is not: very high volumes, texts that cannot leave the building, work that must continue if a supplier changes its prices or terms. It is unfavourable where the API’s strengths lie: no capital outlay, no maintenance, and access to the largest models. Either way, the token remains the unit of measurement — a local user watches tokens per second where an API customer watches dollars per million.2425

Tokens as limits, and as a measure of training

Tokens are also the unit of the two numbers by which models are most often compared: how much text one can consider at once, and how much text it was trained on. The first — the context window — is treated in its own part of this piece, and is mentioned here only to fix the unit: a context limit stated as 128,000 tokens is a limit on input and output counts under that model’s tokeniser, which is why the language premiums above translate into some users fitting a tenth as much of their own writing into the same advertised window as others.2427

The second number is the training claim: “trained on N trillion tokens”. Such claims need unpacking, because a token count of training is three different quantities wearing one label. It may mean the number of tokens the model was exposed to in total during training — tokens seen. It may mean the number of distinct tokens in the training corpus — unique tokens. And the two are connected by a third quantity, the number of epochs: how many times the corpus was run through. A laboratory that trains for two epochs on a corpus of one trillion unique tokens has a model that has seen two trillion tokens, and both “trained on two trillion tokens” and “trained on a trillion tokens of data” can be said of it, with different impressions given. Repetition is not cheating — it is the normal practice of training, and every model of any size is exposed to at least some material more than once — but the value of a repeated token is not the value of a fresh one. Niklas Muennighoff and colleagues, in a study presented at NeurIPS in 2023, trained more than 400 models under data constraints to measure exactly this: they found that training with up to four epochs of repeated data produced negligible differences in loss compared with the same compute spent on unique data, but that beyond that point the value of further repetition decayed, eventually to zero. A token count of training therefore says how much text passed through the model. Without the epoch count, it does not say how much text there was.30

What the number also does not say is anything direct about quality, because it omits which tokens they were. Training corpora are filtered, deduplicated and mixed in proportions their makers choose — so much web text, so much code, so much mathematics, so many books — and two models trained on the same number of tokens from different mixtures are different models. The count is a measure of scale, useful for comparing like with like and nearly meaningless across unlike things. It is also denominated in the maker’s own tokeniser: a trillion Llama tokens and a trillion GPT tokens are similar magnitudes, not identical amounts of text.2427

The training-token number acquired its modern importance from a specific result. Until 2022, the field’s working assumption, drawn from earlier scaling research, was that a bigger model was the best use of a given computing budget, and the largest models were accordingly trained on what later looked like modest data: DeepMind’s Gopher, at 280 billion parameters, was trained on about 300 billion tokens. In March 2022, Jordan Hoffmann and colleagues at DeepMind published a re-examination, training over 400 models ranging from tens of millions to over 16 billion parameters on between 5 billion and 500 billion tokens, and fitting how performance depended jointly on model size and data size. Their conclusion was that, for a fixed compute budget, model size and training tokens should be increased in roughly equal proportion — which works out, across the range they studied, at approximately 20 training tokens per parameter. Their demonstration model, Chinchilla, had 70 billion parameters and was trained on 1.4 trillion tokens — the 20-to-1 ratio applied — and, using the same compute as Gopher, outperformed it broadly while being a quarter of its size and correspondingly cheaper to run. Most of the large models of the day were, by this measure, undertrained: too many parameters fed too few tokens.29

Practice then departed from the prescription, deliberately and for a stated reason. The Chinchilla ratio is optimal for training compute only: it answers the question “what is the best model this training budget can produce?” A laboratory that will serve a model to millions of users faces a different question, because a smaller model costs less to run on every one of the billions of requests that follow, and it can be worth spending extra training compute — training the small model far past 20 tokens per parameter, on data the Chinchilla rule would have assigned to a larger model — to buy a lifetime of cheaper answers. Meta’s Llama 3 report is the documented case at scale. The Llama 3 models were pretrained on about 15 trillion tokens of multilingual text; the flagship 405-billion-parameter model was trained on 15.6 trillion tokens, which is roughly 38 tokens per parameter — already about double the Chinchilla ratio — while the 8-billion-parameter model in the same family was trained on the same 15-trillion-token corpus, which is on the order of 1,900 tokens per parameter, nearly a hundred times the compute-optimal ratio. Meta reported that the smaller models were still improving, log-linearly, at the end of that training. The “20 tokens per parameter” figure survives as the reference point that makes such departures describable: it is the training-optimal benchmark against which a laboratory’s decision to overtrain a small, cheap-to-serve model can be measured and explained.2429

Special tokens and the machinery around the text

Not every token in a vocabulary stands for a piece of text. A small number are reserved as signals to the machinery, inserted by software rather than typed by anyone, and a reader who does not know they exist will misunderstand several things models do — including what they charge for.

The oldest of these mark the edges of a sequence. A beginning-of-sequence token — written variously as BOS, ``, or `<|begin_of_text|>` depending on the model family — is placed at the start of the input, and an end-of-sequence token — EOS, ``, `<|endoftext|>` — marks its end; when a generating model produces the EOS token, the software around it treats the answer as finished and stops. SentencePiece’s design reserves vocabulary positions for exactly these functions from the outset: an unknown symbol, BOS, EOS and a padding symbol are set aside as meta symbols before any subword units are learned. Padding is the least visible of the set. Models process text in batches, and batches must be rectangular — every sequence the same length — so shorter sequences are filled out to the length of the longest with padding tokens, which an attention mask then instructs the model to ignore. Padding tokens consume computation in training and in batched serving, but they are not text, are not shown to users, and are not part of what a prompt says.2333

Chat models add a second layer of machinery, because a conversation is not naturally a single stream of text. It is a sequence of turns by different speakers, preceded usually by a system prompt: instructions from the operator that set the assistant’s role, rules and context, which the user may never see. Models are fine-tuned to expect these elements marked in a particular format, and the marking is done by a chat template — a small program, stored with the tokeniser and written in the Jinja templating language in the Hugging Face ecosystem, which takes the structured list of messages and renders it into the single tokenisable string the model receives, inserting the control tokens and role markers the model was trained on. Hugging Face’s documentation is blunt about the stakes: a chat template that does not match the format a model was trained with will cost performance, because the model is being addressed in a dialect it does not quite recognise. Llama-style templates wrap each turn in header tokens naming the role — system, user, assistant — and close it with an end-of-turn token; other families use different markers for the same jobs. All of those markers are tokens, all of them occupy positions in the context window, and on an API all of them are billed as input.2433

The system prompt is the largest body of tokens in many interactions that the user did not write and cannot inspect. A commercial assistant’s system prompt — instructions, tool definitions, the date, retrieved documents, safety rules — can run to hundreds or thousands of tokens, and in a continuing conversation the entire history is re-sent with every new message, so a chat’s input count grows with each turn even when the user’s own messages are short. This is the ordinary explanation of a common experience: a long conversation becomes slower and, on a metered API, more expensive per reply, and eventually reaches the context limit and begins to lose its beginning. The meter counts tokens the user never saw, because the model genuinely had to read them.3133

Two failure modes show the machinery’s edges, and both are documented rather than anecdotal. The first is the boundary problem. A tokeniser cuts a prompt without knowing what will follow it, so a prompt that ends mid-word-part can force a cut the model would never have seen in training text: a prompt ending “The capital of France is” followed by a generated continuation beginning with a space is natural, but a prompt ending with a partial token — the classic case is a prompt ending in a space, or ending with characters that would normally merge with the next ones — leaves the model starting its answer from an unnatural token boundary, and its predictions degrade measurably. The Guidance library, developed at Microsoft Research for controlling language-model generation, named its remedy token healing: the generation software backs up by one token at the end of the prompt, then constrains the model’s first generated token to be one that begins with the text that was backed over, so the boundary is re-cut the way continuous text would have cut it. The technique exists only because tokenisation is greedy and forward-looking text is not available when the prompt is cut.34

The second failure mode is the famous one: models stumbling over the letters inside words, as in the widely reported inability of prominent models to count the letter “r” in “strawberry”. The tokenisation explanation is real but partial, and the research literature should be quoted at its own strength rather than at the strength of the folklore. The word reaches the model as three tokens — “str”, “aw”, “berry” in one major tokeniser — and no token boundary falls between the letters to be counted; the model is being asked about the internal composition of units it processes as indivisible, and what it knows about a token’s spelling it has had to infer indirectly from patterns across its training data. Adrian Cosma and colleagues, in a 2025 paper that took the problem as its title — “The Strawberry Problem” — framed it as a limitation arising from tokenisation and showed, across 19 synthetic tasks isolating character-level reasoning, that such abilities emerge slowly, suddenly and only late in training. Other experimental work, however, does not support the simple version of the story in which the cut alone explains the failure: studies of letter-counting errors have found them tied to the complexity of the counting operation itself as well as to how the input is tokenised. Xiang Zhang and colleagues likewise found that tokenisation choices could move counting accuracy substantially — by up to 80 per cent in their experiments with different tokenisations of the same tasks — which establishes that the cut matters without establishing that it is the whole cause. The careful conclusion is that tokenisation makes letter-level information hard for a model to reach, and that counting is independently hard for this kind of architecture; the strawberry failure is overdetermined, and any account that blames the tokeniser alone goes beyond the evidence.3536

Counting tokens in practice: characters, words and the drift between estimates

Given that money and limits ride on the count, the first rule is to count with the tokeniser of the model actually being used. For OpenAI models, the instrument is tiktoken, OpenAI’s open-source BPE tokeniser library, which ships the encodings for its model families; OpenAI’s help pages direct users to it, and to the online tokeniser, while warning that a plain-text count may still differ from the count of a complete API request, because a request carries the machinery of the previous section — role markers, formatting, system material — as well as the visible text. For open-weight models, the instrument is the tokeniser shipped with the model itself, loaded through the Hugging Face libraries or the model’s own software.2133

Estimates drift for enumerable reasons, and listing them is more useful than any single correction factor. The rule of thumb — four characters, three-quarters of a word — is an average over ordinary English prose, and it fails in predictable directions. Code costs more tokens per character than prose, because indentation, punctuation and short identifiers fragment differently from sentences. Numbers cost more than their length suggests, because digit strings are cut into short groups rather than read as quantities. Text dense with capital letters, URLs, or unusual names fragments more than running text. And any language other than English must be expected to cost more, by the premiums measured above — a budget built by counting words and multiplying by four-thirds will be roughly right for an English document and badly wrong for the same document in Hindi or Burmese. The direction of the error is at least consistent: naive estimates almost always undercount, because every effect on the list pushes the true count up from the prose average.212728

The three units — characters, words, tokens — answer different questions, and confusing them is the root of most practical mistakes. Characters are what storage and transmission charge for, and what a reader sees. Words are what human beings estimate length by, and what most writing software reports. Tokens are what the model reads, what its limits are set in, and what its bill is written in. A 10,000-word report is about 13,000 tokens in English on the published ratio — comfortably inside a 128,000-token window, with room for the conversation around it — and the same report in a language carrying a premium of five would occupy some 65,000 tokens of the same window before a single word of reply was generated. Neither figure can be got from the word count alone without knowing the language and the tokeniser, which is the whole argument of this section in one example: the token is not a pedantic refinement of the word. It is a different unit, owned by a particular artefact, and the artefacts differ.212427

Context windows — how much the model can hold in view

What the window is

A context window is the maximum number of tokens a model can attend to in a single run: the tokens of the input — system instructions, the conversation so far, any documents pasted or retrieved, and the user’s new message — plus the tokens of the output the model is about to generate, all counted together against one limit. Nothing outside that set exists for the model during the run. Text that was in an earlier conversation but is not re-supplied in this one is not dimly remembered; it is absent, in the same way that a page not placed on a desk is absent from the desk. The window is therefore not a store the model consults. It is the working surface itself, rebuilt from scratch on every run, and emptied when the run ends.3748

The counting is done in the model’s own tokens, which is why window sizes cannot be converted into words by a universal rule. OpenAI’s help documentation gives the rough English conversion its models use — one token is about four characters, or about three-quarters of a word, so 100 tokens are roughly 75 words — and states in the same place that the same text produces different token counts under different models, encodings and languages. A 128,000-token window is therefore a different amount of English, and a much different amount of most other languages, depending on whose tokeniser is doing the counting.48

The window is also not a text-only measure in current models. Multimodal systems convert images, audio and video into tokens at rates set by the maker, and those tokens draw on the same budget as words. Google’s equivalents for Gemini 1.5 Pro’s million-token window — one hour of video, eleven hours of audio, over 700,000 words — are three different fillings of one container, not three containers. A user who loads forty minutes of video into such a window has spent most of it before a single document is added, and the transcript of that video, if it is also supplied, is charged a second time in text tokens. Announcements quote the window once and let each audience imagine it filled with its own material.4445

Inside the run, the mechanism that uses the window is attention. In the transformer architecture set out by Vaswani and colleagues in 2017, each token’s representation is repeatedly compared with the representations of the other tokens in the sequence, and the comparisons decide how much each token’s meaning is adjusted by its neighbours. That is what “attending to” the window means mechanically: not reading it once, in order, as a person reads a page, but computing, at every layer of the network, a weighted mixture of the whole supplied sequence for every position in it.37

For those comparisons to be useful, the model must know where each token sits. A bag of tokens with no positions would be unable to distinguish “the dog bit the man” from “the man bit the dog”. The original transformer added a positional signal — sinusoidal positional encodings, fixed mathematical patterns of sines and cosines at different frequencies, added to each token’s embedding so that position was present in the numbers the attention layers received. The paper’s authors noted that they chose the sinusoidal form partly in the hope that it would let the model extrapolate to sequence lengths longer than any it had seen in training, because the pattern for a new position is defined by the same functions rather than learned from examples.37

Most current open models instead use rotary position embedding, or RoPE, introduced by Su and colleagues in the RoFormer paper of 2021. RoPE does not add a position vector. It rotates each token’s query and key vectors — the vectors attention uses to ask and to answer “what is relevant to me?” — by an angle proportional to the token’s position, applied in pairs of dimensions at different rotation speeds. The consequence the authors designed for, and proved in the paper, is that the attention score between two tokens then depends on their relative distance rather than on their absolute positions, and that the influence between tokens tends to decay as relative distance grows. Position, in a RoPE model, is a set of rotations, and the window’s usable length is bound up with the range of rotations the model was trained to handle.38

That last point governs much of what follows. A model’s window is not a neutral container size, like the capacity of a disk. It is a range of positions the network was trained — or later adapted — to work over. Extending the range is an engineering operation with measurable effects on quality, and operating near the edge of the range is not the same as operating in the middle of it. The marketing number states the range. It does not state the quality profile across it, which is why the evidence sections below exist.385051

The growth of the window, 2019–2025

The documented sequence of window sizes is short enough to give in full, and it is worth giving with dates, because the speed of the growth is itself part of how the numbers should be read: each figure below was a headline when announced and an ordinary specification within about a year.

GPT-2, released by OpenAI in stages through 2019 with the full 1.5-billion-parameter model published in November 2019, worked over a context of 1,024 tokens — roughly a few pages of English text. That was the working surface of the model whose outputs first prompted public argument about machine-written text.39 GPT-3, described by Brown and colleagues in 2020, doubled the figure to a context window of 2,048 tokens, the size stated in the paper’s architecture table for every model in the GPT-3 family from the smallest to the 175-billion-parameter largest. Two thousand tokens is about 1,500 words of English: a long essay, not a book.40

GPT-4, released on 14 March 2023, was offered in two window sizes: a version with an 8,192-token context, which is the version the technical report’s evaluations principally describe, and a 32,768-token version. Even the larger of the two held about 25,000 words — a novella, with no room for a long reply once the novella was loaded.41 Two months later the scale changed. On 11 May 2023 Anthropic announced that Claude’s context window had been expanded from 9,000 to 100,000 tokens, about 75,000 words, and demonstrated the system by loading the whole of The Great Gatsby — 72,000 tokens in their count — changing one line, and having the model identify the change in 22 seconds. It was the first widely available window of that order, and Anthropic’s announcement is careful in a way later announcements often were not: the demonstration it chose was a retrieval task, finding a planted difference, not a claim that the model reasoned equally well over every page.42

On 6 November 2023, at its first DevDay, OpenAI announced GPT-4 Turbo with a 128,000-token context window — described as the equivalent of more than 300 pages of text in a single prompt — at input and output prices respectively three times and two times lower than the original GPT-4. The 128k figure then became the industry’s standard large window for a season: it is the size Meta adopted, the size Gemini 1.5 carried as its standard configuration, and the size against which the next jump was measured.4344

The jump came on 15 February 2024, when Google announced Gemini 1.5 Pro with an experimental context window of one million tokens, offered to a limited group of developers and enterprise customers in private preview, alongside a standard 128,000-token window. Google stated the equivalents plainly: one million tokens could hold over 700,000 words, more than 30,000 lines of code, eleven hours of audio or one hour of video. The accompanying technical report, published the following month, reported near-perfect recall — over 99.7 per cent — on its needle-retrieval tests up to one million tokens across text, audio and video, and research results, beyond the production offering, extending to ten million tokens of text.4445

Meta’s Llama 3.1, released on 23 July 2024, brought the 128,000-token window to a downloadable model: all three sizes — 8 billion, 70 billion and 405 billion parameters — were given a context length of 128,000 tokens, up from 8,192 in Llama 3 three months earlier. The Llama 3 herd paper describes how the extension was done: continued pretraining in stages at increasing sequence lengths, with the RoPE base frequency adjusted for the longer range, rather than a model trained at 128,000 tokens from the start. The method matters for the reader because it is typical. Most large windows in production models are extensions of shorter trained ranges, achieved by exactly this kind of staged adaptation, and the quality evidence for the extension is the maker’s own evaluation.4647

After February 2024 the headline figures moved into the millions. Google’s report describes research recall tests to ten million tokens.45 Meta announced Llama 4 Scout on 5 April 2025 with what it called an industry-leading context window of ten million tokens. OpenAI’s GPT-4.1 family, cited in Chroma’s 2025 long-context study, carried a one-million-token window. These figures should be read with the distinction this piece maintains throughout: a research result at ten million tokens, a production window of one million, and an advertised maximum of ten million are three different claims, made by different documents, with different evidence behind each, and announcements do not always keep them separate.4552

Why attention is expensive: the quadratic problem and its answers

The reason windows stayed at one or two thousand tokens for years is arithmetic. In the original transformer, attention compares every token with every other token. For a sequence of n tokens, that is n squared pairwise comparisons, computed at every layer. Double the sequence and the attention computation roughly quadruples; multiply the sequence by ten and it grows a hundredfold. Vaswani and colleagues set this out in the 2017 paper’s own complexity table: self-attention’s cost per layer is quadratic in sequence length, which is cheaper than the recurrent alternatives only while sequences are shorter than the representation dimension — a condition long documents violate.37

Generation adds a second cost that grows with the window. To avoid recomputing the whole sequence for each new output token, a running model caches the key and value vectors of every token already processed — the KV cache — and attends to the cache. The cache grows linearly with the number of tokens in the window, for every layer, so a million-token conversation carries a million tokens’ worth of cached vectors in memory alongside the weights themselves. The window’s size is therefore also a hardware claim: whoever serves the model must hold, for each active user, a cache proportional to the context that user has filled.3747

Three documented lines of engineering made large windows practical, and each is worth naming because announcements routinely present their combined result as a property of “the model” when it is a property of a system.

The first is exact but faster attention. Dao and colleagues’ FlashAttention, published in 2022, computes exactly the same attention result as the standard method — it is not an approximation — but reorganises the computation into tiles that fit in the processor’s fast on-chip memory, sharply reducing reads and writes to main GPU memory. The paper reports, among its results, a threefold training speedup on GPT-2 and the first transformers to score better than chance on the Path-X task at a sequence length of 16,384 and on Path-256 at 65,536. FlashAttention changed the wall-clock cost of attention without changing its mathematics; the quadratic number of comparisons remains, performed more efficiently.53

The second is attending to less. Mistral 7B, released in October 2023, uses sliding-window attention: each token attends directly to a bounded window of preceding tokens — 4,096 in that model — rather than to the entire past, with information from further back reaching it indirectly, passed forward through successive layers, in the way news travels along a line of people. Combined with grouped-query attention, which shares key and value heads among query heads and so shrinks the KV cache, the design let a 7-billion-parameter model handle long sequences at reduced inference cost, and its authors state the trade openly: the direct view is bounded so that the effective reach can be long.54

The third is rescaling position itself. Because RoPE encodes position as rotations, a model trained at 4,000 tokens meets, at token 100,000, rotation angles it never encountered in training, and quality collapses. YaRN — Yet another RoPE extensioN — published by Peng and colleagues in 2023, rescales the rotation frequencies unevenly, treating the slow-rotating dimensions that carry long-range position differently from the fast ones, and adds a temperature adjustment to the attention scores. The authors report extending LLaMA models to context lengths far beyond their training range using ten times fewer tokens and two and a half times fewer training steps than previous extension methods, with fine-tuning on roughly a tenth of one per cent of the original pretraining data. The Llama 3 extension to 128,000 tokens was done by the same family of operations — staged long-sequence training with an adjusted RoPE base — inside Meta’s own pipeline.4755

None of these techniques repeals the underlying arithmetic. They move the point at which cost and quality bite — from thousands of tokens to hundreds of thousands, and for retrieval-style tasks to millions — and they do so unevenly, task by task. A window made affordable by sliding-window attention, rescaled rotations and a tiled kernel is a window whose every region has been reached by a different compromise. That is the mechanical background to the evidence that models do not use their windows uniformly.505354

A big window is not memory, and it is not understanding

The word most often attached to a large window in product writing is “memory”. The word is wrong in a way that changes what users trust the system with, so it is worth being exact. A model with a million-token window retains nothing when the run ends. The next run begins with whatever text the surrounding software chooses to supply — the saved conversation, a summary of it, or nothing — and the model has no access to anything else, including its own previous answers, unless they are pasted back into the new window. What persists between runs is a transcript held by the product, not a memory held by the model. The window is the size of the desk. It says nothing about whether anything is kept in the filing cabinet, because there is no filing cabinet in the model at all.3748

Nor does presence in the window guarantee use. The central study is “Lost in the Middle: How Language Models Use Long Contexts”, by Liu and colleagues, published in the Transactions of the Association for Computational Linguistics in 2024. The authors took multi-document question answering — twenty documents, one of which contains the answer — and moved the answer-bearing document through the context while holding everything else constant. Performance traced a U shape: highest when the relevant document stood at the beginning or the end of the input, and significantly degraded when it stood in the middle. For GPT-3.5-Turbo with twenty documents, accuracy was 75.8 per cent when the answer came first and 53.8 per cent when it came tenth, in the middle — below the 56.1 per cent the same model scored with no documents supplied at all. In that configuration, giving the model the answer in the middle of its window was worse than not giving it the document. The authors found the same pattern in a key-value retrieval task, and found that enlarging a model’s window did not by itself remove the effect: the extended-context versions of the models they tested traced nearly the same curves as the standard versions.50

The needle-in-a-haystack test is the counter-exhibit most often quoted, and it is a real test with a narrow meaning. The design comes from an open evaluation harness published by Greg Kamradt in 2023, which Google’s report cites as the inspiration for its own long-context retrieval tests: a single distinctive sentence — the needle, classically a statement about the best thing to do in San Francisco — is planted at a chosen depth in a long body of unrelated text, in the original harness a set of essays, and the model is asked a question only that sentence answers. Running the test across depths and lengths produces the grid of green and red cells that became the standard launch graphic. The design’s virtues are that it is cheap, repeatable and hard to fake. Its limits are built into the same simplicity: one needle, stated in words unlike everything around it, with a question that points at it directly.45 Google reported over 99.7 per cent recall for Gemini 1.5 Pro on this design up to one million tokens, across text, video and audio, and 100 per cent recall up to 530,000 tokens of text. Those are the maker’s own figures, from its own report, for a task with one planted fact, phrased distinctively, in text otherwise unrelated to it.45

The same report shows what happens when the test is made less like a parlour trick. When the number of needles to be recalled rose to one hundred, Gemini 1.5 Pro’s recall at one million tokens fell to roughly 60 per cent. Finding one marked sentence in a haystack and reporting everything relevant distributed through a haystack are different abilities, and the first is routinely used in announcements as if it evidenced the second. A needle test also cannot measure reasoning over the retrieved material, resistance to plausible distractors, or correct handling of two passages that contradict each other — the operations most real long-document work consists of.45

RULER, a benchmark published by Hsieh and colleagues at NVIDIA in 2024, was built to close exactly that gap. It extends the needle design with multiple needles of varied type and quantity, multi-hop tracing — following a chain of references across the context — and aggregation tasks such as finding the most common words, which require the whole context to be used rather than one point in it. Evaluating seventeen long-context models, the authors found that although nearly all achieved almost perfect scores on the standard single-needle test, performance dropped substantially as context length grew, and although every model tested claimed a context size of at least 32,000 tokens, only about half maintained satisfactory performance at 32,000 tokens on RULER’s broader tasks. The gap between the advertised window and what the authors call the effective context size is the paper’s central finding, and it is a finding about the field, not about one maker.51

Chroma’s “Context Rot” study, published in July 2025, pushed the measurement further by holding task difficulty constant and varying only input length. Across eighteen models, including GPT-4.1, the Claude 4 family and Gemini 2.5, performance degraded as input grew even on deliberately simple tasks; needles whose wording merely paraphrased the question, rather than matching it word for word, were lost faster as length increased; single distractors resembling the answer lowered performance, and four distractors lowered it further; and on a conversational-memory evaluation, models given a focused extract of about 300 tokens outperformed the same models given the full history of about 113,000 tokens. Chroma is a company that sells retrieval infrastructure, which is a reason to note its interest; its methods, code and per-model results are published with the report, which is the reason the findings can be checked rather than merely weighed.52

Taken together, the three studies describe one fact from three angles. Admission to the window is binary — a token is in or out — but use of the window is graded, positional and task-dependent. A specification sheet reports the binary fact. The graded fact is the one that decides whether a contract clause on page 190 of a loaded file influences the answer.505152

Retrieval: the alternative to a bigger desk

Retrieval-augmented generation, or RAG, was given its modern form by Lewis and colleagues in 2020, before any of the windows described above existed. Their system paired a pretrained generator with a retriever over an external index — in the original paper, a dense-vector index of a text corpus — so that the passages relevant to a question were fetched at the moment of asking and placed in the model’s context, rather than the model’s parameters or its window being expected to contain them. The paper’s stated reasons remain the operative ones: knowledge held in an index can be inspected, attributed to a source, and updated by changing the index, none of which is true of knowledge held in weights or assumed to be somewhere in a stuffed window. On three open-domain question-answering tasks the system set the state of the art at the time, ahead of models that relied on their parameters alone.56

Retrieval beats window-stuffing in identifiable conditions. The first is scale: a corpus of millions of documents cannot be placed in any window, but it can be indexed, and only the few passages relevant to a question need to travel. The second is freshness: an index can be rebuilt when a price list, a statute or a personnel file changes, while a window is only ever as current as the copy pasted into it. The third is provenance: a retrieved passage has an address, so an answer can cite the document it came from and a reader can check it; a fact the model produced from somewhere inside a 500,000-token prompt has no such address. The fourth, on Chroma’s evidence, is accuracy itself: where the relevant material is a small fraction of the whole, a short focused context outperformed the full history in their conversational test, so fetching less produced more.5256

The window beats retrieval in the opposite conditions. Where the task is genuinely about the whole of a bounded document — the internal consistency of one contract, the argument of one book, a codebase small enough to hold entire — relations between distant parts are the substance of the question, and a retriever fetching fragments by similarity will miss the passage whose importance is structural rather than verbal. Where the corpus is small, stable and private, the machinery of indexing may cost more than it saves. And retrieval has its own failure mode, which the honest reader should hold alongside the window’s: if the retriever does not fetch the passage, the model never sees it, and the answer is built on the model’s parameters and the wrong fragments, delivered with the same fluency as a correct one. The two techniques are complements in most serious systems — retrieval to choose what enters the window, the window to reason over what was chosen — and any announcement presenting a giant window as the abolition of retrieval is selling the desk by disparaging the filing system.5256

What truncation silently does

When material exceeds the window, something is cut, and in most products the cutting is done by the surrounding software, automatically, without a marker in the text the user sees. Three forms of the cut recur, and each has a characteristic damage.

The first is the dropped beginning. Chat systems commonly manage a long conversation by discarding the earliest turns, or replacing them with an automatically written summary, once the running total approaches the limit. The instructions given at the start of the conversation — the system prompt’s house rules as relayed by the user, the corrections issued in the first hour, the fact established in message two on which message ninety depends — are precisely what stands at the beginning. A user experiences the result as the model “forgetting” something it demonstrably knew earlier in the same conversation. Nothing was forgotten. The text was removed from the only place the model can look, by a policy the interface did not announce.4850

The second is the cut document. A file pasted or uploaded beyond the window’s capacity is commonly truncated at the limit, sometimes from the end, sometimes — for formats processed in chunks — in ways the user cannot predict. The model then summarises, reviews or answers questions about a document whose final sections it has never seen, and it does so without reporting the omission, because from inside the run there is no omission to report: the window it received is, to the model, the whole of what exists. A review of a contract that stops before the termination clauses, or of a report that stops before the qualifications, will read as complete. The check is the user’s: count the document’s tokens with the maker’s tool before submitting it, and compare the count with the window minus the space reserved for the reply.48

The third is the shared budget. The window is one number, and everything draws on it: the system instructions, the conversation, the documents, any retrieved passages, and the output itself, including, in reasoning models, internal reasoning tokens that the user never sees but that are counted as output usage. OpenAI’s documentation states the arithmetic directly: input and output tokens together are bounded by the model’s limit, and reasoning tokens count toward output. A user who fills 127,000 tokens of a 128,000-token window has not bought a long answer; they have bought about a thousand tokens of one, after which generation stops mid-sentence or the request is refused. Long inputs and long outputs are not two capacities. They are two claims on one capacity, and announcements quote the capacity once.4348

The three terms together

The three subjects of this piece — open weights, tokens and context windows — are usually announced in the same paragraph and confused in the same paragraph. One documented launch shows what each number in it does and does not establish. Take Meta’s release of Llama 3.1 on 23 July 2024, in the company’s own announcement, its model paper and its licence.464749

The announcement’s first claim is about holding. Meta released three models — 8 billion, 70 billion and 405 billion parameters — for download on its own site and on Hugging Face, and described the 405B as the first frontier-level openly available model. What a downloader actually received was the weights, configuration and tokeniser files, under the Llama 3.1 Community License. That licence grants use, reproduction, distribution and derivative works, including commercially, and then sets its conditions: a licensee whose products or services had more than 700 million monthly active users in the preceding calendar month must request a separate licence, which Meta may grant or withhold at its discretion; derivatives must begin their names with “Llama”; distributed copies must display “Built with Llama” and carry the licence; and all use is subject to an acceptable use policy. So the first lens — may I hold it, and on what terms? — is answered by the licence, not by the adjective in the headline. A university, a start-up and a hospital may hold the file outright and permanently for that version. One of Meta’s largest competitors may not, without asking. Both facts are in the same document.4649

The announcement’s second set of numbers is about training tokens. Meta reported that the models were pretrained on more than 15 trillion tokens, and the herd paper describes the corpus as drawn from publicly available sources, processed through de-duplication and quality filtering, with the 405B trained on over 16,000 H100 accelerators. Read through the token lens, “15 trillion” establishes the scale of the training exposure and nothing finer. It does not state how many unique documents the corpus contained, because tokens are counted after tokenisation and after the pipeline’s decisions, and a corpus in which some sources are repeated for more than one pass — a standard practice the paper’s data description reflects in its mixing and upsampling of high-quality sources — yields a token total larger than its unique content. It also does not convert into words by the reader’s conversion, because the count was made by Llama’s tokeniser, whose vocabulary of 128,000 tokens cuts text at Llama’s boundaries, not at another maker’s.47

The third headline number is the window: 128,000 tokens, up from 8,192 in Llama 3, and presented in the announcement as enabling long-form summarisation, multilingual conversation and coding assistance over long inputs. Read through the window lens, the figure establishes the maximum size of one run’s working surface, counted in Llama tokens, shared between input and output. It does not establish that the model uses all 128,000 positions equally well. The herd paper reports Meta’s own long-context evaluations, which are the maker’s measurements on the maker’s chosen tasks; the independent evidence available for long-context models generally — the U-shaped position effect of Liu and colleagues, and RULER’s finding that only about half of seventeen models claiming at least 32,000 tokens performed satisfactorily at 32,000 — is the reason a reader asks for position-sensitive and multi-task evidence rather than accepting the maximum as a working length. A document of 100,000 Llama tokens fits in the window. Whether the clause in its middle will be used is a separate, empirical question that the number 128,000 does not answer.46475051

The cost lens cuts across all three. The weights are free to download, which is a statement about the file, not about the run: serving a 405-billion-parameter model requires accelerators by the rack, and the herd paper’s own account of the model’s training hardware indicates the class of machinery involved at inference, at reduced but still substantial scale. A user who instead rents the model from a hosting provider pays per token — in Llama tokens, at that provider’s rates, with input and output commonly priced differently. The same English document therefore has three different token counts in play in one product decision: the count its vendor quotes for a rival’s API, the count in Llama’s tokeniser, and the count that determines whether it fits the 128,000-token window. Comparing the per-token prices of two services without establishing that their tokens are the same size is comparing prices per crate without asking how much a crate holds.4748

Finally, the launch shows what no headline number in it establishes. The download does not include the training data, the full training code or the safety apparatus of Meta’s own hosted products; the licence is not an open-source licence in the maintained sense, because of the user threshold and the use policy; the training-token total does not disclose the unique corpus; and the window does not certify uniform use of its length. None of this makes the release small — by the documented record it was the largest transfer of frontier-class capability to independent holders made to that date. It makes the release specific. Each number in the announcement answers one question well and the others not at all, and the three lenses are simply the discipline of asking each number only its own question.464749

How to spot misuse of the terms

The misuses below are checkable against documents, not matters of tone. Each names the claim as it usually appears and the test that settles it.

“Open” without the licence. A release described as open, open source or freely available whose weights sit behind an application form, an account approval, a click-through community licence with a user threshold, or an acceptable use policy is a gated or restricted release, whatever the headline says. The test takes two minutes: find the licence text, and look for a size threshold, a field-of-use list and a clause about the model’s outputs. Meta’s Llama licences contain all three, in plain sight, which is why the accurate description of Llama is “downloadable under a community licence” and why any announcement that will not name its licence is asking to be read as more open than it is.49

A token count without a tokeniser. “Trained on 30 trillion tokens”, “your document is 40,000 tokens”, “a million tokens of context” — each is incomplete until the tokeniser is named, because tokenisers cut the same text differently and the counts are not interchangeable. The test: ask whose tokeniser produced the count, and recount the same text with the target model’s own counting tool. OpenAI’s documentation concedes the point from inside the industry, stating that the same text yields different counts under different models and languages, and offering only a rough four-characters-per-token rule for its own English case.48

A training-token total without epochs or uniqueness. A total in the trillions can describe a vast unique corpus read once or a smaller corpus read several times, with high-quality sources deliberately upsampled. Both can be sound engineering. They are not the same claim about the breadth of what the model has seen. The test: look in the model paper, not the announcement, for the data section — the number of unique documents or tokens before repetition, the mixing proportions, and any statement of epochs. If the paper gives only the headline total, the breadth claim is unverifiable as stated and should be reported as such.47

A window size without effective-context evidence. A model advertised at 128,000, one million or ten million tokens whose maker publishes only a single-needle retrieval chart has evidenced reach, not use. The test: ask for results that vary the position of the relevant material, that require more than one fact, and that extend to the advertised length. Liu and colleagues supply the position test, RULER the multi-fact and aggregation tests, and Chroma the constant-difficulty length test; a claim that survives none of the three being run has not been tested, only asserted. Note also which length the evidence reaches: research results at ten million tokens are not a production window at ten million tokens.45505152

Per-token prices compared across tokenisers. A service priced at half a rival’s rate per million tokens is cheaper per token. Whether it is cheaper per document depends on how many of its tokens your document becomes, and on the input-output split, since output tokens are commonly priced at a multiple of input. The test: tokenise a representative document and a representative reply in both systems, price the pair, and compare totals. Any comparison published without that arithmetic is marketing, including when it appears in a launch keynote.4348

“Memory” used of a window. Copy that says a model “remembers your whole project”, “never forgets a conversation” or has “a memory of a million tokens” is describing, at most, the size of a single run’s working surface. The test: close the session and start a new one. What the model then knows is what the product chose to re-supply, and the product’s retention policy — a document about the service, not the model — is where the truth of the claim lives. A related tell is the reverse claim, that a conversation was “forgotten” by a model: in a managed chat, the likelier event is silent truncation of early turns by the software around the model.4852

A context figure without a budget split. Announcements quote the window as if it were all available for the user’s document. System instructions, conversation history, retrieved passages and the reply itself draw on the same total, and reasoning models spend part of it on internal tokens the user never sees. The test: ask what the maximum output length is, and subtract. The remainder, not the headline, is the space a document can occupy.4348

What you can do

Count with the maker’s own tool before you budget or submit. Every major provider publishes a tokeniser or a counting endpoint for its models — OpenAI’s is its Tokenizer tool and the tiktoken library; the other laboratories publish equivalents. Paste or process your actual document, in its actual language, and use that number for cost estimates and for judging whether the document fits the window with room left for a reply. Rules of thumb — four characters, three-quarters of a word — are for conversation, not for budgets, and they fail worst on code, tables and languages other than English.48

Read the licence text, and archive it with the weights. If a model matters to your work, download the weights and the licence together, keep them together, and record the version and the date. A downloaded version cannot be withdrawn from your disk, but its terms are the terms of the copy you took, and makers revise licences between versions. The three clauses to find before relying on any release are the user-size threshold, the use policy and the outputs clause; all three are present, in readable English, in the standard community licences.49

Test a long-context claim on your own document, at three positions. Take a document you know well, with a fact you can verify placed first at the beginning, then in the middle, then at the end, and ask the same question each time. Then ask a question requiring two facts from distant sections, and one requiring a fact stated in a passage that resembles, but contradicts, another. This is a home version of the published method — position variation from Liu and colleagues, multi-fact demand from RULER — and twenty minutes of it tells you more about a model’s effective window for your material than any launch chart. Repeat it at the length you actually intend to use, not at a comfortable fraction of it.5051

Prefer retrieval for a large or changing corpus. If the material is bigger than the window, changes often, or needs to be cited to a source, build or choose a system that retrieves passages into the window rather than one that promises to swallow the archive. Reserve window-stuffing for the single bounded document whose whole shape is the question. Where a vendor claims the window has made retrieval unnecessary, the published evidence — including a retrieval company’s own finding that a 300-token focused extract beat a 113,000-token full history — is the reply.5256

Watch for the cut. Before submitting a long document, compare its token count with the window minus the output you need. In a long chat, restate the load-bearing facts and instructions periodically rather than assuming the first messages are still in view, and keep your own copy of anything the conversation established. If an answer reads as though a section was never seen, check the arithmetic before blaming the model: truncation by the surrounding software is silent by design.48

Run the three questions on every announcement. May I hold it — and under which licence text, with which thresholds and use clauses? How much fits — in whose tokens, with what output reserved, and with what published evidence about use at that length and at the middle positions? What does it count and cost — which tokeniser produced the training and pricing figures, how many tokens does my document become, and what is the price of the whole job rather than the million-token unit? A launch that answers all three from its own documents is a specification. A launch that answers none of them is an advertisement, and can be enjoyed as one without being relied on as the other.464749

References

  1. Vaswani, A. et al., Attention Is All You Need, arXiv, 2017. https://arxiv.org/abs/1706.03762 *
  2. Sennrich, R., Haddow, B. and Birch, A., Neural Machine Translation of Rare Words with Subword Units, arXiv, 2015. https://arxiv.org/abs/1508.07909 *
  3. Liu, N. F. et al., Lost in the Middle: How Language Models Use Long Contexts, arXiv, 2023. https://arxiv.org/abs/2307.03172 *
  4. Jiang, A. Q. et al., Mistral 7B, arXiv, 2023. https://arxiv.org/abs/2310.06825 *
  5. DeepSeek-AI, DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning, arXiv, 2025. https://arxiv.org/abs/2501.12948 *
  6. Meta, Llama 3.1 Community License Agreement, Meta, 2024. https://www.llama.com/llama3_1/license/ *
  7. Hugging Face, Gated Models, Hugging Face Hub Documentation, 2024. https://huggingface.co/docs/hub/main/models-gated *
  8. OpenAI, Introducing gpt-oss, OpenAI, 2025. https://openai.com/index/introducing-gpt-oss/ *
  9. Groeneveld, D. et al., OLMo: Accelerating the Science of Language Models, arXiv, 2024. https://arxiv.org/abs/2402.00838 *
  10. Biderman, S. et al., Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling, arXiv, 2023. https://arxiv.org/abs/2304.01373 *
  11. Open Source Initiative, The Open Source AI Definition 1.0, Open Source Initiative, 2024. https://opensource.org/ai/open-source-ai-definition *
  12. Maffulli, S., Meta’s Llama 2 License Is Not Open Source, Open Source Initiative, 2023. https://opensource.org/blog/metas-llama-2-license-is-not-open-source *
  13. Widder, D. G., Whittaker, M. and West, S., Why ‘Open’ AI Systems Are Actually Closed, and Why This Matters, Nature, 2024. https://doi.org/10.1038/s41586-024-08141-1 *
  14. Zuckerberg, M., Open Source AI Is the Path Forward, Meta, 2024. https://about.fb.com/news/2024/07/open-source-ai-is-the-path-forward/ *
  15. National Telecommunications and Information Administration, Report on the Benefits, Risks, and Implications of Dual Use Foundation Models with Widely Available Model Weights, U.S. Department of Commerce, 2024. https://www.ntia.gov/report/2024/dual-use-foundation-models-widely-available-model-weights *
  16. Qi, X. et al., Fine-Tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!, arXiv, 2023. https://arxiv.org/abs/2310.03687 *
  17. Lermen, S., Rogers-Smith, C. and Ladish, J., LoRA Fine-tuning Efficiently Undoes Safety Training in Llama 2-Chat 70B, arXiv, 2023. https://arxiv.org/abs/2311.00117 *
  18. Competition and Markets Authority, AI Foundation Models: Initial Report, GOV.UK, 2023. https://www.gov.uk/government/publications/ai-foundation-models-initial-report *
  19. Gage, P., A New Algorithm for Data Compression, C Users Journal, 1994. http://www.pennelynn.com/Documents/CUJ/HTML/94HTML/19940045.HTM *
  20. Sennrich, R., Haddow, B. and Birch, A., Neural Machine Translation of Rare Words with Subword Units, Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, 2016. https://arxiv.org/abs/1508.07909 *
  21. OpenAI, Understanding and Counting Tokens, OpenAI Help Center, 2026. https://help.openai.com/en/articles/4936856-understanding-and-counting-tokens *
  22. Radford, A., Wu, J., Child, R., Luan, D., Amodei, D. and Sutskever, I., Language Models are Unsupervised Multitask Learners, OpenAI, 2019 (paper summary and model card, Hugging Face). https://huggingface.co/tftransformers/gpt2 *
  23. Kudo, T. and Richardson, J., SentencePiece: A Simple and Language Independent Subword Tokenizer and Detokenizer for Neural Text Processing, Proceedings of EMNLP 2018 (System Demonstrations), 2018. https://aclanthology.org/D18-2012.pdf *
  24. Llama Team, Meta, The Llama 3 Herd of Models, arXiv, 2024. https://arxiv.org/abs/2407.21783 *
  25. Jiang, A. Q. et al., Mistral 7B, arXiv, 2023. https://arxiv.org/abs/2310.06825 *
  26. Rust, P., Pfeiffer, J., Vulić, I., Ruder, S. and Gurevych, I., How Good is Your Tokenizer? On the Monolingual Performance of Multilingual Language Models, Proceedings of ACL-IJCNLP 2021, 2021. https://arxiv.org/abs/2012.15613 *
  27. Petrov, A., La Malfa, E., Torr, P. H. S. and Bibi, A., Language Model Tokenizers Introduce Unfairness Between Languages, Advances in Neural Information Processing Systems (NeurIPS), 2023. https://arxiv.org/abs/2305.15425 *
  28. Ahia, O., Kumar, S., Gonen, H., Kasai, J., Mortensen, D. R., Smith, N. A. and Tsvetkov, Y., Do All Languages Cost the Same? Tokenization in the Era of Commercial Language Models, Proceedings of EMNLP 2023, 2023. https://arxiv.org/abs/2305.13707 *
  29. Hoffmann, J. et al., Training Compute-Optimal Large Language Models, arXiv, 2022. https://arxiv.org/abs/2203.15556 *
  30. Muennighoff, N. et al., Scaling Data-Constrained Language Models, Advances in Neural Information Processing Systems (NeurIPS), 2023. https://arxiv.org/abs/2305.16264 *
  31. OpenAI, Prompt Caching in the API, OpenAI, 2024. https://openai.com/index/api-prompt-caching/ *
  32. Anthropic, Prompt Caching, Claude API Documentation, 2025. https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching *
  33. Hugging Face, Chat Templates, Transformers Documentation, 2025. https://huggingface.co/docs/transformers/v4.51.1/chat_templating *
  34. Lundberg, S. et al., Guidance: A Guidance Language for Controlling Large Language Models, Microsoft Research / guidance-ai, 2023. https://github.com/CatalinCighi/microsoft-guidance *
  35. Zhang, X., Cao, J. and You, C., Counting Ability of Large Language Models and Impact of Tokenization, arXiv, 2024. https://arxiv.org/abs/2410.19730 *
  36. Cosma, A., Ruseti, S., Radoi, E. and Dascalu, M., The Strawberry Problem: Emergence of Character-level Understanding in Tokenized Language Models, arXiv, 2025. https://arxiv.org/abs/2505.14172 *
  37. Vaswani, A. et al., Attention Is All You Need, arXiv, 2017. https://arxiv.org/abs/1706.03762 *
  38. Su, J. et al., RoFormer: Enhanced Transformer with Rotary Position Embedding, arXiv, 2021. https://arxiv.org/abs/2104.09864 *
  39. OpenAI, GPT-2: 1.5B Release, OpenAI, 2019. https://openai.com/index/gpt-2-1-5b-release/ *
  40. Brown, T. B. et al., Language Models are Few-Shot Learners, arXiv, 2020. https://arxiv.org/abs/2005.14165 *
  41. OpenAI, GPT-4 Technical Report, arXiv, 2023. https://arxiv.org/abs/2303.08774 *
  42. Anthropic, Introducing 100K Context Windows, Anthropic, 2023. https://www.anthropic.com/news/100k-context-windows *
  43. OpenAI, New Models and Developer Products Announced at DevDay, OpenAI, 2023. https://openai.com/index/new-models-and-developer-products-announced-at-devday/ *
  44. Pichai, S. and Hassabis, D., Introducing Gemini 1.5, Google’s Next-Generation AI Model, Google, 2024. https://blog.google/innovation-and-ai/products/google-gemini-next-generation-model-february-2024/ *
  45. Gemini Team, Google, Gemini 1.5: Unlocking Multimodal Understanding Across Millions of Tokens of Context, arXiv, 2024. https://arxiv.org/abs/2403.05530 *
  46. Meta, Introducing Llama 3.1: Our Most Capable Models to Date, Meta AI, 2024. https://ai.meta.com/blog/meta-llama-3-1/ *
  47. Grattafiori, A. et al. (Llama Team, Meta), The Llama 3 Herd of Models, arXiv, 2024. https://arxiv.org/abs/2407.21783 *
  48. OpenAI, Understanding and Counting Tokens, OpenAI Help Center, 2025. https://help.openai.com/en/articles/4936856-understanding-and-counting-tokens *
  49. Meta, Llama 3.1 Community License Agreement, Meta, 2024. https://www.llama.com/llama3_1/license/ *
  50. Liu, N. F. et al., Lost in the Middle: How Language Models Use Long Contexts, Transactions of the Association for Computational Linguistics, 2024. https://arxiv.org/abs/2307.03172 *
  51. Hsieh, C.-P. et al., RULER: What’s the Real Context Size of Your Long-Context Language Models?, arXiv, 2024. https://arxiv.org/abs/2404.06654 *
  52. Hong, K., Troynikov, A. and Huber, J., Context Rot: How Increasing Input Tokens Impacts LLM Performance, Chroma Research, 2025. https://www.trychroma.com/research/context-rot *
  53. Dao, T. et al., FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness, arXiv, 2022. https://arxiv.org/abs/2205.14135 *
  54. Jiang, A. Q. et al., Mistral 7B, arXiv, 2023. https://arxiv.org/abs/2310.06825 *
  55. Peng, B. et al., YaRN: Efficient Context Window Extension of Large Language Models, arXiv, 2023. https://arxiv.org/abs/2309.00071 *
  56. Lewis, P. et al., Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks, arXiv, 2020. https://arxiv.org/abs/2005.11401 *

← AI & Algorithms