- Source
- arXiv
- Published
- Runtime
- 0:00
- Snippets
- 4
A conversation between
DuoMem: Towards Capable On-Device Memory Agents via Dual-Space Distillation
§02
Snippets
-
DuoMem distills procedural reasoning from large teachers into compact 4B models by combining context-space distillation (teacher memories prepended to input) and parameter-space distillation (LoRA fine-tuning on successful trajectories).
A 4B model reaches 77.9% task success—nearly closing the gap to an 87.1% teacher—while running 3x faster and needing only 10M trainable parameters, enabling real-time edge deployment.
-
Dual-space distillation works by combining high-quality teacher-generated procedural memories (context space) with lightweight parameter updates (LoRA adapters), making both axes complementary rather than redundant.
The two distillation approaches target different aspects of reasoning—retrieval versus decision-making—so they improve performance together rather than one overshadowing the other.
-
Pre-computed teacher memories can be stored as a few megabytes of data and prepended to student inputs, offloading memory retrieval from the student's limited context window.
Separating memory retrieval from reasoning lets the student focus its limited capacity on planning, similar to how humans use external notes to offload working memory.
-
Ablations across eight models (2B–72B parameters) confirm that both context-space and parameter-space distillation contribute complementary gains, scaling consistently even with large teacher–student disparities.
The framework's robustness across scales suggests the dual-space approach is a general principle for compressing agent reasoning, not a one-off trick for specific model pairs.
§03
Synthesis
The Core Problem and Solution
Large language model agents can tackle complex tasks by reasoning over multiple steps, but they need huge models, massive context windows, and repeated inference calls—making them impractical for phones or edge devices. The authors show that you can shrink these agents dramatically without losing capability by borrowing knowledge from a larger teacher model in two parallel ways.
DuoMem transfers problem-solving ability from a 72B-parameter teacher to a 4B student, boosting the student from 4.3% to 77.9% task success on ALFWorld (a benchmark where agents navigate virtual environments and manipulate objects). The student then runs 3× faster than the teacher while staying nearly as capable, opening the door to real-time deployment on resource-constrained hardware.
How Dual-Space Distillation Works
The framework operates on two fronts simultaneously.
Context-space distillation is the more direct transfer: instead of having the student generate its own reasoning chain from scratch, the teacher solves the task first and records its step-by-step memory or reasoning trace. The student then uses that pre-computed teacher trajectory as context prepended to its input, effectively learning to follow and extend better reasoning paths. This sidesteps a core bottleneck—the student doesn't waste inference on bad reasoning steps.
Parameter-space distillation fine-tunes lightweight LoRA adapters (low-rank modifications that add only a few million parameters) on successful teacher trajectories. LoRA is a parameter-efficient technique: instead of updating a model's weights wholesale, it learns small weight adjustments that can be added or removed without retraining. The student learns to mimic the teacher's decision-making by example.
Critically, both axes are complementary. The context-space approach gives the student immediate access to good reasoning; the parameter-space approach lets the student internalize and generalize that knowledge. Together they close most of the performance gap between a tiny model acting alone and a massive one.
Why This Matters
The results are striking in practical terms. On ALFWorld, the 4B student reaches 77.9% success versus the teacher's 87.1%—a performance cliff that would otherwise require deploying the 72B model. But the student uses fewer than 10M trainable parameters (just LoRA weights) and a few megabytes of cached teacher memories. Those are constraints that fit on an edge device. The 3× wall-clock speedup matters for real-time systems where latency is a constraint.
The authors validate their approach across eight models from 2B to 72B parameters and show both distillation axes contribute meaningfully. This suggests the framework is robust and not an artifact of one specific model size.
The practical implication is clear: you don't need to deploy the giant model to get near-giant performance. For a class of procedural reasoning tasks (navigation, manipulation, planning), you can offload the heavy thinking once—the teacher solves it and saves its reasoning—then let lightweight students on devices learn from those solutions. This splits deployment cost between a one-time teacher inference phase and many lightweight student inferences, which is economically and environmentally viable for edge AI.
Mine your own.
Lode is a workbench, not a feed. Paste a YouTube URL. The model proposes a transcript, a set of quote-grounded snippets, a synthesis essay, and the fan-out. You decide what stays.