paper-with-me

홈 › Papers

Mirostat: A Neural Text Decoding Algorithm that Directly Controls Perplexity

2020-07-29 · ICLR 2021 1 · Sourya Basu, Govardana Sachitanandam Ramachandran, Nitish Shirish Keskar, Lav R. Varshney

Neural text decoding is important for generating high-quality texts using language models. To generate high-quality text, popular decoding algorithms like top-k, top-p (nucleus), and temperature-based sampling truncate or distort the unreliable low probability tail of the language model. Though these methods generate high-quality text after parameter tuning, they are ad hoc. Not much is known about the control they provide over the statistics of the output, which is important since recent reports show text quality is highest for a specific range of likelihoods. Here, first we provide a theoretical analysis of perplexity in top-k, top-p, and temperature sampling, finding that cross-entropy behaves approximately linearly as a function of p in top-p sampling whereas it is a nonlinear function of k in top-k sampling, under Zipfian statistics. We use this analysis to design a feedback-based adaptive top-k text decoding algorithm called mirostat that generates text (of any length) with a predetermined value of perplexity, and thereby high-quality text without any tuning. Experiments show that for low values of k and p in top-k and top-p sampling, perplexity drops significantly with generated text length, which is also correlated with excessive repetitions in the text (the boredom trap). On the other hand, for large values of k and p, we find that perplexity increases with generated text length, which is correlated with incoherence in the text (confusion trap). Mirostat avoids both traps: experiments show that cross-entropy has a near-linear relation with repetition in generated text. This relation is almost independent of the sampling method but slightly dependent on the model used. Hence, for a given language model, control over perplexity also gives control over repetitions. Experiments with human raters for fluency, coherence, and quality further verify our findings.

📄 PDF Abstract BibTeX arXiv:2007.14966

Code (2)

basusourya/mirostat 공식 구현 pytorch
guinmoon/llmfarm

Tasks

Language ModelingLanguage Modelling

Similar Papers 제목 키워드 기반

Language Models Can See: Plugging Visual Controls in Text Generation

2022-05-05 · Yixuan Su, Tian Lan, Yahui Liu, Fangyu Liu 외

Generative language models (LMs) such as GPT-2/3 can be prompted to generate text with remarkable quality. While they are designed for text-prompted generation, it remains an open question how the generation process coul…

Image CaptioningImage-text matchingOpen-Ended Question AnsweringStory Generation+2

Brain-language fusion enables interactive neural readout and in-silico experimentation

2025-09-28 · Victoria Bosch, Daniel Anthes, Adrien Doerig, Sushrut Thorat 외 arxiv

Large language models (LLMs) have revolutionized human-machine interaction, and have been extended by embedding diverse modalities such as images into a shared language space. Yet, neural decoding has remained constraine…

Zero-shot Generalization

Guiding Image Captioning Models Toward More Specific Captions

2023-07-31 · ICCV 2023 1 · Simon Kornblith, Lala Li, ZiRui Wang, Thao Nguyen

Image captioning is conventionally formulated as the task of generating captions for images that match the distribution of reference image-caption pairs. However, reference captions in standard captioning datasets are sh…

Image CaptioningImage Retrieval

ControlSpeech: Towards Simultaneous and Independent Zero-shot Speaker Cloning and Zero-shot Language Style Control

2024-06-03 · Shengpeng Ji, Qian Chen, Wen Wang, Jialong Zuo 외

In this paper, we present ControlSpeech, a text-to-speech (TTS) system capable of fully cloning the speaker's voice and enabling arbitrary control and adjustment of speaking style. Prior zero-shot TTS models only mimic t…

Speech Synthesistext-to-speechText to Speech

Magnetoencephalography (MEG) Based Non-Invasive Chinese Speech Decoding

2025-06-15 · Zhihong Jia, Hongbin Wang, Yuanzhong Shen, Feng Hu 외

As an emerging paradigm of brain-computer interfaces (BCIs), speech BCI has the potential to directly reflect auditory perception and thoughts, offering a promising communication alternative for patients with aphasia. Ch…