deepseek-ai/engram

Conditional Memory via Scalable Lookup: A New Axis of Sparsity for Large Language Models

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 3 minutes ago
Added to GitGenius on September 14th, 2026
Created on January 12th, 2026
Open Issues & Pull Requests: 22 (+0)
GitHub issues: Enabled
Number of forks: 359
Total Stargazers: 4,671 (+0)
Total Subscribers: 42 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 5.0 days
Mean response time: 14.6 days
90th percentile: 43.7 days
Tracked items: 11

Most active contributors

Sign in to see contributor activity.

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 5% of issues opened in the past year have been closed.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 16
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 194 days
Stale 30+ days: 15
Stale 90+ days: 9

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

Engram is a neural architecture module that introduces conditional memory via scalable lookup as a sparsity mechanism for large language language models.

The project addresses the limitation that Transformers lack a native primitive for knowledge lookup, unlike Mixture-of-Experts which enables conditional computation. Engram modernizes classic n-gram embeddings to achieve constant-time lookup, allowing models to retrieve static n-gram memory and fuse it with dynamic hidden states. The module uses deterministic addressing to enable offloading of massive embedding tables to host memory with minimal inference overhead during inference.

Engram suits researchers and practitioners building large language models who want to explore sparsity beyond mixture-of-experts approaches. The tool is particularly relevant for those investigating how to allocate capacity between neural computation and static memory, as the project identifies a U-shaped scaling law that guides optimal allocation between these two axes. The implementation demonstrates that under equivalent parameter and compute budgets, models augmented with Engram show consistent improvements across knowledge, reasoning, code, and math domains compared to mixture-of-experts baselines.

The project provides the official implementation accompanying a research paper, with architecture diagrams and evaluation results on large-scale pretraining experiments. The codebase is written in Python and made available under an open-source license, enabling direct reproduction of the reported scaling laws and empirical comparisons.