Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

RULER: What's the Real Context Size of Your Long-Context Language Models?

About

The needle-in-a-haystack (NIAH) test, which examines the ability to retrieve a piece of information (the "needle") from long distractor texts (the "haystack"), has been widely adopted to evaluate long-context language models (LMs). However, this simple retrieval-based test is indicative of only a superficial form of long-context understanding. To provide a more comprehensive evaluation of long-context LMs, we create a new synthetic benchmark RULER with flexible configurations for customized sequence length and task complexity. RULER expands upon the vanilla NIAH test to encompass variations with diverse types and quantities of needles. Moreover, RULER introduces new task categories multi-hop tracing and aggregation to test behaviors beyond searching from context. We evaluate 17 long-context LMs with 13 representative tasks in RULER. Despite achieving nearly perfect accuracy in the vanilla NIAH test, almost all models exhibit large performance drops as the context length increases. While these models all claim context sizes of 32K tokens or greater, only half of them can maintain satisfactory performance at the length of 32K. Our analysis of Yi-34B, which supports context length of 200K, reveals large room for improvement as we increase input length and task complexity. We open source RULER to spur comprehensive evaluation of long-context LMs.

Cheng-Ping Hsieh, Simeng Sun, Samuel Kriman, Shantanu Acharya, Dima Rekesh, Fei Jia, Yang Zhang, Boris Ginsburg• 2024

Related benchmarks

TaskDatasetResultRank
Commonsense ReasoningWinoGrande--
1442
Language ModelingWikiText
Word Perplexity19.07
234
Commonsense ReasoningPIQA
Accuracy72.91
213
Question AnsweringBoolQ
Accuracy61.71
201
Commonsense ReasoningSIQA
Accuracy40.69
168
Question AnsweringARC Challenge
Normalized Accuracy38.65
105
Question AnsweringARC Easy
Normalized Accuracy67.76
55
Common Sense ReasoningHellaSwag--
47
Long-context retrievalNIAH Single-3
Accuracy (1024)49.2
22
Common Sense ReasoningCommon-sense Reasoning Suite PIQA, HellaSwag, WinoGrande, ARC-e, ARC-c, SIQA, BoolQ
Average Accuracy55.93
14
Showing 10 of 14 rows

Other info

Follow for update