Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/inferencebench/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
338 changes: 338 additions & 0 deletions src/inferencebench/README.md

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions src/inferencebench/adapter_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[
{
"adapter_name": "inferencebench",
"adapter_builders": ["Yuanfan Chen (yuanfan0504@gmail.com)"],
"original_benchmark": [
{
"split": "full",
"size": 12,
"harness": "agent",
"supported_agents": [
"claude-code@2.1.258",
"codex@0.164.0",
"gemini-cli@0.39.1",
"opencode@1.14.28"
],
"adaptable": true,
"notes": "4 scenarios x 3 seed pairs on Mistral-7B-Instruct-v0.3. The paper's other models and budgets are ablations and are not adapted."
}
],
"harbor_adapter": [
{
"split": "full",
"adapted_benchmark_size": 12,
"parity_benchmark_size": 12,
"parity_sampling_rate": 1.0,
"registry_benchmark_size": 12,
"added_agents": ["inferencebench.agents:ClaudeCodeUntilDeadline"],
"parity_matching_agents": [],
"parity_unmatching_agents": ["None"],
"parity_costs": null,
"notes": "Parity is pending. The agent, model, and number of runs have not been agreed yet."
}
]
}
]
19 changes: 19 additions & 0 deletions src/inferencebench/inferencebench_daytona.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Oracle verification on Daytona GPU sandboxes. The oracle is judged like any other run, so the
# host needs HF_TOKEN and a judge credential (ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN);
# without one, no trial is evaluated or graded. Each trial gets its own sandbox and GPU, so -n
# can be raised to your H100 quota once a single task has passed.
# From the repository root, one task at a time (see "Oracle pilot" in the README):
# uv run --project src/inferencebench --with 'harbor[daytona]==0.26.0' harbor run -c src/inferencebench/inferencebench_daytona.yaml \
# -p datasets/inferencebench -i inferencebench-a-mistral-7b-21-1337
jobs_dir: jobs
n_attempts: 1
timeout_multiplier: 1.0
n_concurrent_trials: 1
quiet: false
environment:
type: daytona
delete: true
agents:
- name: oracle
datasets:
- path: datasets/inferencebench
19 changes: 19 additions & 0 deletions src/inferencebench/inferencebench_modal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Oracle verification on Modal cloud GPUs. The oracle is judged like any other run, so the
# host needs HF_TOKEN and a judge credential (ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN);
# without one, no trial is evaluated or graded. Each trial gets its own sandbox and GPU, so -n
# can be raised to your H100 quota once a single task has passed.
# From the repository root, one task at a time (see "Oracle pilot" in the README):
# uv run --project src/inferencebench --with 'harbor[modal]==0.26.0' harbor run -c src/inferencebench/inferencebench_modal.yaml \
# -p datasets/inferencebench -i inferencebench-a-mistral-7b-21-1337
jobs_dir: jobs
n_attempts: 1
timeout_multiplier: 1.0
n_concurrent_trials: 1
quiet: false
environment:
type: modal
delete: true
agents:
- name: oracle
datasets:
- path: datasets/inferencebench
25 changes: 25 additions & 0 deletions src/inferencebench/inferencebench_parity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Harbor side of a parity run. The agent repeats upstream's wrapper (deadline, continuation loop,
# restarts) and uses the CLI version that the task image already ships. Harbor passes
# ANTHROPIC_API_KEY, and ANTHROPIC_BASE_URL if it is set, from the host environment. The judge
# uses CLAUDE_CODE_OAUTH_TOKEN if the host sets it, and the same ANTHROPIC_API_KEY otherwise.
# Each trial gets its own sandbox and GPU, so -n can be raised to your H100 quota.
# From the repository root:
# uv run --project src/inferencebench --with 'harbor[daytona]==0.26.0' harbor run -c src/inferencebench/inferencebench_parity.yaml
jobs_dir: jobs
n_attempts: 1
timeout_multiplier: 1.0
n_concurrent_trials: 1
quiet: false
environment:
type: daytona
delete: true
agents:
- import_path: inferencebench.agents:ClaudeCodeUntilDeadline
model_name: anthropic/claude-sonnet-4-6
# The agent stops the CLI when the task's 2-hour budget ends. Harbor's own agent timeout
# only backs that up, so it leaves the agent time to return.
override_timeout_sec: 7320
kwargs:
version: 2.1.258
datasets:
- path: datasets/inferencebench
26 changes: 26 additions & 0 deletions src/inferencebench/parity_experiment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
"adapter_name": "inferencebench",
"agent": "<agent>@<version>",
"model": "<model>",
"date": "YYYY-MM-DD",
"adapted_benchmark_size": 12,
"parity_benchmark_size": 12,
"number_of_runs": null,
"notes": "Parity is pending. The agent, model, and number of runs have not been agreed yet.",
"original_parity_repo": null,
"adapter_pr": ["https://github.com/harbor-framework/adapters/pull/71"],
"dataset_pr": null,
"parity_pr": null,
"metrics": [
{
"benchmark_name": "InferenceBench",
"metric": "Aggregate speedup",
"original": "<mean +/- sample_SEM, e.g. 45.2% +/- 1.3%>",
"harbor": "<mean +/- sample_SEM, e.g. 44.8% +/- 1.1%>",
"original_runs": [],
"harbor_runs": []
}
]
}
]
18 changes: 18 additions & 0 deletions src/inferencebench/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[project]
name = "harbor-inferencebench-adapter"
version = "0.1.0"
description = "Harbor adapter for InferenceBench, a benchmark of agents optimizing an LLM inference server"
readme = "README.md"
requires-python = ">=3.12"
dependencies = []

[project.scripts]
inferencebench = "inferencebench.main:main"
inferencebench-score = "inferencebench.score:main"

[build-system]
requires = ["uv_build>=0.12.3,<0.13.0"]
build-backend = "uv_build"

[tool.uv.build-backend]
module-name = "inferencebench"
22 changes: 22 additions & 0 deletions src/inferencebench/run_inferencebench.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Oracle verification on a host with Docker and an NVIDIA H100 GPU. Keep n_concurrent_trials
# at 1: Harbor's Docker environment asks for one GPU by count and does not choose which, so
# concurrent trials can land on the same GPU and distort each other's measurements.
# The oracle is judged like any other run, so the host needs HF_TOKEN and a judge credential
# (ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN); without one, no trial is evaluated or graded.
# For an agent run, use inferencebench_parity.yaml with `environment.type: docker`.
# From the repository root, one task at a time (see "Oracle pilot" in the README):
# uv run --project src/inferencebench --with harbor==0.26.0 harbor run -c src/inferencebench/run_inferencebench.yaml \
# -p datasets/inferencebench -i inferencebench-a-mistral-7b-21-1337
jobs_dir: jobs
n_attempts: 1
timeout_multiplier: 1.0
n_concurrent_trials: 1
quiet: false
environment:
type: docker
force_build: false
delete: true
agents:
- name: oracle
datasets:
- path: datasets/inferencebench
1 change: 1 addition & 0 deletions src/inferencebench/src/inferencebench/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__all__ = []
Loading