gpu-price-explorer / index.html
halituzun's picture
Cloud GPU Price Explorer: live prices + VRAM fit
e1d9928 verified
Raw History Blame Contribute Delete
7.16 kB
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Cloud GPU Price Explorer</title>
<meta name="description" content="Live hourly prices for renting about 90 NVIDIA cloud GPUs (RTX 4090, A100, H100, H200, B200) and a VRAM calculator that finds the cheapest GPU for a model.">
<style>
:root { --bg:#fafaf9; --surface:#fff; --ink:#1c1917; --muted:#57534e; --line:#e7e5e4; --accent:#15803d; --accent-soft:#dcfce7; }
@media (prefers-color-scheme: dark) { :root { --bg:#0c0a09; --surface:#1c1917; --ink:#fafaf9; --muted:#a8a29e; --line:#292524; --accent:#4ade80; --accent-soft:#14532d; } }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font:15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
main { max-width:960px; margin:0 auto; padding:24px 16px 48px; }
h1 { font-size:28px; letter-spacing:-.02em; margin:0 0 4px; }
h2 { font-size:18px; margin:32px 0 12px; }
p.lead { color:var(--muted); margin:0 0 20px; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:16px; }
.row { display:flex; flex-wrap:wrap; gap:12px; align-items:end; }
label { display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--muted); }
input, select { font:inherit; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:var(--bg); color:var(--ink); min-width:140px; }
.mono { font-family:ui-monospace, SFMono-Regular, Menlo, monospace; }
.result { margin-top:14px; padding:12px; border-radius:8px; background:var(--accent-soft); }
table { width:100%; border-collapse:collapse; font-size:14px; }
th, td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); }
th { cursor:pointer; user-select:none; color:var(--muted); font-weight:600; white-space:nowrap; }
td.num, th.num { text-align:right; }
a { color:var(--accent); }
.wrap { overflow-x:auto; }
footer { margin-top:28px; color:var(--muted); font-size:13px; }
.err { color:#b91c1c; }
</style>
</head>
<body>
<main>
<h1>Cloud GPU Price Explorer</h1>
<p class="lead">Starting hourly prices to rent NVIDIA GPUs in the cloud, refreshed daily from a live catalog. <span id="asof"></span></p>
<div class="card">
<strong>Which GPU fits my model?</strong>
<div class="row" style="margin-top:10px">
<label>Parameters (billions)<input id="params" type="number" min="0.1" step="0.1" value="8"></label>
<label>Precision
<select id="bits">
<option value="16">FP16 / BF16</option>
<option value="8">INT8 / FP8</option>
<option value="4" selected>4-bit (GGUF Q4, AWQ)</option>
</select>
</label>
</div>
<div class="result" id="fit">Loading prices…</div>
</div>
<h2>All GPUs</h2>
<div class="row" style="margin-bottom:10px">
<label>Search<input id="q" type="search" placeholder="e.g. 4090, H100"></label>
<label>Minimum VRAM (GB)<input id="minvram" type="number" min="0" step="1" value="0"></label>
</div>
<div class="card wrap">
<table>
<thead><tr>
<th data-k="gpu">GPU</th>
<th data-k="vram_gb" class="num">VRAM (GB)</th>
<th data-k="usd_per_hour_from" class="num">From $/hr</th>
<th data-k="usd_per_gb" class="num">$/GB VRAM</th>
<th></th>
</tr></thead>
<tbody id="rows"><tr><td colspan="5">Loading…</td></tr></tbody>
</table>
</div>
<footer>
Data: <a href="https://huggingface.co/datasets/corehu-cloud/gpu-cloud-prices">corehu-cloud/gpu-cloud-prices</a> (CC BY 4.0), from the live catalog at
<a href="https://corehu.com/gpu-prices">CoreHu</a>. Per-second billing in USD. Weekly reports: <a href="https://corehu.com/gpu-price-index">GPU price index</a>.
VRAM figures are estimates (weights + ~20 % for KV cache and runtime).
</footer>
</main>
<script>
const CSV = 'https://huggingface.co/datasets/corehu-cloud/gpu-cloud-prices/resolve/main/gpu_prices_latest.csv';
let data = [], sortKey = 'usd_per_hour_from', sortDir = 1;
const $ = (id) => document.getElementById(id);
const money = (n) => '$' + n.toFixed(2);
const esc = (s) => String(s).replace(/[&<>"]/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;' }[c]));
const safeUrl = (u) => /^https:\/\/corehu\.com\//.test(u) ? u : 'https://corehu.com/gpu-prices';
function parse(text) {
const [head, ...lines] = text.trim().split(/\r?\n/);
const cols = head.split(',');
return lines.map((l) => { const v = l.split(','); const o = {}; cols.forEach((c, i) => { o[c] = v[i]; }); return o; })
.map((o) => ({ ...o, vram_gb: +o.vram_gb, usd_per_hour_from: +o.usd_per_hour_from }))
.filter((o) => o.gpu && o.usd_per_hour_from > 0 && o.vram_gb > 0)
.map((o) => ({ ...o, usd_per_gb: o.usd_per_hour_from / o.vram_gb }));
}
function render() {
const q = $('q').value.trim().toLowerCase(), min = +$('minvram').value || 0;
const list = data.filter((d) => d.vram_gb >= min && (!q || d.gpu.toLowerCase().includes(q)))
.sort((a, b) => (a[sortKey] > b[sortKey] ? 1 : a[sortKey] < b[sortKey] ? -1 : 0) * sortDir);
$('rows').innerHTML = list.map((d) => `<tr><td>${esc(d.gpu)}</td><td class="num mono">${d.vram_gb}</td>` +
`<td class="num mono">${money(d.usd_per_hour_from)}</td><td class="num mono">${money(d.usd_per_gb)}</td>` +
`<td><a href="${esc(safeUrl(d.url))}" target="_blank" rel="noopener">Rent ${esc(d.gpu)}</a></td></tr>`).join('') ||
'<tr><td colspan="5">No GPU matches.</td></tr>';
fit();
}
function fit() {
const p = +$('params').value || 0, bits = +$('bits').value;
if (!data.length || p <= 0) return;
const need = p * bits / 8 * 1.2;
const ok = data.filter((d) => d.vram_gb >= need).sort((a, b) => a.usd_per_hour_from - b.usd_per_hour_from);
$('fit').innerHTML = `Needs about <span class="mono">${need.toFixed(1)} GB</span> of VRAM. ` + (ok.length
? `Cheapest single GPU: <strong>${esc(ok[0].gpu)}</strong> (${ok[0].vram_gb} GB) from <span class="mono">${money(ok[0].usd_per_hour_from)}/hr</span>. ` +
`<a href="${esc(safeUrl(ok[0].url))}" target="_blank" rel="noopener">See offers</a>`
: 'No single GPU is large enough; use a multi-GPU machine. <a href="https://corehu.com/vram-calculator" target="_blank" rel="noopener">Plan a multi-GPU setup</a>');
}
document.querySelectorAll('th[data-k]').forEach((th) => th.addEventListener('click', () => {
const k = th.dataset.k; sortDir = sortKey === k ? -sortDir : 1; sortKey = k; render();
}));
['q', 'minvram'].forEach((id) => $(id).addEventListener('input', render));
['params', 'bits'].forEach((id) => $(id).addEventListener('input', fit));
fetch(CSV).then((r) => { if (!r.ok) throw new Error(r.status); return r.text(); }).then((t) => {
data = parse(t);
if (data[0]?.date) $('asof').textContent = `Prices as of ${data[0].date}.`;
render();
}).catch(() => {
$('rows').innerHTML = '<tr><td colspan="5" class="err">Could not load prices. Open the dataset link below.</td></tr>';
$('fit').innerHTML = '<span class="err">Could not load prices.</span>';
});
</script>
</body>
</html>