Skip to main content

Overview

The prime eval run command executes rollouts against model APIs and reports aggregate metrics. It supports single-environment evaluations or multi-environment benchmark suites via TOML config files.

Usage

Arguments

string
required
Either:
  • Environment ID: gsm8k, primeintellect/math-python
  • TOML config path: configs/eval/benchmark.toml (for multi-environment evals)

Model Configuration

string
default:"openai/gpt-4.1-mini"
Model name or endpoint alias from the registry.Aliases: -m
string
default:"https://api.pinference.ai/api/v1"
API base URL. Overrides endpoint registry.Aliases: -b
string
default:"PRIME_API_KEY"
Environment variable containing API key.Aliases: -k
string
default:"openai_chat_completions"
Client type: openai_chat_completions, openai_completions, openai_chat_completions_token, or anthropic_messages.
string
default:"./configs/endpoints.toml"
Path to TOML endpoint registry.Aliases: -e
string
Provider shorthand (prime, openai, anthropic, openrouter, deepseek, minimax, glm, local, vllm).Aliases: -p
string
Extra HTTP header (Name: Value). Repeatable.

Sampling Parameters

integer
Maximum tokens to generate.Aliases: -t
float
Sampling temperature.Aliases: -T
json
Additional sampling parameters as JSON object.Aliases: -SExample: -S '{"top_p": 0.9, "frequency_penalty": 0.5}'

Environment Configuration

json
default:"{}"
Arguments passed to load_environment() as JSON.Aliases: -aExample: -a '{"difficulty": "hard"}'
json
default:"{}"
Arguments passed directly to environment constructor.Aliases: -xExample: -x '{"max_turns": 20}'
string
default:"./environments"
Base path for environment outputs.

Evaluation Scope

integer
default:"5"
Number of dataset examples to evaluate.Aliases: -n
integer
default:"3"
Rollouts per example (for pass@k metrics).Aliases: -r

Concurrency

integer
default:"32"
Maximum concurrent requests (both generation and scoring).Aliases: -c
integer
Concurrent generation requests (defaults to --max-concurrent).
integer
Concurrent scoring requests (defaults to --max-concurrent).
flag
Disable interleaved scoring (score all rollouts after generation completes).Aliases: -N
flag
Score each rollout individually instead of by group.Aliases: -i
integer
default:"0"
Retries per rollout on transient infrastructure errors.

Output and Display

flag
Enable debug logging.Aliases: -v
flag
Use alternate screen mode (TUI) for live display.Aliases: -u
flag
Disable Rich display; use normal logging and tqdm progress.Aliases: -d
flag
Save results to disk in ./outputs/evals/ or ./environments/*/outputs/evals/.Aliases: -s
string
Extra state columns to save (comma-separated).Aliases: -CExample: -C "judge_response,parsed_answer"
string
Resume from a previous run. Optionally provide a path; if omitted, auto-detect latest incomplete run.Aliases: -R
flag
Push results to Hugging Face Hub.Aliases: -H
string
Dataset name for HF Hub upload.Aliases: -D
string
Heartbeat URL for uptime monitoring.
flag
Do not start environment servers for OpenEnv environments.

Examples

Basic Evaluation

Output:

With Custom Sampling

With Environment Arguments

Save and Resume

Using Anthropic API

Or using the provider shorthand:

Multi-Environment Benchmark

configs/eval/benchmark.toml:

High Concurrency

Debug Mode

Configuration Files

Endpoint Registry

Define model endpoints in configs/endpoints.toml:
Then reference by endpoint ID:

Multi-Environment Config

Results Output

With --save-results, outputs are saved to:
Or per-environment:

results.jsonl Format

Each line contains one rollout:

metadata.json Format

Configuration Precedence

CLI Mode

  1. CLI flags
  2. Environment defaults (from pyproject.toml)
  3. Built-in defaults

TOML Config Mode

  1. Per-eval settings ([[eval]] sections)
  2. Global settings (top of config file)
  3. Environment defaults (from pyproject.toml)
  4. Built-in defaults

Environment Defaults

Environments can specify defaults in pyproject.toml:
These are used when higher-priority sources don’t specify a value.

Resuming Evaluations

Long evaluations can be resumed:
Resume requirements:
  • Same env_id, model, and rollouts_per_example
  • num_examples must be >= original target
  • Results directory must contain valid results.jsonl and metadata.json

Troubleshooting

Environment Not Found

Solution:

API Key Not Set

Solution:

Rate Limit Errors

Reduce concurrency:
Or add retries:

Out of Memory

For large evaluations, enable checkpointing and reduce batch size: