2026-11-26 15:48 UTC

A llama.cpp fork claims live patching of Qwen’s PLE table for swappable knowledge

state: corroboratedheat: mediumuncertainty: highrelevance: mediumagent-memory local-inference model-adaptationortegaalfredollama.cppQwen

What is this?

Qwen’s Per-Layer Embedding (PLE) n-gram table is a large learned lookup structure that contributes vectors to the model during inference; it is not a general-purpose database. Developer ortegaalfredo says a llama.cpp fork and a separate injector can patch selected table rows while the model is running, without reloading its weights. The supplied GitHub search result describes replacement-row patch files and no restart, but the evidence here is project-authored and community-reported, not an independent validation of reliable knowledge recall or safe, general adaptation.

Why it matters

A promising local-inference experiment: patching Qwen’s learned PLE table at runtime could offer a fast way to add or swap model-specific information without reloading weights. But this is an early, author-reported capability—not yet evidence of dependable persistent memory or a practical alternative to RAG or fine-tuning. Reliability, generalization, and the cost of keeping the large table in memory remain open questions.

Current assessment

The original claim comes from llama.cpp modifier ortegaalfredo: a custom fork and injector patch selected rows of Qwen’s PLE n-gram table in memory, allowing changes without reloading model weights or restarting the runtime. The supplied GitHub README search result corroborates the project’s stated mechanism: it creates a small patch file of replacement rows for the PLE table. Both sources are project-authored; the evidence supplied does not include independent replication or systematic recall and regression benchmarks. The author warns that output is hard to control reliably, says the PLE must be memory-mapped, and reports testing only with Q8 quantization and substantial memory requirements. PLE is a learned, token-pattern-addressed embedding component, not a conventional knowledge database; altering it may affect unrelated outputs, and exact-pattern retrieval may limit generalization. Other supplied community experiments report recall and output-quality tradeoffs, while a separate Qwen PLE-transfer experiment reports a 5.05% validation-perplexity reduction on a small model but faces a substantive challenge over whether the benefit comes from PLE transfer or its trained reader. These are adjacent, not direct validation of hot-swappable knowledge injection. Practical implication: worth tracking for local-model builders seeking an alternative memory mechanism, but not yet a recommendation to replace RAG or fine-tuning. Key tests are reproducible recall across varied prompts, interference/regressions, memory and latency costs, and persistence and update behavior under real workloads.

Measured heat

now 0 pts/hpeak 0 pts/hcomments 0/hpeers p10momentum: steady2 platformsage 2020h
points/hour across evidence · reading as of 2026-11-27 02:23:58.509736+11:00 · deterministic, not a model opinion

How the heat travelled

09-03 11:40⭐ origin directly observedQwen-3.8-Next-Flash Ngram Hot-Swappable Knowledge Injector for llama.cpp
ortegaalfredo on r/LocalLLaMA
—
09-11 23:45first on r/LocalLLaMA · published · +204.1hLearning/RSI through ngrams?
RapidRaid
—
09-21 20:49first on hacker news · published · +441.2hPer-Layer Embeddings (PLE)
Bluestein
—
09-03 11:40amplified on r/LocalLLaMAreddit.post.1w64y26
ortegaalfredo
peak 241 · 61 comments · 24% of case engagement
09-11 23:45amplified on r/LocalLLaMAreddit.post.1wdwmwh
RapidRaid
peak 15 · 11 comments · 2% of case engagement
09-13 21:29amplified on r/LocalLLaMAreddit.post.1wfkb2t
OuterKey
peak 55 · 21 comments · 6% of case engagement
09-19 12:48amplified on r/LocalLLaMAreddit.post.1wkldv3
Mrinohk
peak 1 · 5 comments · 0% of case engagement
09-21 20:49amplified on hacker newshn.story.49793198
Bluestein
peak 2 · 0 comments · 0% of case engagement
09-25 12:46amplified on r/LocalLLaMA 👑reddit.post.1wpvep4
Nicolodeva
peak 377 · 100 comments · 38% of case engagement
1 more amplifiers in ainews.case_chain
09-03 12:20our radar first saw it · +0.7hdiscovery anchor: reddit.post.1w64y26—

Evidence (7) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟠 reddit ⭐Qwen-3.8-Next-Flash Ngram Hot-Swappable Knowledge Injector for llama.cpp
LocalLLaMA
ortegaalfredo24160
🟠 redditLearning/RSI through ngrams?
LocalLLaMA
RapidRaid1511
🟠 redditAre there any experimental small models (9B or less) which are out or currently being trained using engram/n-grams?
LocalLLaMA
OuterKey5221
🟠 redditRe-writable n-grams?
LocalLLaMA
Mrinohk15
🟧 hnPer-Layer Embeddings (PLE)Bluestein20
🟠 redditQwengram-0.8B: I transferred Qwen3.8 Flash-Next’s n-gram memory into Qwen3.5-0.8B — 5.05% lower validation perplexity
LocalLLaMA
Nicolodeva370100
🟠 redditWhy not run Qwen 3.8 Flash Next with the full n-gram-table?
LocalLLaMA
sillynoobhorse229124

Interpretation history

Decision trace