SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.06654 · 2024

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

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 5 functions out of this paper's own repositories and ran 5 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
nvidia/ruler canonical 2 of 2
mungg/OneRuler reimplementation 3 of 3
FunctionStatusWhere it lives
clean_text Ran mungg/OneRuler/OneRuler/eval/evaluate.py
code served (permissive licence) · get_code("d7f2c747adfac407")
escape_quotes Ran mungg/OneRuler/OneRuler/eval/evaluate.py
code served (permissive licence) · get_code("e471d920d2c12c30")
extract_model_name Ran mungg/OneRuler/OneRuler/eval/evaluate.py
code served (permissive licence) · get_code("fd1b2d1bb5310843")
generate_random_number Ran nvidia/ruler/scripts/data/synthetic/niah.py
code served (permissive licence) · get_code("67a4392dc018930e")
postprocess_pred Ran nvidia/ruler/scripts/eval/evaluate.py
code served (permissive licence) · get_code("5f32085fb2b18264")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2404.06654")
get_code_for_paper("2404.06654")
have("2404.06654")

Connect an agent — have() is free.