Discover and explore top open-source AI tools and projects—updated daily.
deepseek-aiScalable conditional memory for large language models
New!
Top 14.5% on SourcePulse
This repository provides the official implementation for Engram, a novel conditional memory module designed to enhance Large Language Models (LLMs) by introducing a new axis of sparsity. It addresses the inherent lack of native knowledge lookup primitives in Transformers, complementing existing Mixture-of-Experts (MoE) approaches. Engram offers a scalable lookup mechanism, enabling improved model capacity and performance under strict parameter and FLOP constraints, particularly benefiting knowledge-intensive tasks and complex reasoning.
How It Works
Engram augments Transformer backbones by retrieving static N-gram memory and fusing it with dynamic hidden states. It modernizes classic N-gram embeddings for efficient O(1) lookup. This approach is advantageous as it formulates a trade-off between neural computation (MoE) and static memory, guided by a U-shaped scaling law for optimal capacity allocation. Deterministic addressing allows massive embedding tables to be offloaded to host memory with minimal inference overhead, enhancing system efficiency.
Quick Start & Requirements
pip install torch numpy transformers sympyengram_demo_v1.py is provided to illustrate the core logic, mocking standard components.Highlighted Details
Maintenance & Community
service@deepseek.com.Licensing & Compatibility
Limitations & Caveats
1 week ago
Inactive
facebookresearch
mlc-ai
bigcode-project