Cactus: Aceleração da Decodagem Autorregressiva com Amostragem Especulativa de Aceitação Restrita
Cactus: Accelerating Auto-Regressive Decoding with Constrained Acceptance Speculative Sampling
April 5, 2026
Autores: Yongchang Hao, Lili Mou
cs.AI
Resumo
A amostragem especulativa (SpS) tem sido bem-sucedida em acelerar a taxa de transferência de decodificação de modelos de linguagem grandes autorregressivos ao aproveitar modelos esboço menores. A SpS impõe rigorosamente que a distribuição gerada corresponda à do LLM verificador. Esta restrição é desnecessária, uma vez que variações leves da distribuição do verificador, como amostragem com top-k ou temperatura, também seriam aceitáveis. A amostragem de aceitação típica (TAS) atenua este problema ao aceitar mais tokens usando heurísticas baseadas em entropia. No entanto, esta abordagem distorce a distribuição do verificador, potencialmente degradando a qualidade da saída quando o verificador codifica informações críticas. Neste trabalho, formalizamos o algoritmo de amostragem especulativa através da lente da otimização com restrições. Com base nesta formulação, propomos o Cactus (amostragem especulativa com aceitação restrita), um método que garante uma divergência controlada da distribuição do verificador e o aumento das taxas de aceitação. Resultados empíricos em uma ampla gama de benchmarks confirmam a eficácia da nossa abordagem.
English
Speculative sampling (SpS) has been successful in accelerating the decoding throughput of auto-regressive large language models by leveraging smaller draft models. SpS strictly enforces the generated distribution to match that of the verifier LLM. This is unnecessarily restrictive as slight variations of the verifier's distribution, such as sampling with top-k or temperature, would also be acceptable. Typical acceptance sampling (TAS) alleviates this issue by accepting more tokens using entropy-based heuristics. However, this approach distorts the verifier distribution, potentially degrading output quality when the verifier encodes critical information. In this work, we formalize the speculative sampling algorithm through the lens of constrained optimization. Based on this formulation, we propose Cactus (constrained acceptance speculative sampling), a method that guarantees controlled divergence from the verifier distribution and increasing acceptance rates. Empirical results across a wide range of benchmarks confirm the effectiveness of our approach.