Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
[![Paper](https://img.shields.io/badge/arXiv-2506.01254-b31b1b.svg)](https://arxiv.org/abs/2506.01254)
[![Release](https://img.shields.io/github/v/release/initial-d/ngram-store?label=release)](https://github.com/initial-d/ngram-store/releases/latest)

**从早期 n-gram embedding,到大模型中的 learned n-gram 参数化记忆。**

FastText uses learned subword vectors to build word representations;
Engram-style LLM memory retrieves learned token-n-gram features and fuses them
with hidden states. The application changes, while the need to index, store and
query trained vectors continues. NGramStore follows this thread through a
shared backend. Learned n-gram tables are one form of parametric memory.

Formerly **me_fasttext**. The engine grew from
[Memory-Efficient FastText: A Comprehensive Approach Using Double-Array Trie Structures and Mark-Compact Memory Management](https://arxiv.org/abs/2506.01254).
The paper keeps its original title; later Engram integrations are software extensions.
Expand Down
6 changes: 6 additions & 0 deletions docs/artifact_card.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
Formerly me_fasttext; the original Memory-Efficient FastText paper is the method
origin, while native row storage and LLM integrations are later software work.

The historical thread runs from n-gram embeddings for word representations to
learned n-gram memory modules in LLMs. FastText and Engram illustrate these
application generations: both query trained vector tables, with different keys,
addressing and model computation. This table-based form of parametric memory is
the scope of the shared engine.

| Layer / component | What it provides | Boundary |
| --- | --- | --- |
| 1. Shared native C engine | Lossless compressed blocks, original-ID forwarding, mmap and gather | Frozen single-worker handles; caches do not bound RSS |
Expand Down
19 changes: 19 additions & 0 deletions docs/ngram_memory_research_plan.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# NGramStore engine roadmap and research plan

## Historical background: n-gram embeddings to LLM memory

Early learned n-gram embeddings represent local patterns as trainable vectors.
FastText's subword vectors contribute to word representations. Newer Engram-style
LLM architectures retrieve learned token-n-gram features from tables and fuse
them with hidden states. This gives the same addressable-vector abstraction a
role as an explicit learned memory module alongside the LLM backbone.

Here, n-gram parametric memory means learned lookup-table weights. This is one
branch of model memory, with a common storage/query problem across application
generations. The continuity is the table abstraction; character versus token
keys, hash versus exact addressing, training and context fusion remain distinct.

NGramStore's historical development follows that abstraction: the original
me_fasttext method optimizes n-gram indexing and memory management for word
embeddings; the shared engine extends storage and queries to frozen learned
tables used by LLM memory modules. The later software evidence keeps its own
scope and does not rewrite the original paper's experiments.

## Product contract and history

NGramStore is a general-purpose backend for **learned n-gram embeddings**:
Expand Down
Loading