--- language: - en - zh license: apache-2.0 pipeline_tag: feature-extraction tags: - embedding - retrieval - long-context - rag - qwen --- # EvoEmbedding: Evolvable Representations for Long-Context Retrieval and Agentic Memory 🔗 **[GitHub Repository](https://github.com/MiG-NJU/EvoEmbedding)** | 🌐 **[Project Page](https://clare-nie.github.io/EvoEmbedding/)** | 📚 **[Training Dataset](https://huggingface.co/datasets/MiG-NJU/EvoTrain-180K)** | 📄 **[Paper](https://huggingface.co/papers/2606.21649)** **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: ```bash 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 ```python 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 ```python 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](https://huggingface.co/MiG-NJU/EvoEmbedding-0.8B) | | **EvoEmbedding-2B** | 2B | Qwen3.5-2B | [MiG-NJU/EvoEmbedding-2B](https://huggingface.co/MiG-NJU/EvoEmbedding-2B) | | **EvoEmbedding-4B** | 4B | Qwen3-4B | [MiG-NJU/EvoEmbedding-4B](https://huggingface.co/MiG-NJU/EvoEmbedding-4B) | ## 📚 Citation If you find this model or our methodology useful, please cite our paper: ```bibtex @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} } ```