Improving Next Tokens via Second-to-Last Predictions with Generate and Refine

Johannes Schneider
11/23/2024
cs.CLcs.LG

No official code found. Best implementation: JohnTailor/AutoEncGenerateThenRefine (2 stars, last commit 2025-02-13).

Abstract

Autoregressive language models like GPT aim to predict next tokens, while autoencoding models such as BERT are trained on tasks such as predicting masked tokens. We train a decoder-only architecture for predicting the second to last token for a sequence of tokens. Our approach yields higher computational training efficiency than BERT-style models by employing a structured deterministic approach to masking tokens. We use our model to improve the next token predictions of a standard GPT by combining both predictions in a ``generate-then-refine'' approach. We demonstrate on different variants of GPT-2 and different datasets that (not unexpectedly) second to last token predictions are much more accurate, i.e., more than 15\% higher accuracy than standard next token predictions. The ``generate-then-refine'' approach also demonstrates notable improvements in next-token predictions, yielding smaller yet consistent and significant gains.

View on arXivView PDF

Code Implementations(1)

Repo for paper "Improving Next Tokens via Second-to-Last Predictions with Generate and Refine"

20PythonFeb 13, 20251 years ago

Similar Papers

Cite this paper

@article{schneider2024improving,
  title  = {Improving Next Tokens via Second-to-Last Predictions with Generate and Refine},
  author = {Johannes Schneider},
  year   = {2024},
  eprint = {2411.15661},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.15661v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2411.15661.svg)](https://codeofpaper.com/paper/2411.15661)

Discussion