Memory-R2 7B — Answer Agent
The trained answer agent (sft_cont_step55) from Memory-R2: Fair Credit Assignment for Long-Horizon Memory-Augmented LLM Agents (arXiv:2605.21768).
It is a Qwen2.5-7B-Instruct model trained with an SFT warm-start followed by an RL continuation (answer-F1 reward). Given a question and a memory store, it generates the final answer.
This model only answers questions — it does not manage memory. It is meant to be paired with the Memory-R2 memory manager, which reads the running conversation and maintains the memory store this model answers from. It is optional and swappable: the memory manager was evaluated against several different answer agents in the paper (untrained Qwen-7B, GPT-OSS-120B, this one) — any instruction-tuned LLM can play this role, and using a different one has no effect on how memory is maintained.
Headline results (tab:main)
| Memory manager | Answer agent | F1 | BLEU-1 | LLM-judge (gpt-4o-mini) |
|---|---|---|---|---|
| ahmedehabb/Memory-R2 | this model | 51.46 | 44.84 | 69.03 |
| ahmedehabb/Memory-R2 | GPT-OSS-120B (untrained, external) | 49.29 | 43.64 | 86.08 |
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
answer_agent = AutoModelForCausalLM.from_pretrained("ahmedehabb/Memory-R2-answer-agent", torch_dtype="auto", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("ahmedehabb/Memory-R2-answer-agent")
Full inference code and the memory-store protocol are in the project repository (see the paper for the official release).
Training
- Base model:
Qwen/Qwen2.5-7B-Instruct - SFT warm-start followed by an RL continuation (answer-F1 reward) against the memory manager's rollouts
- Judge for reward/logging during training: GPT-OSS-120B
Citation
@misc{yan2026memoryr2faircreditassignment,
title={Memory-R2: Fair Credit Assignment for Long-Horizon Memory-Augmented LLM Agents},
author={Sikuan Yan and Ahmed Bahloul and Ercong Nie and Susanna Schwarzmann and Riccardo Trivisonno and Volker Tresp and Yunpu Ma},
year={2026},
eprint={2605.21768},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2605.21768},
}
- Downloads last month
- -