Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 1 new columns ({'question'}) and 2 missing columns ({'metadata', 'messages'}).

This happened while the json dataset builder was generating data using

hf://datasets/eigen-ai-labs/95-cache-dataset/data/combined_dataset_openqa.jsonl (at revision edaf4e722767d50de742fd9802add4b58b233a54)

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1831, in _prepare_split_single
                  writer.write_table(table)
                File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 714, in write_table
                  pa_table = table_cast(pa_table, self._schema)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2272, in table_cast
                  return cast_table_to_schema(table, schema)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2218, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              question: string
              to
              {'messages': List({'role': Value('string'), 'content': Value('string')}), 'metadata': {'id': Value('string'), 'var_suffix_tokens_estimated': Value('int64'), 'sampled_paragraphs': Value('int64'), 'target_output_tokens': Value('int64'), 'shared_prefix_tokens': Value('int64'), 'user_content_tokens': Value('int64'), 'total_input_tokens': Value('int64'), 'cache_hit_rate': Value('float64'), 'source': Value('string')}}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1339, in compute_config_parquet_and_info_response
                  parquet_operations = convert_to_parquet(builder)
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 972, in convert_to_parquet
                  builder.download_and_prepare(
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 894, in download_and_prepare
                  self._download_and_prepare(
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 970, in _download_and_prepare
                  self._prepare_split(split_generator, **prepare_split_kwargs)
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1702, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1833, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 1 new columns ({'question'}) and 2 missing columns ({'metadata', 'messages'}).
              
              This happened while the json dataset builder was generating data using
              
              hf://datasets/eigen-ai-labs/95-cache-dataset/data/combined_dataset_openqa.jsonl (at revision edaf4e722767d50de742fd9802add4b58b233a54)
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

messages
list
metadata
dict
[{"role":"system","content":"\n\n============================================================\nSourc(...TRUNCATED)
{"id":"k8s_8b94c744_000000","var_suffix_tokens_estimated":3409,"sampled_paragraphs":15,"target_outpu(...TRUNCATED)
[{"role":"system","content":"\n\n============================================================\nSourc(...TRUNCATED)
{"id":"k8s_8b94c744_000001","var_suffix_tokens_estimated":3463,"sampled_paragraphs":14,"target_outpu(...TRUNCATED)
[{"role":"system","content":"\n\n============================================================\nSourc(...TRUNCATED)
{"id":"k8s_8b94c744_000002","var_suffix_tokens_estimated":3372,"sampled_paragraphs":14,"target_outpu(...TRUNCATED)
[{"role":"system","content":"\n\n============================================================\nSourc(...TRUNCATED)
{"id":"k8s_8b94c744_000003","var_suffix_tokens_estimated":3193,"sampled_paragraphs":14,"target_outpu(...TRUNCATED)
[{"role":"system","content":"\n\n============================================================\nSourc(...TRUNCATED)
{"id":"k8s_8b94c744_000004","var_suffix_tokens_estimated":3300,"sampled_paragraphs":14,"target_outpu(...TRUNCATED)
[{"role":"system","content":"\n\n============================================================\nSourc(...TRUNCATED)
{"id":"k8s_8b94c744_000005","var_suffix_tokens_estimated":3432,"sampled_paragraphs":14,"target_outpu(...TRUNCATED)
[{"role":"system","content":"\n\n============================================================\nSourc(...TRUNCATED)
{"id":"k8s_8b94c744_000006","var_suffix_tokens_estimated":3484,"sampled_paragraphs":13,"target_outpu(...TRUNCATED)
[{"role":"system","content":"\n\n============================================================\nSourc(...TRUNCATED)
{"id":"k8s_8b94c744_000007","var_suffix_tokens_estimated":3444,"sampled_paragraphs":14,"target_outpu(...TRUNCATED)
[{"role":"system","content":"\n\n============================================================\nSourc(...TRUNCATED)
{"id":"k8s_8b94c744_000008","var_suffix_tokens_estimated":3459,"sampled_paragraphs":15,"target_outpu(...TRUNCATED)
[{"role":"system","content":"\n\n============================================================\nSourc(...TRUNCATED)
{"id":"k8s_8b94c744_000009","var_suffix_tokens_estimated":3496,"sampled_paragraphs":15,"target_outpu(...TRUNCATED)
End of preview.

Prefix Cache Benchmark Datasets

Datasets for benchmarking DeepSeek-V3 prefix cache performance with ~95% cache hit rate.

Dataset Variants

Dataset Source Samples Avg Tokens Cache Hit Rate
k8s_dataset.jsonl Kubernetes docs 1,000 ~70,000 ~95%
sglang_dataset.jsonl SGLang source code 1,000 ~70,058 ~95%
yahoo_finance_dataset.jsonl SGLang + Yahoo Finance 1,000 ~70,057 ~95%
combined_dataset.jsonl All three combined 3,000 ~70,000 ~95%

Structure

All datasets share:

  • Shared prefix: 66,500 tokens (same for all requests) → cached
  • Variable suffix: ~3,500 tokens (different per request) → not cached
{
  "messages": [
    {"role": "system", "content": "<66.5K token shared prefix>"},
    {"role": "user", "content": "<~3.5K token unique suffix + query>"}
  ],
  "metadata": {
    "shared_prefix_tokens": 66500,
    "total_input_tokens": 70057,
    "cache_hit_rate": 0.9492,
    "source": "sglang"
  }
}

Quick Start

Option 1: Benchmark Script (Recommended, Shuffled)

Auto-downloads dataset and shuffles samples each run for varied request ordering.

pip install evalscope huggingface_hub

# Download script
wget -q https://huggingface.co/datasets/eigen-ai-labs/95-cache-dataset/resolve/main/run_benchmark.sh
chmod +x run_benchmark.sh

# Run benchmark (auto-downloads dataset)
./run_benchmark.sh --url http://localhost:8000/v1/chat/completions --number 500 --parallel 4

Examples

# Quick test
./run_benchmark.sh --url http://localhost:8000/v1/chat/completions --number 100

# Specific dataset variant
./run_benchmark.sh --url http://localhost:8000/v1/chat/completions --variant k8s --number 500

# Reproducible run
./run_benchmark.sh --url http://localhost:8000/v1/chat/completions --number 500 --seed 42

Options

Option Description Default
--url API endpoint (required) -
--variant Dataset: combined, k8s, sglang, yahoo_finance combined
--number Number of requests 500
--parallel Concurrent requests 1
--max-tokens Max output tokens 200
--seed Random seed for shuffle random
--model Model name deepseek-ai/DeepSeek-V3
--dataset-path Custom dataset (overrides variant) -

Option 2: EvalScope Directly (Sequential)

Runs samples in sequential order without shuffling. Supports multi-config runs.

DATASET_PATH=$(python -c "from huggingface_hub import hf_hub_download; print(hf_hub_download('eigen-ai-labs/95-cache-dataset', 'data/combined_dataset_openqa.jsonl', repo_type='dataset'))")

evalscope perf \
    --model deepseek-ai/DeepSeek-V3 \
    --url http://localhost:8000/v1/chat/completions \
    --api openai \
    --dataset openqa \
    --dataset-path "$DATASET_PATH" \
    --max-tokens 200 \
    --parallel 1 2 4 \
    --number 500 500 500 \
    --stream

File Structure

data/
├── combined_dataset.jsonl              # Original messages format (3000 samples)
├── combined_dataset_openqa.jsonl       # EvalScope-compatible format
├── k8s_dataset.jsonl                   # Original messages format (1000 samples)
├── k8s_dataset_openqa.jsonl            # EvalScope-compatible format
├── sglang_dataset.jsonl                # Original messages format (1000 samples)
├── sglang_dataset_openqa.jsonl         # EvalScope-compatible format
├── yahoo_finance_dataset.jsonl         # Original messages format (1000 samples)
└── yahoo_finance_dataset_openqa.jsonl  # EvalScope-compatible format

run_benchmark.sh                        # Benchmark script with auto-shuffle

Data Sources

Dataset Prefix Source Suffix Source
k8s Kubernetes official docs Kubernetes docs
sglang SGLang source code SGLang source code
yahoo_finance SGLang source code Yahoo Finance data
combined Mixed (all above) Mixed (all above)

License

Apache 2.0

Downloads last month
45