Sequence Repetition Enhances Token Embeddings and Improves Sequence Labeling with Decoder-only Language Models

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Kukić, Matija Luka, Čuljak, Marko, Dukić, David, Tutek, Martin, Šnajder, Jan
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866911396864720896
author Kukić, Matija Luka
Čuljak, Marko
Dukić, David
Tutek, Martin
Šnajder, Jan
author_facet Kukić, Matija Luka
Čuljak, Marko
Dukić, David
Tutek, Martin
Šnajder, Jan
contents Modern language models (LMs) are trained in an autoregressive manner, conditioned only on the prefix. In contrast, sequence labeling (SL) tasks assign labels to each individual input token, naturally benefiting from bidirectional context. This discrepancy has historically led SL to rely on inherently bidirectional encoder-only models. However, the rapid development of decoder-only models has raised the question of whether they can be adapted to SL. While causal mask removal has emerged as a viable technique for adapting decoder-only models to leverage the full context for SL, it requires considerable changes to the base model functionality. In this work, we explore sequence repetition (SR) as a less invasive alternative for enabling bidirectionality in decoder-only models. Through fine-tuning experiments, we show that SR inherently makes decoders bidirectional, improving the quality of token-level embeddings and surpassing encoders and unmasked decoders. Contrary to earlier claims, we find that increasing the number of repetitions does not degrade SL performance. Finally, we demonstrate that embeddings from intermediate layers are highly effective for SR, comparable to those from final layers, while being significantly more efficient to compute. Our findings underscore that SR alleviates the structural limitations of decoders, enabling more efficient and adaptable LMs and broadening their applicability to other token-level tasks.
format Preprint
id arxiv_https___arxiv_org_abs_2601_17585
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Sequence Repetition Enhances Token Embeddings and Improves Sequence Labeling with Decoder-only Language Models
Kukić, Matija Luka
Čuljak, Marko
Dukić, David
Tutek, Martin
Šnajder, Jan
Computation and Language
Modern language models (LMs) are trained in an autoregressive manner, conditioned only on the prefix. In contrast, sequence labeling (SL) tasks assign labels to each individual input token, naturally benefiting from bidirectional context. This discrepancy has historically led SL to rely on inherently bidirectional encoder-only models. However, the rapid development of decoder-only models has raised the question of whether they can be adapted to SL. While causal mask removal has emerged as a viable technique for adapting decoder-only models to leverage the full context for SL, it requires considerable changes to the base model functionality. In this work, we explore sequence repetition (SR) as a less invasive alternative for enabling bidirectionality in decoder-only models. Through fine-tuning experiments, we show that SR inherently makes decoders bidirectional, improving the quality of token-level embeddings and surpassing encoders and unmasked decoders. Contrary to earlier claims, we find that increasing the number of repetitions does not degrade SL performance. Finally, we demonstrate that embeddings from intermediate layers are highly effective for SR, comparable to those from final layers, while being significantly more efficient to compute. Our findings underscore that SR alleviates the structural limitations of decoders, enabling more efficient and adaptable LMs and broadening their applicability to other token-level tasks.
title Sequence Repetition Enhances Token Embeddings and Improves Sequence Labeling with Decoder-only Language Models
topic Computation and Language
url https://arxiv.org/abs/2601.17585