pith:FQXNA77O
NGM: A Plug-and-Play Training-Free Memory Module for LLMs
Averaging pretrained token embeddings creates n-gram representations that a cosine-gated injector adds to LLMs without training or extra parameters.
arxiv:2605.16893 v1 · 2026-05-16 · cs.AI
Add to your LaTeX paper
\usepackage{pith}
\pithnumber{FQXNA77ORWYDEG4KRNLSNDLPM7}
Prints a linked badge after your title and injects PDF metadata. Compiles on arXiv. Learn more · Embed verified badge
Record completeness
Claims
NGM improves average performance by 0.5 to 1.2 points, with particularly clear gains on code generation and knowledge-intensive tasks (e.g., +3.0 on LiveCodeBench and +3.03 on GPQA for Qwen3-14B).
That directly averaging pretrained token embeddings produces useful n-gram representations that the cosine-gated injector can meaningfully modulate without introducing noise or requiring any learned parameters or additional training.
NGM is a plug-and-play n-gram memory module that encodes n-grams from pretrained embeddings and gates their injection to improve LLM performance by 0.5-1.2 points on average across eight benchmarks.
References
Formal links
Receipt and verification
| First computed | 2026-05-20T00:03:28.715557Z |
|---|---|
| Builder | pith-number-builder-2026-05-17-v1 |
| Signature | Pith Ed25519
(pith-v1-2026-05) · public key |
| Schema | pith-number/v1.0 |
Canonical hash
2c2ed07fee8db0321b8a8b57268d6f67eb7357c81972eaca89e7737a1790fdf9
Aliases
· · · · ·Agent API
Verify this Pith Number yourself
curl -sH 'Accept: application/ld+json' https://pith.science/pith/FQXNA77ORWYDEG4KRNLSNDLPM7 \
| jq -c '.canonical_record' \
| python3 -c "import sys,json,hashlib; b=json.dumps(json.loads(sys.stdin.read()), sort_keys=True, separators=(',',':'), ensure_ascii=False).encode(); print(hashlib.sha256(b).hexdigest())"
# expect: 2c2ed07fee8db0321b8a8b57268d6f67eb7357c81972eaca89e7737a1790fdf9
Canonical record JSON
{
"metadata": {
"abstract_canon_sha256": "4e867976f7f559626b33bccc4a190943e4772af7e96f6da5a2c6426838d31d67",
"cross_cats_sorted": [],
"license": "http://arxiv.org/licenses/nonexclusive-distrib/1.0/",
"primary_cat": "cs.AI",
"submitted_at": "2026-05-16T09:12:52Z",
"title_canon_sha256": "fa3dfc81e90801d2508f65fa03902b664d983b73726720d46dd5570ad6ea5c86"
},
"schema_version": "1.0",
"source": {
"id": "2605.16893",
"kind": "arxiv",
"version": 1
}
}