Inside the LLM Word Factory

Benzi Busigin, Yuval Pinter


Abstract
Transformer language models process input provided as subword fragments, but natural language semantics usually rely on word-level concepts. Detokenization is the process where models reconcile these two facts, aggregating subwords into word-level representations through their computation. Prior work has found that this takes place mostly in early-to-middle layers, but so far the exact mechanics of the process have not been pinned down. We venture deep into detokenization using activation patching in controlled paired experiments that isolate the contribution of different model components, localizing English detokenization in Llama2-7B to a two-stage process at Layer 1. Attention transmits a token-specific signal from nonfinal subwords, using sequential relays if necessary, while the MLP composes it with the local embedding. This two-stage structure generalizes to twelve models from eight families, but the depth over which it takes place depends on the flavor of positional encoding: RoPE-based models detokenize over 1 to 5 layers, while learned-absolute models take 5 to 10. Finally, we provide a probe for determining the success of the detokenization process based on early-layer activations alone, performing at 0.94-0.97 AUROC depending on the amount of context.
Anthology ID:
2026.findings-emnlp.1654
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2026
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
Findings
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
35230–35249
Language:
URL:
https://aclanthology.org/2026.findings-emnlp.1654/
DOI:
10.18653/2026.findings-emnlp.1654
Bibkey:
Cite (ACL):
Benzi Busigin and Yuval Pinter. 2026. Inside the LLM Word Factory. In Findings of the Association for Computational Linguistics: EMNLP 2026, pages 35230–35249, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Inside the LLM Word Factory (Busigin & Pinter, Findings 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.findings-emnlp.1654.pdf