# deepseek-ai/Engram

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

Repository: https://github.com/deepseek-ai/Engram
Canonical: https://ross.abutalabs.com/products/deepseek-ai-engram
Language: Python
License: Apache-2.0
License Family: permissive
Last push: 2026-01-14T01:13:02+00:00

## Health v2 (maintenance only)
Score: 43/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 62, release rhythm 35, longevity 16
- inputs: {"age_days": 233, "days_push": 232, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4614, forks 357 (observed 2026-08-28T04:08:54.980213+00:00)

## What it is
Official implementation of Engram, a conditional memory module from DeepSeek that modernizes N-gram embeddings for O(1) lookup as a new sparsity axis for large language models. It complements Mixture-of-Experts by offloading static knowledge into large embedding tables that can be hosted in host memory with minimal inference overhead.

## Use cases
- add conditional memory to an LLM architecture
- train a language model with N-gram lookup memory
- reduce inference cost by offloading embedding tables to host memory
- study sparsity allocation between MoE and static memory
- reproduce the Engram-27B paper experiments
- improve knowledge-heavy LLM benchmarks under iso-FLOPs constraints

## When to choose
- you are researching sparse memory architectures for LLMs
- you want to complement MoE with a static knowledge lookup module
- you need the official reference implementation of the Engram paper

## When to avoid
- you need a production-ready general LLM framework rather than a research module
- you lack GPU infrastructure for large model training
- you want a plug-and-play library with broad model support

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, llm-training, llm-inference, deep-learning
- domain: large-language-models, deep-learning, machine-learning, artificial-intelligence
- platform: python
- tags: n-gram-embeddings, conditional-memory, mixture-of-experts, sparsity, lookup-tables, research, deepseek, gpu, linux

## Member repositories
- deepseek-ai/Engram (main) score 43

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:54.980213+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:19:41.395104+00:00, confidence not recorded.
  - readme: https://github.com/deepseek-ai/Engram (fetched 2026-08-28T04:08:54.980213+00:00, sha ae7dc20343b6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
