paper-with-me

홈 › Papers

Controlled Text Generation via Language Model Arithmetic

2023-11-24 · Jasper Dekoninck, Marc Fischer, Luca Beurer-Kellner, Martin Vechev

As Large Language Models (LLMs) are deployed more widely, customization with respect to vocabulary, style, and character becomes more important. In this work, we introduce model arithmetic, a novel inference framework for composing and biasing LLMs without the need for model (re)training or highly specific datasets. In addition, the framework allows for more precise control of generated text than direct prompting and prior controlled text generation (CTG) techniques. Using model arithmetic, we can express prior CTG techniques as simple formulas and naturally extend them to new and more effective formulations. Further, we show that speculative sampling, a technique for efficient LLM sampling, extends to our setting. This enables highly efficient text generation with multiple composed models with only marginal overhead over a single model. Our empirical evaluation demonstrates that model arithmetic allows fine-grained control of generated text while outperforming state-of-the-art on the task of toxicity reduction. We release an open source easy-to-use implementation of our framework at https://github.com/eth-sri/language-model-arithmetic.

📄 PDF Abstract BibTeX arXiv:2311.14479

Code (1)

eth-sri/language-model-arithmetic 공식 구현 pytorch

Tasks

Language ModelingLanguage ModellingmodelText Generation

Similar Papers 제목 키워드 기반

On Representational Dissociation of Language and Arithmetic in Large Language Models

2025-02-17 · Riku Kisako, Tatsuki Kuribayashi, Ryohei Sasano

The association between language and (non-linguistic) thinking ability in humans has long been debated, and recently, neuroscientific evidence of brain activity patterns has been considered. Such a scientific context nat…

Arithmetic Reasoning

POLAR: A Polynomial Arithmetic Framework for Verifying Neural-Network Controlled Systems

2021-06-25 · Chao Huang, Jiameng Fan, Zhilu Wang, YiXuan Wang 외

We present POLAR, a polynomial arithmetic-based framework for efficient bounded-time reachability analysis of neural-network controlled systems (NNCSs). Existing approaches that leverage the standard Taylor Model (TM) ar…

OccamLLM: Fast and Exact Language Model Arithmetic in a Single Step

2024-06-04 · Owen Dugan, Donato Manuel Jimenez Beneto, Charlotte Loh, Zhuo Chen 외

Despite significant advancements in text generation and reasoning, Large Language Models (LLMs) still face challenges in accurately performing complex arithmetic operations. Language model systems often enable LLMs to ge…

Language ModelingLanguage ModellingMathematical Problem-SolvingText Generation

Quasi-random Multi-Sample Inference for Large Language Models

2024-11-09 · Aditya Parashar, Aditya Vikram Singh, Avinash Amballa, Jinlin Lai 외

Large language models (LLMs) are often equipped with multi-sample decoding strategies. An LLM implicitly defines an arithmetic code book, facilitating efficient and embarrassingly parallelizable \textbf{arithmetic sampli…

DiversityGSM8KMachine TranslationText Generation+1

How Is LLM Reasoning Distracted by Irrelevant Context? An Analysis Using a Controlled Benchmark

2025-05-24 · Minglai Yang, Ethan Huang, Liang Zhang, Mihai Surdeanu 외

We introduce Grade School Math with Distracting Context (GSM-DC), a synthetic benchmark to evaluate Large Language Models' (LLMs) reasoning robustness against systematically controlled irrelevant context (IC). GSM-DC con…

Math