paper-with-me

홈 › Papers

DoLa: Decoding by Contrasting Layers Improves Factuality in Large Language Models

2023-09-07 · Yung-Sung Chuang, Yujia Xie, Hongyin Luo, Yoon Kim, James Glass, Pengcheng He

Despite their impressive capabilities, large language models (LLMs) are prone to hallucinations, i.e., generating content that deviates from facts seen during pretraining. We propose a simple decoding strategy for reducing hallucinations with pretrained LLMs that does not require conditioning on retrieved external knowledge nor additional fine-tuning. Our approach obtains the next-token distribution by contrasting the differences in logits obtained from projecting the later layers versus earlier layers to the vocabulary space, exploiting the fact that factual knowledge in an LLMs has generally been shown to be localized to particular transformer layers. We find that this Decoding by Contrasting Layers (DoLa) approach is able to better surface factual knowledge and reduce the generation of incorrect facts. DoLa consistently improves the truthfulness across multiple choices tasks and open-ended generation tasks, for example improving the performance of LLaMA family models on TruthfulQA by 12-17% absolute points, demonstrating its potential in making LLMs reliably generate truthful facts.

📄 PDF Abstract BibTeX arXiv:2309.03883

Code (4)

voidism/dola 공식 구현 jax
JayZhang42/SLED jax
githubhyz/delta pytorch
shikiw/opera jax

Tasks

TruthfulQA

Similar Papers 제목 키워드 기반

Attention-Guided Layer Selection for Contrastive Decoding in Large Language Models

2026-07-25 · Yusuke Sakai, Natthawut Kertkeidkachorn, Kiyoaki Shirai arxiv

Contrastive decoding methods such as DoLa improve the factuality of Large Language Models (LLMs) by contrasting the output distributions of mature and premature layers. However, DoLa's dynamic layer selection relies sole…

PruneCD: Contrasting Pruned Self Model to Improve Decoding Factuality

2025-09-20 · Byeongho Yu, Changhun Lee, Jungyu Jin, Eunhyeok Park arxiv

To mitigate the hallucination problem in large language models, DoLa exploits early exit logits from the same model as a contrastive prior. However, we found that these early exit logits tend to be flat, low in magnitude…

Multilingual Contrastive Decoding via Language-Agnostic Layers Skipping

2024-07-15 · Wenhao Zhu, Sizhe Liu, ShuJian Huang, Shuaijie She 외

Decoding by contrasting layers (DoLa), is designed to improve the generation quality of large language models (LLMs) by contrasting the prediction probabilities between an early exit output (amateur logits) and the final…

Active Layer-Contrastive Decoding Reduces Hallucination in Large Language Model Generation

2025-05-29 · Hongxiang Zhang, Hao Chen, Tianyi Zhang, Muhao Chen

Recent decoding methods improve the factuality of large language models~(LLMs) by refining how the next token is selected during generation. These methods typically operate at the token level, leveraging internal represe…

Decision MakingHallucinationLanguage ModelingLanguage Modelling+2

Temporal Guidance for Large Language Models

2026-01-29 · Hong-Kai Zheng, Piji Li arxiv

Contrastive Decoding (CD) enhances the generation quality of large language models (LLMs) but incurs significant additional computational overhead due to the need for an auxiliary model. Existing internal self-contrastiv…