Skip to content

Add a benchmark for the serving cost of one Literature AI answer - #8

Merged
man4ish merged 1 commit into
mainfrom
claude/literature-cost-benchmark
Oct 3, 2026
Merged

man4ish merged 1 commit into
mainfrom
claude/literature-cost-benchmark

Conversation

@man4ish

@man4ish man4ish commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

literature_cost_benchmark.py sends N questions (built-in set or a file) to POST /v1/literature/answers with an omni_sk_ key, optionally in parallel, while sampling nvidia-smi on a background thread. It reports:

  • answers, statuses, throughput, latency mean/p50/p95/max
  • GPU busy-seconds and Wh per answer, peak GPU memory
  • cost per answer at the measured throughput ("dedicated") and for GPU busy time only, from --gpu-hourly-cost
  • a suggested price per 1,000 answers (dedicated cost x --markup)

Every answer is billable, so it asks for confirmation unless --yes, and the README says to use a test organization's key. Each request carries its own Idempotency-Key. Tests cover the module at 100%.

Claude-Session: https://claude.ai/code/session_016nxi4bp7DP1ancERNUUfzj

literature_cost_benchmark.py sends N questions (built-in set or a file)
to POST /v1/literature/answers with an omni_sk_ key, optionally in
parallel, while sampling nvidia-smi on a background thread. It reports:

- answers, statuses, throughput, latency mean/p50/p95/max
- GPU busy-seconds and Wh per answer, peak GPU memory
- cost per answer at the measured throughput ("dedicated") and for GPU
  busy time only, from --gpu-hourly-cost
- a suggested price per 1,000 answers (dedicated cost x --markup)

Every answer is billable, so it asks for confirmation unless --yes, and
the README says to use a test organization's key. Each request carries
its own Idempotency-Key. Tests cover the module at 100%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nxi4bp7DP1ancERNUUfzj
@man4ish
man4ish merged commit cb4d16a into main Oct 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants