Update README.md
Browse files
README.md
CHANGED
|
@@ -1,22 +1,104 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
- name:
|
| 10 |
-
dtype: string
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
- sentence-similarity
|
| 6 |
+
- text-retrieval
|
| 7 |
+
dataset_info:
|
| 8 |
+
features:
|
| 9 |
+
- name: text
|
| 10 |
+
dtype: string
|
| 11 |
+
- name: length_category
|
| 12 |
+
dtype: string
|
| 13 |
+
- name: source
|
| 14 |
+
dtype: string
|
| 15 |
+
splits:
|
| 16 |
+
- name: train
|
| 17 |
+
num_bytes: 373887763
|
| 18 |
+
num_examples: 8000
|
| 19 |
+
download_size: 210093799
|
| 20 |
+
dataset_size: 373887763
|
| 21 |
+
configs:
|
| 22 |
+
- config_name: default
|
| 23 |
+
data_files:
|
| 24 |
+
- split: train
|
| 25 |
+
path: data/train-*
|
| 26 |
+
tags:
|
| 27 |
+
- embedding
|
| 28 |
+
- benchmark
|
| 29 |
+
- long-context
|
| 30 |
+
- deepinfra
|
| 31 |
+
- rag
|
| 32 |
+
- wikitext
|
| 33 |
+
language:
|
| 34 |
+
- en
|
| 35 |
+
|
| 36 |
+
size_categories:
|
| 37 |
+
- 1K<n<10K
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
# Variable Length Embedding Benchmark (VLEB)
|
| 42 |
+
|
| 43 |
+
## Dataset Summary
|
| 44 |
+
**VLEB (Variable Length Embedding Benchmark)** is a specialized dataset designed to evaluate the performance, latency, and stability of **embedding models and rerankers** across a wide spectrum of context lengths.
|
| 45 |
+
|
| 46 |
+
Unlike standard datasets that focus on short passages, VLEB provides a balanced distribution of text ranging from standard RAG chunks to maximum-context documents (up to 32k tokens). It is constructed from `wikitext-103-raw-v1` using a **smart-clipping strategy** that preserves semantic integrity without splitting words.
|
| 47 |
+
|
| 48 |
+
This benchmark is essential for:
|
| 49 |
+
- **Length Generalization:** Testing if models maintain semantic understanding as context grows.
|
| 50 |
+
- **RAG Profiling:** Measuring encoding latency and memory usage at different bins.
|
| 51 |
+
- **"Lost-in-the-Middle" Analysis:** Evaluating retrieval degradation in long-context windows.
|
| 52 |
+
|
| 53 |
+
## Data Structure
|
| 54 |
+
|
| 55 |
+
The dataset consists of **8,000 samples**, strictly balanced across 4 length categories (2,000 samples per bin). Token counts are calculated using the `Qwen/Qwen2.5-7B-Instruct` tokenizer.
|
| 56 |
+
|
| 57 |
+
| Category | Token Range (Qwen) | Typical Use Case |
|
| 58 |
+
| :--- | :--- | :--- |
|
| 59 |
+
| **Short** | 512 - 2,048 | Standard RAG chunks, abstracts, news snippets. |
|
| 60 |
+
| **Medium** | 2,048 - 8,192 | Full articles, technical reports, single-file code. |
|
| 61 |
+
| **Long** | 8,192 - 16,384 | Multiple papers, book chapters, long legal contracts. |
|
| 62 |
+
| **Very Long** | 16,384 - 32,000 | Entire books, massive documentation, stress testing context limits. |
|
| 63 |
+
|
| 64 |
+
## Usage
|
| 65 |
+
|
| 66 |
+
```python
|
| 67 |
+
from datasets import load_dataset
|
| 68 |
+
|
| 69 |
+
# Load the full dataset
|
| 70 |
+
dataset = load_dataset("ovuruska/variable-length-embedding-bench")
|
| 71 |
+
|
| 72 |
+
# Filter for specific length requirements
|
| 73 |
+
short_contexts = dataset.filter(lambda x: x['length_category'] == 'Short')
|
| 74 |
+
very_long_contexts = dataset.filter(lambda x: x['length_category'] == 'Very Long')
|
| 75 |
+
|
| 76 |
+
print(f"Sample Text ({very_long_contexts[0]['length_category']}):")
|
| 77 |
+
print(very_long_contexts[0]['text'][:200] + "...")
|
| 78 |
+
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
## Construction Methodology
|
| 82 |
+
|
| 83 |
+
1. **Source:** The dataset is derived from the `wikitext-103-raw-v1` corpus.
|
| 84 |
+
2. **Stream Buffering:** The raw text was processed as a continuous stream rather than isolated lines.
|
| 85 |
+
3. **Smart Clipping:** A buffer system accumulated tokens until a target length (randomly selected within bin ranges) was met. The text was then clipped at the exact token boundary and decoded back to string, ensuring **no words are split** and the text remains natural.
|
| 86 |
+
4. **Validation:** All samples were re-tokenized to ensure they strictly fall within their assigned bin limits.
|
| 87 |
+
|
| 88 |
+
## Citation
|
| 89 |
+
|
| 90 |
+
If you use this dataset for benchmarking, please cite:
|
| 91 |
+
|
| 92 |
+
```bibtex
|
| 93 |
+
@misc{vleb_2026,
|
| 94 |
+
author = {DeepInfra Engineering Team},
|
| 95 |
+
title = {Variable Length Embedding Benchmark (VLEB)},
|
| 96 |
+
year = {2026},
|
| 97 |
+
publisher = {Hugging Face},
|
| 98 |
+
howpublished = {\url{[https://huggingface.co/datasets/ovuruska/variable-length-embedding-bench](https://huggingface.co/datasets/ovuruska/variable-length-embedding-bench)}}
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
|