LLM Semantic Caching: Stop Paying Twice
Exact-match vs semantic caching for LLM calls: a small Python cache, LiteLLM and RedisVL setups, and real scores showing why restart and stop nginx collide.
All the articles with the tag "ai".
Exact-match vs semantic caching for LLM calls: a small Python cache, LiteLLM and RedisVL setups, and real scores showing why restart and stop nginx collide.
A 125B MoE ran an agent job locally for 72 hours and made real progress. A free 120B cloud route finished the same job in 7. Here is where the time went.
What the B in 7B, 12B and 125B means, how MoE total vs active parameters differ, and why quantization changes the memory math. A guide for local LLM users.
Run Claude Code, Codex CLI, or Aider in parallel with one git worktree per agent, one tmux window each, and a bell that tells you which agent is waiting.
Every chat turn re-sends the whole history. See the token math, what prompt caching saves on the API, and what a long context costs in VRAM when you run local.
Agent Skills package know-how, MCP servers package access. Here is how each one loads into context, what each one costs, and when your home lab needs which.
Two used 3090s or a mismatched pair can run a 27B model. Compare llama.cpp layer split with vLLM tensor parallelism, PCIe limits, and a verdict on which to run.
Blender MCP is great for building one model with an agent watching screenshots. Headless bpy scripts win for batches, parallel agents, and automated checks.
Dify and Open WebUI both front your local LLMs, but they solve different problems. Compare footprint, RAG, auth, APIs and licenses, and see how to run both.
Give a local LLM agent long-term memory with Markdown files or SQLite FTS5. Working code, token math, and the point where you finally need embeddings.
Constrained decoding makes local LLMs emit valid JSON in llama.cpp, Ollama, and vLLM. It guarantees syntax, not truth. Working curl, Pydantic, and retry code.
A 5.8M-parameter GPT scores 1.626 bits per byte on Holmes. Gemma 4 E4B scores 0.953 untrained, and a 34-minute QLoRA run on an 8 GB GPU gets it to 0.865.