Skip to content

Commit edc7482

Browse files
authored
Merge pull request #78 from initial-d/docs/paper-link
Link the project homepage to the Memory-Efficient FastText paper
2 parents d659a95 + 9e1be6d commit edc7482

3 files changed

Lines changed: 32 additions & 14 deletions

File tree

‎CITATION.cff‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ references:
2424
given-names: Yimin
2525
year: 2025
2626
url: "https://arxiv.org/abs/2506.01254"
27-
notes: "Origin of the exact-identity-then-compact idea (me_fasttext, 2017 prototype)."
27+
notes: "The paper describing the exact-identity-then-compact idea (me_fasttext, 2017 prototype). NGramStore continues it; later results are in the repository's evidence archive."

‎README.md‎

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,16 @@ model ends up owning a large frozen table that has to be indexed, stored and
1313
queried. NGramStore takes care of that table; training, addressing and
1414
aggregation stay in the model.
1515

16-
The project also asks research questions: when is it worth giving every n-gram
17-
its own row instead of hashing into buckets, what redundancy does training leave
18-
in the table, and how should it be served? The experiments are in
19-
[`evidence/`](evidence/README.md).
16+
The project continues the idea of the paper
17+
[Memory-Efficient FastText](https://arxiv.org/abs/2506.01254): give every n-gram
18+
an exact identity, then compact the table after training. The paper describes the
19+
idea; this repository has the rebuilt engine and everything measured since
20+
([from the paper to now](#from-the-paper-to-now)).
21+
22+
The research questions are the paper's, asked again with full experiments: when
23+
is it worth giving every n-gram its own row instead of hashing into buckets, what
24+
redundancy does training leave in the table, and how should it be served? The
25+
experiments are in [`evidence/`](evidence/README.md).
2026

2127
## Components
2228

@@ -117,14 +123,24 @@ facade need Linux x86-64. Tables are read-only at serving time. Runtime details
117123
are in the [C ABI guide](docs/guides/native_ngram_memory.md); what comes next is
118124
in the [roadmap](docs/roadmap.md).
119125

120-
## History
126+
## From the paper to now
127+
128+
NGramStore started as me_fasttext, a 2017 FastText prototype written up in
129+
[arXiv:2506.01254](https://arxiv.org/abs/2506.01254). It gave every subword
130+
n-gram an exact DATrie ID instead of a hash bucket, trained one row per n-gram,
131+
and after training merged similar rows and compacted the table, in the spirit of
132+
a mark-compact collector. Each part has since been tested on its own:
121133

122-
NGramStore started as me_fasttext, a 2017 FastText prototype that gave every
123-
n-gram an exact DATrie ID and compacted rows after training, in the spirit of a
124-
mark-compact collector ([arXiv:2506.01254](https://arxiv.org/abs/2506.01254)).
125-
The engine has since been rebuilt. Old `meft_memory` imports, `meft-*` commands
126-
and file formats still work ([compatibility](docs/guides/legacy_fasttext.md),
127-
[history](docs/history/README.md)).
134+
| Idea in the paper | What the experiments show |
135+
| --- | --- |
136+
| Exact IDs instead of hash buckets | Pays off when the task stores many per-key facts: +0.41–4.05 pp at 20,877 knowledge edits on frozen Qwen, mixed at 1,024 ([result 1](#results)) |
137+
| Prefix/suffix neighbours can share rows | They become similar with training: 1.34% saving after 2k steps, 41.49% after 32k ([result 2](#results)) |
138+
| Compact the table after training | With pooled reads and zero initialization, training itself leaves rows byte-identical; storing each distinct row once, uncompressed, saves 85% and serves near raw speed ([result 3](#results)) |
139+
| Extend to LLM n-gram memory | Engine and adapters work for Engram, TinyEngram and Qwen. The size savings do not carry over to token n-grams ([token-level check](evidence/token_ngram_duplicates_20261115/README.md)) |
140+
141+
The engine itself was rebuilt. Old `meft_memory` imports, `meft-*` commands and
142+
file formats still work ([compatibility](docs/guides/legacy_fasttext.md),
143+
[documents from the paper's period](docs/history/README.md)).
128144

129145
## Citing and contributing
130146

‎docs/history/README.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ idea was written up in
1111
> arXiv:2506.01254.
1212
1313
NGramStore keeps the idea (exact identity first, compaction later) and rebuilt
14-
everything else: the storage format, codecs, query paths and LLM adapters. Its
15-
measurements are in the [evidence archive](../../evidence/README.md).
14+
everything else: the storage format, codecs, query paths and LLM adapters. How
15+
each idea in the paper held up under later experiments is summarized in
16+
[From the paper to now](../../README.md#from-the-paper-to-now); the measurements
17+
are in the [evidence archive](../../evidence/README.md).
1618

1719
The originally released exporter merged rows on a norm-ratio test alone; the
1820
current one also checks cosine similarity and prefix/suffix structure

0 commit comments

Comments
 (0)