Keep pulling the thread on Tri Dao.
SonicSampler's hierarchical two-stage top-k algorithm achieves up to a 10x speedup over competitive baselines.
SonicSampler achieves up to a 16x speedup over state-of-the-art baselines across heterogeneous speculative decoding workloads.
SonicSampler supports dynamic per-request sampling behaviors, including grammar-constrained decoding, various penalties, filtering methods, and speculative verification, within a single batched kernel.
Existing LLM sampling implementations are often inefficient for CUDA Graph execution because they rely on multiple kernel launches or assume homogeneous sampling behavior.
SonicSampler is a unified suite of tile-aware Triton kernels that vertically fuses the complete LLM sampling pipeline into a fixed, workload-aware execution model.