Lngram v2 adds n-gram memory routing to multimodal Transformers
The arXiv paper describes exact n-gram addresses built from hidden-state binary codes, with median-based calibration and surrogate gradients, tested in continued training and mid-training runs.
In plain words
The authors propose attaching a lookup memory to Transformers so the model can retrieve learned associations directly instead of computing everything through its usual layers. Their system converts internal model states into binary codes that act as addresses, and a router learns which memory entries to fetch. The paper reports gains in multimodal benchmarks and modest training overhead.
What was announced
Lngram v2, described in an arXiv paper by its authors, builds exact n-gram addresses from binary codes derived from hidden states, giving the model a single lookup mechanism that works across modalities. To make better use of that memory, the team introduces median-based bit calibration that needs no auxiliary losses, and uses counterfactual surrogate gradients so the routing component can learn from how alternative retrievals differ. The authors report that fixed-logit ablations show their balancing bias reduces bit imbalance and raises per-route code entropy.
In a controlled continued-training experiment on Keye30B, the authors say the method improves average vision-language performance, and they also integrated it into KeyeOmni, a large-scale multimodal mixture-of-experts model, during mid-training. They state that optimized implementations add only modest runtime overhead in Megatron training and SGLang cached decoding, and that analysis of held-out English and Chinese text suggests the learned codes carry semantic information beyond lexical and contextual cues. The evidence comes from the paper's abstract alone, so the reported gains rest on the authors' own account rather than independent verification.
What it does not show
- The source is the paper's abstract only; full experimental details, baselines and magnitudes of the reported improvements are not available in the supplied passages.
- Performance claims and the semantic analysis are the authors' own reports and have not been independently confirmed.
For security and IT teams
- Status
- The paper is an arXiv preprint listed with announce type 'replace', indicating a revised version rather than a first release.
Sources
Source-support review completed 4 Dec 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.
Coverage: arXiv: abstract.
Updates and corrections
No corrections so far.
First published 4 Dec 2026
New to the subject? AI from the Ground Up starts from the beginning.