THIS IS A PURE F*CKING DIAMOND
Anthropic just documented one of the best setups for Claude Code
The idea: run Opus 5.5, Sonnet 5.5, and the new Haiku 5.5 together in a tight tripartite loop, each doing only what it was built for
Opus-level planning on every big architectural decision, without paying Opus rates for routine code edits or repo searches
You just start Claude Code like this:
CLAUDE_CODE_SUBAGENT_MODEL=haiku claude --model opusplan
here's how it splits:
→ Opus 5.5 runs plan mode: architects the system blueprint, locks contracts, and signs off on the diff
→ Sonnet 5.5 executes the plan in the main session: writes the code, applies patches, and runs test suites
→ Haiku 5.5 swarms the repository in parallel: maps the AST, greps call sites, and parses docs at 340 tok/s with native 1M context
→ you stop burning Opus context on routine files and keep your main session under 10k tokens
Opus only steps in at three moments:
→ before a plan locks (architectural design)
→ when the same test fails twice (debugging deadlocks)
→ before calling it done (signing off on git diff)
Opus plans, Sonnet builds, Haiku swarms
JEV engineering is the same move one layer down: the forks that need no thinker (which file, which tool, retry or stop) resolve in code in 15ms, and the frontier models only see the ones that split
the full tree
> Opus 5.5 architects the implementation plan (opusplan mode)
> Sonnet 5.5 runs the main execution session and writes code
> search maps the repo AST on Haiku 5.5 (340 tok/s, 1M context)
> grep locates token call sites on Haiku 5.5 (isolated subagent)
> docs pulls API specifications on Haiku 5.5 (0.05x cost)
> Opus 5.5 verifies synthesized diff before final sign-off
> JEV routes micro-forks in milliseconds
paste the tree and this prompt into Claude Code ↓
"Reconfigure my Claude Code setup around this tree:
1. Run with model 'opusplan' so Opus 5.5 plans the architecture and Sonnet 5.5 implements the code
2. Set CLAUDE_CODE_SUBAGENT_MODEL=haiku so all search, grep, and documentation subagents swarm on Haiku 5.5 with its native 1M context
3. Configure fallbackModel to ['sonnet', 'haiku'] in settings.json to guarantee 100% session availability
4. Add one rule to CLAUDE.md: delegate all repository searches and test runs to Haiku 5.5 subagents to keep main context under 10k tokens
5. Route fast deterministic forks (tool choice, path selection, retries) through JEV
Show me every change as a diff first. No edits until I say go"
↳ https://t.co/a2VGzSHZEn
save it, it'll come in handy
xAI released 15 grok bot guides and almost nobody caught it
each one written by the team behind grok
the whole section is free
grab a guide, follow it, ship your bot
builders are still guessing when the instructions already exist
15 full guides, zero cost
see them below 👇
Loading an LLM does not guarantee inference!
The model may load successfully and still run out of GPU memory when the first requests arrive.
This happens because model weights are only one of four VRAM allocations:
1) Model weights
The parameters are loaded into VRAM before inference begins.
Ignoring quantization metadata and implementation overhead, a 70B parameter model requires approximately:
→ 140 GB in FP16 or BF16
→ 70 GB in INT8
→ 35 GB in INT4
This allocation remains mostly constant during inference.
Quantization reduces it by storing each parameter with fewer bits. However, kernels may use higher-precision values for some operations.
2) KV cache
Each Transformer layer generates KV tensors for every processed token.
The inference engine retains these tensors so new tokens can attend to earlier tokens without recomputing their key and value projections.
The approximate KV cache memory per token is:
2 × layers × KV heads × head dimension × bytes per value
The factor of two represents the key and value tensors.
This allocation increases with context length and the number of active requests.
Grouped-query attention and multi-query attention reduce it by sharing fewer key-value heads across multiple query heads.
3) Activations and workspace
A forward pass creates intermediate tensors for attention, MLP operations, normalization, and matrix multiplication.
GPU kernels may also require temporary workspace for computation.
The inference engine reuses much of this memory across layers and generation steps.
Its peak size depends on the model architecture, number of tokens processed together, selected kernels, and serving configuration.
Prefill processes multiple prompt tokens in parallel.
Decode usually processes one new token per active request.
The two phases therefore have different activation and workspace requirements.
4) Runtime overhead
CUDA contexts, loaded kernels, memory allocators, metadata, communication buffers, and serving-engine state also consume VRAM.
The amount varies across runtimes and deployment configurations.
Memory fragmentation can also leave enough total free VRAM but no sufficiently large contiguous region for a new allocation.
The total memory requirement is:
model weights + KV cache + peak activations and workspace + runtime overhead
- Model weights remain mostly constant.
- KV cache memory increases with context length and concurrency.
- Activation and workspace usage changes during execution.
- Runtime overhead depends on the software stack.
This is why model size alone cannot determine whether an LLM can serve a given workload.
The visual below shows when each allocation is created, how long it remains in memory, and which workload parameters increase it.
If you want to dive deeper, I wrote a first-principles guide that explains the complete inference process, including prefill, decode, KV caching, batching, and quantization.
Read it below.