GLM-5.3 1M Context: Where Long Agent Sessions Break

By Cameron Voss · Reviewed November 21, 2026

TL;DR.
  • Memory sets the price. A full 1M-token GLM-5.3 request carries an FP8 KV cache of about 53.4 GiB against roughly 15.3 GiB of KV headroom per H200. TP8 copies that cache to every GPU; DCP8's token sharding brings each card to about 6.7 GiB, the move that makes the window servable.
  • Prefill is memory-bound until the prompt is split. TP8 gives each GPU 8 of 64 heads and about 26 FLOPs/byte against a 206 ridge. PCP divides the prompt into 16 slices, gives each rank a V-shaped pair, and lifts intensity to about 191 FLOPs/byte. Median first-token latency falls from 1.5–5.2 s to 0.8–0.9 s, with 1.7–3.2× interactivity.
  • Decode charges a toll, then a concurrency wall. DCP costs about 6% per step through 64K and about 15% at 248K with a 2K-token chunk. HiSparse moves KV to host memory (48 GiB/node + 16 GiB/rank). Under 64 sessions, only a PCP8/DCP8 prefill stack with HiSparse decode sustains 8,340 logical tokens/s/GPU at 29.6 tokens/s/user; at 1M, it is the only layout that runs.
  • The client can close the window first. Claude Code needs the [1m] suffix and CLAUDE_CODE_AUTO_COMPACT_WINDOW=1000000. Reasoning is always on, effort runs low/high/max, and the model is text-only, with vision on GLM-5.3-Flash. First-party scores: Terminal-Bench 3.0 28.3 vs 4.6, DeepSWE v1.1 66.9 vs 46.2, Agents' Last Exam 28.5 vs 23.8.

Spec sheets sell the window; serving engineers pay for it. The window is not a marketing rounding; it has a concrete memory price. A GLM-5.3 request that fills the full million-token span is, before anything else, a 53.4 GiB allocation of FP8 KV cache. The H200 reading the prompt has roughly 15.3 GiB left for that cache once weights and activations are resident. That gap explains most of what goes wrong at long context.

The first bill is memory, and more GPUs do not pay it

The gap does not close with additional hardware. Under tensor parallelism, MLA's latent KV is copied onto each rank, so an eight-GPU job still puts 53.4 GiB on every card. Compute scales; per-request cache capacity does not. Dividing the cache by token position is the only move that changes the number. Decode context parallelism, or DCP, deals tokens round-robin across ranks, and at eight-way DCP each GPU carries about 6.7 GiB. That fits inside the 15.3 GiB budget, and it is the reason a million-token request can be served at all.

How much KV cache each GPU holds for a GLM-5.3 request that fills 1M tokens: 53.4 GiB with DP8; TP8 repeats the same 53.4 GiB on all eight cards; PCP8 plus DCP8 brings each GPU down to 6.7 GiB, set against a 15.3 GiB budget
KV cache per GPU for a request that fills the window. DP8 keeps 53.4 GiB on one card, TP8 copies that same 53.4 GiB to all eight, and PCP8 with DCP8 spreads tokens until each card holds about 6.7 GiB against a 15.3 GiB budget.

Prefill waits on memory until the prompt is cut apart

Cutting decode memory does nothing for first-token latency. During TP8 prefill, a GPU owns eight heads out of 64, yet it still executes the whole sparse indexer across the prompt. Byte traffic far outruns the arithmetic: roughly 26 FLOPs per byte moved, while H200's compute-bound ridge sits near 206. Prefill is memory-bound in practice.

PCP rearranges the prompt instead. It breaks the input into 16 chunks and assigns each rank a V-shaped pair, so a GPU touches only its own tokens and still keeps all 64 heads. That arrangement pushes arithmetic intensity to approximately 191 FLOPs per byte, near enough to the ridge that the kernel becomes compute-bound in practice. AgentX tests run by the vLLM team put the gain in numbers: at long context, median first-token latency fell from 1.5–5.2 seconds with DP8 to 0.8–0.9 seconds with PCP8 plus DCP8. Throughput held, and per-user interactivity rose 1.7–3.2 times.

Decode charges a toll, then hits a concurrency wall

DCP is not free at decode. Attention needs shards from every layer, so each step all-gathers them into a temporary buffer and releases it afterward. The added cost is close to 6 percent per step until cached context reaches 64K; with a 2K-token chunk, the figure at 248K is roughly 15 percent. The charge applies to every token the server streams.

DCP8 overhead by cached context length: near 6% until 64K tokens, then climbing to roughly 15% at 248K with 2K-token chunks
DCP8's per-step cost. The tax is flat near 6 percent through 64K of cached context, then rises with session length; at 248K a 2K-token chunk pays about 15 percent.

Concurrency is the harder ceiling. With KV in HBM, the count of simultaneous 1M-token sessions is HBM capacity over 53.4 GiB, which leaves a single-digit number. HiSparse relocates decode KV to host memory (a pool of 48 GiB on each node, with another 16 GiB of offload for every rank in the test setup), so RAM, not HBM, sets the limit.

The throughput-interactivity plot shows both the cost and the payoff. When 64 sessions run together, a stack using PCP8 and DCP8 for prefill plus HiSparse for decode sustains 8,340 logical tokens each second on every GPU, while a single user receives 29.6 tokens per second. The other combinations in the same test drop to 1–2 tokens per second per user. At 1M context, only that one layout runs.

Pareto chart of per-GPU throughput versus P90 per-user speed in 142K and 1M runs; at 1M only the PCP8 and DCP8 prefill stack with HiSparse decode has data points
Throughput against P90 interactivity at 142K and 1M. Several layouts compete at 142K. At 1M, one layout survives: PCP8 and DCP8 for prefill, paired with HiSparse decode.

The window can be closed on the client side

Nothing above appears in the API response, and the client has its own way to shrink the window. Multi-hour agent sessions do hold up, but Claude Code and similar tools do not open the full span by default. The model name needs a [1m] suffix, and CLAUDE_CODE_AUTO_COMPACT_WINDOW has to be 1000000. Leave either out and the client will compact the transcript on a schedule of its own, which means the session runs on a fraction of what you are paying for.

Two more settings shape a long session. Reasoning is mandatory: the API accepts thinking.type: "enabled" and nothing else. reasoning_effort, set to low, high, or max, moves answer quality and invoice size together, since reasoning tokens are billed at output rates. The model is also text-only; images go to GLM-5.3-Flash.

Zhipu's published results are first-party: Terminal-Bench 3.0 scores 28.3, up from 4.6 on GLM-5.2. DeepSWE v1.1 reaches 66.9 against 46.2. Agents' Last Exam lands at 28.5 while GLM-5.2 sits at 23.8. They point in a direction, not a promise. Run your own traces first; do not stake a pipeline on vendor numbers.

Read the failures in order. Memory goes first (53.4 GiB per FP8 request), and token sharding fixes it where extra GPUs cannot. Latency goes second (memory-bound prefill), and PCP restores intensity by chunking the prompt. Concurrency goes third (single-digit users on HBM), and host-memory KV raises the cap at a 6–15 percent per-step cost. The fourth failure is your client: silent compaction closes the window before the server ever does. Check the client's compaction setting before blaming the model.

Measure the window against your traffic

Published charts show what a serving stack can do; they cannot tell you what your sessions will cost. DSSUB lists GLM under its Multi-Model Plan, with availability, exact model IDs, and point rates still pending confirmation.

See the GLM listing

Coverage and connection details are recorded on the model page. Confirm both before you migrate.

← Back to news