TensorX
返回文献探索

Paper · arXiv 2411.07641

Top-nσ: Not All Logits Are You Need

Chenxia Tang, Jianchun Liu, Hongli Xu, Liusheng Huang

24 upvotesNovember 12, 2024arXiv 预印本
AI 摘要

A novel sampling method called top-$n\sigma$ for large language models improves reasoning task performance by filtering pre-softmax logits and maintaining consistent results across different temperatures.

greedy decodinglow-temperature samplingtop-$n\sigma$pre-softmax logitsGaussian-distributed noisy regioninformative regiontoken filteringtop-$p$min-$p$sampling approaches

Abstract

Large language models (LLMs) typically employ greedy decoding or low-temperature sampling for reasoning tasks, reflecting a perceived trade-off between diversity and accuracy. We challenge this convention by introducing top-nsigma, a novel sampling method that operates directly on pre-softmax logits by leveraging a statistical threshold. Our key insight is that logits naturally separate into a Gaussian-distributed noisy region and a distinct informative region, enabling efficient token filtering without complex probability manipulations. Unlike existing methods (e.g., top-p, min-p) that inadvertently include more noise tokens at higher temperatures, top-nsigma maintains a stable sampling space regardless of temperature scaling. We also provide a theoretical analysis of top-nsigma to better understand its behavior. The extensive experimental results across four reasoning-focused datasets demonstrate that our method not only outperforms existing sampling approaches but also surpasses greedy decoding, while maintaining consistent performance even at high temperatures.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
Top-nσ: Not All Logits Are You Need | TensorX