77trust / 100

Throughput Estimate

by denk.halowerk.com in AI models & inference

x402 APIPassing, checked 19 min ago

Rough tokens per second for a model on a GPU: memory-bound decode, compute-bound prefill, time to first token and batch throughput, from datasheet bandwidth and TFLOPS with stated efficiencies.

POST
https://denk.halowerk.com/v1/throughput-estimate
Price
$0.003
per call in USDC
Uptime
96.0%
last 30 days
Response time
126 ms
184 ms slowest 5%
Last check
Passed
19 min ago, next in 9 min

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://denk.halowerk.com/v1/throughput-estimate

Each call costs $0.003 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://denk.halowerk.com/v1/throughput-estimate
content-type: application/json

{
  "gpu": "rtx-4090",
  "head_dim": 128,
  "n_kv_heads": 8,
  "n_layers": 32,
  "params_b": 8.03,
  "quant": "Q4_K_M"
}

Parameters

ParameterTypeRequiredDescription
active_params_bnumberNo
batchintegerNo Default: 1.
bits_per_weightnumberNo
compute_efficiencynumberNo Default: 0.5.
context_tokensintegerNo Default: 4096.
fp16_accumulatebooleanNo Default: false.
fp16_tflopsnumberNo
gpustringNo One of: h100-sxm, h100-nvl, h200-sxm, h200-nvl, a100-80gb-sxm, a100-80gb-pcie, a100-40gb-sxm, a100-40gb-pcie, l40s, l40, l4, a10.
head_dimintegerNo
hf_modelstringNo
hidden_sizeintegerNo
kv_cache_typestringNo One of: f32, f16, bf16, fp8, q8_0, q5_1, q5_0, q4_1, q4_0, iq4_nl. Default: "f16".
memory_bandwidth_gbsnumberNo
memory_efficiencynumberNo Default: 0.7.
n_gpusintegerNo Default: 1.
n_headsintegerNo
n_kv_headsintegerNo
n_layersintegerNo
output_tokensintegerNo Default: 256.
params_bnumberNo
prompt_tokensintegerNo Default: 1000.
quantstringNo One of: F32, F16, BF16, Q8_0, Q6_K, Q5_K_M, Q5_K_S, Q5_1, Q5_0, Q4_K_M, Q4_K_S, Q4_1. Default: "F16".
vocab_sizeintegerNo

Example response

The provider's example. We can't check it without paying.

Example response, 62 lines
{
  "limitations": [
    "Order-of-magnitude estimate; measured speed depends on engine, kernels, quantization kernels and scheduling.",
    "Attention FLOPs, communication between GPUs and CPU offload are not modelled.",
    "Default efficiencies (0.7 memory, 0.5 compute) are assumptions."
  ],
  "result": {
    "assumptions": [
      "memory_efficiency 0.7, compute_efficiency 0.5 (assumptions, not measurements).",
      "KV cache is read in full at the given context length for every step.",
      "Single device."
    ],
    "decode": {
      "bottleneck": "memory_bandwidth",
      "bytes_per_step": 5449624912,
      "compute_time_ms": 0.194,
      "memory_time_ms": 7.723,
      "step_ms": 7.723,
      "tokens_per_second_per_sequence": 129.48,
      "tokens_per_second_total": 129.5
    },
    "formulas": {
      "compute_time": "2 × active_params × batch / (TFLOPS × compute_efficiency)",
      "decode_step": "max(memory_time, compute_time)",
      "memory_time": "(active_params × bpw / 8 + batch × kv_bytes(context)) / (bandwidth × memory_efficiency)",
      "prefill": "TFLOPS × compute_efficiency / (2 × active_params)"
    },
    "gpu": {
      "bandwidth_gbs": 1008,
      "fp16_tflops_dense": 165.2,
      "id": "rtx-4090",
      "name": "NVIDIA GeForce RTX 4090",
      "source": "https://images.nvidia.com/aem-dam/Solutions/geforce/ada/nvidia-ada-gpu-architecture.pdf (Appendix A)",
      "sparsity_halved": false
    },
    "memory_check": {
      "capacity_gib": 24,
      "fits": true,
      "needed_gib": 5.075
    },
    "model": {
      "active_parameters": 8029999999.999999,
      "bits_per_weight": 4.8944,
      "kv_bytes_per_sequence": 536870912,
      "parameters": 8029999999.999999,
      "quant": "Q4_K_M",
      "source": "input"
    },
    "prefill": {
      "note": null,
      "time_to_first_token_s": 0.194,
      "tokens_per_second": 5143.2
    },
    "request": {
      "output_tokens": 256,
      "prompt_tokens": 1000,
      "total_seconds": 2.17
    }
  },
  "service": "throughput-estimate",
  "status": "success"
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.003.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://denk.halowerk.com/v1/throughput-estimate' \
  -H 'content-type: application/json' \
  --data-raw '{"gpu":"rtx-4090","head_dim":128,"n_kv_heads":8,"n_layers":32,"params_b":8.03,"quant":"Q4_K_M"}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://denk.halowerk.com/v1/throughput-estimate' \
  -H 'content-type: application/json' \
  --data-raw '{"gpu":"rtx-4090","head_dim":128,"n_kv_heads":8,"n_layers":32,"params_b":8.03,"quant":"Q4_K_M"}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.003 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.003" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.003 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fdenk.halowerk.com%2Fv1%2Fthroughput-estimate&method=POST
const res = await pay("https://denk.halowerk.com/v1/throughput-estimate", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "gpu": "rtx-4090",
    "head_dim": 128,
    "n_kv_heads": 8,
    "n_layers": 32,
    "params_b": 8.03,
    "quant": "Q4_K_M"
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.003 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.003"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://denk.halowerk.com/v1/throughput-estimate",
        json={
            "gpu": "rtx-4090",
            "head_dim": 128,
            "n_kv_heads": 8,
            "n_layers": 32,
            "params_b": 8.03,
            "quant": "Q4_K_M",
        },
    )
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
19 min agoPassed402145 ms$0.003
13 h agoPassed402119 ms$0.003
2 days agoTimed out---
4 days agoPassed402126 ms$0.003
4 days agoPassed402140 ms$0.003
Show 10 older checks
5 days agoPassed402123 ms$0.003
5 days agoPassed402156 ms$0.003
5 days agoPassed402132 ms$0.003
6 days agoPassed402139 ms$0.003
6 days agoPassed402188 ms$0.003
6 days agoPassed402123 ms$0.003
7 days agoPassed402122 ms$0.003
7 days agoPassed402129 ms$0.003
7 days agoPassed402118 ms$0.003
8 days agoPassed402121 ms$0.003