How-toSelected

Hugging Face 开源 specbench:帮你测出推测解码最快的配置

Why we picked it

Hugging Face 的 Merve Noyan 把自用的推测解码基准工具开源了,叫 specbench。它会自动帮你扫不同的草稿 token 数、量化方案和硬件,直接告诉你哪种配置加速最多,不用再瞎猜参数。经常跑本地推理、想榨干速度的开发者可以直接拿来用。

Hugging Face 的 Merve Noyan 开源了 specbench,一个用于推测解码(speculative decoding)基准测试的 CLI 工具,目标是找出给定 drafter 与主模型组合下实际能获得的加速比。

Body

推测解码的速度取决于草稿 token 数量、drafter 准确率、量化方案、用例与 drafter 训练数据的重合度以及硬件带宽等因素,手动调参很难做全。specbench 支持在草稿 token 数量、硬件、量化设置之间自动扫描,内置 coding、knowledge work、multimodal 三类预设,也允许用户自带数据集,可在本地或通过 HF Jobs 运行。

作者表示该工具最初为自用而写,经同事反馈后决定开源。

Original · Merve Noyan

"how fast is this speculative decoder for coding?" none of us can know, so I built specbench for you to get the best speed-up 🤝

speculative decoding drafter speed-ups depend on > number of draft tokens > drafter accuracy > quantizations etup > your use case overlapping with training data of drafter > hardware (specifically bandwidth)

specbench is a lean CLI to benchmark a given drafter against main model, sweep across different number of draft tokens, hardware, quant setups for you to find best setup for your use case! 🔥

it comes with different presets (coding, knowledge work, multimodal) but it's bring your own dataset, as well as supporting local benchmarking and HF Jobs 🤗

please give this a try, I built it for myself but my colleagues think it's dope so I decided to open-source 🫡 https://t.co/ngEEmoKi3V

Industry Coordinates & Source Verification

This report is categorized under AITOP's "How-to" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows and US-China foundation model benchmarks and commercialization comparison. Key entities and technical topics under continuous tracking include specbench, Hugging Face, speculative decoding, inference optimization.

Source attribution: curated from Merve Noyan (@mervenoyann).