Skip to main content

Evidence-gated optimization

InferCrane separates proposing a configuration from proving it. The optimizer starts with reviewed model metadata and locally or really qualified provider/runtime compatibility. When the exact optional estimator toolchain is available, it uses AIConfigurator to narrow the setups it proposes. Otherwise it proposes conservative setups from the reviewed catalog. Neither path contacts a control plane or provisions paid capacity. The CLI and the dashboard call one optimization a run and each configuration it measures a setup; a winner is rolled out. The control API calls a run an optimization campaign, a setup a candidate, and rolling out activating or promoting. API fields, states, codes, and the sections on how measurement works keep the API’s names. See Words. Check the optional estimator once:
Install its exact compatible tuple in an isolated Python 3.11–3.13 environment:
The plotext pin is required: AIConfigurator 0.11.0 is not compatible with plotext 6.0.0 even though its published dependency range permits it. optimize doctor validates the complete tuple, not just the top-level package.
The default --source auto tries the pinned AIConfigurator adapter and visibly falls back to the reviewed catalog when the optional tool is unavailable. Use --source aiconfigurator to require the estimator or --source catalog for deterministic reviewed starting profiles only. The result is a bounded list of setups. Each spec pins:
  • the exact model revision;
  • runtime engine and version;
  • provider adapter, region, and accelerator;
  • reviewed runtime arguments;
  • compute mode, scale bounds, and routing strategy.

Start from a public workload prior

When customer traffic is not available yet, choose one of InferCrane’s immutable content-free public priors. The default interactive lane is available directly to the optimizer:
Automation clients can discover the same versioned inputs with GET /api/v1/workload-profiles. Each result includes a ready-to-submit benchmark_request, its exact optimizer binding, source provenance, and the evidence digest. Available lanes cover interactive, long-prefill, and decode-heavy shapes. The public trace chooses token-shape experiments only. It does not supply a customer arrival rate, quality target, or production SLO, so InferCrane marks it promotion_eligible: false. Every setup requires a representative customer replay before qualification or rollout. The prior ships as an embedded artifact; normal product use does not download or rescan the dataset.

Start with any pinned open-weight model

A model does not need to be in the reviewed catalog to enter the proof loop. Supply its repository, immutable commit, intended GPU count, and one or more executable runtimes:
By default, an uncataloged model gets only an untuned vLLM or SGLang baseline. Its only arguments split it across its GPUs (--tensor-parallel-size, or --tp-size for SGLang, when --gpu-count is above 1) and, when max_model_len is set, bound its context (--max-model-len, or --context-length). It does not infer tokenizer behavior, quantization, speculative decoding, or kernel compatibility. Those gaps are listed as required evidence. The optional AIConfigurator adapter may narrow these generic setups, but its output remains modeled and unqualified. A mutable branch such as main is rejected; the revision must be a 40–64 character hexadecimal commit. When the control plane has Hugging Face metadata access on, you can leave out the commit. Both infercrane optimize propose|create ORG/MODEL and POST /api/v1/optimization/proposals then run the automatic check: it pins the commit it read, sets max_model_len to the context the GPU was sized for (8192 tokens by default), and refuses a model it found unsupported with model_unsupported and the reason. For a gated or private model, name the saved Hugging Face token with model_secret_reference_id: it checks the model and reaches every candidate’s worker through the provider’s own secret store, while the token never enters the proposal. model_adapters serves the same pinned LoRA adapter on every candidate (checkpoint swaps are skipped), and imported s3:// or gs:// weights are pinned by their manifest digest as model_revision; see model artifacts. A request that already names a commit proceeds as before when the check cannot run. This is how a run started from the dashboard works for any model it deployed.

Find the best setup for a pinned model

To find the best setup for any model pinned to a commit, let InferCrane read the model’s pinned config.json with --allow-model-metadata-network. It then adds setups to measure and uses the config to decide which apply, so this does not depend on the model name:
Pass --model-config config.json instead to stay offline. Either one turns on these added setups; --search recipes is still accepted by scripts that pass it. Without either, setups that need a declared model feature, such as speculative decoding, are skipped and the proposal says why. With --source aiconfigurator, --allow-model-metadata-network only feeds the estimator. API clients send search, model_features, and model_config_digest on POST /api/v1/optimization/proposals. Each proposal starts with an untuned starting setup on the same image, so every added setup has a like-for-like comparison even under a small --max-candidates. Each added setup applies one optimization technique or combines two: This currently covers SGLang 0.5.20 on H100, H200, and B200 through RunPod Pods. Anywhere else the proposal keeps its existing setups and explains why none were added.
Added setups are listed in planning order, not by predicted performance. Each setup’s flags ran on this image with another model, which proves only that the flags exist. Every added setup is proposed-unmeasured until a run measures it against the starting setup; a wrong or missing config feature costs at most one failed experiment inside the approved spend limit.
The command refuses to overwrite a non-empty output directory. Use --output json to archive the input digest, source, compatibility evidence, required evidence, and limitations with the specs.
A proposal is not a benchmark result or recommendation. AIConfigurator rows are marked modeled and proposed-modeled-unqualified; catalog rows are marked unmeasured and proposed-unmeasured. InferCrane never presents an estimate as measured or qualified evidence.

Choose setups from the endpoint diagnosis

When an endpoint already serves traffic, let its measured bottleneck choose what to try. Name the endpoint and the control plane plans from its recorded diagnosis:
Plan from the endpoint's diagnosis
API clients send diagnosis_endpoint on POST /api/v1/optimization/proposals. The server reads:
  • the endpoint’s optimization-readiness assessment over the last hour: gateway request stages, the serving engine’s own metrics, and DCGM profiling fields when they were fresh;
  • a summary of the newest GPU profile of the endpoint’s active revision, when one was captured in the last 7 days: the share of kernel time spent in attention, matrix-multiply, communication, and other kernels. For a capture recorded with infercrane profile, it also carries the trace analysis (input.diagnosis.gpu_profile.trace): every analysis rule that fired, with its measured value, threshold, and unit, and the measured values behind them, such as idle time waiting on the host, launch delay, the share of graph launches, communication overlap, roofline coverage, decode share, and step times. A value the trace could not measure is left out. A call-stack-only capture, or an analysis version the planner was not written against, carries the kernel shares alone.
A client cannot send a diagnosis itself. The server records it in the proposal’s input.diagnosis, so the input digest binds the choice of setups to the evidence that made it. A missing signal stays missing: no rule fires on it, and a GPU profile that was not recorded is left out rather than inferred. With --diagnosis-endpoint, the CLI asks the control plane for the proposal, so the result matches what the dashboard gets for the same request. It cannot be combined with --source aiconfigurator, because the estimator does not read a diagnosis. The proposal holds the starting setup, which every other setup is measured against, and only setups a diagnosis rule chose, in order of expected benefit. Each added setup is the starting setup with one change, or an existing setup that already makes that change, such as a setup on a pinned image. Generic alternatives are left out. --max-candidates cuts the list after ranking, so the changes most likely to help are the ones measured. When no rule applies, the proposal holds the starting setup alone, and its diagnosis says what to collect, such as serving-engine metrics, before planning again. The starting setup is on the provider adapter the request names, not on what the diagnosed endpoint runs: the plan does not read the endpoint’s own setup. --provider kubernetes names the plain Kubernetes adapter, so the plan starts from a plain server, and the Dynamo serving graph the same cloud also offers comes after it. To plan for an endpoint served by a Dynamo serving graph, name it: --provider kubernetes-dynamo. A request that names the wrong adapter plans from the wrong kind of server. A provider that names only a cloud with several adapters, such as --provider runpod, names none of them; between adapters with equal qualification evidence and equal reusable artifacts the plan then starts from the first in name order (runpod-pods). Either way one request plans from the same kind of server for every --profile. Each rule chooses at most two changes a setup can carry, so a win can be attributed to one change. When several rules choose the same change, it keeps its strongest priority plus a small bonus for each rule that agrees. Speculation is chosen only at low concurrency, where it pays, and never with n-gram drafts, which need repeated text and turn vLLM’s async scheduling off. An FP8 KV cache is chosen only when the KV cache limits the server or contexts are long: below about 7,000 tokens BF16 KV has measured slightly better token latency. Every flag is checked against the engine’s resolved default before a setup is added. Defaults were read from the source of vLLM 0.22.1 and SGLang 0.5.12. vLLM’s batch defaults depend on GPU memory: 2,048 batched tokens and 256 sequences under 70 GB and on A100, and 8,192 and 1,024 from 70 GB up. A flag equal to its default is dropped, and a setup left with no change is not added. When a default is unknown, the setup is not added either. This covers an accelerator whose memory InferCrane does not know, the batch sizes SGLang derives from GPU memory at start, and any other engine version.

