Skip to content

Adds RULER benchmark #722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Adds RULER benchmark #722

wants to merge 7 commits into from

Conversation

NathanHB
Copy link
Member

@NathanHB NathanHB commented May 15, 2025

https://github.com/NVIDIA/RULER

Available context size: 4096, 8192, 16384, 32768, 65536, 131072

uv run lighteval vllm "model_name=meta-llama/Llama-3.1-8B,dtype=bfloat16,max_model_length=131072" "lighteval|ruler_{context size}|0|0"

@HuggingFaceDocBuilderDev
Copy link
Collaborator

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@NathanHB NathanHB linked an issue May 15, 2025 that may be closed by this pull request
@@ -24,6 +24,1238 @@
from lighteval.tasks.lighteval_task import LightevalTaskConfig


ruler_niah_single_1_131072 = LightevalTaskConfig(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imo we should keep the task names in alphabetical order to make the file easier to browse

@NathanHB NathanHB requested a review from Copilot May 21, 2025 14:52
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates the RULER benchmark into the lighteval framework, expanding its evaluation capabilities.

  • Implements a new prompt function for RULER in default_prompts.py
  • Wraps task iteration with tqdm progress bars in lighteval_task.py
  • Adds new RULER metrics in metrics.py and introduces a debugging breakpoint in vllm_model.py

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

File Description
src/lighteval/tasks/lighteval_task.py Adds tqdm import and progress bars to task iteration loops
src/lighteval/tasks/default_prompts.py Adds a new RULER prompt function; contains a typo in the arc_with_options function
src/lighteval/models/vllm/vllm_model.py Modifies logging format and introduces a breakpoint for debugging
src/lighteval/metrics/metrics.py Adds new RULER metrics for evaluation

@@ -254,7 +265,7 @@ def arc_with_options(line, task_name: str = None):
query += "".join([f"\n{key}. {choice}" for key, choice in zip(LETTER_INDICES, line["choices"]["text"])])
query += "\nAnswer:"
return Doc(
task_name=task_name,
mm task_name=task_name,
Copy link
Preview

Copilot AI May 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears that an extraneous 'mm' has been introduced before the task_name parameter. Please remove it to restore valid syntax.

Suggested change
mm task_name=task_name,
task_name=task_name,

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[EVAL] Add RULER for evaluating long context
3 participants