RadixArk and Annapurna Labs Open-Source SGLang-Neuron v0.1.0 for Trainium
Summary:RadixArk’s SGLang team and Amazon Annapurna Labs have open-sourced SGLang-Neuron v0.1.0, a PyTorch-native SGLang backend for AWS Trainium. The release targets the execution layer rather than introducing a new model: a two-stream asynchronous runtime overlaps host copies with device work, a Megakernel executes an entire decode step in one NKI call, and prefill/decode disaggregation transfers KV-cache blocks directly through NIXL over EFA. HiCache adds a host-memory tier for evicted prefixes. The
SGLang-Neuron v0.1.0 publicly extends the SGLang serving stack to AWS Trainium for the first time. Jointly developed by the SGLang team at RadixArk and Amazon Annapurna Labs, it is a PyTorch-native, out-of-tree hardware backend plugin. The release does not introduce a new model; it redesigns scheduling, memory movement and distributed execution on the accelerator.
Architecture boundary: preserve SGLang core, specialize the device layer
Installing the plugin registers a neuron platform through SGLang’s plugin entry point, and SGLANG_PLATFORM=neuron selects it at launch. Responsibilities remain separated: SGLang core owns the API server, scheduler, Radix Cache and disaggregated-serving protocol, while the plugin supplies Trainium model implementations, NKI kernels, parallel strategies, a graph runner and KV-cache pools.
TorchNeuron registers Trainium as a PyTorch device for eager execution and exposes a TorchDynamo backend. torch.compile can therefore lower graphs into NEFF programs for the Neuron compiler. The graph runner compiles fixed shape buckets and dispatches each step to the matching program. This reduces graph recompilation, but introduces warm-up and bucket-padding costs: bucket selection and shape utilization can materially affect end-to-end efficiency.
The plugin also supplies tensor, expert and data parallelism, pipeline parallelism, decode-context parallelism, paged full-KV pools for MHA models, latent pools for MLA and DSA attention, speculative decoding and a device-side sampler.
Fully asynchronous runtime: two streams and two in-flight launches
On a conventional single-stream path, a host copy between two graphs waits for the first graph and leaves the NeuronCores idle. SGLang-Neuron separates the work into a default stream for graph execution and a side stream for host copies. Uploads are queued on the side stream before graph submission; the submit waits on one event, allowing the upload to overlap the previous graph. Readbacks are queued only after the relevant graph’s launch event, so they do not block active device work.
SGLANG_NEURON_MAX_INFLIGHT_LAUNCHES permits two in-flight launches per thread by default. The scheduler can submit step n+1 before step n completes. This moves the familiar CUDA-style overlap of compute and copies into Neuron’s launch-queue model and gives every supported LLM a shared execution path.
The trade-off is memory pressure and synchronization complexity. Two in-flight steps require more activation, workspace and queue state, while incorrect event ordering can introduce races or device stalls. The default of two is a conservative starting point; production tuning should track queue depth, host submission time and device utilization rather than simply increasing concurrency.
Megakernels: one decode step per NKI call
By default, the compiler lowers a decode step into many small kernels, with intermediate results repeatedly written to and read from HBM. A Megakernel takes a more aggressive approach: weights are packed along the leading layer axis, KV pools are updated in place, and all decoder layers in one step execute through a single NKI call. MegakernelSpec provides a common contract, avoiding a new runtime subclass for each model.
GPT-OSS-120B was the first model on this path, using pipeline parallelism and decode-context parallelism on Trainium3. GLM-5.2 uses Megakernels for both prefill and decode, while Kimi-K3 has dedicated NKI prefill kernels.
The design can reduce launch boundaries, scheduling overhead and some HBM round trips, but it does not automatically eliminate the same number of transferred bytes. The payoff depends on weight layout, fusion depth, per-layer compute intensity and memory-access patterns. A very large fused kernel may also reduce scheduling granularity, prevent heterogeneous layers from fully utilizing the NeuronCores and make compilation, debugging and fault isolation harder. No same-workload A/B data are yet available to quantify the gain over the ordinary graph path.
Prefill-decode disaggregation: direct KV transfer over EFA
Prefill and decode run as separate server roles on Trainium. A prefill node computes the prompt’s KV cache, while the decode node receives it through NIXL WRITE operations over EFA and writes it directly into its KV pool. A balancer can front any number of prefill and decode instances, forming an xPyD deployment.
The split has three practical benefits. Each server compiles and warms only the graphs for its phase, avoiding repeated program-switch fences on an aggregated server. The roles can choose independent tensor-, expert- and data-parallel layouts. Because no prefill forward is inserted between decode steps, TPOT is more likely to remain stable. The published Kimi-K3 example uses three Trainium3 nodes and transfers KV over EFA through NIXL.
The cost is network traffic. For an MHA or GQA model, transferred bytes are approximately 2 × L × T × H_kv × D_head × s, where L is layer count, T is token count, H_kv is the number of KV heads, D_head is head dimension and s is bytes per element. MLA and DSA latent layouts require a separate calculation. EFA bandwidth, congestion, topology distance and receiver backpressure can all affect TTFT. PD disaggregation is most useful when prefill is bursty or the two phases need independent scaling; for short requests or nearby nodes, transfer overhead may erase the benefit.
HiCache: host memory beneath the device KV cache
HiCache retains evicted prefixes in host memory. When a later request hits a cached prefix, the saved state is loaded back rather than recomputed through prefill. It primarily improves TTFT for stable system prompts, tool definitions and long documents. It does not shorten decode or reduce the HBM occupied by currently active KV state.
The benefit depends on hit rate, eviction policy, transfer bandwidth and prefix length. Caching pays off only when load time + lookup overhead < prefill recomputation time. Long, highly reused prefixes are good candidates; short, one-off documents or workloads with rapidly changing prefixes may add memory traffic without meaningful savings.
Model and diffusion-model coverage
The preview currently lists GPT-OSS-120B, GLM-5.2 and Kimi-K3. The GLM-5.2 MXFP4 path serves a one-million-token context for long-running agentic coding workloads. Such extreme context lengths magnify KV-capacity, paging and cross-node transfer pressure; being able to serve 1M tokens does not imply production-grade TPOT or cost under concurrency.
SGLang Diffusion also runs on Trainium2 with FLUX.1-dev, FLUX.3-Action, MiniMax-H3, Wan2.2 A14B and LingBot-World-V2. This list demonstrates coverage, not equivalent performance with GPU backends. Diffusion workloads need separate measurements for image throughput, time to first image, peak memory and output quality rather than LLM-style TPOT.
Engineering trade-offs and benchmark limits
The release exposes a complete Trainium execution path for the first time. Combining the asynchronous runtime, whole-step Megakernels, PD disaggregation and HiCache has substantial engineering value. Its architecture description also carries strong first-party credibility because the implementation comes from the SGLang maintainers and Annapurna Labs.
Nevertheless, v0.1.0 remains a public preview. The currently verifiable material primarily describes functionality and deployment shapes, such as GLM-5.2’s 1M-token path and Kimi-K3’s three-node split, rather than providing a standard performance matrix. Missing or necessary comparison variables include model revision, precision and quantization, input/output lengths, batch size and concurrency, cold versus warm cache state, compilation cost, TTFT, TPOT, goodput, p95/p99 latency, HBM and host-memory consumption, EFA traffic, power and cost per million tokens. General claims about Trainium economics do not replace accelerator comparisons using the same model, quantization, context and hardware configuration.
Deployment recommendations for developers
- Start with the AWS Deep Learning Container for SGLang-Neuron and pin the plugin, TorchNeuron, driver and checkpoint versions to prevent preview-stage component drift.
- Validate checkpoint, parallel layout and flags in the model catalog before launch. Test ordinary compiled graphs, Megakernels and every intended parallel strategy for compilation and warm-up failures.
- Run four A/B comparisons: synchronous versus asynchronous runtime, ordinary graph versus Megakernel, aggregated versus PD-disaggregated serving, and HiCache disabled versus enabled. Measure cold-start and warm-cache cases separately.
- Track more than average tokens per second. Include TTFT, TPOT, goodput, p95/p99 latency, device utilization, queue depth, HBM and host-memory use, EFA bandwidth and compilation time.
- For million-token and PD workloads, calculate KV footprint and cross-node traffic independently. Scale prefill and decode roles from a small deployment based on the network bottleneck rather than accelerator count alone.
- Roll the preview out through canaries, retain a fallback serving path and test recovery after node failures, cache eviction and model updates.
— END —Source: LMSYS / SGLang Blog (2026-11-12)
Tags: #SGLang #AWS Trainium #NKI #Prefill-Decode Disaggregation #KV Cache
Editorial & Fact-Checking Note: This article is compiled from primary research, official release documentation, and source papers by the ZICQ Newsroom pipeline with automated entity verification and human editorial review. If you notice any technical inaccuracy, please submit a correction via our corrections policy or email our editorial desk directly.
Community Comments