Quantization Advice
by denk.halowerk.com in AI models & inference
Pick the llama.cpp quantization (GGUF file type) with the best published quality that fits your GPU memory, optionally with CPU offload, and list all candidates with sizes and perplexity cost. For every llama.cpp file type, weights = parameters × effective bits per weight (measured on Llama-3.1-8B, tools/quantize/README.md, commit ad1b88c) plus KV cache and overhead (same formulas as vram-estimate) are compared with the memory budget.
https://denk.halowerk.com/v1/quantization-advice- Price
- $0.003
- per call in USDC
- Uptime
- 96.0%
- last 30 days
- Response time
- 130 ms
- 174 ms slowest 5%
- Last check
- Passed
- 31 min ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://denk.halowerk.com/v1/quantization-advice
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/quantization-advice
content-type: application/json
{
"head_dim": 128,
"min_quality": "high",
"n_kv_heads": 8,
"n_layers": 32,
"params_b": 8.03,
"vram_gib": 8
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
allow_imatrix | boolean | No | Default: true. |
batch | integer | No | Default: 1. |
context_tokens | integer | No | Default: 4096. |
gpu | string | No | 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_dim | integer | No | |
hf_model | string | No | |
hidden_size | integer | No | |
kv_cache_type | string | No | One of: f32, f16, bf16, fp8, q8_0, q5_1, q5_0, q4_1, q4_0, iq4_nl. Default: "f16". |
min_quality | string | No | One of: near_lossless, high, balanced, any. Default: "balanced". |
n_gpus | integer | No | Default: 1. |
n_heads | integer | No | |
n_kv_heads | integer | No | |
n_layers | integer | No | |
overhead_gib | number | No | Default: 0.5. |
params_b | number | No | |
ram_gib | number | No | |
vocab_size | integer | No | |
vram_gib | number | No |
Example response
The provider's example. We can't check it without paying.
Example response, 85 lines
{
"limitations": [
"Perplexity deltas were measured on Llama-3(.1)-8B; smaller models usually lose m…",
"Partial CPU offload is much slower than full GPU placement.",
"Memory figures are formula estimates."
],
"result": {
"accepted_tiers": [
"near_lossless",
"high"
],
"candidates": [
{
"bpw_source": "measured (Llama-3.1-8B)",
"effective_bpw": 16.0005,
"fits_gpu": false,
"fits_with_offload": false,
"ppl_increase": 0.002,
"ppl_reference": "Mistral-7B",
"quant": "F16",
"requires_imatrix": false,
"tier": "near_lossless",
"total_gib": 15.958,
"weights_gib": 14.958
},
{
"bpw_source": "tensor type",
"effective_bpw": 16,
"fits_gpu": false,
"fits_with_offload": false,
"ppl_increase": -0.005,
"ppl_reference": "Mistral-7B",
"quant": "BF16",
"requires_imatrix": false,
"tier": "near_lossless",
"total_gib": 15.957,
"weights_gib": 14.957
},
{
"bpw_source": "measured (Llama-3.1-8B)",
"effective_bpw": 8.5008,
"fits_gpu": false,
"fits_with_offload": false,
"ppl_increase": 0.0026,
"ppl_reference": "Llama-3-8B",
"quant": "Q8_0",
"requires_imatrix": false,
"tier": "near_lossless",
"total_gib": 8.947,
"weights_gib": 7.947
}
],
"memory_budget_gib": {
"gpu": 8,
"ram": 0
},
"model": {
"kv_cache_gib": 0.5,
"overhead_gib": 0.5,
"parameters": 8029999999.999999,
"source": "input"
},
"recommendation": {
"bpw_source": "measured (Llama-3.1-8B)",
"effective_bpw": 6.5633,
"fits_gpu": true,
"fits_with_offload": false,
"method": "lowest published perplexity increase that fits in GPU memory",
"placement": "gpu",
"ppl_increase": 0.0217,
"ppl_reference": "Llama-3-8B",
"quant": "Q6_K",
"requires_imatrix": false,
"tier": "near_lossless",
"total_gib": 7.135,
"weights_gib": 6.135
},
"sources": [
"https://github.com/ggml-org/llama.cpp/blob/ad1b88ca0d37a2171efba1c04f1a3531c78f1…",
"https://github.com/ggml-org/llama.cpp/blob/732707dff265be513347b02911e1dd18f7e1f…"
]
},
"service": "quantization-advice",
"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/quantization-advice' \
-H 'content-type: application/json' \
--data-raw '{"head_dim":128,"min_quality":"high","n_kv_heads":8,"n_layers":32,"params_b":8.03,"vram_gib":8}'
# 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/quantization-advice' \
-H 'content-type: application/json' \
--data-raw '{"head_dim":128,"min_quality":"high","n_kv_heads":8,"n_layers":32,"params_b":8.03,"vram_gib":8}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: 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%2Fquantization-advice&method=POST
const res = await pay("https://denk.halowerk.com/v1/quantization-advice", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"head_dim": 128,
"min_quality": "high",
"n_kv_heads": 8,
"n_layers": 32,
"params_b": 8.03,
"vram_gib": 8
}),
});
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/quantization-advice",
json={
"head_dim": 128,
"min_quality": "high",
"n_kv_heads": 8,
"n_layers": 32,
"params_b": 8.03,
"vram_gib": 8,
},
)
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
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 31 min ago | Passed | 402 | 267 ms | $0.003 |
| 14 h ago | Passed | 402 | 41 ms | $0.003 |
| 3 days ago | Timed out | - | - | - |
| 4 days ago | Passed | 402 | 126 ms | $0.003 |
| 4 days ago | Passed | 402 | 43 ms | $0.003 |
Show 10 older checks
| 5 days ago | Passed | 402 | 174 ms | $0.003 |
| 5 days ago | Passed | 402 | 164 ms | $0.003 |
| 5 days ago | Passed | 402 | 131 ms | $0.003 |
| 6 days ago | Passed | 402 | 151 ms | $0.003 |
| 6 days ago | Passed | 402 | 135 ms | $0.003 |
| 6 days ago | Passed | 402 | 129 ms | $0.003 |
| 7 days ago | Passed | 402 | 120 ms | $0.003 |
| 7 days ago | Passed | 402 | 170 ms | $0.003 |
| 7 days ago | Passed | 402 | 120 ms | $0.003 |
| 8 days ago | Passed | 402 | 138 ms | $0.003 |