Compute Split in the Agent Era and Practical Small-Model Selection

    Agent workloads differ from single-turn inference: multi-step loops amplify latency, KV cache hits the memory wall, and training versus inference need different hardware. This article covers supernode training design, SRAM-focused inference, why dense small models can beat larger MoE systems on agent tasks, and engineering practices for routing, context, validation, and evaluation.

    See the load first: agents are not longer Q&A

    Before talking about compute, admit that agent compute has diverged from traditional single-turn inference.

    Classic inference is one request, one forward pass, one response. An agent is multi-step reasoning + tool calls + a persistent loop: the model emits an action, the environment returns a result, the model decides again, until the task finishes or times out. That creates three structural shifts:

    1. Latency is amplified along the chain. A 200 ms step looks fast, but a 20-step job plus tool round-trips, parsing, and retries becomes seconds end to end. Users feel time-to-completion, not per-step latency.
    2. The bottleneck moves from FLOPs to memory capacity and bandwidth. In long sessions, context grows and KV cache stays in GPU memory, roughly linear with length. Extra compute is wasted if you cannot feed it.
    3. Training and inference optimize opposite goals. Training wants large-scale interconnect, stable long runs, and high aggregated FLOPs. Inference wants low latency, high effective bandwidth, and predictable tail latency. One hardware stack serving both must compromise on one side.

    That is the real reason training and inference chips are designed separately—load split, not marketing tiers.

    Training: supernodes, shared memory, and host isolation

    Public materials describe next-generation in-house training accelerators delivered as supernodes: tens of thousands of chips per system, petabyte-scale shared memory, and hundred-EFLOPS-class aggregate compute, aiming to compress frontier training from months to weeks.

    The useful engineering points are not peak numbers:

    • Shared memory cuts sharding overhead. A unified addressable pool inside a supernode gives more freedom for model and pipeline parallel splits and reduces cross-node communication and rematerialization.
    • Keep communication on-node. Agent-era training data is often long trajectories and long context; sequence sharding stresses interconnect more than short samples, so high intra-node bandwidth matters more.
    • Isolate host CPUs and NUMA. Preprocessing, checkpoint I/O, scheduling, and failure isolation run on general-purpose CPUs, separated from accelerators at NUMA boundaries so host jitter does not pollute the accelerator pipeline. Over long jobs this often matters more than peak FLOPs for effective training time.

    Inference: the memory wall and on-chip SRAM

    Inference SKUs take the opposite path: stack on-chip SRAM and hit the memory wall directly.

    The memory wall is compute growing faster than memory bandwidth, so cycles are spent waiting on data movement. Agent inference makes this worse: every loop iteration rereads the full history KV cache. On-chip SRAM keeps hot data next to compute, cuts trips to external HBM, and turns nameplate FLOPs into effective throughput.

    A rough capacity check shows when memory is the bottleneck:

    1. def kv_cache_bytes(layers, kv_heads, head_dim, seq_len, batch, dtype_bytes=2):
    2. # 2 = K and V
    3. return 2 * layers * kv_heads * head_dim * seq_len * batch * dtype_bytes
    4. # Example: sessions × context length drive resident memory
    5. print(kv_cache_bytes(32, 8, 128, 32000, 64) / 1024**3, "GiB")

    If the estimate is already near a single card’s memory, optimize cache residency (context compression, sliding windows, prefix reuse)—do not just add cards.

    Split train/serve also helps ops: independent scale-out, chip SKUs, and SLAs, with separate failure domains. Public figures claim about 2× performance per watt versus the prior generation; that metric matters far more on the inference side, where cost is always-on.

    Where dense small models get their edge

    Another industry signal: an open-source team’s dense model of about 27B parameters beat a previous-generation sparse MoE flagship (~397B total, ~17B active) on public agent coding and computer-use benchmarks.

    That is easy to misread as “parameters do not matter.” A stricter reading:

    • Dense models are more predictable at inference. No routing jitter, fixed activation paths, tighter latency, simpler memory and batching, lower bar for quantization and private deploy.
    • MoE wins on train-time capacity; it pays in memory traffic. Sparse activation cuts compute per token, but weight access is discontinuous; on long context and small online batches, bandwidth utilization can drop.
    • Agent coding depends more on post-training than scale. Tool-call format, failure recovery, instruction holding over long traces, and repo-scale context come mainly from high-quality trajectories and post-training. Data quality can beat an order-of-magnitude parameter jump on a given task.

    The operational conclusion: do not worship parameter count or density; run reproducible evals per task.

    Practice: turn judgment into verifiable engineering

    1. Layered model routing

    Use a small dense model for frequent simple steps; escalate hard planning and stubborn repairs to a larger model—best cost/latency tradeoff:

    1. def route(step, ctx):
    2. if step["needs_deep_reasoning"] or ctx["failed_attempts"] >= 2:
    3. return "large_model"
    4. return "small_dense_model"

    2. Context engineering before swapping models

    As traces grow, do three things first: summarize history, truncate and structure tool returns, externalize state to retrievable storage. Most “the model got dumber” cases are noisy context.

    3. Structured output and validate-then-retry

    Tool calls must pass schema validation; on failure, retry with the error—do not pass illegal args to the environment:

    1. def call_tool(schema, payload, model, max_retry=2):
    2. for i in range(max_retry + 1):
    3. args = model.parse(payload, schema) # structured parse
    4. if args is not None:
    5. return args
    6. payload = model.repair(payload, schema) # repair with validation errors
    7. raise ValueError("tool schema invalid")

    4. Eval regression and cost observability

    Offline: fixed task-set regression. Online: task success rate, average steps, cost per task. Meter by session, step, and tool call via monitoring, alerts, and logs. Without trajectory-level metrics, model choice is intuition.

    Closing

    Agents rewrite compute from a single forward pass into a long, stateful loop, so supply splits along training and inference, and model choice shifts from parameter races to post-training quality and inference predictability. For engineering teams the practical order is: quantify load and memory bottlenecks, then layered routing and context hygiene, then pick model size from reproducible evals—not the reverse.