---
title: "Self-hosted AI autocomplete: architecture and GPU sizing | Coline"
description: "Run Hence 1 on your own GPUs so code stays on your network. Covers architecture, GPU sizing, latency, prefix caching and when a smaller model wins."
url: https://coline.app/hence/self-hosted-ai-autocomplete
---

[Sign in](https://coline.app/auth/signin)

[Sign up](https://coline.app/auth/signup)

[Sign in](https://coline.app/auth/signin)

[Sign up](https://coline.app/auth/signup)

[Hence 1](https://coline.app/hence)

Updated December 4, 2026

# Self-hosted AI autocomplete: a private architecture guide

Run Hence 1 on your own GPUs so code stays on your network. Covers architecture, GPU sizing, latency, prefix caching and when a smaller model wins.

Self-hosted AI autocomplete means the model runs on hardware you control, so your code, your prompts and the suggestions stay inside your network. [Hence 1](https://coline.app/hence) fits that setup: its weights are Apache 2.0, there is no hosted API to call, and the release ships the production config. The cost is hardware, since it needs about 60 GB of VRAM, and it is slower on code than smaller models.

Coline builds Hence 1 and writes this page.

|  | Hence 1 |
| --- | --- |
| License | Apache 2.0 |
| Base model | Qwen3.8-27B, 27B parameters |
| Weights at bf16 | 55.6 GB across 18 files |
| VRAM needed | About 60 GB |
| Tested setup | vLLM 0.34, one A100 80 GB, bf16, prefix caching, MTP |
| Public API at launch | None. Self-host it, or use Coline Tab |
| Code, whole suggestion, new prompt (p50 / p90) | 1.11 s / 2.13 s |
| Quiet rate (gate on) | 99.2% |

## What "no code leaves your network" covers

Once the weights are downloaded from [Hugging Face](https://huggingface.co/ColineApp/hence-1), the request path is your editor, your gateway, vLLM on your GPU, and back. Nothing on that path needs Coline. Two settings make the boundary explicit. Set `HF_HUB_OFFLINE=1` on serving hosts after the download, so the Hub client makes no requests. Turn off vLLM's usage reporting using the setting in the docs for your version.

Training is a separate question. Coline states that Hence 1 was never trained on Coline customer data, on Coline's own workspace, or on any benchmark test split. [The Hence 1 release post](https://coline.app/blog/introducing-hence-1) covers the training mix. Self-hosting answers a different question: whether your code reaches a third party at inference time. In this setup, it does not.

## Why Hence 1 fits a VPC or on-prem deployment

- **License:** Apache 2.0 covers commercial use, modification, redistribution and self-hosting. The base model, Qwen3.8-27B, is also Apache 2.0.
- **Files:** merged bf16 weights, tokenizer and chat template, `gate.json`, `reference.py` (the exact vLLM 0.34 production config), `NOTICE`, and the documented prompt formats.
- **One server:** code completion, next-edit prediction and prose writing run on one model, so you operate one endpoint instead of one per surface.

## GPU sizing

The weights are 55.6 GB at bf16, so the model needs about 60 GB of VRAM before you count cache headroom. That leaves four realistic options:

- **One 80 GB A100 or H100.** This is the configuration Coline tests on.
- **Two 48 GB cards**, with the model sharded across them. Coline has not officially tested this layout, so benchmark it before you commit.
- **A unified-memory workstation with 64 to 96 GB or more.** It can run once the model is ported and served properly, but it is not officially tested.
- **A consumer card with 24 GB.** It does not fit at bf16, and there is no quantized build to fall back on.

`--max-model-len 16384` caps context. Longer context needs more KV cache memory, so lower the cap if you are tight.

Quantization is not a shortcut today. There is no GGUF build, and uncalibrated 8-bit or 4-bit weights degrade output and break the confidence gate's calibration.

## Latency, and where the time goes

| Surface | First token, p50 / p90 | Whole suggestion, p50 / p90 |
| --- | --- | --- |
| Writing | 0.11 s / 0.17 s | 0.26 s / 0.44 s |
| Code, later keystrokes (cached) | 0.36 s / 0.54 s | 0.73 s / 1.48 s |
| Code, new prompt | 0.73 s / 1.35 s | 1.11 s / 2.13 s |
| Next-edit | 0.38 s / 0.44 s | 1.13 s / 1.69 s |

These were measured on Coline's production endpoint: one A100 80 GB, vLLM 0.34, bf16, prefix caching and MTP. Your numbers will depend on your GPU, concurrency and prompt length.

The gap between the cached and new-prompt code rows is prefill. Autocomplete sends a long prompt and receives a short reply, so most of the time goes into reading the prompt. Reusing that work for unchanged text is the biggest lever you have.

## Prefix caching and prompt order

`--enable-prefix-caching` lets vLLM reuse attention work for any prompt prefix it has already processed. On each keystroke, the text before the cursor is nearly identical to the last request, so most of it is reused. That only works if the prompt starts with stable content:

- Put the file header, instructions and stable context first.
- Put anything that changes on every request, such as request IDs or snippets retrieved per keystroke, as late as the format allows.
- Do not reorder files or inject variable metadata near the top. A changed early token invalidates the cache from that point forward.

## Repeat guard

Prose can loop, with the model repeating a phrase the user just typed. Add a server-side guard that drops any suggestion nearly repeating the text right before the cursor. In Coline's runs, the guard catches 0.28% of suggestions. That is small, but it is the difference between a bad suggestion shown and not shown.

## When a smaller model is the better choice

Hence 1 is not the right model for every team.

- **Speed on code.** 7B and 8B models run 3 to 5 times faster on the same GPU. If latency is the main complaint, that matters more than any benchmark.
- **Code benchmarks.** Zeta 2.1 (8B) passes 27 of Zed's 32 cases to Hence 1's 20. Qwen2.5-Coder-32B leads raw SAFIM, 72.8% to 69.8%. The [benchmark breakdown](https://coline.app/hence/hence-1-benchmarks) has every number.
- **Hardware.** An 8B model runs on one consumer card. Hence 1 needs datacenter-class memory.
- **Where Hence 1 is stronger.** It leads on writing surfaces, 50.6% gated against DeepSeek-V4.1-Flash's 41.3%, and it stays quiet on 99.2% of cases where nothing should appear. The cost is that it shows a suggestion on only 74.5% of wanted cases.

For a code-only team that puts latency first, start with a 7B or 8B model. For a team that wants one private model across code, docs, messages and tasks, Hence 1 is the case it is built for.

## Deployment checklist

1. Download the weights and pin the Hugging Face revision you tested. Store them in your own artifact registry.
2. Serve them with the command in [the vLLM guide](https://coline.app/hence/run-hence-1-with-vllm).
3. Keep `gate.json` and `reference.py` with the weights, since they must match.
4. Add the repeat guard.
5. Measure latency and show/hide rates on your own traffic. Coline's numbers come from Coline's endpoint and validation sets.

Related: [Hardware and VRAM guide](https://coline.app/hence/local-code-completion-hardware-guide), [Run Hence 1 with vLLM](https://coline.app/hence/run-hence-1-with-vllm), [Apache 2.0 autocomplete models](https://coline.app/hence/apache-2-autocomplete-models), [Confidence gate](https://coline.app/hence/autocomplete-confidence-gate), [Hence 1 benchmarks](https://coline.app/hence/hence-1-benchmarks), [Local autocomplete models](https://coline.app/hence/local-autocomplete-models)

## Frequently asked questions

Can I run AI autocomplete entirely inside my own network?

Yes. Hence 1 is Apache 2.0 and its weights are on Hugging Face, so you can download them once and serve them with vLLM inside a VPC or on-premises. Once the weights are on disk, serving requests needs no outbound connection to Coline.

How much GPU memory does Hence 1 need?

About 60 GB of VRAM at bf16, because the weights alone are 55.6 GB. Coline's tested setup is one 80 GB A100. Two 48 GB cards can work too, but that layout is not officially tested. It does not fit a 24 GB consumer card at bf16, and there is no GGUF build yet.

Is a self-hosted 27B model fast enough for code autocomplete?

For prose, yes. For code, it is slower than 7B and 8B models, which run 3 to 5 times faster on the same GPU. On Coline's production endpoint, a code suggestion with a new prompt takes a p50 of 1.11 seconds for the whole suggestion.

[Explore Hence 1](https://coline.app/hence) [All Hence 1 guides](https://coline.app/hence/guides)
