arXiv Machine Learning

Tensorizing Engram: Sharing Latents Across N-Gram Embeddings is Beneficial in LLMs

arXiv:2606. 08347v1 Announce Type: cross Abstract: Modern language models represent text using discrete token-level embeddings, which forces recurring multi-token patterns to be learned implicitly across Transformer layers.

arXiv Machine Learning
Aug 31

Accelerating LLM Inference via Vector Index Based Output Embeddings

The paper proposes replacing dense output projection in large language models with an HNSW-based vector index to perform maximum inner product search over token embeddings. This approach reduces memory bandwidth usage by retrieving only a small set of high-scoring tokens and can be integrated into existing decoding pipelines via sparse logits scattering. Experiments on Gemma 3, Llama 3.2, and Qwen 3 show up to 82% speed‑up in batch‑size‑one decoding while maintaining generation quality.

By Martin Loretz, Sepp Hochreiter
arXiv Machine Learning
Oct 15

The COUNT: Counting N-grams Unlocks Scaling on Host Memory and Training-Free Adaptation

The paper introduces COUNT, a method that builds n‑gram embeddings without adding learned parameters by storing precomputed n‑gram counts on host memory. By weighting the language model’s own unembeddings with corpus frequencies, COUNT can be added as an extra input embedding during pretraining, improving validation loss equivalent to a 57% increase in compute for a 1B‑parameter model. Additionally, COUNT enables efficient GPU memory usage and allows domain‑specific n‑gram tables to be swapped in at inference time for training‑free adaptation.

By Ian Magnusson, Noah A. Smith, Pang Wei Koh
arXiv Computation and Language
Sep 4

Lngram v2: Latent N-Gram Memory with Interpretable Discrete Representations

Lngram v2 introduces a latent N‑gram memory system that decouples memory routes, memory dimension, and backbone width, enabling scalable memory capacity for transformers. It employs context‑aware grouped‑query attention, a zero‑value sink, and counterfactual surrogate gradients to improve readout selectivity and routing trainability while preserving hard discrete addressing. Experiments on vision‑language models up to 30B parameters show consistent performance gains, reduced memory parameters, and stable semantic structure in the discrete IDs.

By Yunao Zheng, Bin Wen, Xiaojie Wang
arXiv Computation and Language
4d ago

Chorus: Shared N-gram Embeddings with Layer-wise Adaptation

Chorus introduces a shared n‑gram embedding table that serves all layers of a language model, with each layer applying its own projection and rescaling based on its hidden state. This design achieves comparable or superior performance to existing n‑gram methods while using 87% fewer table parameters—e.g., 1.2 B parameters outperforming FactorEngram and DeepSeek’s Engram with 9.6 B. Additionally, Chorus works well with the memory‑efficient Ember optimizer, cutting table‑optimizer memory by 99.2% without harming training speed.

By Stephen Chung, Wenyu Du
arXiv AI
Sep 10

Compressing Sequences in the Latent Embedding Space: $K$-Token Merging for Large Language Models

The paper introduces K-Token Merging, a latent-space compression method that merges each contiguous block of K token embeddings into a single embedding using a lightweight encoder. The compressed sequence is then processed by a LoRA-adapted large language model, while generation continues in the original vocabulary. Experiments on tasks such as structural reasoning, sentiment classification, and code editing demonstrate that K-Token Merging achieves up to 75% input length reduction with minimal performance loss, placing it on the Pareto frontier of performance versus compression.

By Zihao Xu, John Harvill, Ziwei Fan, Yizhou Sun, Hao Ding, Hao Wang
arXiv Computation and Language
Oct 23

Low-Bit N-Gram Embeddings for Language Models

The paper investigates reducing memory usage of n‑gram embedding tables in open‑weight language models by storing them in low precision. Experiments on nanochat, Llama, and GPT‑2 families show that four‑bit tables cut table memory by about 75% while retaining over 99% of the validation‑loss improvement. The study also demonstrates that re‑allocating the saved memory to larger tables can surpass the performance of full‑precision tables, and that similar savings are achievable in large models like DeepSeek‑V4.1‑Flash and Qwen3.8‑Flash‑Next with minimal impact on perplexity and downstream tasks.

By Stephen Chung, Wenyu Du