Datasets:
Improve: Add related work (AttnTrace) and library_name
Browse filesThis PR improves the `THUDM/LongBench` dataset card by:
- Adding `library_name: datasets` to the metadata for better discoverability and standard Hugging Face Hub practices.
- Introducing a "Used In / Related Work" section that links to the [AttnTrace paper](https://huggingface.co/papers/2508.03793) and its [Hugging Face Spaces demo](https://huggingface.co/spaces/SecureLLMSys/AttnTrace). This highlights an important application of the `LongBench` dataset in recent research on context traceback for LLMs.
- Updating the Arxiv link for the original `LongBench` paper from `.pdf` to `.abs` for a canonical URL.
README.md
CHANGED
|
@@ -1,16 +1,18 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
task_categories:
|
| 3 |
- question-answering
|
| 4 |
- text-generation
|
| 5 |
- summarization
|
| 6 |
- text-classification
|
| 7 |
-
language:
|
| 8 |
-
- en
|
| 9 |
-
- zh
|
| 10 |
tags:
|
| 11 |
- Long Context
|
| 12 |
-
|
| 13 |
-
-
|
| 14 |
---
|
| 15 |
|
| 16 |
# Introduction
|
|
@@ -22,7 +24,7 @@ We are fully aware of the potentially high costs involved in the model evaluatio
|
|
| 22 |
LongBench includes 14 English tasks, 5 Chinese tasks, and 2 code tasks, with the average length of most tasks ranging from 5k to 15k, and a total of 4,750 test data. For detailed statistics and construction methods of LongBench tasks, please refer [here](task.md). In addition, we provide LongBench-E, a test set with a more uniform length distribution constructed by uniform sampling, with comparable amounts of data in the 0-4k, 4k-8k, and 8k+ length intervals to provide an analysis of the model's performance variations at different input lengths.
|
| 23 |
|
| 24 |
Github Repo for LongBench: https://github.com/THUDM/LongBench
|
| 25 |
-
Arxiv Paper for LongBench: https://arxiv.org/
|
| 26 |
|
| 27 |
# How to use it?
|
| 28 |
|
|
@@ -73,57 +75,57 @@ This repository provides data download for LongBench. If you wish to use this da
|
|
| 73 |
|
| 74 |
# Task statistics
|
| 75 |
|
| 76 |
-
| Task
|
| 77 |
| :-------- | :-----------:| :-----------: |:-------: | :-----------: |:--------: |
|
| 78 |
-
| HotpotQA
|
| 79 |
-
| 2WikiMultihopQA| Multi-doc QA | F1
|
| 80 |
-
| MuSiQue| Multi-doc QA | F1
|
| 81 |
-
| DuReader| Multi-doc QA | Rouge-L
|
| 82 |
-
| MultiFieldQA-en| Single-doc QA | F1
|
| 83 |
-
| MultiFieldQA-zh| Single-doc QA | F1
|
| 84 |
-
| NarrativeQA| Single-doc QA | F1
|
| 85 |
-
| Qasper| Single-doc QA | F1
|
| 86 |
-
| GovReport| Summarization | Rouge-L
|
| 87 |
-
| QMSum| Summarization | Rouge-L
|
| 88 |
-
| MultiNews| Summarization
|
| 89 |
-
| VCSUM| Summarization | Rouge-L
|
| 90 |
-
| TriviaQA| Few shot
|
| 91 |
-
| SAMSum| Few shot | Rouge-L
|
| 92 |
-
| TREC| Few shot | Accuracy
|
| 93 |
-
| LSHT| Few shot | Accuracy
|
| 94 |
-
| PassageRetrieval-en| Synthetic | Accuracy
|
| 95 |
-
| PassageCount| Synthetic | Accuracy
|
| 96 |
-
| PassageRetrieval-zh | Synthetic | Accuracy
|
| 97 |
-
| LCC| Code | Edit Sim
|
| 98 |
-
| RepoBench-P| Code | Edit Sim
|
| 99 |
|
| 100 |
> Note: In order to avoid discrepancies caused by different tokenizers, we use the word count (using Python's split function) to calculate the average length of English datasets and code datasets, and use the character count to calculate the average length of Chinese datasets.
|
| 101 |
|
| 102 |
# Task description
|
| 103 |
-
| Task
|
| 104 |
| :---------------- | :----------------------------------------------------------- |
|
| 105 |
-
| HotpotQA
|
| 106 |
-
| 2WikiMultihopQA
|
| 107 |
-
| MuSiQue
|
| 108 |
-
| DuReader
|
| 109 |
-
| MultiFieldQA-en
|
| 110 |
-
| MultiFieldQA-zh
|
| 111 |
-
| NarrativeQA
|
| 112 |
-
| Qasper
|
| 113 |
-
| GovReport
|
| 114 |
-
| MultiNews
|
| 115 |
-
| QMSum
|
| 116 |
-
| VCSUM
|
| 117 |
-
| SAMSum
|
| 118 |
-
| TriviaQA
|
| 119 |
-
| NQ
|
| 120 |
-
| TREC
|
| 121 |
-
| LSHT
|
| 122 |
| PassageRetrieval-en | Given 30 English Wikipedia paragraphs, determine which paragraph the given summary corresponds to |
|
| 123 |
| PassageCount | Determine the total number of different paragraphs in a given repetitive article |
|
| 124 |
| PassageRetrieval-zh | Given several Chinese paragraphs from the C4 data set, determine which paragraph the given abstract corresponds to |
|
| 125 |
-
| LCC
|
| 126 |
-
| RepoBench-P
|
| 127 |
|
| 128 |
# Task construction
|
| 129 |
> Note: For all tasks constructed from existing datasets, we use data from the validation or test set of the existing dataset (except for VCSUM).
|
|
@@ -140,24 +142,29 @@ This repository provides data download for LongBench. If you wish to use this da
|
|
| 140 |
- For the [LCC](https://arxiv.org/abs/2306.14893) task, we sample from the original code completion dataset. In the [RepoBench-P](https://arxiv.org/abs/2306.03091) task, we select the most challenging XF-F (Cross-File-First) setting from the original dataset and refer to the Oracle-Filled scenario in the paper. For each original piece of data, we randomly extract multiple cross-file code snippets, including the gold cross-file code snippet, and concatenate them as input, requiring the model to effectively use cross-file code for completion.
|
| 141 |
|
| 142 |
# LongBench-E statistics
|
| 143 |
-
| Task
|
| 144 |
| :--------- | :-----------:| :-----------: |:---------: | :-------------: |
|
| 145 |
-
| HotpotQA
|
| 146 |
-
| 2WikiMultihopQA| Multi-doc QA | 100
|
| 147 |
-
| MultiFieldQA-en| Single-doc QA | 67
|
| 148 |
-
| Qasper| Single-doc QA
|
| 149 |
-
| GovReport| Summarization | 100
|
| 150 |
-
| MultiNews| Summarization | 100
|
| 151 |
-
| TriviaQA| Few shot
|
| 152 |
-
| SAMSum| Few shot | 100
|
| 153 |
-
| TREC| Few shot | 100
|
| 154 |
-
| PassageRetrieval-en| Synthetic | 100
|
| 155 |
-
| PassageCount| Synthetic | 100
|
| 156 |
-
| LCC| Code | 100
|
| 157 |
-
| RepoBench-P| Code | 100
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
|
| 159 |
# Citation
|
| 160 |
-
```
|
| 161 |
@misc{bai2023longbench,
|
| 162 |
title={LongBench: A Bilingual, Multitask Benchmark for Long Context Understanding},
|
| 163 |
author={Yushi Bai and Xin Lv and Jiajie Zhang and Hongchang Lyu and Jiankai Tang and Zhidian Huang and Zhengxiao Du and Xiao Liu and Aohan Zeng and Lei Hou and Yuxiao Dong and Jie Tang and Juanzi Li},
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- zh
|
| 5 |
+
size_categories:
|
| 6 |
+
- 1K<n<10K
|
| 7 |
task_categories:
|
| 8 |
- question-answering
|
| 9 |
- text-generation
|
| 10 |
- summarization
|
| 11 |
- text-classification
|
|
|
|
|
|
|
|
|
|
| 12 |
tags:
|
| 13 |
- Long Context
|
| 14 |
+
library_name:
|
| 15 |
+
- datasets
|
| 16 |
---
|
| 17 |
|
| 18 |
# Introduction
|
|
|
|
| 24 |
LongBench includes 14 English tasks, 5 Chinese tasks, and 2 code tasks, with the average length of most tasks ranging from 5k to 15k, and a total of 4,750 test data. For detailed statistics and construction methods of LongBench tasks, please refer [here](task.md). In addition, we provide LongBench-E, a test set with a more uniform length distribution constructed by uniform sampling, with comparable amounts of data in the 0-4k, 4k-8k, and 8k+ length intervals to provide an analysis of the model's performance variations at different input lengths.
|
| 25 |
|
| 26 |
Github Repo for LongBench: https://github.com/THUDM/LongBench
|
| 27 |
+
Arxiv Paper for LongBench: [https://arxiv.org/abs/2308.14508](https://arxiv.org/abs/2308.14508)
|
| 28 |
|
| 29 |
# How to use it?
|
| 30 |
|
|
|
|
| 75 |
|
| 76 |
# Task statistics
|
| 77 |
|
| 78 |
+
| Task | Task Type | Eval metric | Avg len |Language | #Sample |
|
| 79 |
| :-------- | :-----------:| :-----------: |:-------: | :-----------: |:--------: |
|
| 80 |
+
| HotpotQA | Multi-doc QA | F1 |9,151 |EN |200 |
|
| 81 |
+
| 2WikiMultihopQA| Multi-doc QA | F1 |4,887 |EN |200 |
|
| 82 |
+
| MuSiQue| Multi-doc QA | F1 |11,214 |EN |200 |
|
| 83 |
+
| DuReader| Multi-doc QA | Rouge-L |15,768 |ZH |200 |
|
| 84 |
+
| MultiFieldQA-en| Single-doc QA | F1 |4,559 |EN |150 |
|
| 85 |
+
| MultiFieldQA-zh| Single-doc QA | F1 |6,701 |ZH |200 |
|
| 86 |
+
| NarrativeQA| Single-doc QA | F1 |18,409 |EN |200 |
|
| 87 |
+
| Qasper| Single-doc QA | F1 |3,619 |EN |200 |
|
| 88 |
+
| GovReport| Summarization | Rouge-L |8,734 |EN |200 |
|
| 89 |
+
| QMSum| Summarization | Rouge-L |10,614 |EN |200 |
|
| 90 |
+
| MultiNews| Summarization | Rouge-L |2,113 |EN |200 |
|
| 91 |
+
| VCSUM| Summarization | Rouge-L |15,380 |ZH |200 |
|
| 92 |
+
| TriviaQA| Few shot | F1 |8,209 |EN |200 |
|
| 93 |
+
| SAMSum| Few shot | Rouge-L |6,258 |EN |200 |
|
| 94 |
+
| TREC| Few shot | Accuracy |5,177 |EN |200 |
|
| 95 |
+
| LSHT| Few shot | Accuracy |22,337 |ZH |200 |
|
| 96 |
+
| PassageRetrieval-en| Synthetic | Accuracy |9,289 |EN |200 |
|
| 97 |
+
| PassageCount| Synthetic | Accuracy |11,141 |EN |200 |
|
| 98 |
+
| PassageRetrieval-zh | Synthetic | Accuracy |6,745 |ZH |200 |
|
| 99 |
+
| LCC| Code | Edit Sim |1,235 |Python/C#/Java |500 |
|
| 100 |
+
| RepoBench-P| Code | Edit Sim |4,206 |Python/Java |500 |
|
| 101 |
|
| 102 |
> Note: In order to avoid discrepancies caused by different tokenizers, we use the word count (using Python's split function) to calculate the average length of English datasets and code datasets, and use the character count to calculate the average length of Chinese datasets.
|
| 103 |
|
| 104 |
# Task description
|
| 105 |
+
| Task | Task Description |
|
| 106 |
| :---------------- | :----------------------------------------------------------- |
|
| 107 |
+
| HotpotQA | Answer related questions based on multiple given documents |
|
| 108 |
+
| 2WikiMultihopQA | Answer related questions based on multiple given documents |
|
| 109 |
+
| MuSiQue | Answer related questions based on multiple given documents |
|
| 110 |
+
| DuReader | Answer related Chinese questions based on multiple retrieved documents |
|
| 111 |
+
| MultiFieldQA-en | Answer English questions based on a long article, which comes from a relatively diverse field |
|
| 112 |
+
| MultiFieldQA-zh | Answer Chinese questions based on a long article, which comes from a relatively diverse field |
|
| 113 |
+
| NarrativeQA | Answer questions based on stories or scripts, including understanding of important elements such as characters, plots, themes, etc. |
|
| 114 |
+
| Qasper | Answer questions based on a NLP research paper, questions proposed and answered by NLP practitioners |
|
| 115 |
+
| GovReport | A summarization task that requires summarizing government work reports |
|
| 116 |
+
| MultiNews | A multi-doc summarization that requires summarizing over multiple news |
|
| 117 |
+
| QMSum | A summarization task that requires summarizing meeting records based on user queries |
|
| 118 |
+
| VCSUM | A summarization task that requires summarizing Chinese meeting records |
|
| 119 |
+
| SAMSum | A dialogue summarization task, providing several few-shot examples |
|
| 120 |
+
| TriviaQA | Single document question answering task, providing several few-shot examples |
|
| 121 |
+
| NQ | Single document question answering task, providing several few-shot examples |
|
| 122 |
+
| TREC | A classification task that requires categorizing questions, includes 50 categories in total |
|
| 123 |
+
| LSHT | A Chinese classification task that requires categorizing news, includes 24 categories in total |
|
| 124 |
| PassageRetrieval-en | Given 30 English Wikipedia paragraphs, determine which paragraph the given summary corresponds to |
|
| 125 |
| PassageCount | Determine the total number of different paragraphs in a given repetitive article |
|
| 126 |
| PassageRetrieval-zh | Given several Chinese paragraphs from the C4 data set, determine which paragraph the given abstract corresponds to |
|
| 127 |
+
| LCC | Given a long piece of code, predict the next line of code |
|
| 128 |
+
| RepoBench-P | Given code in multiple files within a GitHub repository (including cross-file dependencies), predict the next line of code |
|
| 129 |
|
| 130 |
# Task construction
|
| 131 |
> Note: For all tasks constructed from existing datasets, we use data from the validation or test set of the existing dataset (except for VCSUM).
|
|
|
|
| 142 |
- For the [LCC](https://arxiv.org/abs/2306.14893) task, we sample from the original code completion dataset. In the [RepoBench-P](https://arxiv.org/abs/2306.03091) task, we select the most challenging XF-F (Cross-File-First) setting from the original dataset and refer to the Oracle-Filled scenario in the paper. For each original piece of data, we randomly extract multiple cross-file code snippets, including the gold cross-file code snippet, and concatenate them as input, requiring the model to effectively use cross-file code for completion.
|
| 143 |
|
| 144 |
# LongBench-E statistics
|
| 145 |
+
| Task | Task Type | #data in 0-4k | #data in 4-8k | #data in 8k+|
|
| 146 |
| :--------- | :-----------:| :-----------: |:---------: | :-------------: |
|
| 147 |
+
| HotpotQA | Multi-doc QA | 100 |100 |100 |
|
| 148 |
+
| 2WikiMultihopQA| Multi-doc QA | 100 |100 |100 |
|
| 149 |
+
| MultiFieldQA-en| Single-doc QA | 67 |70 |13 |
|
| 150 |
+
| Qasper| Single-doc QA | 100 |100 |24 |
|
| 151 |
+
| GovReport| Summarization | 100 |100 |100 |
|
| 152 |
+
| MultiNews| Summarization | 100 |100 |94 |
|
| 153 |
+
| TriviaQA| Few shot | 100 |100 |100 |
|
| 154 |
+
| SAMSum| Few shot | 100 |100 |100 |
|
| 155 |
+
| TREC| Few shot | 100 |100 |100 |
|
| 156 |
+
| PassageRetrieval-en| Synthetic | 100 |100 |100 |
|
| 157 |
+
| PassageCount| Synthetic | 100 |100 |100 |
|
| 158 |
+
| LCC| Code | 100 |100 |100 |
|
| 159 |
+
| RepoBench-P| Code | 100 |100 |100 |
|
| 160 |
+
|
| 161 |
+
# Used In / Related Work
|
| 162 |
+
This dataset has been utilized in recent research, such as:
|
| 163 |
+
- [**AttnTrace: Attention-based Context Traceback for Long-Context LLMs**](https://huggingface.co/papers/2508.03793)
|
| 164 |
+
- Project page / Demo: [https://huggingface.co/spaces/SecureLLMSys/AttnTrace](https://huggingface.co/spaces/SecureLLMSys/AttnTrace)
|
| 165 |
|
| 166 |
# Citation
|
| 167 |
+
```bib
|
| 168 |
@misc{bai2023longbench,
|
| 169 |
title={LongBench: A Bilingual, Multitask Benchmark for Long Context Understanding},
|
| 170 |
author={Yushi Bai and Xin Lv and Jiajie Zhang and Hongchang Lyu and Jiankai Tang and Zhidian Huang and Zhengxiao Du and Xiao Liu and Aohan Zeng and Lei Hou and Yuxiao Dong and Jie Tang and Juanzi Li},
|