Code for "LMEB: Long-horizon Memory Embedding Benchmark"
Python
16
28 commits
updated Jul 6, 2026
🚀 LMEB is now officially supported by MTEB.
You can evaluate embedding models on LMEB through the standard MTEB evaluation framework. After running the benchmark, results can be submitted to the MTEB results repository. Once merged, the LMEB leaderboard will be updated on the MTEB Leaderboard.
LMEB fills a crucial gap in current embedding benchmarks, offering a standardized and reproducible evaluation that focuses on long-term memory retrieval. By evaluating the memory retrieval capabilities of embedding models, a crucial ability for memory-augmented systems like OpenClaw🦞, LMEB helps OpenClaw 🦞 identify the most suitable embedding models, enhancing its ability to adapt, remember, and make personalized, user-aware decisions.
Welcome to the Long-horizon Memory Embedding Benchmark (LMEB)! Unlike existing text embedding benchmarks that narrowly focus on passage retrieval, LLMEB is designed to evaluate embedding models' ability to handle complex, long-horizon memory retrieval tasks, focusing on fragmented, context-dependent, and temporally distant information. LMEB spans 22 diverse datasets and 193 retrieval tasks, across 4 memory types:
conda create -n lmeb python==3.10
conda activate lmeb
pip install -r requirements.txt
Note: If you want to evaluate the NV-Embed-v2 model, install the dependencies from requirements_nv.txt instead, as NV-Embed-v2 relies on transformers==4.42.4:
pip install -r requirements_nv.txt
The LMEB benchmark dataset is required to run the evaluation. Download the dataset to the eval_data directory using the following command:
huggingface-cli download --repo-type dataset --resume-download KaLM-Embedding/LMEB --local-dir ./eval_data
Run LMEB evaluation using BM25
pip install bm25s==0.3.6 PyStemmer==3.0.0
bash ./scripts/run_bm25.sh
Run LMEB evaluation WITH task-specific instructions (w_inst = with instruction)
bash ./scripts/run_lmeb_w_inst.sh
Run LMEB evaluation WITHOUT task-specific instructions (wo_inst = without instruction)
bash ./scripts/run_lmeb_wo_inst.sh
trust_remote_code: Whether to trust and execute remote code (set to true for custom models).attn_implementation: Attention implementation method (e.g., "sdpa" for Scaled Dot-Product Attention).max_length: Maximum input sequence length (e.g., 1024), limiting the number of tokens processed per sample.do_norm: Whether to normalize the embedding vectors (set to true for better retrieval performance).use_instruction: Whether to use task-specific instructions during encoding (set to true to enable instruction following).instruction_dict_path: Path to the JSON file containing task instructions (e.g., "task_instructions.json").pooler_type: Pooling method for generating sentence embeddings (e.g., "mean" for mean pooling).attn_type: Attention type used in embedding (e.g., "biattn" for bidirectional attention).instruction_template: Template for formatting instructions (e.g., "Instruct: {}\nQuery:" where {} is replaced with task-specific instructions).normalize_embeddings: Whether to normalize the final embeddings (consistent with do_norm for alignment).show_progress_bar: Whether to display a progress bar during encoding (set to true for real-time progress tracking).bash summary.sh
We sincerely thank the MTEB (Massive Text Embedding Benchmark) project (https://github.com/embeddings-benchmark/mteb) and all its contributors and maintainers for providing the standardized evaluation framework for embedding models.
If you find this benchmark useful, please consider giving a star and citation.
@misc{zhao2026lmeb,
title={LMEB: Long-horizon Memory Embedding Benchmark},
author={Xinping Zhao and Xinshuo Hu and Jiaxin Xu and Danyu Tang and Xin Zhang and Mengjia Zhou and Yan Zhong and Yao Zhou and Zifei Shan and Meishan Zhang and Baotian Hu and Min Zhang},
year={2026},
eprint={2603.12572},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2603.12572},
}
If you encounter any issue, feel free to contact us via the email: zhaoxinping@stu.hit.edu.cn or xinpingzhao@slai.edu.cn
28 commits
Python
84.0%
Shell
16.0%
Code for "LMEB: Long-horizon Memory Embedding Benchmark"
Python
16
28 commits
updated Jul 6, 2026
🚀 LMEB is now officially supported by MTEB.
You can evaluate embedding models on LMEB through the standard MTEB evaluation framework. After running the benchmark, results can be submitted to the MTEB results repository. Once merged, the LMEB leaderboard will be updated on the MTEB Leaderboard.
LMEB fills a crucial gap in current embedding benchmarks, offering a standardized and reproducible evaluation that focuses on long-term memory retrieval. By evaluating the memory retrieval capabilities of embedding models, a crucial ability for memory-augmented systems like OpenClaw🦞, LMEB helps OpenClaw 🦞 identify the most suitable embedding models, enhancing its ability to adapt, remember, and make personalized, user-aware decisions.
Welcome to the Long-horizon Memory Embedding Benchmark (LMEB)! Unlike existing text embedding benchmarks that narrowly focus on passage retrieval, LLMEB is designed to evaluate embedding models' ability to handle complex, long-horizon memory retrieval tasks, focusing on fragmented, context-dependent, and temporally distant information. LMEB spans 22 diverse datasets and 193 retrieval tasks, across 4 memory types:
conda create -n lmeb python==3.10
conda activate lmeb
pip install -r requirements.txt
Note: If you want to evaluate the NV-Embed-v2 model, install the dependencies from requirements_nv.txt instead, as NV-Embed-v2 relies on transformers==4.42.4:
pip install -r requirements_nv.txt
The LMEB benchmark dataset is required to run the evaluation. Download the dataset to the eval_data directory using the following command:
huggingface-cli download --repo-type dataset --resume-download KaLM-Embedding/LMEB --local-dir ./eval_data
Run LMEB evaluation using BM25
pip install bm25s==0.3.6 PyStemmer==3.0.0
bash ./scripts/run_bm25.sh
Run LMEB evaluation WITH task-specific instructions (w_inst = with instruction)
bash ./scripts/run_lmeb_w_inst.sh
Run LMEB evaluation WITHOUT task-specific instructions (wo_inst = without instruction)
bash ./scripts/run_lmeb_wo_inst.sh
trust_remote_code: Whether to trust and execute remote code (set to true for custom models).attn_implementation: Attention implementation method (e.g., "sdpa" for Scaled Dot-Product Attention).max_length: Maximum input sequence length (e.g., 1024), limiting the number of tokens processed per sample.do_norm: Whether to normalize the embedding vectors (set to true for better retrieval performance).use_instruction: Whether to use task-specific instructions during encoding (set to true to enable instruction following).instruction_dict_path: Path to the JSON file containing task instructions (e.g., "task_instructions.json").pooler_type: Pooling method for generating sentence embeddings (e.g., "mean" for mean pooling).attn_type: Attention type used in embedding (e.g., "biattn" for bidirectional attention).instruction_template: Template for formatting instructions (e.g., "Instruct: {}\nQuery:" where {} is replaced with task-specific instructions).normalize_embeddings: Whether to normalize the final embeddings (consistent with do_norm for alignment).show_progress_bar: Whether to display a progress bar during encoding (set to true for real-time progress tracking).bash summary.sh
We sincerely thank the MTEB (Massive Text Embedding Benchmark) project (https://github.com/embeddings-benchmark/mteb) and all its contributors and maintainers for providing the standardized evaluation framework for embedding models.
If you find this benchmark useful, please consider giving a star and citation.
@misc{zhao2026lmeb,
title={LMEB: Long-horizon Memory Embedding Benchmark},
author={Xinping Zhao and Xinshuo Hu and Jiaxin Xu and Danyu Tang and Xin Zhang and Mengjia Zhou and Yan Zhong and Yao Zhou and Zifei Shan and Meishan Zhang and Baotian Hu and Min Zhang},
year={2026},
eprint={2603.12572},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2603.12572},
}
If you encounter any issue, feel free to contact us via the email: zhaoxinping@stu.hit.edu.cn or xinpingzhao@slai.edu.cn
28 commits
Python
84.0%
Shell
16.0%