Hence 1

How a confidence gate stops noisy AI autocomplete ghost text

Why raw confidence fails for autocomplete, how Hence 1's six-signal gate.json reaches 0.91 AUC and a 99.2% quiet rate, and the 74.5% show-rate trade-off.

Ghost text gets noisy when the model suggests something on every pause, including when the right answer is nothing. Hence 1 handles this with a confidence gate: a small logistic regression, stored in gate.json, that scores each finished suggestion and hides the weak ones. It stays quiet on 99.2% of cases where nothing should appear, and the price is showing a suggestion on only 74.5% of cases where one is wanted.

Coline builds Hence 1 and writes this page.

Hence 1 is covered in the Hence 1 release post, and the Hugging Face repo ships gate.json with the weights.

ModelQuiet rate
Hence 1, with gate99.2%
Qwen3.8-27B (base)38.8%
Previous Tab code model37.7%
DeepSeek-V4.1-Flash27.0%
Previous Tab prose model23.7%

Quiet rate is the share of cases where the right output is no suggestion, and the model stays silent.

Why the obvious signal fails

The obvious gate is the probability that the model emits the end-of-turn token, 248046, at the end of its answer. On Coline's validation set, that raw probability ranks kept against dismissed suggestions with an AUC of 0.63. An AUC of 0.5 is a coin flip, so 0.63 is weak.

Our reading is that this probability measures whether the model thinks the text is finished. It does not measure whether the model is unsure about what to write. A finished, confident, wrong suggestion scores as high as a right one. The gate needs signals about uncertainty in the content itself, which is why it reads the token log-probabilities.

The six signals

SignalWhat it captures
Sum of token log-probsTotal likelihood of the suggestion. It gets more negative as the suggestion gets longer
Mean log-probAverage confidence per token
Minimum log-probThe least confident token. One shaky token can sink a suggestion
First token log-probConfidence in the opening token, which often decides whether the suggestion is on track
Log lengthSuggestion length on a log scale
First-step log-odds of token 248046How strongly the model wants to end the turn at step one

The end-of-turn signal is still in the gate. It is one input among six, not the score.

Coline fit the regression on 7,213 validation samples. The fitted file is a few hundred bytes of weights and an intercept. It reaches an AUC of 0.91 for ranking kept against dismissed suggestions, up from 0.63 for the raw end-of-turn probability. A linear model is simple on purpose. You can inspect it, reproduce it and reason about each signal.

How the gate decides

  1. The model finishes its reply, a complete suggestion with per-token log-probabilities.
  2. The gate computes the six signals from those log-probabilities, including the first-step probability of token 248046.
  3. It combines them with the weights and intercept in gate.json and produces a score between 0 and 1.
  4. It compares the score with the threshold for the surface the suggestion belongs to. At or above the threshold, the suggestion shows. Below it, the suggestion is dropped and the user sees nothing.

None of this happens until the reply is complete. That is why the gate costs latency, covered below.

Per-surface thresholds

SurfaceThreshold
Code0.25
Next-edit0.25
Docs0.15
Messages0.15
Tasks0.15
NotesOff
CalendarOff
Task propertiesOff

Thresholds are set per surface. "Off" means the gate never shows ghost text on that surface, so notes and calendar get no suggestions at all.

The trade-off in numbers

The gate hides about a quarter of the suggestions users want. Hence 1 shows a suggestion on 74.5% of wanted cases. The other models in Coline's runs show 95% to 99%. That gap is the price of the 99.2% quiet rate, and it is the honest half of the result.

The gate also changes timing. It holds the full suggestion until the reply finishes, then decides. Ghost text appears after the whole suggestion arrives, so the latency that matters is whole-suggestion latency. On Coline's endpoint, a code suggestion with a new prompt takes a p50 of 1.11 seconds, and a next-edit takes 1.13 seconds.

The gate also costs accuracy on the CUHK next-edit set. Hence 1 scores 51.0% with the gate on and 54.1% without it. The gate is not free on every metric, and you should not read its quiet rate as a free lunch.

Why uncalibrated quantization breaks it

The thresholds apply to log-probabilities from the bf16 weights. Quantizing to 8-bit or 4-bit shifts those log-probabilities, and the same thresholds then mean something else. You get ghost text on nothing, or silence where it should show.

There is no GGUF or calibrated quantized build of Hence 1 yet. If you quantize anyway, you must refit gate.json on your own validation set with the quantized model. At that point you are running your own model and your own gate, and Coline's numbers no longer describe your setup.

Tuning for your team

  • Thresholds are per surface, so you can move them independently. Change one surface at a time.
  • Judge changes on your own traffic: the hide rate and the accept rate on suggestions that do show. Coline's validation sets are not your codebase.
  • Coline's held-out results are encouraging but not a substitute. Hence 1 scored 58.5% on unseen repos against 47.7% for the held-out baseline, and the gap is real. Your repos still need a test of their own.

Trade-offs and limitations

  • Missed suggestions. About a quarter of wanted suggestions do not appear.
  • Delay. Users see nothing until the full reply arrives.
  • Calibration is Coline's. The 7,213 validation samples come from Coline's own data, and the thresholds are fit to them.
  • Repeat loops are a separate problem. The gate does not replace the server-side repeat guard described in the vLLM guide.

If your team would rather see more suggestions and accept more noise, lower the thresholds on the surfaces where you want that. If silence matters more than coverage, keep the defaults.

Related: Hence 1 benchmarks, Run Hence 1 with vLLM, AI autocomplete, What makes a good autocomplete model, Next-edit prediction models, Self-hosted AI autocomplete

Frequently asked questions

What is a confidence gate in AI autocomplete?

It is a scoring step that runs after the model finishes a suggestion and decides whether to show it. Hence 1's gate is a logistic regression over six signals from the model's token log-probabilities, stored in gate.json. It hides suggestions that score below a per-surface threshold.

Why does Hence 1 hide some suggestions it could have gotten right?

The gate is a deliberate trade-off. Hence 1 shows a suggestion on 74.5% of cases where one is wanted, while other models show 95% to 99% of them. In return, it stays quiet on 99.2% of cases where nothing should appear.

Can I use the gate without the rest of Hence 1?

The gate needs the model's log-probabilities, so you have to run the model. You can refit gate.json on your own validation set, but the shipped file is calibrated to the released bf16 weights. Any change to the weights means a refit.