Local AI Systems

A self-hosted AI model for my coding tools.

Wait until a repeated long request's answer starts

In the recorded test, the request was 262,144 tokens long. Tokens are the word pieces a model reads. With the fix, 95% of repeats started within 2.98 s.

Operator and recipe contributor

My cache fix and memory report were merged into the community deployment recipe for GLM-5.3-Flash. The model, runtime, and recipe are other people's work.

Project dates, tools, and platform

Built
September 2026
Software
vLLM, Docker, Linux, Python
Runs on
Two NVIDIA DGX Spark computers

Startup stalled, and repeated requests took three minutes

Shared memory and the cache, before the fixesIllustrative

The fixes address memory pressure and unused cached work.

Startup memory and prefix-cache failures

Each DGX Spark computer shares memory between its central processor (CPU) and graphics processor (GPU). Loading the model's weights can fill that memory with cached file data. The GPU driver can then fail to find a free block during startup checks in vLLM, the software that runs the model.

The recipe's prefix cache reported zero hits, even for an exact repeat of the same prompt. Each repeat of a 262,144-token prompt was processed from the start and took about three minutes.

A shared interface connects the model to coding tools

How a request travels through the systemIllustrative
How a request travels through the systemA coding tool sends a request to a shared API. The API passes it to two computers that run one model together, and the answer returns through the API to the coding tool. TWO COMPUTERS, ONE MODEL CODINGTOOLS SHARED API COMPUTER ACOMPUTER B

My partOther people's work

I built the shared interface, health checks, and recovery.

Deployment and my contributions

The model, runtime, and deployment recipe are other people's work. I built the shared application programming interface (API), health checks, automatic startup, recovery, and the fixes described here. I run the community recipe for GLM-5.3-Flash at tensor parallel 2, which splits the model across two computers: vLLM in Docker, 4-bit NVFP4 weights, an fp8 KV cache, and the DFlash2 speculative drafter. NVFP4 is NVIDIA's 4-bit floating-point format. The KV cache holds the attention keys and values of tokens the model has already read. One OpenAI-compatible API serves my coding tools.

Memory and cache fixes address two separate failures

Shared memory during startup, with each fixIllustrative

The recorded test combined startup, cache, and power checks.

Memory guard, cache patch, and clock limit

Guard free memory during the load. Startup can fail when no suitable free memory block remains. A per-node guard drops caches and compacts memory whenever free memory falls under 8 GiB. It checks every second, from launch until the server is ready.

Leave the kernel reserve alone. Raising the kernel's free-memory reserve lowers the available memory that vLLM's startup check reads by about 6.2 GiB. That causes the check to fail before the model loads.

Stop the guard before it causes faults. Major page faults came from two places: the first use of the OpenSSL encryption libraries, and the guard's own cache drops, which evicted mapped weight pages. I stop the worker's guard once the head node is ready, then run one warm-up pass. After that, both nodes had zero major faults through a full qualification run at 262,144-token context.

Separate the drafter cache from the model cache. The drafter keeps its own short sliding-window cache. vLLM treated every cache group as a drafter group, so the draft window's short hit cut the shared hit to zero. My patch flags only the drafter group and never lets it shorten the hit that the model's own groups agree on.

Cap the GPU clock without losing speed. With the cap, decoding stayed at 55.6 tokens per second. Power fell from 78 W to 47–⁠50 W, and temperature from 86 °C to 69–⁠71 °C.

Two contributions merged into the community recipe

Test results, and where my changes wentMeasured

Results of one recorded test

  • 98.6%of the finished work reused on a repeatwas 0%
  • 2.98 suntil the answer to a repeat startswas 191.7 s
  • 55.6tokens per second of output

Community recipe by tonyd2wild

vLLM, the software that runs the model

Two pull requests merged; the vLLM proposal remains in review.

Recorded test conditions and upstream links

Qualification run, two DGX Spark nodes, September 2026
MeasureResult
Prefix-cache hit rate, repeated prompt0.986, from 0 before the fix
Cached tokens on the repeat258,048
Time to first token, cold191.7 s
Time to first token, cached (p95)2.98 s
Decode speed, one stream (p50)55.6 tokens/s
Drafter acceptance0.928

The test sent 262,144‑token requests one at a time. The recipe's maintainer merged my two pull requests on September 16, 2026. In a test at one eighth of full size, the vLLM change cut the extra memory used during loading from 1,011 MiB to 3 MiB.

On my memory report

"This is the most useful GB10 memory write-up anyone has sent us"

The recipe's maintainer tonyd2wild, on GitHub

Contact

I'm open to full-time AI product engineering roles.