Peyman Hosseini, Ondrej Bohdal, Ahmed Alajrami, Andrea Maracani, Ignacio Castro, Matthew Purver, Mete Ozay, Savas Ozkan, Taha Ceritli
4 min
Abstract
Large Language Model (LLM)-based agents can solve complex procedural tasks by interacting with environments over multiple turns, but this ability typically depends on large models, long contexts, and repeated inference calls. This makes advanced memory-augmented agents difficult to deploy on resource-constrained devices. We introduce DuoMem, a dual-space distillation framework that transfers procedural problem-solving ability from a large teacher model to compact student models. DuoMem distils in two complementary spaces: (1)context-space distillation, which replaces student-generated memories with higher-quality teacher-generated procedural memories prepended to the student's input, and (2)parameter-space distillation, which fine-tunes lightweight LoRA adapters on successful teacher trajectories. Evaluated on ALFWorld, a challenging embodied decision-making benchmark, DuoMem boosts a 4B-parameter model from 4.3% to 77.9% task success rate, closing most of the gap to a 72B teacher model (87.1%), while adding fewer than 10M trainable parameters and only a few megabytes of pre-computed teacher memories. Moreover, the DuoMem-enhanced 4B model completes tasks over 3x faster than the 72B teacher in wall-clock time, making it viable for real-time edge deployment, which would be challenging for the teacher.Extensive ablations across eight models spanning 2B-72B parameters reveal that both distillation axes contribute complementary
Sam: So it's like teaching the student a specific skill—say, how to hold a pen—without having to rewrite everything they've ever learned?
Alex: That's a good way to put it. The model's existing knowledge stays intact. You're just adding a thin layer of new expertise on top, trained specifically on the teacher's successful moves. That's the parameter-space side of distillation.
Sam: So the context-space tells the model what to do in the moment, and the parameter-space changes how the model thinks at a deeper level?
Alex: Exactly. The researchers found these two methods are genuinely complementary—neither one alone is sufficient. The context-space provides the "what," and the parameter-space builds the "how" into the model's behavior over time.
Sam: And does it actually work? What did the tests show?
Alex: The results are notable. They tested DuoMem in a simulated environment called ALFWorld, which involves household tasks—things like finding a specific object and placing it somewhere. A small model closed roughly 89 percent of the performance gap between itself and its much larger teacher. And it ran about three times faster.
Sam: That speed matters, doesn't it? A model that's nearly as capable but runs on a regular device—that's a very different proposition from one that needs a data center.
Alex: It is. The study suggests this combination of distilled knowledge and targeted training is more practical for real-world deployment than simply scaling up model size. A smart home assistant, for instance, needs to respond quickly on local hardware—not wait for a remote server.
Sam: Though I imagine there are limits. Can a model trained this way handle tasks it's never seen before?
Alex: That's a fair concern, and the researchers acknowledge it. The approach requires pre-defined tasks to collect those expert trajectories in the first place. So it isn't yet fully adaptable to brand-new environments without going through the training process again. It's a meaningful step forward on efficiency, but adaptability remains an open question.
Sam: So the small model stops guessing and starts acting with a plan—but only within the territory it's been trained on.
Alex: That's a fair summary. By addressing both what the model sees and how it processes that information, DuoMem makes a meaningful case that capable AI doesn't have to mean large AI. The work ahead is making that capability more flexible. Thanks for listening to ResearchPod.