Cross-entropy loss
24 eligible runs
cross-entropy
Cross-entropy loss over tokens×vocab logits against integer targets; the benchmark generates fp32 logits.
Fastest reported · usable today
532.4µsmedian · 1.64× faster than baseline
LigerLiger-Kernel · BSD-2-Clause · triton
Reported evidence · last observed 2024-09-03. Reported by source; not independently reproduced.
pip install "liger-kernel==0.2.1"Fastest by languagetriton · Liger · 532.4 µs · #1python · Transformers · 875.1 µs · 1.64×
Current records
Workloadvocab = 4096 · tokens = 16384 · fp32vocab = 8192 · tokens = 16384 · fp32vocab = 16384 · tokens = 16384 · fp32vocab = 32768 · tokens = 16384 · fp32vocab = 65536 · tokens = 16384 · fp32vocab = 131072 · tokens = 16384 · fp32
HardwareBest knownImplementationRuns
NVIDIA A100 · env 1532.4 µsLiger2NVIDIA A100 · env 2863.7 µsLiger2Not measured on H100, B200 for this workload. Challenges →
Source-native comparison · GPU NVIDIA A100 · Workload vocab = 4096 · tokens = 16384 · fp32 · Protocol Liger-Kernel benchmark scripts · median · 2 results · last observed 2024-09-03Record history →
Estimated floor 131.7 µs · record 4.04× above itestimate, not evidence ›
DRAM 131.7 µs · bandwidth-bound on A100 80GB
every declared tensor crosses HBM exactly once (2,039 GB/s, A100 80GB 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
1LigerLiger-Kernel532.4µs1.00×Reported · BSD-2-Clause · source2024-09-03stale
1.64× faster than the baseline. Measured exactly what you asked. Reported by source; not independently reproduced.
source mirroredBSD-2-ClauseinstallableView source →Run detail →
2875.1µs1.64×Reported · Apache-2.0 · source2024-09-03stale
Measured exactly what you asked. The source's designated baseline implementation. Reported by source; not independently reproduced.
source mirroredApache-2.0no install recipeView source →Run detail →
Scaling by vocab
Implementations
Implementation
Runtime
Best latency
Evidence
Availability
Semantics
Inputs and outputs
logitsfloat [tokens, vocab]
targetint64 [tokens]
lossfloat [1]
Axes and behavior
vocabvariable
tokensvariable
determinismunspecified
constraintsNo mutation or aliasing
Identity
sha25614cde8c616cb…
Sources: Liger-Kernel benchmarks (2024-09-03) · BSD-2-Clauselast observed 2024-09-03How records are decidedJSON