Next token prediction paradigm has been prevailing for autoregressive models in the era of LLMs. The current default sampling choice for popular LLMs is temperature scaling together with nucleus sampling to balance diversity and coherence. Nevertheless, such approach leads to inferior performance in various NLP tasks when the model is not certain about testing questions. To this end, we propose a brand new training-free decoding strategy, dubbed as Cautious Next Token Prediction (CNTP). In the decoding process, if the model has comparatively high prediction entropy at a certain step, we sample multiple trials starting from the step independently and stop when encountering any punctuation. Then we select the trial with the lowest perplexity score viewed as the most probable and reliable trial path given the model's capacity. The trial number is negatively correlated with the prediction confidence, i.e., the less confident the model is, the more trials it should sample. This is consistent with human beings' behaviour: when feeling uncertain or unconfident, one tends to think more creatively, exploring multiple thinking paths, to cautiously select the path one feels most confident about. Extensive experiments on both LLMs and MLLMs show that our proposed CNTP approach outperforms existing standard decoding strategies consistently by a clear margin. Moreover, the integration of CNTP with self consistency can further improve over vanilla self consistency. We believe our proposed CNTP has the potential to become one of the default choices for LLM decoding. Code is available at https://github.com/wyzjack/CNTP.
Birkbeck, University of London(伦敦大学伯贝克学院);School of Advanced Study, Institute of Philosophy, University of London(伦敦大学高等研究院哲学研究所);University of Utah(犹他大学);Tufts University(塔夫茨大学)
School of Mathematical Sciences, Shanghai Jiao Tong University(上海交通大学数学科学学院);School of Artificial Intelligence, Shanghai Jiao Tong University(上海交通大学人工智能学院);Institute for Advanced Algorithms Research, Shanghai(上海高级算法研究院)
Next Token Prediction Towards Multimodal Intelligence: A Comprehensive Survey
Peking University(北京大学);Beihang Univerisy(北京航空航天大学);University of Hongkong(香港大学);Shenzhen Institute of Advanced Technology, China Academy of Sciences(中国科学院深圳先进技术研究院);Tsinghua University(清华大学);M-A-P;The Chinese University of Hong Kong(香港中文大学);Alibaba Group(阿里巴巴集团);University of Cambridge(剑桥大学);Microsoft Research(微软研究院);UIUC(伊利诺伊大学厄巴纳-香槟分校);Humanify Inc.(Humanify公司);Zhejiang University(浙江大学)
I Predict Therefore I Am: Is Next Token Prediction Enough to Learn Human-Interpretable Concepts from Data?
Responsible AI Research Centre(负责任人工智能研究中心);Australian Institute for Machine Learning(澳大利亚机器学习研究所);Adelaide University(阿德莱德大学);School of Computer Science and Engineering(计算机科学与工程学院);The University of New South Wales(新南威尔士大学);Halıcıoğlu Data Science Institute(哈利奇奥格卢数据科学研究所);University of California San Diego(加州大学圣地亚哥分校);School of Mathematics and Statistics(数学与统计学学院);The University of Melbourne(墨尔本大学)
Is Next Token Prediction Sufficient for GPT? Exploration on Code Logic Comprehension
Microsoft Cloud and AI(微软云与人工智能);School of Artificial Intelligence, Jilin University(吉林大学人工智能学院);Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学)
NITP: Next Implicit Token Prediction for LLM Pre-training
School of AI, Shanghai Jiao Tong University(上海交通大学人工智能学院);Xiaohongshu Inc.(小红书公司);The Chinese University of Hong Kong(香港中文大学);University of Science and Technology of China(中国科学技术大学)