Skip to content
Fourohtwo

Estimate the GPU memory needed to serve a model

denk.halowerk.com/v1/vram-estimate

Estimate the GPU memory needed to serve a model: weights by quantization, KV cache by context and batch, compute buffer and overhead, each with its formula, plus a fit check.

BaseAnswering
POSThttps://denk.halowerk.com/v1/vram-estimate

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://denk.halowerk.com/v1/vram-estimate", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"context_tokens":8192,"gpu":"rtx-4090","head_dim":128,"n_kv_heads":8,"n_layers":32,"params_b":8.03,"quant":"Q4_K_M"}),
});
console.log(await res.json());

Example input

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