Skip to main content

Prerequisites

  • An NVIDIA or AMD GPU (or use --dry-run on CPU)
  • Python 3.10+
  • An Anthropic API key (or any supported LLM provider)

Install

Prepare a workload

Forge optimizes against your real traffic. The workload is a JSONL file — one request per line:
A 50-example starter is bundled:
For production use, export a sample of your real traffic from Langfuse, your API gateway logs, or any JSONL source.

Run

Forge will:
  1. Auto-detect your GPU via nvidia-smi / rocm-smi
  2. Boot vLLM with the baseline config
  3. Benchmark your workload at up to 8 concurrent requests
  4. Ask the agent LLM to propose a mutation
  5. Boot → bench → keep or revert, repeat
Results are saved to .forge/runs/<run-id>/.

Resume an interrupted run

If a run is interrupted (Ctrl-C, timeout, OOM), resume with no arguments — Forge reads everything from the saved config:

View results

Prints a summary table with throughput, P99 latency, accuracy, and whether each experiment was kept.

Device options

LLM providers

The --llm flag selects the agent model. Format: provider/model.
Set the corresponding API key environment variable before running.

Next steps