Rules from a GPU trace

The trace rows apply only to a capture with a trace analysis (gpu-trace-analysis-v1). They cite the analysis’ own measured value and threshold, so a candidate’s evidence shows, for example, gpu_trace_host_wait_share 0.31 against 0.1. For the same capture, the trace’s attention finding replaces the kernel-share attention row, and a measured communication overlap replaces the kernel-share communication rule: communication hidden under compute costs nothing.
  • Launch overhead. vLLM 0.22.1 and SGLang 0.5.12 already run CUDA graphs and schedule the next step while the GPU runs the current one. A setup is added only when the starting setup turned one off, or, on vLLM, when more requests run per server than the largest batch vLLM captures a graph for: min(max_num_seqs × 2, 512), capped at the per-step token budget, which is 512 with the default limits on any GPU. The new capture size covers the running requests plus a quarter, on vLLM’s capture grid, and never exceeds the setup’s own request or token limit. With the defaults and up to 512 requests running, both changes are skipped as no-ops. SGLang sizes its largest graph from GPU memory at start, so no SGLang capture size is planned. Async scheduling is not planned separately when the starting setup speculates, because the speculation method decides whether it runs. The speculation the planner proposes keeps it on in both engines.
  • Exposed communication. A wider layout would add communication, so no setup with more GPUs per server than the starting setup is added while the trace shows exposed communication.
  • Roofline. A memory- or compute-bound verdict covers only the matrix multiplies whose shapes the trace recorded. It chooses nothing until those cover at least half of the multiply time.
  • Findings that name no change. Idle time without a known cause (gpu.idle), long idle gaps (gpu.long_bubbles), and decode-dominant kernel time (gpu.decode_dominant) are carried as evidence but choose nothing on their own.
A chosen change is skipped, and the proposal records why, when:
  • the starting setup runs a pinned custom image or a Dynamo serving graph, whose flags change only through setups reviewed for that image;
  • the model name states 1B parameters or fewer, for speculation, or 1.5B or fewer, for lower weight precision;
  • the accelerator does not run FP8 in hardware (NVIDIA Ada, Hopper, or Blackwell, or AMD Instinct MI300X, MI325X, MI350X, or MI355X; see AMD Instinct GPUs), for FP8 weights and the FP8 KV cache;
  • the model’s pinned config was not read or declares no native prediction head, for speculation (pass --model-config config.json to declare it);
  • the change needs a draft model or a 4-bit publisher checkpoint. No draft model is paired with a model yet. A publisher checkpoint serves different model files, and a run cannot yet rank setups that serve different files, so it is left out;
  • the model’s weights already look quantized, for FP8 weights;
  • the change is already in the starting setup, equals the engine default, or has an unknown default. An engine switch is checked the same way, against the starting setup’s runtime.env or else the default recorded for the pinned engine version;
  • it changes the GPU, the GPUs per server, or the endpoint’s routing. Right-sizing is flagged when few requests run at once, and is planned as a separate run.
Every proposed setup carries a reason: its role (control or diagnosis), the technique, a priority from 0 to 100, an expected_benefit of high, medium, or low, the rules that chose it, a one-sentence summary that cites the measured value, and the evidence behind it. The proposal’s diagnosis records the plan state, a summary, every chosen technique with the setups that apply it or the reason it was skipped, and needed_evidence. Reads of a run return the same plan as diagnosis, with its monitoring window, and each setup’s reason.
A setup's reason
Priority and expected benefit order what to measure first. They are planning priors from the diagnosis, not a measured or predicted gain, and they never relax a gate: every added setup is proposed-unmeasured, a precision change still needs the answer check, and a run keeps the starting setup unless a setup beats it by more than the noise floor. On the first real GPU run (Qwen3-0.6B on one RTX 4090, one request at a time), n-gram speculation and an FP8 KV cache both lost to vLLM defaults. For that diagnosis the rules propose no change and flag right-sizing, and the planning golden suite keeps it that way.

The simple and advanced paths

The common path needs an objective, not a collection of runtime flags:
Advanced users can bind the search to an observed content-free Replay digest, which runs then replay as their load, choose runtimes, control the workload profile and concurrency, require the estimator, and inspect the complete JSON provenance. Provider credentials are not passed to the estimator. Model metadata network access is off by default and requires --allow-model-metadata-network.

Create a durable run

The authenticated console exposes the same boundaries under Optimize:
  1. choose a reviewed model, objective, infrastructure target, and optional SLO;
  2. review the proposed setups without allocating provider resources;
  3. create an immutable run;
  4. grant a hard spend cap with a maximum 24-hour expiry;
  5. follow durable execution from Activity, even after closing the browser;
  6. inspect modeled and measured evidence separately;
  7. explicitly roll out the winning setup: a qualified new endpoint, or a Release Guard-approved evolution of an existing one.
Cancellation is durable too: it persists the decision and links to the cleanup operation. The console never treats a proposed endpoint name as live until the rollout completes. A run keeps the warnings its proposal recorded, such as skipped speculative-decoding setups or the reminder that every added setup is unmeasured. Run responses, including GET /api/v1/optimization/campaigns/{id}, return them as warnings so the run page shows the same boundary as the review step. An empty list means the proposal recorded none; the field is absent only when the stored proposal cannot be read. infercrane optimize inspect, results, approve, activate, and cancel print a Proposal warnings block after the run header when there is at least one warning, and --output json keeps the field exactly as returned. Warnings explain what was skipped or left unproven. They are not performance evidence. Run responses also return workload, the load the immutable proposal bound the run to: The console uses it to show whether a run tests on your recorded traffic before anything is measured. workload is absent when the stored proposal cannot be read or recorded no source, and it states what the run was asked to replay, not what was measured. Each setup’s measured workload evidence records what actually ran. Use propose for a completely offline preview. Use create to persist the same immutable proposal without provisioning anything:
To follow a run live, run infercrane optimize watch RUN_ID. It shows, in plain words, where each setup is (starting a server, measuring against your current setup, checking answer quality), what was measured (throughput, p95 time to first token, p95 latency, and cost per million tokens when the price is sourced), how each setup compared with the current one including the measurement noise floor, each setup’s answer check, and the decision. When a setup beat your current setup, the decision prints the exact activate command that rolls it out, and your current setup reads baseline. When nothing did, your current setup is kept: it is marked kept · nothing to roll out, for a new endpoint no endpoint is created, for an evolution the endpoint keeps serving its current revision, and the one step left is infercrane optimize cancel RUN_ID, which removes the measurement servers now instead of when the approval ends. infercrane inbox shows the same step. When a setup waits on you, for your eval set or your signed evaluation, it prints the exact command that unblocks it. It only reads the control API; --once prints one plain snapshot for scripts and logs. infercrane optimize results RUN_ID prints the same summary once, and adds a pointer to watch while the run is still going.

Follow a run live

A run takes hours, so every read of a run says where it is without guessing. Each setup, a candidate in the API, has: The run’s progress summarizes it: GET /api/v1/optimization/campaigns/{id} also returns spend: spend so far, estimated as each setup’s sourced hourly quote, divided by its quoted maximum replica count, times how long its replicas existed. The quote is the first one that authorized the setup’s servers. The value is labelled estimated from quoted rate and is not an invoice. It is unknown, never zero, when a setup held servers without a recorded quote (any setup provisioned by an earlier control plane) or when its servers cannot be attributed yet, such as an evolution setup whose revision is still being created. cap_usd is the approved cap. infercrane optimize watch and the console’s run page show the same values: the setup and turn the run is on, time elapsed, the estimate of time left, spend against the cap, and each turn’s measured output tokens per second as it finishes.

Get told when a run needs you

