EvoEmbedding: Evolvable Representations for Long-Context Retrieval and Agentic Memory
π GitHub Repository | π Project Page | π Training Dataset | π Paper
EvoEmbedding is a novel embedding model designed for long-context and dynamic retrieval scenarios. Unlike static embedding models that chunk text in isolation, EvoEmbedding maintains a continuously updated Latent Memory Queue. This allows it to capture temporal dynamics and generate context-aware, evolvable embeddings for precise retrieval in agentic workflows and long-conversations.
π Quick Start
Installation
First, clone the repository and install the dependencies:
git clone https://github.com/MiG-NJU/EvoEmbedding.git
cd EvoEmbedding
conda create -n evoemb python=3.10 -y
conda activate evoemb
pip install -r requirements-evoembedding-lite.txt
Usage
As an Embedding Model
from model.client import EvoEmbeddingClient
client = EvoEmbeddingClient()
messages = [
{"role": "user", "content": "I visited Paris in April."},
{"role": "assistant", "content": "Noted."},
{"role": "user", "content": "I bought a new laptop yesterday."},
{"role": "assistant", "content": "Got it."},
{"role": "user", "content": "Where did I travel in spring?"},
]
embeddings = client.encode_messages(messages)
The messages input preserves the original dialogue order. encode_messages returns normalized embeddings for the history turns and the final query.
As a Reranker
candidates = [
"I visited Paris in April.",
"I bought a new laptop yesterday.",
"The meeting was moved to Friday.",
]
query = "Where did I travel in spring?"
ranked_candidates, ranked_indices = client.rerank(
query,
candidates,
top_k=1,
return_indices=True,
)
The reranker takes a direct list of candidate strings and returns them in relevance order.
π¦ Model Family
We provide EvoEmbedding in three sizes based on the Qwen architecture:
| Model | Parameters | Base Model | Hugging Face Link |
|---|---|---|---|
| EvoEmbedding-0.8B | 0.8B | Qwen3.5-0.8B | MiG-NJU/EvoEmbedding-0.8B |
| EvoEmbedding-2B | 2B | Qwen3.5-2B | MiG-NJU/EvoEmbedding-2B |
| EvoEmbedding-4B | 4B | Qwen3-4B | MiG-NJU/EvoEmbedding-4B |
π Citation
If you find this model or our methodology useful, please cite our paper:
@article{nie2026evoembedding,
title={EvoEmbedding: Evolvable Representations for Long-Context Retrieval and Agentic Memory},
author={Nie, Chang and Fu, Chaoyou and Feng, Junlan and Shan, Caifeng},
journal={arXiv preprint arXiv:2606.21649},
year={2026}
}
- Downloads last month
- 97