Local AI Model Deployment
Local AI Model Deployment
Search
Ask the AI

My SSRF Guard Blocked Itself: When the Address You Check Is Not the One You Connect To

Adding web search to a local model meant writing a textbook egress guard. Search then returned empty results, reliably — the guard was refusing Wikipedia and the search API, and its judgement was entirely correct. The cause was synthetic addresses from a transparent proxy landing in an RFC 2544 reserved range. That check-versus-use gap turned up three times in one file.

Turning Three Known VRAM Traps Into a Working Estimator

A lookup table cannot cover variant × format × context × card count, so you model it. This records that modelling: what each of the three terms accounts for, how to measure the global-attention-layer share you cannot look up by reading a slope, how the forgotten concurrency multiplier makes inference two orders of magnitude slower, and two hard constraints beyond VRAM — tensor-parallel divisibility and why recommendations cannot be ranked by size.

Four ONNX-in-the-Browser Deployment Traps That Only Break in Production

Symptom, cause and fix for four real errors: shipping the .wasm without its .mjs glue module, nginx 1.24 having no .mjs entry so browsers refuse the module script, config arriving 155 bytes after the dependency that reads it, and why the cross-origin isolation that WASM threads require is a bad trade for a content site.

How I Fooled Myself Validating Quantisation: IoU 0.98 That Was Really 0.30

A debugging log from a browser-side matting model. int8 quantisation measured IoU 0.976–0.984 on my test set; on a real image where subject and background share a palette it scored 0.296. Four hypotheses were killed by experiment before the cause turned out to be that I had only validated on samples the model was confident about.

Deploy a Local LLM, Part 2: Exposing It Safely with a Tunnel or Port Forwarding

Two complete routes for going public: a Cloudflare tunnel needing no inbound ports, and direct port forwarding with your own domain and certificate. Covers the nginx layer, DNS-01 issuance, DDNS caveats, and fixing a correct port forward that still cannot complete a handshake.

Deploy a Local LLM, Part 4: Adding a Knowledge Base with sqlite-vec Hybrid Retrieval

Build RAG on the same machine: run embeddings on CPU using no VRAM, chunk by heading then by size, combine sqlite-vec vector search with FTS5 lexical search via RRF, and wrap it as an OpenAI-compatible endpoint that returns citations.

Self-Hosting Gemma 4 on an 8GB GPU: 11 Pitfalls You Only Hit in Production

A field report from building a local Gemma 4 inference gateway on 8GB of VRAM: why QAT checkpoints are 2x larger than parameter counts suggest, how one flag changes prompt throughput 40x, a port-forward that fails because replies leave by the wrong gateway, and four traps in RAG chunking and CJK full-text search.

Scroll down