Artificial Analysis Long Context Reasoning (AA-LCR) adaptation - packaged by NVIDIA Eval Factory
Project description
AA-LCR
Artificial Analysis - Long Context Reasoning (AA-LCR) is a benchmark for evaluating long context performance through testing reasoning capabilities across multiple long documents (~100k tokens).
Announcement: link
Leaderboard: link
Dataset: link
NVIDIA Eval Factory
The goal of NVIDIA Eval Factory is to advance and refine state-of-the-art methodologies for model evaluation, and deliver them as modular evaluation packages (evaluation containers and pip wheels) that teams can use as standardized building blocks.
Quick start guide
NVIDIA Eval Factory provide you with evaluation clients, that are specifically built to evaluate model endpoints using our Standard API.
Launching an evaluation for an LLM
-
Install the package
pip install aa-lcr --index-url https://gitlab-master.nvidia.com/api/v4/projects/153108/packages/pypi/simple -
(Optional) Set a token to your API endpoint if it's protected
export MY_API_KEY="your_api_key_here"
-
List the available evaluations:
$ eval-factory ls AA-LCR: * aa_lcr
-
Run the evaluation of your choice:
eval-factory run_eval \ --eval_type aa_lcr \ --model_id meta/llama-3.1-70b-instruct \ --model_url https://integrate.api.nvidia.com/v1/chat/completions \ --model_type chat \ --api_key_name MY_API_KEY \ --output_dir /workspace/results
-
Gather the results
cat /workspace/results/results.yml
Command-Line Tool
Each package comes pre-installed with a set of command-line tools, designed to simplify the execution of evaluation tasks. Below are the available commands and their usage for the aa_lcr:
Commands
1. List Evaluation Types
eval-factory ls
Displays the evaluation types available within the harness.
2. Run an evaluation
The eval-factory run_eval command executes the evaluation process. Below are the flags and their descriptions:
Required flags
--eval_type <string>The type of evaluation to perform--model_id <string>The name or identifier of the model to evaluate.--model_url <url>The API endpoint where the model is accessible.--model_type <string>The type of the model to evaluate, currently either "chat" or "completions".--output_dir <directory>The directory to use as the working directory for the evaluation. The results, including the results.yml output file, will be saved here.
Optional flags
--api_key_name <string>The name of the environment variable that stores the Bearer token for the API, if authentication is required.--run_config <path>Specifies the path to a YAML file containing the evaluation definition.
Example
eval-factory run_eval \
--eval_type aa_lcr \
--model_id my_model \
--model_type chat \
--model_url http://localhost:8000 \
--output_dir ./evaluation_results
If the model API requires authentication, set the API key in an environment variable and reference it using the --api_key_name flag:
export MY_API_KEY="your_api_key_here"
eval-factory run_eval \
--eval_type aa_lcr \
--model_id my_model \
--model_type chat \
--model_url http://localhost:8000 \
--api_key_name MY_API_KEY \
--output_dir ./evaluation_results
Configuring evaluations via YAML
Evaluations in NVIDIA Eval Factory are configured using YAML files that define the parameters and settings required for the evaluation process. These configuration files follow a standard API which ensures consistency across evaluations.
Example of a YAML config:
config:
type: aa_lcr
params:
parallelism: 50
limit_samples: 20
target:
api_endpoint:
model_id: meta/llama-3.1-8b-instruct
type: chat
url: https://integrate.api.nvidia.com/v1/chat/completions
api_key_name: NVIDIA_API_KEY
The priority of overrides is as follows:
- command line arguments
- user config (as seen above)
- task defaults (defined per task type)
- framework defaults
--dry_run option allows you to print the final run configuration and command without executing the evaluation.
Example:
eval-factory run_eval \
--eval_type aa_lcr \
--model_id my_model \
--model_type chat \
--model_url http://localhost:8000 \
--output_dir .evaluation_results \
--dry_run
Output:
Rendered config:
command: aa_lcr --model={{target.api_endpoint.model_id}} --endpoint_url={{target.api_endpoint.url}} --temperature={{config.params.temperature}}
--top_p={{config.params.top_p}} --request_timeout={{config.params.request_timeout}} {%
if config.params.limit_samples is not none %}--limit {{config.params.limit_samples}}{%
endif %} --output_dir={{config.output_dir}} {% if target.api_endpoint.api_key_name is
not none %}--api_key_name={{target.api_endpoint.api_key_name}}{% endif %} --max_retries={{config.params.max_retries}} --max_new_tokens={{config.params.max_new_tokens}}
--async_limit={{config.params.parallelism}} --num_repeats={{config.params.extra.num_repeats}}
framework_name: AA-LCR
pkg_name: aa_lcr
config:
output_dir: .evaluation_results
params:
limit_samples: null
max_new_tokens: 4096
max_retries: 30
parallelism: 10
task: aa_lcr
temperature: 0.0
request_timeout: 600
top_p: 1.0
extra:
num_repeats: 3
supported_endpoint_types:
- chat
type: aa_lcr
target:
api_endpoint:
api_key_name: null
model_id: my_model
stream: null
type: chat
url: http://localhost:8000
adapter_config: null
Rendered command:
aa_lcr --model=my_model --endpoint_url=http://localhost:8000 --temperature=0.0 --top_p=1.0 --request_timeout=600 --output_dir=.evaluation_results --max_retries=30 --max_new_tokens=4096 --async_limit=10 --num_repeats=3
Deploying a model as an endpoint
NVIDIA Eval Factory utilize a client-server communication architecture to interact with the model. As a prerequisite, the model must be deployed as an endpoint with a NIM-compatible API.
Users have the flexibility to deploy their model using their own infrastructure and tooling.
Servers with APIs that conform to the OpenAI/NIM API standard are expected to work seamlessly out of the box.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nvidia_aa_lcr-26.3-py3-none-any.whl.
File metadata
- Download URL: nvidia_aa_lcr-26.3-py3-none-any.whl
- Upload date:
- Size: 12.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af174c2db90bcef69b0e7f0088a1fc2a3860312c5c1d46d765ba728f3d75c396
|
|
| MD5 |
90e193146ecdf4cad13b3d88cfa79fdb
|
|
| BLAKE2b-256 |
90f58d562fea76f3957a538f92b321315f7a53ee1a4c13f1824d9a3b39796981
|