AIAny
Icon for item

Engram — Conditional Memory via Scalable Lookup

Provides a conditional memory module that performs O(1) N‑gram lookups and fuses static embeddings into transformer hidden states — enables offloading large embedding tables to host memory with minimal inference overhead.

Introduction

Modern transformers lack a native, constant‑time primitive for looking up static textual patterns; Engram provides that missing axis by reintroducing N‑gram memory as a scalable, conditional module. The core insight: by allocating some capacity to deterministic static memory (Engram) rather than purely dynamic computation (MoE), models can better store and retrieve recurring patterns without increasing per‑token compute.

What Sets It Apart
  • Sparsity-as-allocation, not just routing: the project formalizes a trade‑off between neural computation (MoE) and static memory (Engram), reporting a U‑shaped scaling law that guides how to split capacity under iso‑parameter and iso‑FLOPs constraints — so you can target optimal capacity allocation rather than guessing.
  • O(1) deterministic N‑gram lookup: Engram uses hashed/deterministic addressing for N‑gram embeddings, enabling constant‑time retrieval and straightforward offloading of embedding tables to host memory with minimal latency impact — so very large static memories become practical in inference.
  • Empirical iso‑budget gains: their Engram‑27B experiments (paper + repo) claim consistent improvements over MoE baselines across knowledge, reasoning, code and math benchmarks when keeping parameter/FLOP budgets matched — indicating this is not just an engineering trick but a useful capacity reallocation.
  • Mechanistic clarity: analyses suggest Engram reduces early‑layer burden of pattern reconstruction, preserving depth for higher‑level reasoning tasks — useful if you care about where capacity is used, not just how much.
Who It's For and Trade‑offs

Great fit if you are a researcher or engineering team exploring LLM architecture trade‑offs, reproducing the paper, or building systems that can benefit from large static pattern tables (e.g., specialized codebases, long repeated sequences, or domain corpora). Look elsewhere if your primary need is up‑to‑date, frequently changing knowledge (static N‑gram tables are not ideal for live updates), or if your deployment environment cannot tolerate the memory or engineering cost of maintaining large host‑side embedding tables. Also note Engram trades off some adaptability for compact deterministic lookup — beneficial for pattern recall but less so for emergent, context‑sensitive generalization.

Where It Fits

Compared to MoE, Engram is a complementary sparsity axis: MoE dynamically routes computation for conditional capacity, while Engram stores conditional memory for lookup. Compared to retrieval/RAG, Engram is designed as an internal, fixed N‑gram embedding memory with O(1) access rather than an external document retriever — lower latency and simpler integration, but less suited for long, mutable documents.

Practical notes

The repository provides a demonstration implementation (Python/PyTorch) and figures for scaling, long‑context behavior, and case studies. The code is marked as a demo to illustrate data flow; reproducing large‑scale (e.g., 27B) experiments requires significant compute and careful integration with training pipelines. The project references an Apache‑2.0 style license and a model license in the repo; check the LICENSE files for usage constraints.

Information

  • Websitegithub.com
  • AuthorsDeepSeek AI
  • Published date2026/01/12

More Items

A zero-data self-evolution framework that co-trains a Challenger, Solver, and Judge so LLMs can iteratively improve on both verifiable and unverifiable tasks without human labels. Uses role-asymmetry and subtask-amplification preference pairs to train the Judge and sustain improvement.

Trains compact conversational agents to adapt at runtime to changing 'Harness' configurations (Skills, Hooks, prompts, tools) using Harness-Aware Training (HAT): Harness-State Augmentation, on-policy distillation, and RL to preserve generality while meeting low-latency deployment constraints.

Analyzes how to generate useful interaction data for LLM agents and proposes the ACE lens — Accuracy, Complexity, divErsity — while factorizing agentic data as (E, q, τ, v). Surveys verification, difficulty calibration, and coverage strategies and outlines implications for training and benchmarks.