Ranked #7 of 27 on Thursday, November 5
NKI layer megakernels cut GLM-5.3-Flash decode time on AWS Trainium2
RunAnywhere open-sourced an inference engine for AWS Trainium2 that serves GLM-5.3-Flash (320B MoE, 1M context) on a single trn2.48xlarge. By fusing each layer half into one NKI kernel, keeping the working set in on-chip SBUF and moving blocking collectives…
Ranked #7 of 27 on Thursday, November 5
Why it matters
It is one of the few detailed accounts of serving a large open-weights model on Trainium, where stock AWS tooling currently offers no GLM support.
What happened
1 min readRunAnywhere open-sourced an inference engine for AWS Trainium2 that serves GLM-5.3-Flash (320B MoE, 1M context) on a single trn2.48xlarge. By fusing each layer half into one NKI kernel, keeping the working set in on-chip SBUF and moving blocking collectives inside kernels, they cut a batch-8 decode step from 32.2 ms to 24.2 ms against a 6.1 ms memory floor. All numbers are self-run, with no GPU comparison.
Our analysis
The value is the honest time breakdown: in one linear-attention layer the actual recurrence was 2% of the time, with XLA glue, transposes and collectives eating the rest. The 'what didn't work' section, including isolated benchmarks and the NKI simulator both misleading them, is a useful warning for anyone writing custom accelerator kernels. Caveats are clear: the author works at the company, there is no task-level eval of this build, an approximation remains in sparse-attention prefill, and no GPU baseline. Worth reading for teams weighing Trainium as a cheaper inference target.