Fix paper link, add project page and sample usage

#1
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +46 -2
README.md CHANGED
@@ -2,6 +2,7 @@
2
  language:
3
  - en
4
  - zh
 
5
  pipeline_tag: feature-extraction
6
  tags:
7
  - embedding
@@ -9,12 +10,11 @@ tags:
9
  - long-context
10
  - rag
11
  - qwen
12
- license: apache-2.0
13
  ---
14
 
15
  # EvoEmbedding: Evolvable Representations for Long-Context Retrieval and Agentic Memory
16
 
17
- πŸ”— **[GitHub Repository](https://github.com/MiG-NJU/EvoEmbedding)** | πŸ“š **[Training Dataset](https://huggingface.co/datasets/MiG-NJU/EvoTrain-180K)** | πŸ“‘ **[Paper (https://arxiv.org/abs/2606.21649)]()**
18
 
19
  **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.
20
 
@@ -28,6 +28,50 @@ We provide EvoEmbedding in three sizes based on the Qwen architecture:
28
  | **EvoEmbedding-2B** | 2B | Qwen3.5-2B | [MiG-NJU/EvoEmbedding-2B](https://huggingface.co/MiG-NJU/EvoEmbedding-2B) |
29
  | **EvoEmbedding-4B** | 4B | Qwen3-4B | [MiG-NJU/EvoEmbedding-4B](https://huggingface.co/MiG-NJU/EvoEmbedding-4B) |
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  ## πŸ“š Citation
32
 
33
  If you find this model or our methodology useful, please cite our paper:
 
2
  language:
3
  - en
4
  - zh
5
+ license: apache-2.0
6
  pipeline_tag: feature-extraction
7
  tags:
8
  - embedding
 
10
  - long-context
11
  - rag
12
  - qwen
 
13
  ---
14
 
15
  # EvoEmbedding: Evolvable Representations for Long-Context Retrieval and Agentic Memory
16
 
17
+ πŸ”— **[Project Page](https://clare-nie.github.io/EvoEmbedding/)** | πŸ™ **[GitHub Repository](https://github.com/MiG-NJU/EvoEmbedding)** | πŸ“š **[Training Dataset](https://huggingface.co/datasets/MiG-NJU/EvoTrain-180K)** | πŸ“„ **[Paper](https://arxiv.org/abs/2606.21649)**
18
 
19
  **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.
20
 
 
28
  | **EvoEmbedding-2B** | 2B | Qwen3.5-2B | [MiG-NJU/EvoEmbedding-2B](https://huggingface.co/MiG-NJU/EvoEmbedding-2B) |
29
  | **EvoEmbedding-4B** | 4B | Qwen3-4B | [MiG-NJU/EvoEmbedding-4B](https://huggingface.co/MiG-NJU/EvoEmbedding-4B) |
30
 
31
+ ## πŸš€ Quick Start
32
+
33
+ To use EvoEmbedding, first clone the [GitHub Repository](https://github.com/MiG-NJU/EvoEmbedding) to access the required `model` client implementation.
34
+
35
+ ### As an Embedding Model
36
+
37
+ ```python
38
+ from model.client import EvoEmbeddingClient
39
+
40
+ client = EvoEmbeddingClient()
41
+
42
+ messages = [
43
+ {"role": "user", "content": "I visited Paris in April."},
44
+ {"role": "assistant", "content": "Noted."},
45
+ {"role": "user", "content": "I bought a new laptop yesterday."},
46
+ {"role": "assistant", "content": "Got it."},
47
+ {"role": "user", "content": "Where did I travel in spring?"},
48
+ ]
49
+
50
+ embeddings = client.encode_messages(messages)
51
+ ```
52
+
53
+ The `messages` input preserves the original dialogue order. `encode_messages` returns normalized embeddings for the history turns and the final query.
54
+
55
+ ### As a Reranker
56
+
57
+ ```python
58
+ candidates = [
59
+ "I visited Paris in April.",
60
+ "I bought a new laptop yesterday.",
61
+ "The meeting was moved to Friday.",
62
+ ]
63
+ query = "Where did I travel in spring?"
64
+
65
+ ranked_candidates, ranked_indices = client.rerank(
66
+ query,
67
+ candidates,
68
+ top_k=1,
69
+ return_indices=True,
70
+ )
71
+ ```
72
+
73
+ The reranker takes a direct list of candidate strings and returns them in relevance order.
74
+
75
  ## πŸ“š Citation
76
 
77
  If you find this model or our methodology useful, please cite our paper: