SLM Playbook: Small Language Models Architecture in Go

Prerequisite: Review the previous module in the slm-playbook series before proceeding. ← Series hub Next → Answer-first: Self-hosting Small Language Models (2B–14B) with Go hybrid routing and vLLM serving reduces enterprise API costs by up to 65%, eliminates PII privacy risks, and delivers specialized domain performance matching 100B+ models. Implementing this architecture enforces sub-50ms P99 latency guarantees, strict component isolation, and automated observability pipelines required for production-grade enterprise operations. For the past two years, enterprise AI adoption has been dominated by a singular architectural pattern: API integration with massive, closed-source models (Frontier LLMs). While this API-Centric model allows for rapid prototyping, it becomes a severe liability when scaled to production workloads handling sensitive company data. ...

May 20, 2026 · 10 min · Lê Tuấn Anh

Inference Optimization: vLLM & PagedAttention Guide

Prerequisite: Familiarity with the concepts introduced in Part 7 — Agentic Memory Long Term. Review it first if the terminology in this part is unfamiliar. Part 8 — Inference Optimization: vLLM, PagedAttention & Speculative Decoding In enterprise AI infrastructure, model serving cost is dictated by GPU VRAM utilization and generation throughput (tokens per second per GPU). Running large language models (LLMs) under high concurrency presents a severe memory management challenge: Managing the KV Cache. ...

May 21, 2026 · 6 min · Lê Tuấn Anh

vLLM Context-Aware Routing & MLA KV Cache Architecture

Tech Radar: vLLM Context-Aware Routing & MLA KV Cache Architecture Answer-First: Multi-Head Latent Attention (MLA) combined with Context-Aware Prefix Routing in vLLM resolves the VRAM memory wall in multi-turn agent execution loops. Compressing the Key-Value cache into low-dimensional latent vectors and routing shared-prefix tool calls to the matching GPU worker reduces VRAM consumption by 75.8% and slashes Time-to-First-Token (TTFT) from 840ms to 165ms. 1. The VRAM Explosion in Autonomous Agent Multi-Turn Loops When scaling autonomous AI agent systems (automated code reviewers, SQL analytics swarms, customer support bots), inference pipelines execute iterative loops: $$\text{User Query} \longrightarrow \text{Tool Invocation} \longrightarrow \text{Observation} \longrightarrow \text{Next Tool} \dots \longrightarrow \text{Final Answer}$$ ...

August 26, 2026 · 4 min · Lê Tuấn Anh

High-Throughput Local LLM Gateway: Go & vLLM Blueprint

High-throughput local LLM architecture guide combining vLLM PagedAttention virtual memory, Prefill-Decode disaggregation over RoCE v2/NVLink, and a custom Go API Gateway with SHA256 prompt prefix context-affinity routing, zero-allocation SSE streaming, and 71% cost savings over SaaS APIs.

August 6, 2026 · 23 min · Tuấn Anh

High-Throughput Local LLM Infrastructure: Architecting a Distributed Go API Gateway for vLLM & PagedAttention Clusters

High-Throughput Local LLM Infrastructure: Architecting a Distributed Go API Gateway for vLLM & PagedAttention Clusters Answer-first: High-throughput local LLM infrastructure pairs vLLM continuous batching inference servers with a Go API gateway for dynamic request queuing, load balancing, and token rate limiting. Implementing this architecture enforces sub-50ms P99 latency guarantees, zero-allocation memory pooling with Go 1.24 unique.Handle, and fault-tolerant Dapr 1.15 component orchestration for resilient production scaling. Executive Summary & Architecture Overview Operating open-weight Large Language Models (e.g., Llama-3-70B, DeepSeek-R1, Mistral-Large) at enterprise scale (>20M to 500M+ tokens/day) introduces severe architectural and economic bottlenecks when relying solely on public SaaS APIs. While proprietary APIs provide simple HTTP interfaces, they present two main issues: runaway API expenditures that scale linearly with volume and strict data privacy/compliance boundaries that prohibit transmitting sensitive enterprise IP across public boundaries. ...

August 6, 2026 · 21 min · Vesviet Engineering Team

Prompt Engineering vs Fine Tuning: 2026 AI Decision Guide

Prompt Engineering vs Fine Tuning vs RAG: Complete 2026 Decision Guide Prompt Engineering vs Fine Tuning: Executive Decision Framework Answer-first: In the prompt engineering vs fine tuning evaluation, prompt engineering offers rapid prototyping with zero setup cost, whereas fine tuning Small Language Models (SLMs) via QLoRA bakes domain knowledge into weights, reducing TTFT latency under 250ms and cutting API token spend by 90%. Implementing this architecture enforces sub-50ms P99 latency guarantees, strict component isolation, and automated observability pipelines required for. ...

June 1, 2026 · 9 min · Lê Tuấn Anh