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
130 changes: 130 additions & 0 deletions data/benchmarks/results_cuvs_26_04.csv

Large diffs are not rendered by default.

2,453 changes: 2,453 additions & 0 deletions fern/assets/data/benchmark_results.json

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions fern/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ generate_api_reference() {
python3 "${SCRIPT_DIR}/scripts/generate_api_reference.py"
}

export_performance_dashboard_data() {
python3 "${SCRIPT_DIR}/scripts/export_performance_dashboard_data.py"
}

run_checks() {
pushd "${REPO_DIR}" >/dev/null
run_fern check --warnings
Expand All @@ -78,24 +82,28 @@ run_checks() {
case "${MODE}" in
check)
generate_api_reference
export_performance_dashboard_data
run_checks
;;
preview)
generate_api_reference
export_performance_dashboard_data
run_checks
pushd "${REPO_DIR}" >/dev/null
run_fern generate --docs --preview "$@"
popd >/dev/null
;;
publish)
generate_api_reference
export_performance_dashboard_data
run_checks
pushd "${REPO_DIR}" >/dev/null
run_fern generate --docs "$@"
popd >/dev/null
;;
dev)
generate_api_reference
export_performance_dashboard_data
pushd "${REPO_DIR}" >/dev/null
run_fern docs dev "$@"
popd >/dev/null
Expand Down
3 changes: 3 additions & 0 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ css:
- "./styles/metrics-table.css"
- "./styles/notebook-viewer.css"
- "./styles/trajectory-viewer.css"
- "./styles/performance-dashboard.css"
experimental:
mdx-components:
- "./theme/nvidia/components"
Expand Down Expand Up @@ -96,6 +97,8 @@ navigation:
path: "./pages/tuning_guide.md"
- page: "Integrations"
path: "./pages/integrations.md"
- page: "Performance"
path: "./pages/performance.md"
- page: "Use-cases"
path: "./pages/use_cases.md"
- page: "Using cuVS APIs"
Expand Down
13 changes: 13 additions & 0 deletions fern/pages/performance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import PerformanceDashboard from "@/theme/nvidia/components/PerformanceDashboard";

# Performance

Compare cuVS-Bench performance across hardware and algorithms. Adjust the filters to see comparative performance for index build time, search throughput (QPS), and search latency.

<PerformanceDashboard />

## About this data

These results come from [cuVS-Bench](cuvs_bench/index.md) runs on cuVS 26.04. The source dataset is [MIRACL](https://huggingface.co/datasets/miracl/miracl-corpus), embedded with [Llama Nemotron Embed 1B](https://huggingface.co/nvidia/llama-nemotron-embed-1b-v2). Each row represents a tuned configuration bucketed by recall range (`90%`, `95%`, `99%`). Green bars denote GPU SKUs; blue bars denote CPU SKUs.

To reproduce or extend these benchmarks, see the [cuVS Bench guide](cuvs_bench/index.md).
85 changes: 85 additions & 0 deletions fern/scripts/export_performance_dashboard_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/usr/bin/env python3
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0

"""Export cuVS bench CSV results to JSON and TypeScript for the Performance dashboard."""

from __future__ import annotations

import csv
import json
from pathlib import Path

REPO_DIR = Path(__file__).resolve().parents[2]
DEFAULT_CSV = REPO_DIR / "data" / "benchmarks" / "results_cuvs_26_04.csv"
OUTPUT_JSON = REPO_DIR / "fern" / "assets" / "data" / "benchmark_results.json"
BENCHMARK_DATA_TS = (
REPO_DIR / "fern" / "theme" / "nvidia" / "components" / "benchmarkData.ts"
)

NUMERIC_COLUMNS = {
"Index Build Time (s)",
"Search Batch Size",
"TopK",
"Mean Search Throughput (QPS)",
"Mean Search Latency (ms)",
"Mean Recall",
"N Points in Bucket",
"Total Vectors",
"Dimensions",
}


def parse_row(row: dict[str, str]) -> dict:
parsed: dict = {}
for key, value in row.items():
if key in NUMERIC_COLUMNS and value not in ("", "NA", None):
try:
parsed[key] = float(value) if "." in value else int(value)
except ValueError:
parsed[key] = value
else:
parsed[key] = value
return parsed


def write_benchmark_data_ts(rows: list[dict], output_path: Path) -> None:
output_path.write_text(
"""/**
* SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION.
* SPDX-License-Identifier: Apache-2.0
*/

export type BenchmarkRow = Record<string, string | number | null>;

export const BENCHMARK_ROWS: BenchmarkRow[] = """
+ json.dumps(rows, indent=2)
+ ";\n",
encoding="utf-8",
)


def export(csv_path: Path = DEFAULT_CSV, output_path: Path = OUTPUT_JSON) -> int:
if not csv_path.is_file():
raise FileNotFoundError(f"Benchmark CSV not found: {csv_path}")

with csv_path.open(newline="", encoding="utf-8") as handle:
rows = [parse_row(row) for row in csv.DictReader(handle, delimiter="\t")]

output_path.parent.mkdir(parents=True, exist_ok=True)
output_path.write_text(json.dumps(rows, indent=2), encoding="utf-8")
print(f"Wrote {len(rows)} rows to {output_path}")

write_benchmark_data_ts(rows, BENCHMARK_DATA_TS)
print(f"Wrote {len(rows)} rows to {BENCHMARK_DATA_TS}")

return len(rows)


def main() -> int:
export()
return 0


if __name__ == "__main__":
raise SystemExit(main())
Loading
Loading