Colab A100 LLM Runner
Rent an A100 on Google Colab, serve a 26B vision LLM to your local tools, tear it down with one command.
A minimal, battle-tested launcher kit that turns a Colab Pro GPU session into a local OpenAI-compatible LLM endpoint β with budget guards, clean teardown, and zero SSH hassle. Built for agentic workflows where several coding agents share one GPU behind one localhost port.
$ .\start.ps1
huihui-inkling-2-mini-uncensored - READY
Status ONLINE (Colab session: a100)
Model / Context unsloth/Inkling-2-Mini-UD-Q4_K_XL.gguf (256K total ctx, 2 slots)
Local endpoint 127.0.0.1:18100 (no key needed - relay injects it)
Manage .\status.ps1 to check, .\stop.ps1 to end billing
Point OpenCode, Cursor, or any OpenAI-API client at http://127.0.0.1:18100/v1
and it just works. .\stop.ps1 ends billing and verifies it ended.
How it works
The Colab SSH proxy stopped attaching to GPU sessions in late 2026, so this kit uses a fully detached architecture:
start.ps1 ββ> start.sh ββ> colab exec ββ> provision.sh (on the VM)
β ββ pinned llama.cpp build (CUDA sm_80)
β ββ aria2c 8-conn GGUF download
β ββ llama-server (key-auth, 127.0.0.1:8081)
βββ> cloudflared quick tunnel (on the VM)
βββ> relay.py (local 127.0.0.1:18100, injects the API key)
βββ> keepalive (pings the kernel so Colab doesn't idle-teardown)
- No SSH keys, no port forwarding, no Colab notebooks.
- The public URL rotates every cold start; the relay reads it from
.tunnel-state.jsonso local clients never care. - Local clients need no API key β the relay injects
Authorizationitself, and the key is random per session.
Requirements
| What | Where |
|---|---|
| Windows + Git for Windows (bash) | any recent version |
| google-colab-cli | pip install google-colab-cli, then colab once to OAuth |
| Colab subscription with A100 entitlement (Pro/Pro+) | check the runtime picker shows A100 |
| ~40 min cold start on first run (llama.cpp build + ~18 GB model) | later cold starts reuse Drive-less cache; ~15 min |
Quickstart
git clone https://huggingface.co/DevGwardo/colab-a100-llm-runner
cd colab-a100-llm-runner
.\start.ps1 # vision model, 2 x 131K slots, relay on 18100
# ...wait for READY (banner shows live progress)...
# from any other terminal / agent:
curl http://127.0.0.1:18100/v1/chat/completions -d "..." # no key needed
.\status.ps1 # health, slots, cache hits, budget hours remaining
.\stop.ps1 # ends billing, verifies clean teardown
Model profiles
| Profile | Model | GPU | Slots / ctx | Measured |
|---|---|---|---|---|
| Default (vision) | Inkling-2-Mini abliterated UD-Q4_K_XL, 26B MoE (3.4B active) | A100 40GB | 2 x 131K | ~50 tok/s single, 2.4s image answer |
| Fast coder | Qwen3-Coder-30B-A3B abliterated Q4_K_M | A100 80GB high-mem | 4 x 96K | 153.8 tok/s single / 237.7 aggregate (4 agents) |
| Budget coder | same | A100 40GB | 2 x 131K | same model, ~26% cheaper per hour |
| Deep / prose | Qwen3.8-27B heretic Q5_K_M + MTP spec-decode | A100 40GB | single slot | 124.5 tok/s with MTP |
.\stop.ps1; .\start-coder.ps1 # fast coding profile
.\stop.ps1; .\start-coder-40gb.ps1 # budget coding profile
Any HF GGUF works with parameters: .\start.ps1 -Model <repo> -File <gguf> -Ctx N -Parallel N.
Cost control
Real burn rates, measured over a month of use:
| GPU | Colab compute units |
|---|---|
| A100 80GB high-mem | 10.99 CU/hr |
| A100 40GB | 8.16 CU/hr |
| L4 | 2.33 CU/hr |
start.ps1andstatus.ps1print hours remaining at the current burn rate before you commit.- Session allocation fails fast on quota (no 30-minute retry loop) and only retries on real capacity errors.
stop.ps1kills the local relay + keepalive, stops the VM, then verifies zero active assignments before declaring clean.
Engineering decisions
Why this kit is shaped the way it is β each of these was a real failure once:
- Pinned llama.cpp commit. Upstream flag churn (
-fa on,--spec-type, reasoning flags) broke a mid-month cold start once;LLAMA_COMMITinprovision.shpins a known-good build. Bump deliberately after testing. - aria2c 8-connection downloads. Single-stream curl took 5β8 min per cold start for an ~18 GB GGUF; aria2c cuts that to ~2 min.
--cache-reuse 256. Agents resend a ~7K-token system prompt every turn; KV-shift prompt-cache reuse skips re-processing the shared prefix. Free speedup.- Repeat penalty 1.0 on coder profiles. Qwen3-Coder measurably degrades on code with repeat penalty on.
- Kernel keepalive. Colab tears down idle kernels (~90 min); a background ping every 40 min keeps long sessions alive and exits by itself once the session is gone.
- Random per-session API key, injected by the local relay β the public trycloudflare URL is authenticated, and localhost needs no credentials.
- Port 8081 on the VM. 8080 is reserved by Colab's internal node service; using it causes confusing, intermittent failures.
Files
| File | Role |
|---|---|
start.ps1 / start-coder*.ps1 |
PowerShell entry points (one per profile) |
start.sh |
session creation, provisioning, tunnel, relay, keepalive orchestration |
provision.sh |
runs ON the VM: pinned build, fast download, llama-server |
relay.py |
localhost:18100 -> tunnel relay, stdlib-only, SSE streaming, key injection |
status.ps1 / stop.ps1 |
one-glance health check / verified teardown |
.tunnel-state.json |
generated at runtime: live URL, key, model info (gitignored) |
Credits
- Base model: Inkling-2-Mini by Thinking Machines (Apache-2.0)
- Abliterated GGUFs: huihui-ai, mradermacher, unsloth, 0bserverx
- Server: llama.cpp by ggml-org
- Session manager: google-colab-cli
This repo contains no model weights β it launches whatever GGUF you point it at. Uncensored ("abliterated") model variants are intended for adults; you are responsible for your use of them and for the licenses of the models you serve.
License
MIT β the launcher scripts, relay, and docs. Model weights are the property of their respective authors under their own licenses.
