paper-with-me

Papers

COLD Decoding: Energy-based Constrained Text Generation with Langevin Dynamics

2022-02-23 · Lianhui Qin, Sean Welleck, Daniel Khashabi, Yejin Choi

Many applications of text generation require incorporating different constraints to control the semantics or style of generated text. These constraints can be hard (e.g., ensuring certain keywords are included in the output) and soft (e.g., contextualizing the output with the left- or right-hand context). In this paper, we present Energy-based Constrained Decoding with Langevin Dynamics (COLD), a decoding framework which unifies constrained generation as specifying constraints through an energy function, then performing efficient differentiable reasoning over the constraints through gradient-based sampling. COLD decoding is a flexible framework that can be applied directly to off-the-shelf left-to-right language models without the need for any task-specific fine-tuning, as demonstrated through three challenging text generation applications: lexically-constrained generation, abductive reasoning, and counterfactual reasoning. Our experiments on these constrained generation tasks point to the effectiveness of our approach, both in terms of automatic and human evaluation.

📄 PDF Abstract BibTeX arXiv:2202.11705

Code (2)

qkaren/cold_decoding 공식 구현 pytorch
yu-fangxu/cold-attack pytorch

Tasks

counterfactualCounterfactual ReasoningText Generation

Similar Papers 제목 키워드 기반

COLD-Attack: Jailbreaking LLMs with Stealthiness and Controllability

2024-02-13 · Xingang Guo, Fangxu Yu, huan zhang, Lianhui Qin 외

Jailbreaks on large language models (LLMs) have recently received increasing attention. For a comprehensive assessment of LLM safety, it is essential to consider jailbreaks with diverse attributes, such as contextual coh…

Text Generation

Enhancing Learned Knowledge in LoRA Adapters Through Efficient Contrastive Decoding on Ascend NPUs

2025-05-20 · Morgan Lindsay Heisler, Linzi Xing, Ge Shi, Hanieh Sadri 외

Huawei Cloud users leverage LoRA (Low-Rank Adaptation) as an efficient and scalable method to fine-tune and customize large language models (LLMs) for application-specific needs. However, tasks that require complex reaso…

Energy-Conscious LLM Decoding: Impact of Text Generation Strategies on GPU Energy Consumption

2025-02-17 · Alireza Nik, Michael A. Riegler, Pål Halvorsen

Decoding strategies significantly influence the quality and diversity of the generated texts in large language models (LLMs), yet their impact on computational resource consumption, particularly GPU energy usage, is insu…

BenchmarkingCode SummarizationDiversityGPU+2

NeuroLogic A*esque Decoding: Constrained Text Generation with Lookahead Heuristics

2021-12-16 · NAACL 2022 7 · Ximing Lu, Sean Welleck, Peter West, Liwei Jiang 외

The dominant paradigm for neural text generation is left-to-right decoding from autoregressive language models. Constrained or controllable generation under complex lexical constraints, however, requires foresight to pla…

Machine TranslationTable-to-Text GenerationText Generation

Guiding LLMs The Right Way: Fast, Non-Invasive Constrained Generation

2024-02-07 · Luca Beurer-Kellner, Marc Fischer, Martin Vechev

To ensure that text generated by large language models (LLMs) is in an expected format, constrained decoding proposes to enforce strict formal language constraints during generation. However, as we show in this work, not…