LLM Hardware & Cost Engineering Guides
First-principles documentation explaining the memory, bandwidth, quantization, and prompt-caching physics powering LLM Horizon.
KV-Cache Math Explained: MHA vs. GQA vs. DeepSeek MLA
Exact closed-form equations for calculating KV-cache VRAM growth per token and why Multi-Head Latent Attention shrinks long-context memory by over 10x.
ArchitectureWhy Sparse MoE Models Fly on Local GPUs & Apple Silicon
Decode generation is memory-bandwidth-bound. Learn why a 30B or 235B Mixture-of-Experts model streams only its active weights per token while still demanding full total-parameter RAM.
QuantizationFP16 vs. Q8_0 vs. Q4_K_M vs. IQ4_XS: Honest Perplexity & Size Tradeoffs
Why Q4_K_M is the universal local deployment sweet spot, when Q6_K/Q8_0 pays off for coding, and when 2-bit/3-bit quants break reasoning.
HardwareApple Silicon Unified Memory Limits: Real Usable GPU VRAM vs. Spec Sheet
Why a 128 GB Mac Studio does not give 128 GB to Metal GPU buffers out of the box, how macOS wired memory limits work, and how to avoid swap cliffs.
Cost EngineeringPrompt Caching Architecture: Cutting Frontier API Bills by 70-85%
How static prefix ordering unlocks 75-90% input token discounts across Anthropic Claude, OpenAI, Google Gemini, and DeepSeek APIs.
Serving Enginesllama.cpp vs. Ollama vs. vLLM: Memory Overhead & Concurrency Tradeoffs
Choosing the right inference runtime based on whether you serve 1 local developer or 32 concurrent team requests.
Cost EngineeringLocal GPU vs. Cloud API Break-Even: When Buying Hardware Actually Pays Off
A sober financial model comparing hardware purchase price, wattage electricity, and utilization against collapsing cloud API token prices.
HardwareMulti-GPU Scaling: Tensor Parallelism vs. Pipeline Split (2x 3090 / 4090)
Why two 24 GB GPUs do not yield exactly 2.0x decode speed, how PCIe all-reduce latency affects efficiency, and when layer-splitting beats tensor-parallel.