Skip to content
KernelIndex
Search⌘K

SwiGLU activation, Megatron layout

72 eligible runs
swiglu

SwiGLU activation over a seq×batch×(2·ffn) tensor: chunk in two on the last dimension, silu(gate)·up. The projections are outside the timed region; the benchmark runs bf16 and sweeps the per-rank FFN size.

Fastest reported · usable today
23.1µsmedian · 1.00× faster than baseline
LigerLiger-Kernel · BSD-2-Clause · triton

Reported evidence · last observed 2026-07-26. Reported by source; not independently reproduced.

pip install "liger-kernel==0.8.1"

Fastest by languagetriton · Liger · 23.1 µs · #1python · PyTorch · 23.2 µs · 1.00×

Current records

Source-native comparison · GPU NVIDIA H100 · Workload ffn = 1024 · seq = 2048 · batch = 4 · bf16 · Protocol Liger-Kernel benchmark scripts · median · 4 results · last observed 2026-07-26Record history →
Estimated floor 10.0 µs · record 2.31× above itestimate, not evidence ›
DRAM 10.0 µs · bandwidth-bound on H100 SXM
every declared tensor crosses HBM exactly once (3,350 GB/s, H100 SXM datasheet)
no arithmetic formula for this family: bandwidth floor only
headroom-v1: a lower bound from declared tensors and datasheet peaks. A kernel can sit well above it for good reasons.
#
Implementation
Latency
vs #1
Trust
Observed
1
LigerLiger-Kernel
23.1µs
1.00×
Reported · BSD-2-Clause · source
2026-07-26

1.00× faster than the baseline. Measured exactly what you asked. Reported by source; not independently reproduced.

source mirroredBSD-2-ClauseinstallableView source →Run detail →
2
PyTorchbaseline
23.2µs
1.00×
Reported · BSD-3-Clause · source
2026-07-26

Measured exactly what you asked. The source's designated baseline implementation. Reported by source; not independently reproduced.

source mirroredBSD-3-Clauseno install recipeView source →Run detail →
3
LigerLiger-Kernel
23.3µs
1.01×
Reported · BSD-2-Clause · source
2026-07-26

1.01× slower than the baseline. Measured exactly what you asked. Reported by source; not independently reproduced.

source mirroredBSD-2-ClauseinstallableView source →Run detail →
4
PyTorchbaseline
57.8µs
2.50×
Reported · BSD-3-Clause · source
2026-07-26

Measured exactly what you asked. The source's designated baseline implementation. Reported by source; not independently reproduced.

source mirroredBSD-3-Clauseno install recipeView source →Run detail →

Scaling by ffn

100.0 µs1024204840968k16k32kffn →23.1 µs39.6 µs72.5 µs137.0 µs266.8 µs527.3 µsLiger23.2 µs60.4 µs113.7 µs220.2 µs432.9 µs858.5 µsPyTorch
LigerPyTorchbest per workload · NVIDIA H100 · Liger-Kernel benchmark scripts held constant · log scale

Implementations

Implementation
Runtime
Best latency
Evidence
Availability
python
23.2µs
1.00×
Reported
BSD-3-Clause · source
LigerLiger-Kernel
triton
23.1µs
1.00×
Reported
BSD-2-Clause · source

Semantics

Inputs and outputs
yfloat [seq, batch, ffn_double]
outfloat [seq, batch, ffn]
Axes and behavior
ffnvariable
seqvariable
batchvariable
ffn_doubleffn_double = ffn * 2
determinismunspecified
constraintsNo mutation or aliasing
Identity
sha2562a90dbd952ce…
Sources: Liger-Kernel benchmarks (2026-07-26) · BSD-2-Clauselast observed 2026-07-26How records are decidedJSON