VENDOR-NEUTRAL AI ARCHITECTURE · CLAUDE · OPENAI · GEMINI · VLLM · FREE KV-CACHE & WIRE LAB
AI, LLM & MCP Primitives Master Lab
Master the 7 physical and protocol primitives that govern every frontier model on earth — KV-cache silicon math, programmatic policy hooks, raw MCP JSON-RPC 2.0 with recoverable isError, zero-leak Hybrid RAG, and crash-safe multi-agent state machines.
02 · LIVE KV-CACHE VRAM & FINOPS CALCULATORH100 80GB ROOFLINE
WEIGHTS + KV TOTAL
90.0 GiB
70.0 GiB weights + 20.0 GiB KV
MIN H100 80GB GPUS
2× H100
1.25 GiB KV per request
DECODE ROOFLINE
64 tok/s
HBM 3.35 TB/s bandwidth bound
FINOPS CACHE SAVINGS
$7,301/mo
Effective spend: $7,099/mo
03 · UNIVERSAL TOOL-USE & MCP WIRE INSPECTOR
{
"jsonrpc": "2.0",
"id": 42,
"method": "tools/call",
"params": {
"name": "issue_refund",
"arguments": { "order_id": "ord_991", "amount_usd": 650 }
}
}
// Recoverable tool-level policy block (model reads & adapts):
{
"jsonrpc": "2.0",
"id": 42,
"result": {
"isError": true,
"content": [{ "type": "text", "text": "POLICY_HOLD: refunds > $500 require manager approval token" }]
}
}Notice the isomorphism: every provider simply wraps a JSON function call + structured result. Put your business logic behind one MCP server + programmatic policy hook and swap model providers with 1 config flag.
04 · FIVE LIVE BREAK-FIX AI & MCP LABS (GRADED IN-BROWSER)AST-SANDBOXED PYTHON VERIFIER
M09 · PYTHON COLD DRILL · PYODIDE WASM SANDBOXKV-Cache VRAM & Max Concurrency Sizing (Silicon Math)
Implement `estimate_kv_cache_gb(layers: int, kv_heads: int, head_dim: int, seq_len: int, batch_size: int, dtype_bytes: int = 2) -> float` computing exact KV-cache memory in GiB (`2 * layers * kv_heads * head_dim * seq_len * batch_size * dtype_bytes / (1024 ** 3)` rounded to 4 decimals) AND `max_batch_for_vram(free_vram_gb: float, per_req_kv_gb: float) -> int` returning floor concurrency (>= 0).