Skip to content

This article reflects MLNavigator Research Group work. Deployment lives in adapterOS.

← Back to Research Notes
stop conditionsreceiptsauditinferencedeterminismcompliancegeneration

Why Stop Conditions Belong in the Receipt

January 27, 2026·James KC Auchterlonie

Practical Outcomes

  • Teams can separate complete outputs from truncated ones before they reach users or downstream systems.
  • Audit and compliance reviews can verify why a response ended without relying on guesswork.
  • Engineering can trace repeat failure modes (for example loops or budget cutoffs) and fix them faster.
  • Governance teams get a verifiable record when output quality or incident impact is challenged.

Every language model generation ends. Something causes the system to stop producing tokens and return a result. In most inference systems, that something is invisible—the output arrives, and the caller has no way to distinguish whether the model stopped because it finished its thought, because it hit a token budget, because it detected a degenerate loop, or because the end-of-sequence probability crossed a threshold that someone configured months ago and forgot about.

The reason generation stopped directly affects output quality and completeness. A response truncated at a budget limit is not the same as one that reached a natural conclusion, even if both look similar to a downstream system. In regulated settings, the distinction between "the model finished" and "the model was cut off" is material.

FOUR TERMINATION MODES BUDGET MAX_TOKENS token: 2048 CLEAN EOS EOS_GENERATED token: 847 THRESHOLD p=.91 EOS_PROB > 0.85 token: 1203 REPETITION A B A B LOOP_DETECTED token: 43

Four Ways Generation Ends

In a well-specified inference system, generation terminates when one of four conditions is satisfied:

Token budget exhaustion. The system has generated the maximum number of tokens permitted for this request. This is the blunt instrument—a hard ceiling that prevents runaway generation regardless of what the model is doing. When a response ends because of a budget limit, the output is truncated. It may be mid-sentence, mid-argument, or mid-calculation. The model did not choose to stop.

End-of-sequence probability threshold. The model's probability distribution assigns a sufficiently high probability to the end-of-sequence token, exceeding a configured threshold. This is the soft signal that the model has reached what it considers a natural stopping point, even if the EOS token was not the highest-probability next token. Different thresholds produce different stopping behavior—a low threshold stops eagerly at the first plausible conclusion, while a high threshold requires strong model confidence before halting.

Repetition detection. A sliding window over recent tokens detects a repeating pattern. Degenerate loops—where the model produces the same phrase or sentence structure indefinitely—are a known failure mode, particularly with certain sampling strategies or when the model encounters inputs outside its training distribution. Detecting and terminating these loops prevents wasted computation and garbage output.

Explicit end-of-sequence generation. The model generates the EOS token as its highest-probability next token. This is the cleanest termination—the model unambiguously signals that it has finished.

Each of these conditions represents a different kind of ending with different implications for the output's reliability and completeness. Conflating them is a category error.

Audit Reliability Challenge

When an inference result is used as evidence—in a compliance review, a medical analysis, a legal filing, a financial model—the question of whether the output is complete is not trivial. A response that was truncated at 2048 tokens may omit qualifications, caveats, or conclusions that the model would have included given a higher budget. A response terminated by repetition detection may indicate that the model failed on this particular input rather than producing a useful result.

Without a record of why generation stopped, a human reviewer cannot distinguish between these scenarios. The output looks like output. It might be a complete thought or a fragment. It might be the model's best response or a degraded one. The reviewer has no evidence to make this determination.

Including the stop condition in the cryptographic receipt changes this. The receipt states not only what was generated but why generation ended, at which token index, and under what configuration. A verifier can confirm that a response reached a natural EOS rather than hitting a budget ceiling. An auditor can identify responses that were terminated by repetition detection and flag them for human review. A compliance officer can verify that the token budget was set to an appropriate value for the task.

Stop Configuration as a First-Class Parameter

The stop controller's configuration—maximum token budget, EOS probability threshold, repetition window size—is as consequential for output quality as the model selection or adapter routing. A model that produces excellent results with a 4096-token budget and a 0.85 EOS threshold may produce truncated or over-extended results under different settings.

Binding the stop configuration into the receipt makes these parameters auditable and reproducible. If an organization changes its default token budget from 2048 to 4096 and observes different output quality, the receipts for both periods document the change. If a specific response is challenged, the receipt shows exactly what budget and thresholds were in effect when it was generated.

This is especially relevant for organizations that run one model across multiple use cases with different stop configurations. A summarization task might use a tight budget and lower EOS threshold. A document analysis task might use a larger budget and higher threshold. The receipt for each run records which configuration produced which output, so teams do not mix results produced under different rules.

The Token Index

Recording the token index at which generation stopped, alongside the reason, provides one additional piece of evidence that turns out to be surprisingly useful. If a response was 1847 tokens long and the budget was 2048, an auditor knows the model stopped voluntarily with 201 tokens of budget remaining. If the response was exactly 2048 tokens, it was truncated. If it was 43 tokens followed by repetition detection, the model likely failed on this input.

These are mechanical observations, but they enable systematic quality analysis across large numbers of inference runs. An organization processing thousands of documents can identify which inputs consistently trigger budget truncation (suggesting the budget is too low for the task), which trigger repetition detection (suggesting inputs the model handles poorly), and which consistently reach natural EOS (suggesting reliable model performance).

Without the stop condition and token index in the receipt, this analysis requires heuristic parsing and inference from output patterns. With it, the data is structured, verifiable, and queryable.

What This Changes

Recording stop conditions transforms generation termination from an invisible implementation detail into an auditable decision with a paper trail. The receipt does not just prove what was generated—it proves how the generation ended and why. For applications where completeness matters, where truncation has consequences, or where systematic quality monitoring is a regulatory requirement, this represents the minimum evidentiary standard for taking inference outputs seriously.