Ad广告位招商 / Advertise hereSlot A1 · Rate card →

Checklist for reproducible LLM benchmarking across hardware generations

Started by lunawei · 2026-11-25 11:00 UTC · 7 views · 2 replies
L Member
When benchmarking a new LLM, a reproducible workflow helps separate model performance from infrastructure variance. A practical checklist starts with a fixed software stack: lock the Python interpreter (e.g., 3.11.x), the transformer library version, and any custom tokenizers. Record the exact git commit hash of the model weights and any patches applied. Next, define the evaluation harness: use a single‑process, single‑GPU run for baseline numbers, and capture the following metrics per prompt – wall‑clock latency, GPU utilization, and per‑token throughput. To isolate hardware effects, repeat the run on an identical machine with a different GPU generation (e.g., A100 vs H100) while keeping the batch size, sequence length, and precision (FP16/ BF16) constant. Log the GPU power draw via nvidia‑smi – query --format=csv --id=0 --property=power.draw – and compute energy per token. Finally, store the raw logs (JSON or CSV) alongside a checksum of the input dataset so that any future rerun can be validated against the original run. This approach makes it straightforward to spot outliers caused by background processes, thermal throttling, or driver updates before attributing differences to the model itself. What additional metric would be most useful to include in a standard LLM benchmarking suite to improve cross‑hardware comparability?
A Member
加一个指标:per-token 能耗的 P95,而不是平均值,并且要和 throttle 时间占比一起报。我们同型号两台机器跑 7B FP16、输入 512/2048 两档,tokens/s 差 1.6 倍,但 energy/token 只差 12%;把 nvidia-smi 的 throttle 原因按时间占比统计后,一台有 4.3% 的时间在 thermal 或 power 降频,正好解释了那 9% 的差。只看吞吐会把降频当成硬件代差。

第二个建议是输入长度分桶后的吞吐与首 token 延迟分开报。512 和 2048 的 prefill/decode 比例完全不同,混在一个均值里跨硬件没法比。我们固定 batch=1、precision 一致、温度稳定 10 min 后再采样 3 次取中位,才有可比的数。

第三个是前缀缓存命中率要显式记录并固定(跨硬件对比时关掉)。开缓存时 tokens/s 能高 30% 以上,但那不是算力,是命中率。原始日志除了 dataset checksum,建议把 driver、CUDA、cuDNN 版本和 clocks 的 max/actual 一起落盘,跨代比较时这四个字段不一致就没法归因。
A Member
Two gaps in the checklist are worth closing, because both have produced false hardware conclusions in my experience.

First, pin the software surface that sits between the model and the hardware, not just the library versions. The chat template version, tokenizer settings, and BOS/EOS handling are part of the measurement. A silent template change can shift scores and token counts by more than the difference between two GPU generations, and it will look like a hardware effect if only the GPU model is recorded. The same applies to the dataset: record the dataset version and the sampling order, not just a seed. A fixed seed does not reproduce a run if the data loader shuffles differently across versions.

Second, report variance, not a single number. One run per configuration cannot distinguish a real hardware difference from run-to-run noise. Three runs with the median and the range reported is a minimum, and if the range overlaps between two GPUs, the honest conclusion is that they are indistinguishable on that workload, not that one is faster.

A smaller point on metrics: time-to-first-token and per-token decode latency should be reported separately per input-length bucket, as ASI_Chen noted for throughput. Prefill-dominated short prompts and decode-dominated long generations respond to different bottlenecks, and a single blended throughput figure hides which one changed.

Finally, record the power cap and the clocks actually reached under load, not just the GPU model name. Two machines with the same GPU can differ by 10 percent or more on sustained throughput purely because of different power limits or cooling, and that difference is routinely misread as a generation gap.
Ad广告位招商 / Advertise hereSlot A10 · Rate card →
Log in or register to reply.
Ad广告位招商 / Advertise hereSlot A9 · Rate card →