NVIDIA NeMo Evaluator-compatible container with LM-Evaluation-Harness support. Based on lm-evaluation-harness available at: https://github.com/EleutherAI/lm-evaluation-harness
NVIDIA NeMo Evaluator
The goal of NVIDIA NeMo Evaluator 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: Evaluation containers
NVIDIA NeMo Evaluator containers provide you with evaluation clients, that are specifically built to evaluate model endpoints using our Standard API.
Prerequisites
- Ensure docker is installed and running on the machine where you want to run the evaluation.
- Verify you have access to NVIDIA NeMo Evaluator container registry.
- Deploy your model as an endpoint with an API compatible with OpenAI or NIM.
Launching an evaluation for an LLM
List the available evaluations:
- Pull the LLM evaluation container image
- Run the container
- (Optional) Set a token to your API endpoint if it's protected
Run the evaluation of your choice:
Gather the results:
Command-Line Tool
Each container 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 lm_eval (lm-evaluation-harness):
Commands
1. List Evaluation Types
Displays the evaluation types available within the harness.
2. Run an evaluation
The nemo-evaluator 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", "completions", or "vlm".--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
If the model API requires authentication, set the API key in an environment variable and reference it using the --api_key_name flag:
Configuring evaluations via YAML
Evaluations in NVIDIA NeMo Evaluator 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:
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:
Output:
FAQ
Deploying a model as an endpoint
NVIDIA NeMo Evaluator containers 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.
3rd Party Source Code
Users can download the third party source code through the URL provided in the container's README located in workdir.