A run can wait hours for measurements, and it stops for a person twice: to approve spending before it starts and to roll out the winner before the approval ends. Add a notification destination so you hear about both outside the dashboard. In the dashboard, open Settings › Notifications. From automation:
Each event is sent once per destination, only for runs that change after the destination was added, and never more than 24 hours late. A cancelled run sends nothing.
  • Webhook destinations receive JSON with schema_version, id (stable per run and event; use it to drop duplicates), event (for example infercrane.optimization.decided), occurred_at, workspace_id, a one-sentence summary, campaign, outcome or failure when they apply, and links. links.dashboard opens the run, including its outcome report, when the control plane knows the dashboard address (INFERCRANE_CONSOLE_URL); links.report_api is the report’s path on the control API. Deliveries are signed exactly like alerts with the signing secret returned once when the destination is created.
  • Slack destinations take an incoming webhook URL (https://hooks.slack.com/services/…) and receive the summary as a message with a link to the run.
  • Email is not available: the control plane has no email sender.
The URL and signing secret are encrypted at rest and never returned; the API shows only the host and the last characters of the path. To rotate the secret, delete the destination and add it again. POST /api/v1/notifications/subscriptions/{id}/test sends one signed test event and returns the result, and every destination shows its last delivery. A failed delivery is retried after 30 seconds, then four times longer each time up to an hour, at most six attempts; a 4xx response other than 429 is final. A workspace can have ten destinations. Destinations need INFERCRANE_CREDENTIAL_ENCRYPTION_KEY on the control plane; without it the routes return 503 capability_unavailable. Listing needs read access; changing and testing need an admin. infercrane inbox lists the same waiting runs with the next command to run.

Read the outcome of a run

When a run finishes, infercrane optimize report RUN_ID shows what it changed. It compares your current setup with the winning setup on: When the winner was measured in turns with your current setup, both values come from that same window, and each change is checked against that window’s noise floor: the report says better, worse, or no real difference. When it was not, the report shows each setup’s own measurement and leaves the decision unknown. Cost and per-GPU throughput are rescaled by price and GPU count the same way the run’s ranking rescales them. The answer-quality verdict comes from the Release Guard evaluation when one exists. Otherwise it comes from the evidence that decided the winner’s answer check, and quality.source says whose it is. For InferCrane’s built-in check (infercrane, basis builtin_answer_check) the verdict uses the check’s own watch and block thresholds. For signed customer evidence (customer, basis campaign_quality_gate) it is the eval’s pass or fail, with no WATCH band. The monthly projection assumes servers stay busy, so idle capacity is not included. It is only made for a run that replayed your traffic, and only when every replayed request recorded its output tokens. A capture keeps at most its request limit, newest first. When it reached the limit, its requests arrived in less time than the capture window, so the projection divides their volume by the time from the first to the last kept request instead. The report says so under how it was measured and sets monthly.capture_cut_off. A capture made before this was recorded has capture_cut_off: null: the projection then uses the whole window, and the report lists monthly.capture_cut_off as unknown, because the projection is too low if that capture was cut off. Every setup measured also shows the share of its requests that failed (error_rate_percent) and the mean output tokens of a successful request (output_tokens_per_request), from its own runs. Either is null when the runs did not record it. A setup that failed more requests or answered shorter than your current setup lists why under guards, and the report adds a line to warnings, shown under the headline. The answer-quality outcome is named after the check that produced it: Answer quality · InferCrane answer check for the built-in check, or Answer quality · and the eval suite’s name for your own eval. The full suite identity, with its version and content digest, is listed under the evidence. Anything missing or not comparable is unknown: never zero and never estimated. The report lists those fields under unknown and says why for each. If any setup ran on a simulated accelerator or a CPU, such as the laptop proof of concept, the report sets simulated_accelerator and every output shows the fixed banner CPU run: proves the pipeline, not GPU speed. Per-GPU throughput is then labelled per simulated accelerator.
In a terminal the report leads with the verdict, then one card per outcome: your current setup → the winner, the change in green when better and red when worse, the decision, and the noise band it was checked against. How it was measured and every setup measured follow as aligned tables, with each setup’s runtime flags one per line. This is the report of a real RTX 4090 run that kept the current setup, in an 80-column terminal (excerpt):
The cards show the same values as the plain text, including every unknown and its reason. Piped or redirected output, NO_COLOR, and TERM=dumb print the plain text unchanged. See Terminal output. The HTML page has no scripts or external resources. It shows outcome cards first, then how the setups were measured and every setup’s result. Next come the engine’s cache, queue, and preemption signals when the runtime reported any, and an appendix. The appendix has the winning setup (engine, version, args, hardware, price) and the evidence digests: run input, proposal, benchmarks, signed quality evidence, ranking, Release Guard evaluation, replayed traffic, and the report itself. Automation clients read the same report from GET /api/v1/optimization/campaigns/{id}/report, which requires read access and only returns runs of the caller’s organization. The report reads the benchmark, quality, and Release Guard records each setup recorded, by their IDs, so a finished run keeps its measured results after cleanup deletes the setups’ deployments, and after their names are deployed again. A referenced record that does not exist leaves its field unknown. The report also keeps the run’s decision after cleanup. Cleanup marks every setup cleaned, cancelling marks waiting setups cancelled, and the proposal rank is only the planner’s order, so the report reads the decision from the ranking each setup recorded when it was ranked. A setup counts as chosen only when its own ranking selected it, it was measured, its answers did not fail, no later check failed it, and, for an evolution, Release Guard accepted it. A kept current setup still reads “Keep your current setup”. A chosen setup that nobody rolled out is named as the best setup found but not rolled out, with whether its server was removed because the approval ended or because the run was cancelled; the report never says it went live. When nothing qualified, the outcome cards lead with your current setup’s measured values. When a run has finished and the control plane has a signing key, its report is signed. The key is the one that signs Inference Passports (INFERCRANE_PASSPORT_SIGNING_KEY_FILE). The API response then carries signature: the algorithm (Ed25519-SHA256), the key ID, the public key, the digest, and the Ed25519 signature over that digest. The digest is the report’s own report_digest, the SHA-256 of the compact report JSON with report_digest emptied, so the signature covers every value in the report. The report has no timestamps, so the same evidence always gives the same signature, and nothing is stored. A report is never given a made-up signature: until the run finishes, signature is null and unsigned_reason is run_not_finished, and on a control plane without a signing key it is signing_key_not_configured. Every text, terminal, and HTML rendering ends with Signed by key sha256:… — verify with infercrane optimize report verify FILE, or says why the report is not signed. Save the report as JSON and check it anywhere, without the control plane or any credential:
verify checks the schema version, recomputes the digest from the report’s JSON, and verifies the signature and that the key ID names its public key. It exits non-zero on any mismatch: a changed value or key, an added field, another report’s signature, an unsigned report, or, with --public-key, a different key. Whitespace does not matter, so an indented file still verifies; re-encoding the file with another tool can change escapes or numbers, and then it fails. Without --public-key, verify proves the report is unchanged since the key it names signed it, and prints that key ID. To prove the key is your control plane’s, pass its public key or compare the key ID. Operators get both from infercrane passport keygen when they create the key, and from the public_key and key_id of any signed report or Inference Passport their control plane returns. Publish the public key where the people who check your reports can fetch it. That default creates a new_endpoint run. To improve an endpoint that already serves production, bind the run to its stable deployment identity:
InferCrane keeps these proof paths distinct. A new endpoint has no production baseline, so a winning setup may become qualified after measured performance, sourced cost, and a passing answer check. It then waits for you to roll it out. An evolve_endpoint run must create a candidate revision against the named deployment, compare it with active production through Release Guard, and wait for you to roll it out. InferCrane never invents a baseline for a new endpoint and never lets an evolution bypass Release Guard. Rolling out with optimize activate is itself a durable, idempotent operation. A new-endpoint run can roll out only a qualified setup. It atomically publishes the endpoint name from the immutable proposal and binds it to the selected setup’s isolated deployment; an existing alias is never silently rebound. The rollout operation waits until the request-path route generation is published. An evolution run can roll out only a guard_passed setup and delegates the traffic mutation to the normal guarded rollout workflow. Approval expiry is checked before mutation, while a retry after a completed rollout remains a successful no-op. A new-endpoint candidate runs on its own deployment, named <endpoint>-opt-<candidate>, and is measured directly against its replicas. Converge publishes no endpoint for it. The database still gives every new deployment an endpoint record of the same name, so the endpoint list (GET /api/v1/endpoints, the console’s Home and Endpoints pages, and infercrane endpoint list) leaves out the record of every new-endpoint candidate, during the run and after it, including candidates of earlier runs. The only endpoint a new-endpoint campaign adds to that list is the one activation publishes for the winner. Cleanup deletes the deployments of the other candidates. It never touches the activated endpoint, the winner’s deployment, or an endpoint you created. Candidate deployments still appear under dedicated deployments while their servers exist, because they are billed resources. Approval first verifies every candidate against a fresh sourced price for its exact cloud, region, GPU, and maximum replica count. It then records a bounded authority window and queues one durable execution operation. The worker composes the existing deployment/rollout lifecycle, measures each exact candidate revision directly with AIPerf against the campaign control, checks each candidate’s answers (see How a campaign checks answers), ranks persisted results, evaluates Release Guard for evolution campaigns, and cleans rejected candidates. It never promotes automatically. The execution capability is fail-closed. The control plane must find AIPerf and must have an exact price snapshot valid for the entire approval window. Configure price evidence before approving:
The rate is the total hourly cost of that exact maximum-replica tuple. A missing tuple, expired source window, absent AIPerf binary, or approval below the worst-case execution cost is rejected before provider mutation. Operators must refresh price evidence rather than treating this static example as current pricing. When the row is missing or stale, approval names it, for example no fresh vast price for 1 × RTX 4090 (region global, 1 replica), says what was tried, and, for a feed on a schedule, when that feed fetches the row next. The Vast offer feed refreshes four GPUs per sweep, so after a control-plane restart most GPUs have no row for several sweeps. Approval therefore fetches the requested Vast GPU on demand, with one request per sweep interval so the feed stays inside Vast’s request window. A second GPU in the same interval waits for the schedule, and the message says until when. Vast rows cover one GPU on one replica only. A row like the one above is advisory: it can rank plans, but it cannot authorize spend, because a hand-entered price is not a provider quote. Execution needs a fresh quote from a reviewed provider price collector, or, for capacity you own or contract, an explicit rate card on a kubernetes row:
authority: account_contract declares that you guarantee this complete hourly rate until valid_until; it must cover the whole approval window. It is accepted only for cloud: kubernetes with cost_scope: instance_total. provider_api and measured_invoice authority come only from reviewed collectors and are rejected in this variable. Automation clients can request the same non-mutating candidate set with POST /api/v1/optimization/proposals. This endpoint performs no provider mutation and makes no performance claim. Pass the returned immutable proposal to POST /api/v1/optimization/campaigns when you are ready to persist the review boundary. Paid execution still requires the separate approval endpoint. The restart-safe execution path is locally qualified for lost child-operation responses, cancellation, expired authority, evidence identity, cleanup, and the human promotion boundary. Canceling a campaign queues durable cleanup even when its execution operation already finished. Closing the CLI does not stop the control-plane operation; reattach with infercrane operation watch. A qualified candidate keeps that parent operation in a bounded waiting state. If explicit activation or promotion does not happen before authority expires, InferCrane marks the candidate failed and cleans its resources rather than allowing an unbounded GPU bill. The same applies to a candidate that is still provisioning or measuring at expiry: it is marked failed with approval_expired and cleaned, and evidence that arrives after expiry is not recorded. Approval cannot be extended, so a campaign whose measurement outlives its approval must be created and approved again with a longer --expires-in. Execution uses a measured-evidence barrier: all viable candidates reach AIPerf measurement and the revision-bound answer check before ranking begins. Candidates are provisioned and measured one at a time, control first. A candidate that reaches the barrier waits there while the next one is provisioned, so a deployment that converges between execution attempts is recorded on the next attempt. A winner stays in the ranking after it becomes qualified (or guarding for an evolution), so ranking the candidates after it reproduces the same evaluation. Inference Lab then compares only the exact same workload shape, and each candidate’s evidence must name the exact model artifact (repository@revision) that candidate deployed, even when the campaign was created from a catalog name. A quantized setup serves its own artifact and competes only when it was built from the control’s model (see When a quantized setup can win). A proposal whose candidates serve unrelated models is refused when the campaign is created, with invalid_optimization_proposal. Proposal order cannot choose the winner. Missing sourced cost, mismatched workloads, or incomplete metrics produce inconclusive; explicit SLO or cost violations produce rejected. For evolution campaigns, the selected candidate still has to pass active-versus-candidate Release Guard and wait for human promotion. The persisted campaign links benchmark, quality, Lab, and, where a real baseline exists, Release Guard evidence separately.

How a campaign checks answers

A faster setup is no use if its answers changed. After a candidate is measured, the worker checks its answers before ranking, so a run started from the dashboard or infercrane optimize reaches a decision without you signing anything:
  1. Your evidence wins. If signed evidence you attached exists for the candidate’s exact revision, it decides. Nothing else runs.
  2. Otherwise InferCrane checks. The worker asks the candidate and a reference the same prompts, one at a time, with greedy decoding (temperature 0, fixed seed). The reference is the campaign control. For an evolve-endpoint campaign it is the target’s active revision when that revision is directly reachable, because Release Guard compares the candidate with the active revision. The prompts are InferCrane’s small built-in suite, pinned by digest in the product, or an eval set you uploaded and named with --eval-set.
  3. Answers are scored, then discarded. Each answer is scored by how closely it matches the reference’s answer to the same prompt (token overlap, ignoring case, punctuation, and reasoning blocks). A case of your eval set that declares function tools is scored on its tool calls instead. A drop of up to 5% is PASS, 5% to 10% is WATCH and still ranks, and more than 10% is BLOCK, which rejects the candidate with quality_gate_rejected. These are the same PASS/WATCH/BLOCK rules Release Guard applies. A candidate that breaks a tool call the reference made correctly is BLOCK whatever its score (Tool calls).
  4. The result is signed evidence. It is stored as quality evidence signed with the control plane’s own key and labelled source: infercrane, separate from evidence you sign (source: customer). The reference gets its own row with score 1: its answers are the reference.
The check needs nothing reviewed about the model: for a model outside the reviewed catalog, the reference is still the campaign control, so every candidate is compared with the baseline’s own answers on the same prompts. The check never passes on missing evidence. When no serving reference exists, for example because the control failed to start, the candidate ends inconclusive with quality_reference_unavailable. When the reference gives no answer text and makes no tool call to a prompt within the token limit, for example a reasoning model cut off mid-reasoning, the candidate ends inconclusive with quality_reference_unanswered: two answers with no text are not a match. When the campaign names an eval set that is not uploaded yet, the candidate waits for it. To have every candidate wait for your own signed evaluation instead, create the campaign with --quality-check customer_evidence. Each candidate’s quality object in the campaign API, the run page, and infercrane optimize inspect show which of these states it is in and, while it waits on you, the exact command to run. Semantic quality evidence covers the evidence format, eval sets, and the signing key. Agreement with the control is not task accuracy: it shows the candidate answers like your current setup does, on general short prompts. For an accuracy claim on your own tasks, upload an eval set of your own cases, including conversations and tool calls, or attach your own evaluator’s signed results. A migration run (--migrate-from ENDPOINT/BINDING) replaces a closed API instead of improving an owned setup. Its baseline is the closed API: candidates are measured in turns with the run’s control as usual, but answer quality is graded against expected answers for both the closed API and each candidate, and the two score lists are compared with a paired bootstrap into a signed verdict. PASS qualifies a candidate, BLOCK rejects it with quality_gate_rejected, and an undecided comparison ends it inconclusive with quality_migration_inconclusive. Activating the winner starts a 5% canary on the closed API’s endpoint rather than publishing a new endpoint. See Migrate from a closed API.

When a quantized setup can win

A quantized setup, such as a publisher’s FP8 or NVFP4 checkpoint, serves different model files than your current setup. It can win a campaign when its answers hold and it is measurably better:
  • It is built from the control’s model. The checkpoint records the model it was built from. Ranking compares it with the control only when that is the control’s repository and, for exact lineage, the control’s revision. When the publisher names only the base repository, the lineage is publisher_declared and the source revision stays unknown. A checkpoint of another model or another revision is refused when the campaign is created.
  • The control serves the unmodified model. The control’s answers are the reference for every answer check, so a quantized setup is never the control.
  • Its answers pass the same check as every other setup. A precision change changes the model’s numbers, so there is no exemption: the built-in check compares its answers with the control’s, or your signed evaluation decides. A quantized setup the check blocks ends rejected with quality_gate_rejected and is never ranked, however fast it measured.
  • It beats the control by more than the measurement noise on the same workload, like any other setup.
The persisted ranking lists the quantized artifacts it admitted under derived_model_identities in its input, and names each quantized row’s artifact (model_identity) and lineage (artifact_lineage: exact or publisher_declared). Unmodified rows keep their earlier shape.

Prompt a decided setup yourself

Scores say that answers agree. To read the answers, send your own prompt to the setup the run decided on, before you roll it out:
The body is an OpenAI chat completion request. model is ignored: the candidate serves the model it was measured with. Tools, temperature, and max_tokens pass through unchanged. The dashboard’s Workbench uses this route to show the current setup and the candidate side by side.
  • Which revision answers. The request goes to the lowest-ordinal healthy replica of the exact revision the run measured, addressed the same way the measurement and the answer check address it. The response names it in X-InferCrane-Deployment and X-InferCrane-Revision.
  • When it answers. Only a candidate in qualified, guard_passed, promoted, or observed answers. While the run is still provisioning, measuring, checking, or ranking a candidate, the route returns 409 candidate_not_decided, so a prompt never runs beside a measurement. A candidate that lost, failed, or was cleaned up returns 409 candidate_not_running. A decided candidate with no healthy replica returns 503 candidate_unavailable with Retry-After.
  • Limits. The request body is at most 1 MiB, the answer at most 8 MiB and five minutes, and one organization runs at most two candidate prompts at once (429 rate_limited with Retry-After).
  • What is kept. Nothing. The request does not pass through the gateway, so it has no request trace, does not count toward the endpoint’s traffic or its request quota, and adds no per-request charge. The candidate’s compute is already billed while it runs. The control plane uses its own server-side credential for the replica; that credential and the runtime’s error text never reach the caller. A runtime error keeps only its status: a 4xx becomes 422 candidate_rejected_request, a 429 stays 429, and anything else becomes 502 candidate_upstream_error.
Any role that can read the run can prompt its decided candidate, the same rule as sending inference with an API key.

How a campaign measures candidates

A single benchmark run misjudges the changes optimization cares about most. Prefix caching has no effect without shared prefixes, a small gain can be run-to-run noise, and a candidate measured an hour after another can win on drift alone. Campaigns therefore measure every candidate the same way. Load. A campaign bound to a customer Replay digest (workload_source: customer_observed) replays that trace. InferCrane verifies the stored trace against its digest, then renders each generation request’s input and output token counts as an AIPerf mooncake_trace. Requests that share system messages share a leading 512-token prompt block, and a later session turn at least as long as the previous one reuses that prompt’s whole blocks, so prefix and session structure survive. One pass over the trace, capped at its first 2,000 generation requests in arrival order, is one run. If the bound trace is missing, malformed, or does not match its digest, every candidate fails with optimization_replay_unavailable or optimization_replay_invalid before any provider mutation, instead of silently measuring synthetic load. Campaigns without a bound trace send their versioned synthetic profile. The rendering records what it preserved and what it did not in the workload’s replay identity. Prompt content is synthetic because Replay never stores it, so MoE expert routing and speculative acceptance on customer content remain unknown. Arrival timing is not replayed: load is closed-loop at the profile concurrency. Replay records which requests share system messages but not how long those messages are, so one shared block is assumed. Tool pauses, parent-session links, and reuse of earlier assistant output are not modeled. Runs. Each server receives warmup requests (twice the concurrency, between 16 and 256) before measurement, and each candidate runs four independent AIPerf invocations. Every invocation gets its own seed and, for a replay, its own prompt-block namespace, drawn from a random base for each measurement. A server is therefore not answered from prefix-cache entries that an earlier run created, including when the control is measured again inside another candidate’s measurement or a measurement is retried. The base is kept as measured.invocation_base. The candidate’s stored metrics are the mean of its four runs, with Student-t 95% intervals in confidence_95. Output tokens are every token the model generated, as the server counted them, reasoning tokens included: a model that reasons before it answers writes those tokens at the same speed and its server bills them as output. The workload records this as output_token_basis. Results stored before reasoning tokens were counted carry no such field, belong to another workload identity, and are never ranked against results that have it; for a model served with a reasoning parser those older results understated output throughput, down to zero when an answer was all reasoning. Control. The control is the proposal’s starting point: the untuned control arm when the proposal includes one, otherwise the highest-ranked compatible candidate. It is measured first. While its deployment is serving, every other candidate is measured interleaved with it, as control, candidate, control, candidate, control, candidate, control, candidate, control. The control and candidate share a time window, not a GPU, so differences between their machines are not removed (see what the judge can and cannot tell). Adjacent control runs whose output throughput differs by more than 15% mean the server changed under the measurement, so that comparison is invalid; the candidate’s own measurement is kept, and its result against the control is unknown. Smaller changes that both setups share, such as a GPU warming up, are cancelled by pairing instead of voiding the window. A control or candidate run that fails stops the measurement so the server can be checked and replaced (see When a measured server is lost). A failure to look the control up is retried rather than recorded as a measurement without one. Paired comparison. Each candidate run is divided by the mean of the two control runs around it. The change is the geometric mean of those four ratios, and the noise floor is the half-width of its Student-t interval, corrected for the control run that neighbouring pairs share. A candidate is better or worse only when the whole interval lies on one side of no change; otherwise it shows no measurable difference. The interval is widened for the number of candidates the run compares with its control (Bonferroni): 95% confidence for one candidate, 98.75% for four. So a run of several candidates is no more likely to crown a candidate that is really no better than the control. The interval also holds the difference between two machines: the control and the candidate always run on separate servers, and no pairing in time removes a fixed speed difference between them. Every interval adds a machine difference of 0.75% (standard deviation) at the same confidence; see how much machines differ. The workload’s measured.comparison records, for throughput, latency, and goodput, the control mean and spread, the candidate mean, the change, the floor, the decision, and the method (paired_bracketing_log_ratio), pairs, comparisons, confidence, and machine_difference. Comparisons stored before the machine difference was added have none. Measurements made before this method (campaign-interleaved-control-v1) keep their stored comparison, which used the larger of the control-to-control spread and the candidate’s own interval.

What the judge can and cannot tell

TestJudgeCalibration in internal/optimizationcampaign runs this exact decision code on simulated runs and prints how often it declares a win when nothing changed (false wins) and how often it finds a real gain. With 2% run-to-run noise, roughly what real GPU runs show: On one machine the judge keeps false wins below the designed 2.5% and finds far more real gains. When the control and the candidate run on different machines whose speed differs by a fixed amount, no pairing in time can remove that difference, and false wins rise once it is larger than the machine difference the interval holds. That is why a gain is also confirmed on fresh servers before it counts.

A gain is measured again on fresh servers

When a candidate’s window shows a gain on the objective (by the same rule, cost included, that the ranking applies), the run does not count it yet. It retires the candidate’s server and then the control’s, provisions each setup’s exact revision again on a fresh server, and measures a second window of four paired rounds there. The candidate wins only if the second window shows the gain too. The ranking then reports the second window’s change, which is free of the first window’s selection, and the reason names both, for example p95 time to first token changed -36.4% (noise ±4.0%), then -32.4% (noise ±5.0%) measured again on fresh servers. A gain that does not hold is superseded with measured_gain_not_confirmed.
  • The control of a run that evolves a live endpoint serves production traffic, so its server is kept and only the candidate’s is retired. A serverless provider places workers itself; its retirement is recorded as provider_managed.
  • Retiring a serving machine is never a loss: it does not count against the two lost machines a setup may replace or against the interruption limit. It is recorded in the setup’s machine_replacements with purpose: confirmation, and in the measurement’s interruptions as kind confirmation, recovered as machine_retired.
  • Nothing is retired that the approved cap cannot replace: the replacement is authorized first, with the same one-hour reserve as a lost machine. A setup whose fresh servers the cap does not cover stops with optimization_confirmation_not_covered.
  • The measurement keeps the second window in measured.confirmation: its runs, control check, paired comparison at the 95% level (it tests the one candidate it confirms), and fresh_candidate and fresh_control.
TestJudgeCalibrationWithConfirmation runs the whole rule, both windows and the ranking’s decision, on simulated machines, at the run noise and machine differences measured on real H100s (below):

How much machines differ

On 2026-11-20, eight H100 80GB HBM3 GPUs on Modal served the same setup: Qwen3-8B (b968826d, BF16) on vLLM 0.22.1 with its defaults. Each ran vLLM’s own benchmark client in the same container, so no network was in the numbers, with identical work on every machine: 4,800 input and 192 output tokens per request, 32 concurrent streams, three runs of 256 requests after a warmup. Modal placed them in five regions, on two NVIDIA drivers (610.57.04 and 620.70.06) and on Intel and AMD hosts. The machines’ mean output throughputs ranged from 923 to 941 tokens/s, 2.0% apart at the extremes. The two drivers averaged 927 and 932 tokens/s, inside that spread. The run was billed $3.81. The script is tools/poc-modal/machine_variance.py; the record, with each machine’s GPU, driver, region, clocks, and runs, is h100-machine-variance-modal-2026-11-20.json. Real GPU runs are so quiet that the machine difference, not run noise, decides false wins. Without a machine term, these conditions gave 23% false wins across four candidates even with the confirmation. A 0.75% machine difference in each window, the first and the one on fresh servers, keeps false wins at or below 5% even at the upper bound, and a +5% gain is still found 97% of the time or more. The cost is at small gains: +3% is found 86% of the time at the measured spread. This was measured for one GPU model, model, runtime, and workload, on one provider. Other GPUs and clouds may differ more, and a campaign measured over a network adds each server’s own path. A gain of a few percent on hardware that has not been measured this way is reported as measured, not as proven. Failed requests and answer length. Latency percentiles count only requests that succeeded, and a shorter answer finishes sooner and needs fewer tokens. So a setup could look faster or cheaper by failing slow requests or by answering shorter. Each run therefore records its failed requests and the mean output tokens of a successful request, by the server’s own count, in measured.runs[] (failed and output_tokens_per_request). A candidate is never selected, whatever it gained, when:
  • the share of its requests that failed is more than one percentage point above the control’s, or is 1% or more while the control failed none, or
  • its mean output tokens per request is more than 5% below the control’s.
The control’s side comes from its runs in the candidate’s own window. When the two were not measured together, it comes from the control’s own runs on the same workload. These checks apply whenever the control was measured, also when the control misses the constraints. An answer length a run did not record, as in runs measured before it was recorded, is unknown and stops nothing. The persisted ranking keeps each candidate’s guard_check: both sides’ requests, failed requests, and answer length, and which check fired. Rankings with these checks, the paired comparison, and the confirmation on fresh servers record algorithm campaign-paired-confirmed-v5; with the machine difference in every interval, campaign-paired-confirmed-v6. Objective metric. Each objective ranks on one measured metric, and Lab and the control gate use the same one: A buffered run receives each answer whole, so AIPerf measures no first token. The wait a buffered client sees is the whole request, so latency objectives rank on p95 request latency there. Before Lab inference-lab-v5, they ranked on time to first token on every profile, and an interactive or latency run on buffered ended measured_ranking_inconclusive after spending its whole measurement time. The substitution is labelled at each step:
  • optimize propose and the stored run carry a warning, for example Objective interactive ranks setups on p95 request latency on the buffered profile: ….
  • Every Lab row in the persisted ranking names its metric in objective_metric. The selection reason names it too, for example best measured interactive (p95 request latency) among exact-workload candidates.
  • The report sets objective_metric to latency_p95_ms and objective_note to the reason. Its subtitle reads goal: interactive, ranked on p95 request latency. The report takes the metric from the stored ranking when it recorded one, so a run ranked before inference-lab-v5 still reads ttft_p95_ms.
A time-to-first-token or time-per-output-token limit (--max-ttft-p95-ms, --max-tpot-p95-ms) has no substitute: no buffered run measures either, so every setup would miss it. optimize propose and optimize create stop with an error naming the limit before anything is sent. The API answers HTTP 422: invalid_optimization_request from POST /api/v1/optimization/proposals and invalid_optimization_proposal from POST /api/v1/optimization/campaigns, before anything is stored or provisioned. Use a streaming profile such as interactive, or drop the limit. Without --profile, the profile comes from the objective: interactive for interactive and latency, throughput for throughput and cost-efficiency, both streaming. Ranking. Inference Lab still orders the exact-workload candidates that meet the constraints. The campaign selects the best of them that measurably beats the control on the objective metric and passes both checks above. If none does, the control is kept. Each losing candidate is superseded with a code that says why: A window the control invalidated only by drifting still holds complete, clean runs of both setups. They can show a candidate is worse, with a noise floor no smaller than the drift; they never show it is better. The report and infercrane optimize watch name the outcomes, for example throughput got worse by 24% (noise ±7.3%). If the control itself does not meet the constraints, Lab’s best candidate that passes both checks is chosen and no gain over the control is claimed. If no such candidate passes them, the ones that failed a check are rejected with its code. Cost efficiency compares output throughput per sourced hourly cost. A candidate that could not be measured beside a serving control is compared through both arms’ 95% intervals, which is weaker evidence because the arms ran at different times; overlapping intervals are no measurable difference. The persisted Lab evaluation records each candidate’s control decision, its basis, and the final selection. Runtime metrics. When a candidate’s runtime contract declares a /metrics path, AIPerf scrapes it during each run, and InferCrane keeps a bounded summary of cache use, prefix-cache hits, preemption, queueing, and speculative acceptance. A built-in vLLM or SGLang setup without its own workload uses that runtime’s default contract, which declares /metrics, on every provider, SkyPilot clouds included. Custom images without a declared path record no runtime metrics, and GPU telemetry is not_collected. When the report has no engine signals it says whether the metrics were not scraped, scraped without a usable result (with AIPerf’s reason), or scraped without any cache, queue, or preemption metric. This method sends eleven AIPerf invocations per non-control candidate (two warmups and nine measured runs) instead of one, and a candidate that gains is measured again on two fresh servers, eleven more. Measurement takes several times longer than a single benchmark. The approval window must cover it. Campaign ranking does not use the multi-lane Pareto evaluator: that evaluator needs TTFT and ITL limits and several concurrency lanes, and a campaign measures one lane and may declare no SLO.

When a measured server is lost

A run takes hours, and a server can disappear in that time: the provider reclaims or loses the machine, or its runtime stops answering. A run survives that without losing the work already done or weakening the comparison. Completed pairs are kept. Each candidate run counts only together with the control runs directly before and after it, from the same stretch of measuring. After every complete pair, the candidate’s measurement is saved on its run record. When an AIPerf invocation fails, measuring stops. Every complete pair is kept, the unfinished pair is dropped, and the interruption is recorded with the arm, the server, and how many finished runs were dropped. Only a server that is really lost is replaced. InferCrane asks the provider and the runtime about the server that failed. A server the provider reports ready and whose runtime still serves the model is left alone, and one the provider is restarting in place is waited for. A server the provider reports ready but whose runtime does not answer is lost only after at least three failed checks over at least a minute, so a network blip does not cost a replacement. Otherwise the server is deleted, the provider is checked until it no longer lists it, and only then is the setup’s exact revision provisioned again, through the same path that provisioned it first. The replacement gets a new provider identity; the lost server’s record is kept for audit and for the spend estimate. The control’s server is replaced the same way, so a lost control no longer makes every later comparison unknown. Measuring resumes at the next pair. Both servers are warmed again, and the next segment starts with a control run, so every pair after the restart is again bracketed by control runs from its own window. Each segment’s invocations get fresh seeds and prompt-block namespaces. The drift check runs over every adjacent pair of control runs, including the pair across the restart, and holds that pair to a tighter limit: a replacement control that serves more than 5% differently from the server it replaced invalidates the comparison instead of passing silently, because pairing cannot cancel a change of machine. A replaced candidate server that serves differently widens the paired interval and with it the noise floor. The workload’s measured.segments and measured.interruptions record each stretch of measuring, each interruption, and how it was recovered: machine_serving, machine_replaced, or provider_managed for serverless workers, which their provider replaces itself. Spend stays inside the cap. A replacement starts only after the lost server is gone, so two servers of one setup never bill at the same time, and the approval already covers each setup’s servers until the approval ends. What the window does not cover is a provider’s minimum charge for starting a server. InferCrane has no sourced minimum billing period for any provider, so each replacement reserves one full hour at the quoted rate. Before every replacement the setup’s spend is authorized again with a fresh sourced quote: its share of the cap must cover its servers from approval until the approval ends, plus one hour for this and each earlier replacement, at the higher of the fresh rate and the rate its first servers were bound to. Approval returns machine_replacements_covered, the number of lost servers per setup the cap covers, from 0 to 2. A confirmation on fresh servers is authorized the same way before anything is retired. The run stops cleanly when it cannot recover. A setup that stops is marked failed and its servers are removed; nothing waits for the approval to end. Interruptible capacity is not used. Optimization runs only on capacity billed at its regular rate. Spend authority needs a sourced price, and InferCrane has no sourced interruptible (spot) price for any provider it runs on. RunPod, which runs InferCrane-managed test servers, no longer offers spot pods. Every measurement’s cost evidence, and every result in dollars per million tokens, uses the price the setup would be served at.

Stay optimized

Stay optimized watches a running endpoint and proposes a run when something changes that could make another setup better. It never deploys and, unless you turn on auto-run, never spends: every proposal is an ordinary run that waits for your approval and spend cap, and rolling out its winner still goes through Release Guard and a person. Turn it on per endpoint with the Stay optimized switch on the endpoint page, or set enabled in the deployment’s policy (PUT /api/v1/deployments/{name}/continual-optimization/policy).

What starts a check

The control plane looks at each endpoint about once an hour, off the inference path. A lease on the endpoint’s check keeps two control-plane instances from checking it at the same time. Each change is acted on once: an engine release, model revision, or price is recorded when a check acts on it. While a proposed run waits for approval, a run is active, or the policy’s cooldown runs, triggers stay pending and nothing is recorded; they fire once the run is decided.

What a check reads

A check reads only the control plane’s own records. Nothing comes from the dashboard.
  • Traffic: the endpoint’s last seven days of content-free request records: request rate, mean input and output tokens of the requests that reported usage, and streaming share. Peak concurrency and prefix or session reuse are not in those records and stay unknown. A proposed run replays a recent recording of your traffic, or one captured from the same records.
  • Service: error rate, p95 time to first token, and output tokens per second from the same window; goodput and per-token time only when a qualified collector reports them.
  • Cost: cost per million output tokens, from the setup’s sourced hourly price, the replicas that ran in the window, and the window’s output tokens.
  • Unknown: availability and contribution margin are not in the control plane’s records (margin needs your revenue). They are listed as unknown on every decision and never start a run.
When a trigger fires, the check asks the planner for setups the same way Optimize does for the endpoint (same model, provider, GPU, compute connection, and measured bottleneck), drops setups measured, rejected, or dismissed on this endpoint in the last rejection_memory_seconds, and keeps at most maximum_candidates_per_campaign that fit maximum_experiment_cost_usd. If one is left, it creates a run proposal. Each proposal records:
  • reason: one sentence naming every trigger, for example “vllm 0.22.1 is the new pinned engine release; this endpoint runs 0.21.0”;
  • expected change: the range of cost-per-token changes earlier runs on this endpoint measured for their winner, or unknown when there are none. The run measures its own;
  • run cost: the spend cap that covers every setup for one hour at today’s sourced prices (approval splits the cap evenly across setups), or unknown when a setup has no current price.
The run’s answer check asks the eval set the policy names in quality_eval_set, or the built-in prompts when it names none (infercrane evaluation set stay-optimized DEPLOYMENT sha256:DIGEST; see Use your own test set). The run’s approval-needed notification carries the reason and the estimated cost in its proposal field and summary. Dismissing a proposal cancels the run; its setups are not proposed again until the rejection memory ends.
The suggestions read lists proposed runs with their reason, triggers, expected change, run cost, unknown evidence, and what auto-run did; when the endpoint was last checked and is checked next; and the endpoint’s custom kernels with their engine pins. A run’s own read (GET /api/v1/optimization/campaigns/{id}) carries the same origin.

Auto-run under a monthly cap

Auto-run is off by default. With auto_run: true and a monthly_auto_run_cap_usd above zero, a proposed run is approved without a person when its cost is known and fits what is left of this calendar month’s (UTC) cap for the endpoint. The approval is the same as a person’s: every setup’s current price is checked against its share, and the run is recorded as approved by stay-optimized. A run with an unknown cost, or one that would pass the cap, waits for a person. Auto-run never rolls out a winner.

Custom kernels and engine changes

A custom kernel is pinned to the engine release it was qualified on. When a check sees the endpoint run a different release than a serving kernel’s pin, it switches the kernel off. When InferCrane pins a new release, a qualified kernel pinned to an older one is marked for re-qualification; a kernel still serving on the running release keeps serving, and the proposal says that a setup on the new release rolls out without it unless it is re-qualified. Stay optimized never turns a kernel back on.

Generate a custom kernel

A custom kernel is a last resort, never a default. Monitoring can suggest which phase to profile (profile_phase on the optimization readiness response), but only an exact target-GPU profile and the Amdahl gate can open the kernel path, and existing implementations are tried first. Start a run from a complete Accelerator Lab request, which carries its own spend cap and 24-hour expiry:
When no approved source exists and the request allows generation, the worker runs infercrane-kernel-adapter:
  1. Optional literature search finds recent public research for the measured operator.
  2. A language model with no tools returns one source file for a human-reviewed operator contract.
  3. A static screen rejects obvious non-kernels before any GPU time is spent.
  4. The draft runs in a no-network container against a hidden test suite and the runtime’s own kernel.
  5. kernelresearch keeps it only if every stage passes and it is materially faster.
  6. An implausibly large speedup must repeat on fresh inputs before it can be kept.
The hidden suite checks shape sweeps, value distributions that defeat hardcoded bypasses, dirty memory, determinism, and bitwise batch invariance. A retained kernel still has to pass the Brezel source build, target-GPU qualification, full serving replay, and explicit human promotion. A search that keeps nothing is recorded as kernel_research_no_winner, with every attempt preserved. The adapter profiles and qualifies on one GPU host with Docker and AIPerf:
  • Profile captures a torch trace of the requested phase, then maps GPU kernels to reviewed operator families. Kernels it cannot classify stay in the denominator and never become hotspots.
  • Qualify re-runs the hidden suite on the built bytes, then replays your workload as control, candidate, control on the same GPU. More than 5% control drift invalidates the run. Deterministic prompts must match the control byte for byte.
Serving containers run offline on an internal Docker network, with a read-only model cache and no credentials. Only the model download step has internet access. A candidate arm must prove the generated kernel was called, because otherwise the result would measure the unmodified runtime. Each operator pack names the exact runtime versions its serving integration was reviewed against, and the adapter refuses any other version before it spends on generation or GPU time. The residual-RMSNorm pack supports vLLM 0.22.1 only. It plugs into vLLM IR, which vLLM has deprecated, and vLLM 0.34.0 removes the setting it uses, so a vLLM 0.34 or later pin needs a new CustomOp-based integration first. Set max_candidates to at least 2. The planner ranks by device time, and the largest hotspot is usually GEMM, which has no reviewed pack yet and is reported as a failed generation. Research abstracts are shown to the model as untrusted reference data and recorded as provenance. They are never performance evidence. The first reviewed pack covers residual-add + RMSNorm in Triton; other operators fail closed until a pack exists.

Read lab runs

List your organization’s lab runs, newest first. The viewer role is enough. campaign_id limits the list to one campaign, and limit sets the page size from 1 to 100 (default 20):
Each run carries its operation status and progress, the target and policy from the request, and the recorded result: profile hotspots, planned candidates, and each experiment’s build, qualification, and kernel research attempts. result_state is pending until the worker records a result, and unreadable when the stored result does not decode or has another schema version. The read copies what the worker stored. A hotspot duration or invocation count the profiler did not record is null, not zero. Artifacts appear only as content digests, never as locations or sizes. The read never returns literature references, credentials, tenant IDs, lease owners, or idempotency keys, and a URI inside an error message becomes [uri redacted]. A lab run is an experiment on the target GPU: a qualified kernel still needs Release Guard and explicit promotion before it serves traffic.

Plan an optimized artifact

Builders run outside InferCrane. The common path produces a strict immutable plan:
Available plan presets cover FP8, AWQ, GPTQ, NVIDIA-specific NVFP4, EAGLE-3, MTP, and DFlash. There is no TensorRT engine preset: TensorRT-LLM removed its engine backend and trtllm-build, and its PyTorch backend loads checkpoints such as the FP8 and NVFP4 outputs directly. An engine built by an earlier TensorRT-LLM release can still be recorded with --plan-file. A preset is not a compatibility or speed claim. Every plan requires an exact tool version, digest-pinned builder, hardware constraints, immutable output attestation, exact candidate binding, and passing semantic quality evidence before qualification. Advanced users can provide the complete JSON plan with --plan-file.

Propose, prove, release

Use the generated files through the existing lifecycle:
When model precision or model artifacts differ, attach signed semantic evaluation evidence before rolling out. When cost is part of the objective, attach sourced, dated cost evidence. Only an exact model, runtime, accelerator, provider, and canonical workload result supports a measured recipe.

Seed candidates from publisher checkpoints

Hardware and model vendors publish quantized checkpoints and speculative-decoding heads for new open-weight models, often within days of the base release. InferCrane keeps a reviewed catalog of these builds, so a campaign can try quantization without building the artifact first. The catalog covers these Hugging Face organizations:

Which builds the catalog tracks

The reviewed policy, internal/checkpointcatalog/policy.json, records a selection rule. The sync tracks a build when any of these holds:
  • It is in a publisher’s organization and was created on or after that publisher’s created_after date.
  • It is in a publisher’s organization, and Hugging Face reports at least min_downloads downloads for it in the last 30 days. This keeps heavily used older builds, such as an FP8 build that runs on Hopper, in view after newer releases arrive.
  • A reviewed collection lists it, and its organization is a publisher in the policy. The policy seeds NVIDIA’s Inference Optimized Checkpoints (with Model Optimizer) collection, which keeps older builds NVIDIA still recommends and lists Model Optimizer builds that other organizations publish. A publisher marked collection_only is never listed as a whole organization; only its builds in a reviewed collection are tracked. Many older Model Optimizer builds record their quantization only in hf_quant_config.json, so for a collection member the planner reads that signal from the files at the pinned revision instead of from the listing.
Selection decides only which builds the catalog observes. It never approves a publisher or a format, and it never relaxes the license, engine, hardware, or lineage gates. A build that the rule selects once stays pinned until it disappears upstream, even if its downloads fall. Every entry is an unmeasured candidate, not an InferCrane performance claim. InferCrane does not claim that it transformed the publisher artifact or that the artifact is faster on a target GPU. Exact runtime and accelerator compatibility, correctness, semantic quality, workload performance, and cost evidence remain mandatory before Release Guard can accept a candidate. A publisher checkpoint that fails any gate is retained as negative evidence rather than promoted. One that is measured faster than the unmodified model, with answers that pass the check against it, can win the campaign; see When a quantized setup can win.

What each entry records

Each entry pins the publisher repository by commit SHA and records:
  • the manifest digest (every file’s path, size, and content identity), model card digest, and license digest at that commit;
  • the quantization tool, tool version, and scheme, or for a speculator its method and target models;
  • the base model it was built from. When the model card states the exact base commit, the lineage is exact and only a campaign on that base revision can use the build. Otherwise the publisher declares only the base repository, and the catalog records the base head it observed;
  • the target hardware vendor and architectures, and whether InferCrane can run them;
  • engine requirements stated in the model card;
  • accuracy or speed tables from the model card, copied as publisher_priors with evidence_state: unmeasured. They are discovery context only. Publishers use different benchmarks and settings, and their numbers cannot satisfy any InferCrane qualification gate.

When an entry becomes a candidate

A catalog entry seeds a proposal candidate only when every condition holds:
  • A reviewer approved the publisher and the exact format in internal/checkpointcatalog/policy.json.
  • It is a quantized checkpoint. Speculators are catalogued with their target models, but speculative-decoding candidates need acceptance-rate and output-parity gates first.
  • It targets hardware that InferCrane runs, and the requested GPU is one of the declared architectures: an NVIDIA family (Hopper, Blackwell) or the compiler target of a reviewed AMD Instinct GPU (gfx942 for MI300X and MI325X, gfx950 for MI350X and MI355X). An NVFP4 checkpoint never matches a Hopper GPU, and an MXFP4 build for CDNA 4 never matches an MI300X. The policy may name AMD architectures by generation (cdna3, cdna4); the planner records the compiler targets of the reviewed GPUs of that generation. A vendor with no reviewed GPU, such as Intel, stays unsupported_hardware.
  • Its license resolves to an approved SPDX identifier. A tag such as other stays unresolved until a reviewer records the terms.
  • The pinned engine version meets every requirement in the model card. The planner compares the card with the pinned image of each reviewed runtime on the build’s platform, CUDA or ROCm. When no runtime’s image is new enough, the entry stays catalog-only with that reason, for example no reviewed runtime fits the pinned images: vllm needs 0.28.0 or newer, pinned 0.22.1. A card that needs an unmerged engine pull request keeps the build off that engine until a reviewer records the release that contains the change.
  • For exact lineage, the campaign pins the stated base revision.
The unmodified setup each checkpoint is compared with serves the revision you pinned. A reviewed recipe’s revision is used only when you pin none, so one proposal never mixes two revisions of a model. The catalog records the blockers for every other entry. GET /api/v1/catalog/hugging-face/models lists each base model’s publisher builds under publisher_builds, including Intel builds marked unsupported_hardware, but proposes none of them.

Refresh the catalog

Network access happens only in an explicit sync step. The optimizer and the control API read the reviewed catalog compiled into the binary. Proposals never contact Hugging Face, and the inference request path never reads the catalog. The separate live search route, /catalog/hugging-face/search, does contact Hugging Face, but its results never enter this catalog or a proposal.
  1. Record a snapshot of the public Hugging Face API. The fetch lists each publisher’s organization twice: newest first back to the publisher’s created_after date, and most downloaded first down to the download threshold. It then reads each reviewed collection and records the head of every member that no listing selected, and it re-observes every pinned repository. A reviewed collection that no longer exists stops the fetch until the policy is reviewed. The snapshot records the selection windows it was fetched with, so a later policy edit does not change what a recorded snapshot selects. The fetch refuses to run without --network.
  2. Plan offline. The plan reads only the snapshot, the review policy, and the committed catalog, and writes a proposed catalog and catalog-diff.md. The same inputs always produce the same output.
  3. Review the diff. It lists the entries waiting for review, new candidates, added builds with the selection reason for each, new revisions, removals, and skipped repositories with reasons. To approve a publisher or format, edit the policy and plan the same snapshot again.
  4. Install and commit the reviewed catalog:
Review rules:
  • A new publisher or a new format always needs a human decision in the policy. A build that a reviewed collection lists from an organization outside the policy is reported as skipped.
  • A new revision of an approved publisher and format is re-reviewed automatically: the planner re-runs every gate and keeps the earlier decision unless the kind, base model, format, hardware vendor, or license changed. Then the revision waits for review.
  • When a newer revision is blocked, for example by an unreleased engine change, the previously pinned revision stays a candidate until the newer one passes.
  • A repository that disappears upstream is removed from the catalog.
  • Eligibility depends on the pinned runtime images and the reviewed GPUs. After either changes, plan the latest snapshot again so blockers name the current pins. Until then, a proposal still checks the pinned engine version before it uses a build.

What the first planner knows

The first source composes: Accelerator matching uses concrete hardware identity. Generic Kubernetes resource names such as nvidia.com/gpu are capacity resources, not GPU models, and cannot qualify a mechanism. Explicit aliases such as NVIDIA-L40S normalize to the exact hardware family. Dynamo candidates compile to one InferCrane-owned parent graph with outer autoscaling fixed at one; Dynamo owns its internal workers. This prevents two controllers from scaling the same serving graph. It does not infer that a model fits an accelerator. Without an endpoint diagnosis it does not propose quantization or speculative decoding on a built-in runtime. With one, it adds those changes only as unmeasured setups chosen by the diagnosis rules. It never enables LMCache, disaggregated serving, FlashInfer, or TensorRT-LLM. Those mechanisms are version- and workload-specific and require their own compatibility and qualification evidence. Use --include-simulated only for development exploration; simulated candidates are excluded by default.

Upstream composition boundaries

InferCrane will reuse upstream execution and optimization work behind replaceable adapters: The durable rule is: the optimizer proposes; InferCrane proves. Candidate sources, builders, and execution systems remain replaceable. Modeled results cannot satisfy a measured gate, provider mutation requires bounded approval, optimized artifacts retain immutable provenance, and activation or promotion remains an explicit action.

Multi-lane optimization evidence

External optimization workers can emit the content-free infercrane.dev/optimization-evidence/v1 contract defined in schemas/optimization-evidence-v1.schema.json. It keeps three benchmark evidence levels distinct:
  • screening is inexpensive candidate-search evidence (at least 12 requests per lane);
  • qualification requires at least 100 requests, two independent runs, and 300 seconds per lane;
  • public requires at least 300 requests, three independent runs, and 600 seconds per lane, and is reserved for independently repeated baseline-versus-final receipts.
These schema floors prevent evidence relabeling; a workload policy may require larger samples. They do not retroactively promote the existing 12-request Qwen measurements, which remain screening evidence. A lane may also record input_tokens, output_tokens, and a typed economics projection. These fields are validated context from the producer: they never affect qualification or scoring, and economics is not sourced cost evidence. Unknown fields are still rejected. Qwen3.8-27B-FP8 has a provisional H200 catalog profile copied from the paired Modal screening recipe. Proposing it returns a proposed-unmeasured candidate; each target still needs its own evidence. Every campaign pins one model, hardware tuple, and workload digest. Every candidate adds an immutable serving-recipe digest and every required concurrency lane. Each lane records aggregate output throughput, request throughput, SLO goodput in requests/second, and SLO-qualified output tokens/second as separate metrics. InferCrane applies error, prompt-integrity, quality, sample-size, TTFT, ITL, and SLO-attainment gates to every lane before calculating a score. An ineligible candidate has no score, even when another lane has the highest raw throughput. Evaluate a secret-free document locally without provisioning infrastructure:
The result pins the evaluator algorithm, input digest, policy/version, rejection reasons, Pareto set, and selected candidate. The supported policies cover qualified output throughput, SLO request goodput, qualified throughput per dollar, minimum COGS under the SLO, and latency-sensitive serving. FastPath provisional handoffs have a separate inspection boundary:
Inspection validates immutable model/tokenizer revisions, tokenizer and chat-template hashes, runtime commit, digest-pinned image, CUDA and hardware identity, launch revision, evidence level, quality declaration, and every workload lane. The result remains external_unverified inside InferCrane until the control plane binds it to its own immutable revision and passing signed quality evidence. A community source remains recorded even after InferCrane independently reproduces its recipe; community measurements never become qualification evidence.

Benchmarks and competitor comparisons

AIConfigurator estimates help decide what to test; they are not publishable performance claims. Use the competitive benchmark methodology to compare InferCrane-managed serving with Baseten, Fireworks, or another provider on the same model artifact, precision, request dataset, protocol, concurrency, region class, warm/cold definition, and output token accounting. If an external provider does not expose the same artifact or configuration, label the result as a product comparison rather than an engine comparison.