> ## Documentation index
> Fetch the complete documentation index at: https://docs.heurastudios.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Versions and the release gate

> Every run saves a version. The release gate decides which one answers, using held-out tests, so a model never ships a regression by accident.

Source: https://docs.heurastudios.com/concepts/versions-and-the-release-gate/

Every training run saves a **version**: v1, v2, v3 and on. Each is a LoRA adapter on the model's base. Version 0 is the base model itself, before any training. Versions are never overwritten, so any of them can be made live again.

The **live** version is the one that answers: in chat, on your website and through the API, all at once. The release gate decides whether a new version replaces it.

## How the gate decides

When a run saves a version, the gate compares it with the live one on the model's **held-out tests**: the test questions no example asks, so passing them shows learning rather than memory. It goes prompt by prompt:

- **fixed**: the live version failed it, the new one passes;
- **broke**: the live version passed it, the new one fails.

The new version goes live **unless it broke more than it fixed**. When there are no held-out results to pair, a version that scores lower than the live one doesn't go live.

*Diagram: The release gate compares the live version and the new one on held-out tests only. Example: v2 live and v3 new on six tests; v3 fixed 2 and broke 1, so v3 goes live. A version that broke more than it fixed is held back, kept, and can be made live by hand.*

*v3 fixed two held-out tests and broke one, so it goes live. Had it broken two and fixed one, v2 would stay live.*

## Held back

A version that doesn't pass the gate is **held back**: it stays in the gate's list (in the notebook's **Output**), with what it fixed and broke, and the owner can make it live by hand. This is deliberate: sometimes a new version breaks a test you've since decided was wrong.

## Promoting and rolling back

The owner can switch the live version to any earlier or held-back version at any time. The switch is immediate everywhere the model answers. Rolling back is the same action, pointed at an older version.

## Turning the gate off

The gate is a tool in the model's [pipeline](https://docs.heurastudios.com/workspace/pipeline/). With it unplugged from Train, runs still train and save versions, but nothing goes live by itself: the owner promotes each version by hand.

## What gets measured

The gate decides on held-out tests. Every run also reports the six specs, before and after: accuracy, held-out accuracy, lesson recall, paraphrase robustness, constraint adherence and non-regression. See [Evals](https://docs.heurastudios.com/build/evals/) for what each one means.
