Qwen-3.8-Next-Flash Ngram Hot-Swappable Knowledge Injector for llama.cpp
Mirrored from r/LocalLLaMA for archival readability. Support the source by reading on the original site.
| Looking into the new Qwen architecture, I was curious if you could modify the Ngram PLE Table to make it work like a long-term knowledge database. It turns out that, with some limitations, you can. I coded a small modification to llama.cpp to modify the table in-memory, allowing you to patch it with new data in real time. The PLE table is updated on every prompt, so now you can hot-swap parts of it without reloading the model. The limitation is that it’s hard to control the output reliably, as the embeddings are injected early in the layers. However, with some techniques, you can influence the model’s output with simple modifications, as the example shows. I created two repos:
There are some limitations in the project, as the PLE table needs to be memory-mapped into memory (this is the default in llama.cpp), and I have only tested it with q8 quantization, so you need quite a bit of memory to test this. Can this be used as a new way of low-cost training? Perhaps. Its not easy at the current state but with simple modifications, I think you could easily create models with long-term instantaneously hot-swappable memory. [link] [comments] |
More from r/LocalLLaMA
-
GGUFs in transformers natively!
Sep 23
-
Pirate Face - pirate bay for LLMs
Sep 23
-
DeepSeek and Moonshot AI face Beijing's probe over potential data leaks to Anthropic
Sep 23
-
Nathan Lambert's written Congressional testimony on the state of open models - Chinese open-weight downloads now 2x America's, >80% of OpenRouter open-model usage
Sep 23
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.