Knowledge Offloading: Decomposing LLMs into Sparse Backbones and Memory Modules

Karim Galliamov, Rochelle Choenni, Ivan TitovarXiv 2026

TL;DR

Knowledge Offloading (KOFF) is a new framework that decomposes monolithic Large Language Models (LLMs) into a sparse, general-purpose backbone and swappable, domain-specific memory modules. By jointly learning what to prune and how to recover it, KOFF allows models to reach ~12% global sparsity without losing performance, effectively moving specialized knowledge into external, modular "cartridges."

What Problem Does This Paper Address?

Modern LLMs are "jacks of all trades" that store everything—from basic grammar and logic to niche facts about 18th-century history—within a single, fixed set of parameters. This creates a capacity management problem: general reasoning and highly specialized knowledge must compete for the same "brain space."

Standard model pruning can compress these models, but it often treats all parameters equally, leading to sharp performance drops as specialized knowledge is erased. Conversely, parameter-efficient fine-tuning (like LoRA) adds knowledge but doesn't solve the underlying bloat of the base model. The authors ask: Can we reorganize an LLM so that broadly useful knowledge stays in a shared core, while specialized knowledge is moved to external, swappable modules?

Methods

The authors introduce Knowledge Offloading (KOFF), a co-adapted prune-and-restore system. Starting with a frozen pretrained LLM, they jointly learn two things:

  1. A Structured Pruning Mask: Using "Hard Concrete gates," the system identifies which neurons are redundant or highly specialized and can be removed from the shared backbone.
  2. Memory Modules: To compensate for the pruned capacity, they train domain-specific modules consisting of two complementary parts:
  3. LoRA Adapters: Providing parameter-space memory updates.
  4. Learned KV Caches: Injecting activation-space memory directly into the attention mechanism.
Figure 1: Knowledge offloading (KOFF) decomposes a pretrained LLM into a sparse backbone and separate swappable memory modules.

The training uses distillation, where the original dense model acts as a teacher. A "retention loss" on general data ensures the backbone doesn't lose its core reasoning abilities, while domain-specific batches teach the memory modules how to recover the "offloaded" knowledge. At inference, a lightweight router selects the appropriate memory module for the given input.

Datasets

The researchers evaluated KOFF across two main partitioning strategies:

  • Topic Domains: English Wikipedia partitioned into six categories: Mathematics, Science, Technology, History, Culture, and Geography.
  • Language Domains: Wikisource data across six languages: English, Spanish, French, German, Italian, and Portuguese.
  • Retention Corpora: A mixture of C4 (general text), GSM8K (math reasoning), and ARC-Challenge (science reasoning) to ensure the model maintains broad capabilities.

Key Insights and Ideas

  • Meaningful Specialization: The decomposition isn't random. Analysis showed that KOFF preferentially prunes language-specific neurons while protecting language-general ones in the backbone. This confirms the model is successfully separating "core" logic from "niche" data.
  • Recovery vs. Adaptation: Surprisingly, KOFF often improves performance on reasoning tasks (BigBench-Lite) compared to the original dense model. This suggests the memory modules aren't just repairing pruning damage; they are also providing beneficial domain adaptation.
  • Complementary Memory Types: Ablations revealed that LoRA (parameter-space) and KV caches (activation-space) are complementary. LoRA is more effective overall, but combining both yields the best results.
  • Layer Sensitivity: Memory modules are most effective when attached to the upper layers of the network. This implies that the lower layers handle shared features, while specialization happens later in the computation stack.
Figure 4: Per-layer sparsity for k_proj and v_proj layers of Llama-3.2-3B.

Key Results

  • The 12% Sweet Spot: Across Llama and Qwen models (3B to 8B parameters), KOFF maintains performance near the dense baseline at ~12% global sparsity. Beyond 20%, performance begins to degrade sharply.
  • Pruning vs. Offloading: At 12% sparsity, a model pruned without KOFF's memory modules sees its MMLU score drop from 0.56 to 0.25. With KOFF, it stays at 0.52.
  • Functional Modularity: When swapping memory modules (e.g., using a French module for an English task), performance drops significantly. This proves the modules are truly specialized and not just generic "fix-it" adapters.
Figure 2: Sparsity–quality trade-off for Llama-3.2-3B, with topic domains.

Limitations and Future Work

  • Predefined Domains: Currently, the user must define the domains (e.g., "History" or "French") beforehand. Future work could involve automatically discovering these partitions.
  • Base Models Only: The study focused on pretrained base models. Extending this to instruction-tuned or reasoning-heavy models (like O1-style models) might require more complex retention objectives to preserve safety and tool-use behaviors.
  • Scaling: While tested up to 8B parameters, the authors note that larger models might exhibit different redundancy patterns, potentially allowing for even higher offloading rates.

Summary updated

BibTeX
@misc{galliamov2026knowledge,
  author = {Karim Galliamov and Rochelle Choenni and Ivan Titov},
  title = {{Knowledge Offloading: Decomposing LLMs into Sparse Backbones and Memory Modules}},
  year = {2026},
  eprint = {2605.29075},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.29075},
}
Figure