neurarch 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/engine.bundle.mjs CHANGED
@@ -5697,7 +5697,7 @@ var require_react_dom_production_min = __commonJS({
5697
5697
  d = d.return;
5698
5698
  }
5699
5699
  Jb(function() {
5700
- var d2 = f, e2 = xb(c), g2 = [];
5700
+ var d2 = f, e2 = xb(c), g3 = [];
5701
5701
  a: {
5702
5702
  var h2 = df.get(a);
5703
5703
  if (void 0 !== h2) {
@@ -5787,7 +5787,7 @@ var require_react_dom_production_min = __commonJS({
5787
5787
  if (J) break;
5788
5788
  w = w.return;
5789
5789
  }
5790
- 0 < t.length && (h2 = new k2(h2, n2, null, c, e2), g2.push({ event: h2, listeners: t }));
5790
+ 0 < t.length && (h2 = new k2(h2, n2, null, c, e2), g3.push({ event: h2, listeners: t }));
5791
5791
  }
5792
5792
  }
5793
5793
  if (0 === (b & 7)) {
@@ -5831,8 +5831,8 @@ var require_react_dom_production_min = __commonJS({
5831
5831
  t = null;
5832
5832
  }
5833
5833
  else t = null;
5834
- null !== k2 && wf(g2, h2, k2, t, false);
5835
- null !== n2 && null !== J && wf(g2, J, n2, t, true);
5834
+ null !== k2 && wf(g3, h2, k2, t, false);
5835
+ null !== n2 && null !== J && wf(g3, J, n2, t, true);
5836
5836
  }
5837
5837
  }
5838
5838
  }
@@ -5847,7 +5847,7 @@ var require_react_dom_production_min = __commonJS({
5847
5847
  }
5848
5848
  else (k2 = h2.nodeName) && "input" === k2.toLowerCase() && ("checkbox" === h2.type || "radio" === h2.type) && (na = Ee);
5849
5849
  if (na && (na = na(a, d2))) {
5850
- ne(g2, na, c, e2);
5850
+ ne(g3, na, c, e2);
5851
5851
  break a;
5852
5852
  }
5853
5853
  xa && xa(a, h2, d2);
@@ -5868,13 +5868,13 @@ var require_react_dom_production_min = __commonJS({
5868
5868
  case "mouseup":
5869
5869
  case "dragend":
5870
5870
  Te = false;
5871
- Ue(g2, c, e2);
5871
+ Ue(g3, c, e2);
5872
5872
  break;
5873
5873
  case "selectionchange":
5874
5874
  if (Pe) break;
5875
5875
  case "keydown":
5876
5876
  case "keyup":
5877
- Ue(g2, c, e2);
5877
+ Ue(g3, c, e2);
5878
5878
  }
5879
5879
  var $a;
5880
5880
  if (ae) b: {
@@ -5892,10 +5892,10 @@ var require_react_dom_production_min = __commonJS({
5892
5892
  ba = void 0;
5893
5893
  }
5894
5894
  else ie ? ge(a, c) && (ba = "onCompositionEnd") : "keydown" === a && 229 === c.keyCode && (ba = "onCompositionStart");
5895
- ba && (de && "ko" !== c.locale && (ie || "onCompositionStart" !== ba ? "onCompositionEnd" === ba && ie && ($a = nd()) : (kd = e2, ld = "value" in kd ? kd.value : kd.textContent, ie = true)), xa = oe(d2, ba), 0 < xa.length && (ba = new Ld(ba, a, null, c, e2), g2.push({ event: ba, listeners: xa }), $a ? ba.data = $a : ($a = he(c), null !== $a && (ba.data = $a))));
5896
- if ($a = ce ? je(a, c) : ke(a, c)) d2 = oe(d2, "onBeforeInput"), 0 < d2.length && (e2 = new Ld("onBeforeInput", "beforeinput", null, c, e2), g2.push({ event: e2, listeners: d2 }), e2.data = $a);
5895
+ ba && (de && "ko" !== c.locale && (ie || "onCompositionStart" !== ba ? "onCompositionEnd" === ba && ie && ($a = nd()) : (kd = e2, ld = "value" in kd ? kd.value : kd.textContent, ie = true)), xa = oe(d2, ba), 0 < xa.length && (ba = new Ld(ba, a, null, c, e2), g3.push({ event: ba, listeners: xa }), $a ? ba.data = $a : ($a = he(c), null !== $a && (ba.data = $a))));
5896
+ if ($a = ce ? je(a, c) : ke(a, c)) d2 = oe(d2, "onBeforeInput"), 0 < d2.length && (e2 = new Ld("onBeforeInput", "beforeinput", null, c, e2), g3.push({ event: e2, listeners: d2 }), e2.data = $a);
5897
5897
  }
5898
- se(g2, b);
5898
+ se(g3, b);
5899
5899
  });
5900
5900
  }
5901
5901
  function tf(a, b, c) {
@@ -6411,8 +6411,8 @@ var require_react_dom_production_min = __commonJS({
6411
6411
  }
6412
6412
  return null;
6413
6413
  }
6414
- function n2(e2, g2, h2, k2) {
6415
- for (var l2 = null, m2 = null, u = g2, w = g2 = 0, x = null; null !== u && w < h2.length; w++) {
6414
+ function n2(e2, g3, h2, k2) {
6415
+ for (var l2 = null, m2 = null, u = g3, w = g3 = 0, x = null; null !== u && w < h2.length; w++) {
6416
6416
  u.index > w ? (x = u, u = null) : x = u.sibling;
6417
6417
  var n3 = r(e2, u, h2[w], k2);
6418
6418
  if (null === n3) {
@@ -6420,30 +6420,30 @@ var require_react_dom_production_min = __commonJS({
6420
6420
  break;
6421
6421
  }
6422
6422
  a && u && null === n3.alternate && b(e2, u);
6423
- g2 = f(n3, g2, w);
6423
+ g3 = f(n3, g3, w);
6424
6424
  null === m2 ? l2 = n3 : m2.sibling = n3;
6425
6425
  m2 = n3;
6426
6426
  u = x;
6427
6427
  }
6428
6428
  if (w === h2.length) return c(e2, u), I && tg(e2, w), l2;
6429
6429
  if (null === u) {
6430
- for (; w < h2.length; w++) u = q(e2, h2[w], k2), null !== u && (g2 = f(u, g2, w), null === m2 ? l2 = u : m2.sibling = u, m2 = u);
6430
+ for (; w < h2.length; w++) u = q(e2, h2[w], k2), null !== u && (g3 = f(u, g3, w), null === m2 ? l2 = u : m2.sibling = u, m2 = u);
6431
6431
  I && tg(e2, w);
6432
6432
  return l2;
6433
6433
  }
6434
- for (u = d(e2, u); w < h2.length; w++) x = y(u, e2, w, h2[w], k2), null !== x && (a && null !== x.alternate && u.delete(null === x.key ? w : x.key), g2 = f(x, g2, w), null === m2 ? l2 = x : m2.sibling = x, m2 = x);
6434
+ for (u = d(e2, u); w < h2.length; w++) x = y(u, e2, w, h2[w], k2), null !== x && (a && null !== x.alternate && u.delete(null === x.key ? w : x.key), g3 = f(x, g3, w), null === m2 ? l2 = x : m2.sibling = x, m2 = x);
6435
6435
  a && u.forEach(function(a2) {
6436
6436
  return b(e2, a2);
6437
6437
  });
6438
6438
  I && tg(e2, w);
6439
6439
  return l2;
6440
6440
  }
6441
- function t(e2, g2, h2, k2) {
6441
+ function t(e2, g3, h2, k2) {
6442
6442
  var l2 = Ka(h2);
6443
6443
  if ("function" !== typeof l2) throw Error(p(150));
6444
6444
  h2 = l2.call(h2);
6445
6445
  if (null == h2) throw Error(p(151));
6446
- for (var u = l2 = null, m2 = g2, w = g2 = 0, x = null, n3 = h2.next(); null !== m2 && !n3.done; w++, n3 = h2.next()) {
6446
+ for (var u = l2 = null, m2 = g3, w = g3 = 0, x = null, n3 = h2.next(); null !== m2 && !n3.done; w++, n3 = h2.next()) {
6447
6447
  m2.index > w ? (x = m2, m2 = null) : x = m2.sibling;
6448
6448
  var t2 = r(e2, m2, n3.value, k2);
6449
6449
  if (null === t2) {
@@ -6451,7 +6451,7 @@ var require_react_dom_production_min = __commonJS({
6451
6451
  break;
6452
6452
  }
6453
6453
  a && m2 && null === t2.alternate && b(e2, m2);
6454
- g2 = f(t2, g2, w);
6454
+ g3 = f(t2, g3, w);
6455
6455
  null === u ? l2 = t2 : u.sibling = t2;
6456
6456
  u = t2;
6457
6457
  m2 = x;
@@ -6461,11 +6461,11 @@ var require_react_dom_production_min = __commonJS({
6461
6461
  m2
6462
6462
  ), I && tg(e2, w), l2;
6463
6463
  if (null === m2) {
6464
- for (; !n3.done; w++, n3 = h2.next()) n3 = q(e2, n3.value, k2), null !== n3 && (g2 = f(n3, g2, w), null === u ? l2 = n3 : u.sibling = n3, u = n3);
6464
+ for (; !n3.done; w++, n3 = h2.next()) n3 = q(e2, n3.value, k2), null !== n3 && (g3 = f(n3, g3, w), null === u ? l2 = n3 : u.sibling = n3, u = n3);
6465
6465
  I && tg(e2, w);
6466
6466
  return l2;
6467
6467
  }
6468
- for (m2 = d(e2, m2); !n3.done; w++, n3 = h2.next()) n3 = y(m2, e2, w, n3.value, k2), null !== n3 && (a && null !== n3.alternate && m2.delete(null === n3.key ? w : n3.key), g2 = f(n3, g2, w), null === u ? l2 = n3 : u.sibling = n3, u = n3);
6468
+ for (m2 = d(e2, m2); !n3.done; w++, n3 = h2.next()) n3 = y(m2, e2, w, n3.value, k2), null !== n3 && (a && null !== n3.alternate && m2.delete(null === n3.key ? w : n3.key), g3 = f(n3, g3, w), null === u ? l2 = n3 : u.sibling = n3, u = n3);
6469
6469
  a && m2.forEach(function(a2) {
6470
6470
  return b(e2, a2);
6471
6471
  });
@@ -32623,6 +32623,10 @@ function normalizeAndAugmentConfig(config, modelId) {
32623
32623
  }
32624
32624
  }
32625
32625
  if (sub.model_type) config._textModelType = sub.model_type;
32626
+ if (sub.model_type === "gemma3_text") {
32627
+ if (config.vocab_size == null) config.vocab_size = 262208;
32628
+ if (config.head_dim == null) config.head_dim = 256;
32629
+ }
32626
32630
  break;
32627
32631
  }
32628
32632
  }
@@ -32679,15 +32683,15 @@ async function fetchDiffusersConfig(modelId) {
32679
32683
  const subResp = await fetch(`https://huggingface.co/${modelId}/resolve/main/${denoiser}/config.json`);
32680
32684
  if (!subResp.ok) return null;
32681
32685
  const raw = await subResp.json();
32682
- const num5 = (...keys) => {
32686
+ const num6 = (...keys) => {
32683
32687
  for (const k of keys) if (typeof raw[k] === "number") return raw[k];
32684
32688
  return void 0;
32685
32689
  };
32686
32690
  const className = raw._class_name || (Array.isArray(mi[denoiser]) ? mi[denoiser][1] : void 0) || (denoiser === "unet" ? "UNet2DConditionModel" : "Transformer2DModel");
32687
- const heads = num5("num_attention_heads");
32688
- const headDim = num5("attention_head_dim");
32689
- const hidden = (heads && headDim ? heads * headDim : void 0) ?? num5("inner_dim", "cross_attention_dim", "hidden_size", "caption_channels", "joint_attention_dim") ?? 1152;
32690
- const layers = denoiser === "transformer" ? num5("num_layers", "num_hidden_layers", "depth") ?? 12 : void 0;
32691
+ const heads = num6("num_attention_heads");
32692
+ const headDim = num6("attention_head_dim");
32693
+ const hidden = (heads && headDim ? heads * headDim : void 0) ?? num6("inner_dim", "cross_attention_dim", "hidden_size", "caption_channels", "joint_attention_dim") ?? 1152;
32694
+ const layers = denoiser === "transformer" ? num6("num_layers", "num_hidden_layers", "depth") ?? 12 : void 0;
32691
32695
  const config = normalizeAndAugmentConfig({
32692
32696
  model_type: denoiser === "unet" ? "unet" : "dit",
32693
32697
  architectures: [className],
@@ -32697,23 +32701,23 @@ async function fetchDiffusersConfig(modelId) {
32697
32701
  // Use the model's real FFN width when it ships one (Wan: ffn_dim 8960,
32698
32702
  // not hidden×4 = 6144 — the hardcoded ×4 undercounted the MLP by ~260M
32699
32703
  // across 30 layers). Falls back to ×4 only when no width is declared.
32700
- intermediate_size: num5("ffn_dim", "intermediate_size", "d_ff", "mlp_dim", "mlp_ratio") ?? hidden * 4
32704
+ intermediate_size: num6("ffn_dim", "intermediate_size", "d_ff", "mlp_dim", "mlp_ratio") ?? hidden * 4
32701
32705
  }, modelId);
32702
32706
  const c = config;
32703
32707
  c._diffusion = true;
32704
32708
  c._denoiser = denoiser;
32705
32709
  c._diffuser_class = className;
32706
- c.in_channels = num5("in_channels") ?? 4;
32707
- c.sample_size = num5("sample_size") ?? 64;
32708
- c.patch_size = num5("patch_size") ?? 2;
32709
- c.cross_attention_dim = num5("cross_attention_dim", "caption_channels", "joint_attention_dim", "text_dim", "text_embed_dim");
32710
+ c.in_channels = num6("in_channels") ?? 4;
32711
+ c.sample_size = num6("sample_size") ?? 64;
32712
+ c.patch_size = num6("patch_size") ?? 2;
32713
+ c.cross_attention_dim = num6("cross_attention_dim", "caption_channels", "joint_attention_dim", "text_dim", "text_embed_dim");
32710
32714
  if (Array.isArray(raw.block_out_channels)) c.block_out_channels = raw.block_out_channels;
32711
32715
  if (typeof raw.layers_per_block === "number") c.layers_per_block = raw.layers_per_block;
32712
32716
  const classLower = className.toLowerCase();
32713
32717
  if (/sd3|stablediffusion3|sd35|\bflux\b|mmdit/.test(classLower) || typeof raw.joint_attention_dim === "number") {
32714
32718
  c._mmdit = true;
32715
32719
  }
32716
- const singleLayers = num5("num_single_layers");
32720
+ const singleLayers = num6("num_single_layers");
32717
32721
  if (singleLayers != null) c._num_single_layers = singleLayers;
32718
32722
  if (mi.vae) {
32719
32723
  try {
@@ -41383,7 +41387,7 @@ function readChangeSpec(input) {
41383
41387
  if (typeof s !== "object" || Array.isArray(s)) problems.push("serving: expected an object");
41384
41388
  else if (typeof s.gpu !== "string" || !s.gpu) problems.push("serving.gpu: expected a GPU id like a100-40g");
41385
41389
  else {
41386
- const int = (k, dflt) => {
41390
+ const int2 = (k, dflt) => {
41387
41391
  const v = s[k];
41388
41392
  if (v == null) return dflt;
41389
41393
  const n2 = typeof v === "string" ? Number(v) : v;
@@ -41393,7 +41397,7 @@ function readChangeSpec(input) {
41393
41397
  }
41394
41398
  return Math.round(n2);
41395
41399
  };
41396
- spec.serving = { gpu: s.gpu, promptTokens: int("promptTokens", 1024), genTokens: int("genTokens", 256), batchSize: int("batchSize", 8) };
41400
+ spec.serving = { gpu: s.gpu, promptTokens: int2("promptTokens", 1024), genTokens: int2("genTokens", 256), batchSize: int2("batchSize", 8) };
41397
41401
  }
41398
41402
  }
41399
41403
  if (raw.constraints != null) {
@@ -41593,7 +41597,7 @@ function readPolicy(input) {
41593
41597
  const raw = input;
41594
41598
  const policy = {};
41595
41599
  const problems = [];
41596
- const num5 = (k) => {
41600
+ const num6 = (k) => {
41597
41601
  const v = raw[k];
41598
41602
  if (v == null) return void 0;
41599
41603
  const n2 = typeof v === "string" ? Number(v) : v;
@@ -41621,11 +41625,11 @@ function readPolicy(input) {
41621
41625
  if (typeof raw.must_fit !== "string") problems.push("must_fit: expected a GPU name like A100-40GB");
41622
41626
  else policy.must_fit = raw.must_fit;
41623
41627
  }
41624
- const mm = num5("max_memory_gb");
41628
+ const mm = num6("max_memory_gb");
41625
41629
  if (mm != null) policy.max_memory_gb = mm;
41626
- const ml = num5("max_layers");
41630
+ const ml = num6("max_layers");
41627
41631
  if (ml != null) policy.max_layers = ml;
41628
- const mc = num5("max_cost_usd");
41632
+ const mc = num6("max_cost_usd");
41629
41633
  if (mc != null) policy.max_cost_usd = mc;
41630
41634
  const ft = list2("forbid_types");
41631
41635
  if (ft) policy.forbid_types = ft;
@@ -42435,21 +42439,21 @@ function loraTargetsFor(model, shapesIn) {
42435
42439
  const ms = modules.filter(pick);
42436
42440
  const r8 = ms.reduce((a, m) => a + m.lora.r8, 0);
42437
42441
  const r16 = ms.reduce((a, m) => a + m.lora.r16, 0);
42438
- const pct2 = (x) => baseParams > 0 ? x / baseParams * 100 : 0;
42442
+ const pct3 = (x) => baseParams > 0 ? x / baseParams * 100 : 0;
42439
42443
  return {
42440
42444
  targetModules: [...new Set(ms.map((m) => m.module))],
42441
42445
  modules: ms.length,
42442
42446
  loraParams: { r8, r16 },
42443
- pctOfBase: { r8: pct2(r8), r16: pct2(r16) }
42447
+ pctOfBase: { r8: pct3(r8), r16: pct3(r16) }
42444
42448
  };
42445
42449
  };
42446
- const ATTN2 = /* @__PURE__ */ new Set(["q_proj", "k_proj", "v_proj", "o_proj"]);
42450
+ const ATTN3 = /* @__PURE__ */ new Set(["q_proj", "k_proj", "v_proj", "o_proj"]);
42447
42451
  return {
42448
42452
  baseParams,
42449
42453
  modules,
42450
42454
  byRole,
42451
42455
  presets: {
42452
- attention: preset((m) => ATTN2.has(m.role)),
42456
+ attention: preset((m) => ATTN3.has(m.role)),
42453
42457
  allLinear: preset((m) => m.role !== "head")
42454
42458
  },
42455
42459
  uncovered
@@ -42476,11 +42480,11 @@ function trainingPeakFor(p, adapter) {
42476
42480
  return { trainableParams: Math.round(adapterParams), peakGb };
42477
42481
  }
42478
42482
  function renderLoraText(lora) {
42479
- const pct2 = (x) => x < 0.01 ? "<0.01%" : `${x.toFixed(2)}%`;
42483
+ const pct3 = (x) => x < 0.01 ? "<0.01%" : `${x.toFixed(2)}%`;
42480
42484
  const L = [];
42481
42485
  L.push(`LoRA targets base ${fmtParamCount(lora.baseParams)} params, ${lora.modules.length} linear module${lora.modules.length === 1 ? "" : "s"}`);
42482
42486
  const row = (label, pr) => {
42483
- L.push(` ${label.padEnd(11)} r=8 +${fmtParamCount(pr.loraParams.r8)} (${pct2(pr.pctOfBase.r8)}) r=16 +${fmtParamCount(pr.loraParams.r16)} (${pct2(pr.pctOfBase.r16)}) over ${pr.modules} module${pr.modules === 1 ? "" : "s"}`);
42487
+ L.push(` ${label.padEnd(11)} r=8 +${fmtParamCount(pr.loraParams.r8)} (${pct3(pr.pctOfBase.r8)}) r=16 +${fmtParamCount(pr.loraParams.r16)} (${pct3(pr.pctOfBase.r16)}) over ${pr.modules} module${pr.modules === 1 ? "" : "s"}`);
42484
42488
  L.push(` ${"".padEnd(11)} target_modules=${JSON.stringify(pr.targetModules)}`);
42485
42489
  };
42486
42490
  row("attention", lora.presets.attention);
@@ -43605,6 +43609,15 @@ var GUARDRAIL_GATE_IDS = [
43605
43609
  // src/utils/templateLoader.ts
43606
43610
  init_toastStore();
43607
43611
 
43612
+ // scripts/siteMeta.ts
43613
+ var SITE = "https://www.neurarch.com";
43614
+ var OG_IMAGE = `${SITE}/og-image.png`;
43615
+ var OG_IMAGE_ALT = "Neurarch: the pre-check for every open-weight model change. What changed, what it needs, whether the layout is legal and balanced, and whether the config matches the reference.";
43616
+ var OG_IMAGE_META = `<meta property="og:image" content="${OG_IMAGE}" />
43617
+ <meta property="og:image:width" content="1200" />
43618
+ <meta property="og:image:height" content="630" />
43619
+ <meta property="og:image:alt" content="${OG_IMAGE_ALT}" />`;
43620
+
43608
43621
  // scripts/architecture-pages.ts
43609
43622
  var STRUCTURAL_CHECKS = ADVISOR_RULE_IDS.length + GUARDRAIL_GATE_IDS.length;
43610
43623
 
@@ -44059,6 +44072,559 @@ function checkDataFit(contract, data) {
44059
44072
  // src/utils/parallelLayout.ts
44060
44073
  init_paramEstimator();
44061
44074
 
44075
+ // src/utils/nonGemmCost.ts
44076
+ var NONGEMM_BW_EFFICIENCY = 0.9;
44077
+ var KERNEL_GAP_US = 0.9;
44078
+ var NONGEMM_RATES = {
44079
+ eager: {
44080
+ /** transformers' RMSNorm: fwd to(fp32), pow, mean, add+rsqrt, mul, to(bf16), mul weight = 36 B, 7 kernels; bwd 64 B, 10 kernels. */
44081
+ rmsNorm: { bytes: 100, kernels: 17 },
44082
+ /** torch.nn.LayerNorm: one fused kernel forward, two backward (input grad, weight grad). */
44083
+ layerNorm: { bytes: 16, kernels: 3 },
44084
+ /** Residual add forward; the gradient summed where the stream forks backward. */
44085
+ add: { bytes: 12, kernels: 2 },
44086
+ /** Per intermediate element: fwd silu, mul; bwd mul (two grads), silu backward. */
44087
+ swiglu: { bytes: 28, kernels: 5 },
44088
+ /** Per intermediate element: one GELU kernel each way. */
44089
+ gelu: { bytes: 10, kernels: 2 },
44090
+ /** Per q / k element: rotate_half (neg, cat), two muls and an add, for q and for k, each way. */
44091
+ rope: { bytes: 52, kernels: 22 },
44092
+ /** Qwen3 / OLMo-2 style RMSNorm on every q and k head, per q / k element: the RMSNorm count, twice the kernels (q and k). */
44093
+ qkNorm: { bytes: 100, kernels: 34 },
44094
+ /**
44095
+ * Backward only: the q, k, v gradients come out of attention in [B, H, T, hd]
44096
+ * and the projections' GEMMs need [B, T, H x hd], so each is copied (read 2 +
44097
+ * write 2) per q / k / v element.
44098
+ */
44099
+ attnLayout: { bytes: 4, kernels: 3 },
44100
+ /** Dropout with p > 0: fwd read, write, mask; bwd read grad and mask, write. */
44101
+ dropout: { bytes: 10, kernels: 2 }
44102
+ },
44103
+ fused: {
44104
+ /** One kernel forward (read x, write y, bf16), two backward (dx, partial dweight). */
44105
+ rmsNorm: { bytes: 10, kernels: 3 },
44106
+ layerNorm: { bytes: 12, kernels: 3 },
44107
+ /** Same bytes (the residual stream is still written and read); the kernel is folded into the neighbouring norm or bias-dropout-add. */
44108
+ add: { bytes: 12, kernels: 0 },
44109
+ /** Fused SwiGLU: fwd read gate, up, write 6 B; bwd read grad, gate, up, write two grads 10 B. */
44110
+ swiglu: { bytes: 16, kernels: 2 },
44111
+ /** Fused bias-GELU: fwd 4 B, bwd 6 B. */
44112
+ gelu: { bytes: 10, kernels: 2 },
44113
+ /** Fused RoPE: read and write each element once each way. */
44114
+ rope: { bytes: 8, kernels: 4 },
44115
+ qkNorm: { bytes: 10, kernels: 6 },
44116
+ attnLayout: { bytes: 0, kernels: 0 },
44117
+ /** Folded into the bias-dropout-add kernel: the mask still moves. */
44118
+ dropout: { bytes: 4, kernels: 0 }
44119
+ }
44120
+ };
44121
+ var GQA_BWD_BYTES_PER_Q_ELEM = 8;
44122
+ var OPTIMIZER_BYTES_PER_PARAM = { eager: 40, fused: 34 };
44123
+ var GRAD_ACCUM_BYTES_PER_PARAM = { eager: 6, fused: 0 };
44124
+ var GEMM_KERNELS = 3;
44125
+ var ATTN_KERNELS = 4;
44126
+ var ATTN = /attention/i;
44127
+ function nonGemmOf(c, out, stack, qkNorm) {
44128
+ if (!out.length) return { bytes: 0, kernels: 0 };
44129
+ const R = NONGEMM_RATES[stack];
44130
+ const elems = out.reduce((a, b) => a * b, 1);
44131
+ const width = out[out.length - 1] || 1;
44132
+ const tokens = elems / width;
44133
+ const p = c.params ?? {};
44134
+ const num6 = (v) => typeof v === "number" && v > 0 ? v : null;
44135
+ const op = (r, n2) => ({ bytes: r.bytes * n2, kernels: r.kernels });
44136
+ switch (c.type) {
44137
+ case "rmsNorm":
44138
+ return op(R.rmsNorm, elems);
44139
+ case "layerNorm":
44140
+ return op(R.layerNorm, elems);
44141
+ case "add":
44142
+ return op(R.add, elems);
44143
+ case "dropout": {
44144
+ const pr = num6(p.p) ?? num6(p.rate) ?? 0;
44145
+ return pr > 0 ? op(R.dropout, elems) : { bytes: 0, kernels: 0 };
44146
+ }
44147
+ case "swiglu":
44148
+ case "geglu": {
44149
+ const I = num6(p.intermediateSize) ?? num6(p.ffDim) ?? num6(p.hiddenFeatures);
44150
+ const g = I ? op(R.swiglu, tokens * I) : { bytes: 0, kernels: 0 };
44151
+ return { bytes: g.bytes, kernels: g.kernels + 3 * GEMM_KERNELS };
44152
+ }
44153
+ case "feedForward": {
44154
+ const I = num6(p.intermediateSize) ?? num6(p.ffDim) ?? num6(p.hiddenFeatures);
44155
+ const g = I ? op(R.gelu, tokens * I) : { bytes: 0, kernels: 0 };
44156
+ return { bytes: g.bytes, kernels: g.kernels + 2 * GEMM_KERNELS };
44157
+ }
44158
+ case "linear":
44159
+ return { bytes: 0, kernels: GEMM_KERNELS };
44160
+ case "embedding": {
44161
+ const V = num6(p.vocabSize), D = num6(p.embeddingDim) ?? width;
44162
+ return { bytes: (V ? V * D * 2 : 0) + tokens * D * 10, kernels: 3 };
44163
+ }
44164
+ default: {
44165
+ if (!ATTN.test(c.type)) return { bytes: 0, kernels: 0 };
44166
+ const E = num6(p.embedDim) ?? num6(p.hiddenDim) ?? width;
44167
+ const H = num6(p.numHeads);
44168
+ if (!H) return { bytes: 0, kernels: 4 * GEMM_KERNELS + ATTN_KERNELS };
44169
+ const hd = num6(p.headDim) ?? E / H;
44170
+ const kv = num6(p.numKVHeads) ?? H;
44171
+ const qk = tokens * (H + kv) * hd;
44172
+ let bytes = R.attnLayout.bytes * tokens * (H + 2 * kv) * hd;
44173
+ let kernels = 4 * GEMM_KERNELS + ATTN_KERNELS + R.attnLayout.kernels;
44174
+ if (qkNorm) {
44175
+ bytes += R.qkNorm.bytes * qk;
44176
+ kernels += R.qkNorm.kernels;
44177
+ }
44178
+ if (kv < H) bytes += GQA_BWD_BYTES_PER_Q_ELEM * tokens * H * hd;
44179
+ return { bytes, kernels };
44180
+ }
44181
+ }
44182
+ }
44183
+ function ropeOf(c, out, stack) {
44184
+ if (!out.length || !ATTN.test(c.type)) return { bytes: 0, kernels: 0 };
44185
+ const p = c.params ?? {};
44186
+ const num6 = (v) => typeof v === "number" && v > 0 ? v : null;
44187
+ const width = out[out.length - 1] || 1;
44188
+ const tokens = out.reduce((a, b) => a * b, 1) / width;
44189
+ const H = num6(p.numHeads);
44190
+ if (!H) return { bytes: 0, kernels: 0 };
44191
+ const hd = num6(p.headDim) ?? (num6(p.embedDim) ?? width) / H;
44192
+ const kv = num6(p.numKVHeads) ?? H;
44193
+ const r = NONGEMM_RATES[stack].rope;
44194
+ return { bytes: r.bytes * tokens * (H + kv) * hd, kernels: r.kernels };
44195
+ }
44196
+ function nonGemmMs(bytes, kernels, bwGBs) {
44197
+ if (!(bwGBs > 0)) return 0;
44198
+ return bytes / (bwGBs * 1e9 * NONGEMM_BW_EFFICIENCY) * 1e3 + kernels * KERNEL_GAP_US / 1e3;
44199
+ }
44200
+
44201
+ // src/utils/gemmEfficiency.table.ts
44202
+ var GEMM_EFFICIENCY_TABLE = {
44203
+ "sources": {
44204
+ "neusight": {
44205
+ "repo": "https://github.com/scai-tech/NeuSight",
44206
+ "commit": "6945927d9afcca2b9daf021f8395e53edc5b4eef",
44207
+ "licence": "MIT",
44208
+ "copyright": "Copyright (c) 2025 Georgia Institute of Technology and Microsoft Corporation",
44209
+ "files": [
44210
+ "scripts/asplos/data/dataset/train/linear.csv",
44211
+ "scripts/asplos/data/dataset/test/linear.csv",
44212
+ "scripts/asplos/fp16mm.csv"
44213
+ ]
44214
+ },
44215
+ "pytorch": {
44216
+ "repo": "https://github.com/pytorch/pytorch",
44217
+ "commit": "6a6db44e15f9678d573ad0af5e1f3e2b0713414a",
44218
+ "licence": "BSD-3-Clause",
44219
+ "files": [
44220
+ "torch/_inductor/analysis/device_info.py"
44221
+ ]
44222
+ }
44223
+ },
44224
+ "fit": {
44225
+ "script": "scripts/gemm-efficiency/fit_gemm_efficiency.py",
44226
+ "plateauMinUs": 2e3,
44227
+ "bucket": "half octave of time at the plateau, median, then isotonic (non-decreasing), capped at 1",
44228
+ "minRowsPerBucket": 8
44229
+ },
44230
+ "cards": {
44231
+ "h100-sxm": {
44232
+ "neusightDevice": "NVIDIA H100 80GB HBM3",
44233
+ "rows": 1040,
44234
+ "plateauFp32TFLOPS": 50.2,
44235
+ "fp32PeakTFLOPS": 67,
44236
+ "plateauOfFp32Peak": 0.749,
44237
+ "curve": [
44238
+ [5.25, 0.4625],
44239
+ [5.75, 0.492],
44240
+ [6.25, 0.5737],
44241
+ [6.75, 0.5775],
44242
+ [7.25, 0.6399],
44243
+ [7.75, 0.6527],
44244
+ [8.25, 0.7348],
44245
+ [8.75, 0.7348],
44246
+ [9.25, 0.8118],
44247
+ [9.75, 0.8118],
44248
+ [10.25, 0.8977],
44249
+ [10.75, 0.8977],
44250
+ [11.25, 0.9606],
44251
+ [11.75, 0.9606],
44252
+ [12.25, 0.9864],
44253
+ [12.75, 0.9864],
44254
+ [13.25, 0.9986],
44255
+ [13.75, 0.9986],
44256
+ [14.25, 1]
44257
+ ]
44258
+ },
44259
+ "l4": {
44260
+ "neusightDevice": "NVIDIA L4",
44261
+ "rows": 1040,
44262
+ "plateauFp32TFLOPS": 8.9,
44263
+ "fp32PeakTFLOPS": 30.3,
44264
+ "plateauOfFp32Peak": 0.294,
44265
+ "curve": [
44266
+ [7.75, 0.6977],
44267
+ [8.25, 0.8307],
44268
+ [8.75, 0.8465],
44269
+ [9.25, 0.8868],
44270
+ [9.75, 0.8868],
44271
+ [10.25, 0.8868],
44272
+ [10.75, 0.9848],
44273
+ [11.25, 0.9867],
44274
+ [11.75, 0.9867],
44275
+ [12.25, 0.9867],
44276
+ [12.75, 0.9887]
44277
+ ]
44278
+ },
44279
+ "a100-40g": {
44280
+ "neusightDevice": "NVIDIA A100-PCIE-40GB",
44281
+ "rows": 7500,
44282
+ "plateauFp32TFLOPS": 14.88,
44283
+ "fp32PeakTFLOPS": 19.5,
44284
+ "plateauOfFp32Peak": 0.763,
44285
+ "curve": [
44286
+ [-3.75, 13e-4],
44287
+ [-2.25, 41e-4],
44288
+ [-1.75, 52e-4],
44289
+ [-1.25, 7e-3],
44290
+ [-0.75, 0.0107],
44291
+ [-0.25, 0.0148],
44292
+ [0.25, 0.0207],
44293
+ [0.75, 0.0304],
44294
+ [1.25, 0.0417],
44295
+ [1.75, 0.0606],
44296
+ [2.25, 0.0858],
44297
+ [2.75, 0.1142],
44298
+ [3.25, 0.1608],
44299
+ [3.75, 0.2152],
44300
+ [4.25, 0.2762],
44301
+ [4.75, 0.337],
44302
+ [5.25, 0.4209],
44303
+ [5.75, 0.4993],
44304
+ [6.25, 0.5871],
44305
+ [6.75, 0.6628],
44306
+ [7.25, 0.7263],
44307
+ [7.75, 0.7778],
44308
+ [8.25, 0.8345],
44309
+ [8.75, 0.8615],
44310
+ [9.25, 0.8717],
44311
+ [9.75, 0.9284],
44312
+ [10.25, 0.9312],
44313
+ [10.75, 0.9483],
44314
+ [11.25, 0.9553],
44315
+ [11.75, 0.9814],
44316
+ [12.25, 0.9882],
44317
+ [12.75, 0.9995]
44318
+ ]
44319
+ },
44320
+ "a100-80g": {
44321
+ "neusightDevice": "NVIDIA A100 80GB PCIe",
44322
+ "rows": 1040,
44323
+ "plateauFp32TFLOPS": 17.51,
44324
+ "fp32PeakTFLOPS": 19.5,
44325
+ "plateauOfFp32Peak": 0.898,
44326
+ "curve": [
44327
+ [6.75, 0.6136],
44328
+ [7.25, 0.6876],
44329
+ [7.75, 0.7516],
44330
+ [8.25, 0.7685],
44331
+ [8.75, 0.819],
44332
+ [9.25, 0.8328],
44333
+ [9.75, 0.893],
44334
+ [10.25, 0.9067],
44335
+ [10.75, 0.9401],
44336
+ [11.25, 0.9704],
44337
+ [11.75, 0.987],
44338
+ [12.25, 0.992]
44339
+ ]
44340
+ },
44341
+ "v100": {
44342
+ "neusightDevice": "Tesla V100-PCIE-32GB",
44343
+ "rows": 7500,
44344
+ "plateauFp32TFLOPS": 12.01,
44345
+ "fp32PeakTFLOPS": 14,
44346
+ "plateauOfFp32Peak": 0.858,
44347
+ "curve": [
44348
+ [-3.75, 12e-4],
44349
+ [-1.75, 46e-4],
44350
+ [-1.25, 71e-4],
44351
+ [-0.75, 9e-3],
44352
+ [-0.25, 0.0123],
44353
+ [0.25, 0.018],
44354
+ [0.75, 0.0244],
44355
+ [1.25, 0.034],
44356
+ [1.75, 0.05],
44357
+ [2.25, 0.0681],
44358
+ [2.75, 0.0956],
44359
+ [3.25, 0.1398],
44360
+ [3.75, 0.1818],
44361
+ [4.25, 0.2316],
44362
+ [4.75, 0.2963],
44363
+ [5.25, 0.3427],
44364
+ [5.75, 0.4064],
44365
+ [6.25, 0.4777],
44366
+ [6.75, 0.5333],
44367
+ [7.25, 0.6233],
44368
+ [7.75, 0.6822],
44369
+ [8.25, 0.7467],
44370
+ [8.75, 0.7942],
44371
+ [9.25, 0.8572],
44372
+ [9.75, 0.8877],
44373
+ [10.25, 0.9254],
44374
+ [10.75, 0.9398],
44375
+ [11.25, 0.9497],
44376
+ [11.75, 0.9653],
44377
+ [12.25, 0.9897],
44378
+ [12.75, 0.997]
44379
+ ]
44380
+ },
44381
+ "t4": {
44382
+ "neusightDevice": "Tesla T4",
44383
+ "rows": 7498,
44384
+ "plateauFp32TFLOPS": 3.14,
44385
+ "fp32PeakTFLOPS": 8.1,
44386
+ "plateauOfFp32Peak": 0.387,
44387
+ "curve": [
44388
+ [-1.75, 57e-4],
44389
+ [0.25, 0.0208],
44390
+ [0.75, 0.0315],
44391
+ [1.25, 0.0413],
44392
+ [1.75, 0.0587],
44393
+ [2.25, 0.0857],
44394
+ [2.75, 0.1067],
44395
+ [3.25, 0.1559],
44396
+ [3.75, 0.2183],
44397
+ [4.25, 0.2903],
44398
+ [4.75, 0.3519],
44399
+ [5.25, 0.4754],
44400
+ [5.75, 0.5216],
44401
+ [6.25, 0.6392],
44402
+ [6.75, 0.7926],
44403
+ [7.25, 0.8978],
44404
+ [7.75, 0.9814],
44405
+ [8.25, 0.9832],
44406
+ [8.75, 0.9832],
44407
+ [9.25, 0.9832],
44408
+ [9.75, 0.9832],
44409
+ [10.25, 0.9832],
44410
+ [10.75, 0.9832],
44411
+ [11.25, 0.9832],
44412
+ [11.75, 0.9832],
44413
+ [12.25, 0.9832],
44414
+ [12.75, 0.9832],
44415
+ [13.25, 0.9832],
44416
+ [13.75, 0.9832],
44417
+ [14.25, 0.9832],
44418
+ [14.75, 0.9845],
44419
+ [15.25, 1]
44420
+ ]
44421
+ }
44422
+ },
44423
+ "neusightFp16H100OfDensePeak": [
44424
+ 0.119,
44425
+ 0.154,
44426
+ 0.178,
44427
+ 0.309,
44428
+ 0.342,
44429
+ 0.357,
44430
+ 0.418,
44431
+ 0.385,
44432
+ 0.37
44433
+ ],
44434
+ "deviceInfo": {
44435
+ "h100-sxm": {
44436
+ "deviceInfoKey": "NVIDIA H100",
44437
+ "bf16TFLOPSListed": 1979,
44438
+ "sparsityFactor": 2,
44439
+ "bf16TFLOPSDense": 989.5,
44440
+ "fp32TFLOPS": 67,
44441
+ "dramGBs": 3350,
44442
+ "dramGB": 80
44443
+ },
44444
+ "a100-80g": {
44445
+ "deviceInfoKey": "NVIDIA A100",
44446
+ "bf16TFLOPSListed": 312.5,
44447
+ "sparsityFactor": 1,
44448
+ "bf16TFLOPSDense": 312.5,
44449
+ "fp32TFLOPS": 19.5,
44450
+ "dramGBs": 2039,
44451
+ "dramGB": 80
44452
+ },
44453
+ "l4": {
44454
+ "deviceInfoKey": "NVIDIA L4",
44455
+ "bf16TFLOPSListed": 242,
44456
+ "sparsityFactor": 1,
44457
+ "bf16TFLOPSDense": 242,
44458
+ "fp32TFLOPS": 30.3,
44459
+ "dramGBs": 3350,
44460
+ "dramGB": 24
44461
+ },
44462
+ "b200": {
44463
+ "deviceInfoKey": "NVIDIA B200",
44464
+ "bf16TFLOPSListed": 2250,
44465
+ "sparsityFactor": 1,
44466
+ "bf16TFLOPSDense": 2250,
44467
+ "fp32TFLOPS": 75,
44468
+ "dramGBs": 7700,
44469
+ "dramGB": 180
44470
+ }
44471
+ }
44472
+ };
44473
+
44474
+ // src/utils/gemmEfficiency.ts
44475
+ var CARDS = GEMM_EFFICIENCY_TABLE.cards;
44476
+ var GEMM_CURVE_CARDS = Object.keys(CARDS);
44477
+ function gemmShapeFactor(gpuId, plateauUs) {
44478
+ const c = CARDS[gpuId];
44479
+ if (!c || !(plateauUs > 0)) return 1;
44480
+ const pts = c.curve;
44481
+ const x = Math.log2(plateauUs);
44482
+ if (x <= pts[0][0]) return pts[0][1];
44483
+ const last = pts[pts.length - 1];
44484
+ if (x >= last[0]) return last[1];
44485
+ for (let i = 1; i < pts.length; i++) {
44486
+ if (x <= pts[i][0]) {
44487
+ const [x0, y0] = pts[i - 1], [x1, y1] = pts[i];
44488
+ return y0 + (y1 - y0) * (x - x0) / (x1 - x0);
44489
+ }
44490
+ }
44491
+ return last[1];
44492
+ }
44493
+ function gemmMs(gpuId, flops, peakFlopsPerSec2, anchor, axis = "time") {
44494
+ if (!(flops > 0) || !(peakFlopsPerSec2 > 0)) return 0;
44495
+ const plateau = peakFlopsPerSec2 * anchor;
44496
+ const fp32 = CARDS[gpuId]?.plateauFp32TFLOPS;
44497
+ const us = axis === "flops" && fp32 ? flops / (fp32 * 1e12) * 1e6 : flops / plateau * 1e6;
44498
+ const s = gemmShapeFactor(gpuId, us);
44499
+ return flops / (plateau * s) * 1e3;
44500
+ }
44501
+ var GEMM_SHAPE_CARDS = {
44502
+ "h100-sxm": { sms: 132, sustainedOfPeak: 786 / 989, attnOfPeak: 0.35, source: "MSMF 786 of 989 TFLOPS (ml-engineering); FA2 about 35% on H100 (FlashAttention-3 paper, arXiv 2407.08608)" },
44503
+ h200: { sms: 132, sustainedOfPeak: 755 / 989, attnOfPeak: 0.35, source: "MSMF 755 of 989 TFLOPS, H200 SXM (ml-engineering); FA2 utilisation taken from H100 (same SM)" },
44504
+ b200: { sms: 148, sustainedOfPeak: 1439 / 2250, attnOfPeak: null, source: "MSMF 1439 of 2250 TFLOPS, B200 SXM (ml-engineering)" },
44505
+ "a100-80g": { sms: 108, sustainedOfPeak: 258 / 312, attnOfPeak: 0.5, source: "MSMF 258 of 312 TFLOPS, A100 PCIe (ml-engineering; no SXM sustained row); FA2 50% to 73% on A100 (FlashAttention-2 paper, arXiv 2307.08691), low end" },
44506
+ "a100-40g": { sms: 108, sustainedOfPeak: 258 / 312, attnOfPeak: 0.5, source: "as a100-80g" }
44507
+ };
44508
+ var GEMM_SHAPE_MODEL_CARDS = Object.keys(GEMM_SHAPE_CARDS);
44509
+ var SHAPE_TILES = [
44510
+ [256, 128, 1],
44511
+ [128, 256, 1],
44512
+ [128, 128, 0.9],
44513
+ [128, 64, 0.75],
44514
+ [64, 128, 0.75],
44515
+ [64, 64, 0.6]
44516
+ ];
44517
+ var SHAPE_K0 = 128;
44518
+ var SHAPE_BW_EFFICIENCY = 0.8;
44519
+ function gemmShapeEfficiency(gpuId, M, N, K, batch = 1) {
44520
+ const c = GEMM_SHAPE_CARDS[gpuId];
44521
+ if (!c || !(M > 0 && N > 0 && K > 0)) return null;
44522
+ let best = 0;
44523
+ for (const [tm, tn, te] of SHAPE_TILES) {
44524
+ const gm = Math.ceil(M / tm), gn = Math.ceil(N / tn);
44525
+ const tiles = gm * gn * Math.max(1, batch);
44526
+ const wave = tiles / (Math.ceil(tiles / c.sms) * c.sms);
44527
+ const pad = M * N / (gm * tm * gn * tn);
44528
+ best = Math.max(best, te * wave * pad);
44529
+ }
44530
+ return c.sustainedOfPeak * best * (K / (K + SHAPE_K0));
44531
+ }
44532
+ function gemmShapeMs(gpuId, M, N, K, batch, peakFlopsPerSec2, bwBytesPerSec, bytesPerElem = 2) {
44533
+ const e = gemmShapeEfficiency(gpuId, M, N, K, batch);
44534
+ if (e == null || !(peakFlopsPerSec2 > 0)) return null;
44535
+ const flops = 2 * M * N * K * Math.max(1, batch);
44536
+ const compute = flops / (peakFlopsPerSec2 * e);
44537
+ const bytes = bytesPerElem * (M * K + K * N + M * N) * Math.max(1, batch);
44538
+ const memory = bwBytesPerSec > 0 ? bytes / (bwBytesPerSec * SHAPE_BW_EFFICIENCY) : 0;
44539
+ return Math.max(compute, memory) * 1e3;
44540
+ }
44541
+ function attentionMs(gpuId, flops, peakFlopsPerSec2) {
44542
+ const a = GEMM_SHAPE_CARDS[gpuId]?.attnOfPeak;
44543
+ if (!a || !(flops > 0) || !(peakFlopsPerSec2 > 0)) return null;
44544
+ return flops / (peakFlopsPerSec2 * a) * 1e3;
44545
+ }
44546
+
44547
+ // src/utils/pipelineSchedule.ts
44548
+ function scheduleTable(pp, v, m) {
44549
+ const table = Array.from({ length: pp }, () => []);
44550
+ if (v <= 1) {
44551
+ for (let r = 0; r < pp; r++) {
44552
+ const warm = Math.min(pp - r - 1, m);
44553
+ for (let i = 0; i < warm; i++) table[r].push({ kind: "F", mb: i, chunk: 0 });
44554
+ for (let i = warm; i < m; i++) {
44555
+ table[r].push({ kind: "F", mb: i, chunk: 0 });
44556
+ table[r].push({ kind: "B", mb: i - warm, chunk: 0 });
44557
+ }
44558
+ for (let i = m - warm; i < m; i++) table[r].push({ kind: "B", mb: i, chunk: 0 });
44559
+ }
44560
+ return table;
44561
+ }
44562
+ if (m % pp !== 0) throw new Error(`interleaved schedule needs microbatches (${m}) divisible by pp (${pp})`);
44563
+ const span = pp * v;
44564
+ const total = m * v;
44565
+ const fwdAt = (i) => ({ mb: i % pp + Math.floor(i / span) * pp, chunk: Math.floor(i % span / pp) });
44566
+ const bwdAt = (i) => ({ mb: i % pp + Math.floor(i / span) * pp, chunk: v - 1 - Math.floor(i % span / pp) });
44567
+ for (let r = 0; r < pp; r++) {
44568
+ const warm = Math.min((pp - 1 - r) * 2 + (v - 1) * pp, total);
44569
+ for (let i = 0; i < warm; i++) table[r].push({ kind: "F", ...fwdAt(i) });
44570
+ for (let i = warm; i < total; i++) {
44571
+ table[r].push({ kind: "F", ...fwdAt(i) });
44572
+ table[r].push({ kind: "B", ...bwdAt(i - warm) });
44573
+ }
44574
+ for (let i = total - warm; i < total; i++) table[r].push({ kind: "B", ...bwdAt(i) });
44575
+ }
44576
+ return table;
44577
+ }
44578
+ function simulatePipeline(fwdMs, bwdMs, m, v = 1, p2pMs = 0) {
44579
+ const pp = fwdMs.length;
44580
+ const table = scheduleTable(pp, v, m);
44581
+ const nv = pp * v;
44582
+ const doneF = new Float64Array(nv * m).fill(-1);
44583
+ const doneB = new Float64Array(nv * m).fill(-1);
44584
+ const clock = new Array(pp).fill(0);
44585
+ const idx = new Array(pp).fill(0);
44586
+ let progress = true;
44587
+ while (progress) {
44588
+ progress = false;
44589
+ for (let r = 0; r < pp; r++) {
44590
+ const ops = table[r];
44591
+ while (idx[r] < ops.length) {
44592
+ const op = ops[idx[r]];
44593
+ const vs = op.chunk * pp + r;
44594
+ let ready = 0;
44595
+ if (op.kind === "F") {
44596
+ if (vs > 0) {
44597
+ const t = doneF[(vs - 1) * m + op.mb];
44598
+ if (t < 0) break;
44599
+ ready = t + ((vs - 1) % pp !== r ? p2pMs : 0);
44600
+ }
44601
+ } else if (vs < nv - 1) {
44602
+ const t = doneB[(vs + 1) * m + op.mb];
44603
+ if (t < 0) break;
44604
+ ready = t + ((vs + 1) % pp !== r ? p2pMs : 0);
44605
+ } else {
44606
+ const t = doneF[vs * m + op.mb];
44607
+ if (t < 0) break;
44608
+ ready = t;
44609
+ }
44610
+ const start = clock[r] > ready ? clock[r] : ready;
44611
+ const end = start + (op.kind === "F" ? fwdMs[r][op.chunk] : bwdMs[r][op.chunk]);
44612
+ (op.kind === "F" ? doneF : doneB)[vs * m + op.mb] = end;
44613
+ clock[r] = end;
44614
+ idx[r]++;
44615
+ progress = true;
44616
+ }
44617
+ }
44618
+ }
44619
+ if (idx.some((i, r) => i < table[r].length)) throw new Error("pipeline schedule deadlocked");
44620
+ return { stepMs: Math.max(...clock), rankEndMs: clock };
44621
+ }
44622
+ function simulatedStepTime(stageMs, m, v = 1, fwdShare = 1 / 3, p2pMs = 0) {
44623
+ const f = stageMs.map((t) => new Array(v).fill(t * fwdShare / v));
44624
+ const b = stageMs.map((t) => new Array(v).fill(t * (1 - fwdShare) / v));
44625
+ return simulatePipeline(f, b, Math.max(1, m), v, p2pMs).stepMs;
44626
+ }
44627
+
44062
44628
  // src/utils/parallelismPlanner.ts
44063
44629
  var NODE_SIZE = 8;
44064
44630
  var COMPUTE_BOUND_MFU = 0.4;
@@ -44105,7 +44671,7 @@ var MEM_BYTES_PER_ELEM = {
44105
44671
  /** Fused / chunked linear + cross-entropy: bf16 logits written and read once each way, never upcast whole. An assumption, not a count. */
44106
44672
  crossEntropyFused: 8
44107
44673
  };
44108
- var LAYOUT_BASIS = "Derived from the graph, not measured. A stage's time is the sum of its layers: matmul FLOPs at 40% of the card's peak, plus memory-bound bytes (norms, elementwise ops, RoPE, the fp32 loss) at 80% of its memory bandwidth. Step time uses the pipeline formula m x slowest + (sum - slowest) / v at this layout's microbatch count. On 2 and 4 L4 GPUs the predicted speedup of a split landed within 5.1 points of measured; on H100 this overprices the LM head. Memory uses the same per-layer terms and calibrated upper bound as the training-peak estimate, plus the fp32 logits on the stage with the loss. Nothing here was timed on a GPU.";
44674
+ var LAYOUT_BASIS = "Derived from the graph, not measured. A stage's time is the sum of its layers: each matmul at 40% of the card's peak when long and less when short (a per-card curve fitted to NeuSight's measured kernels on H100, L4, A100, V100 and T4; flat 40% on other cards), plus memory-bound bytes (norms, elementwise ops, RoPE, the fp32 loss) at 80% of its memory bandwidth. Step time comes from simulating the 1F1B or interleaved schedule at this layout's microbatch count. Predicted speedups of a split landed within 5.4 points of measured on 2 and 4 L4 and within 2.3 on 2 H100; absolute step time runs over, by up to 7% on L4 and 27% on H100. Memory uses the same per-layer terms and calibrated upper bound as the training-peak estimate, plus the fp32 logits on the stage with the loss. Nothing here was timed on a GPU.";
44109
44675
  var DEFAULT_GPU = "h100-sxm";
44110
44676
  var posInt3 = (v) => {
44111
44677
  const n2 = typeof v === "string" && v.trim() !== "" ? Number(v) : typeof v === "number" ? v : NaN;
@@ -44118,7 +44684,7 @@ function readLayout(raw) {
44118
44684
  const n2 = names.find((k) => r[k] != null);
44119
44685
  return n2 == null ? null : { name: n2, v: r[n2] };
44120
44686
  };
44121
- const int = (required, ...names) => {
44687
+ const int2 = (required, ...names) => {
44122
44688
  const p = pick(...names);
44123
44689
  if (!p) return required ? { error: `\`layout.${names[0]}\` is required.` } : void 0;
44124
44690
  const v = posInt3(p.v);
@@ -44139,7 +44705,7 @@ function readLayout(raw) {
44139
44705
  ["virtualStages", false, ["virtual_stages", "virtualStages", "virtual_pipeline_stages"]]
44140
44706
  ];
44141
44707
  for (const [key, req, names] of spec) {
44142
- const v = int(req, ...names);
44708
+ const v = int2(req, ...names);
44143
44709
  if (v && typeof v === "object") return v;
44144
44710
  if (v != null) out[key] = v;
44145
44711
  }
@@ -44165,7 +44731,12 @@ function readLayout(raw) {
44165
44731
  if (nums.some((n2) => n2 == null)) return { error: `\`layout.${lps.name}\` must be a list of positive integers.` };
44166
44732
  out.layersPerStage = nums;
44167
44733
  }
44168
- for (const [key, names] of [["embeddingOnFirst", ["embedding_on_first", "embeddingOnFirst"]], ["headOnLast", ["head_on_last", "headOnLast"]], ["fsdp", ["fsdp"]], ["activationCheckpointing", ["activation_checkpointing", "activationCheckpointing", "recompute"]], ["fusedCrossEntropy", ["fused_cross_entropy", "fusedCrossEntropy", "fused_ce"]]]) {
44734
+ const ks = pick("kernel_stack", "kernelStack");
44735
+ if (ks) {
44736
+ if (ks.v !== "eager" && ks.v !== "fused") return { error: `\`layout.${ks.name}\` must be "eager" or "fused".` };
44737
+ out.kernelStack = ks.v;
44738
+ }
44739
+ for (const [key, names] of [["embeddingOnFirst", ["embedding_on_first", "embeddingOnFirst"]], ["headOnLast", ["head_on_last", "headOnLast"]], ["fsdp", ["fsdp"]], ["activationCheckpointing", ["activation_checkpointing", "activationCheckpointing", "recompute"]], ["fusedCrossEntropy", ["fused_cross_entropy", "fusedCrossEntropy", "fused_ce"]], ["qkNorm", ["qk_norm", "qkNorm"]]]) {
44169
44740
  const p = pick(...names);
44170
44741
  if (!p) continue;
44171
44742
  if (typeof p.v !== "boolean") return { error: `\`layout.${p.name}\` must be true or false.` };
@@ -44279,25 +44850,25 @@ function blocksOf(model) {
44279
44850
  }
44280
44851
  return null;
44281
44852
  }
44282
- var ATTN = /attention|^mla$/i;
44853
+ var ATTN2 = /attention|^mla$/i;
44283
44854
  function geometryOf(model) {
44284
44855
  const g = { numHeads: null, numKVHeads: null, hidden: null, ffn: null, numExperts: null, vocab: null };
44285
- const num5 = (v) => typeof v === "number" && v > 0 ? v : null;
44856
+ const num6 = (v) => typeof v === "number" && v > 0 ? v : null;
44286
44857
  for (const c of model.components) {
44287
44858
  const p = c.params ?? {};
44288
- if (g.numHeads == null && ATTN.test(c.type)) {
44289
- g.numHeads = num5(p.numHeads);
44290
- g.numKVHeads = num5(p.numKVHeads) ?? g.numHeads;
44291
- g.hidden = g.hidden ?? num5(p.embedDim);
44859
+ if (g.numHeads == null && ATTN2.test(c.type)) {
44860
+ g.numHeads = num6(p.numHeads);
44861
+ g.numKVHeads = num6(p.numKVHeads) ?? g.numHeads;
44862
+ g.hidden = g.hidden ?? num6(p.embedDim);
44292
44863
  }
44293
- if (g.ffn == null && /^(swiglu|feedForward|geglu|mlp)$/i.test(c.type)) g.ffn = num5(p.intermediateSize) ?? num5(p.ffDim) ?? num5(p.hiddenFeatures);
44864
+ if (g.ffn == null && /^(swiglu|feedForward|geglu|mlp)$/i.test(c.type)) g.ffn = num6(p.intermediateSize) ?? num6(p.ffDim) ?? num6(p.hiddenFeatures);
44294
44865
  if (/moe/i.test(c.type)) {
44295
- g.numExperts = g.numExperts ?? num5(p.numExperts);
44296
- g.ffn = g.ffn ?? num5(p.expertDim) ?? num5(p.ffDim);
44866
+ g.numExperts = g.numExperts ?? num6(p.numExperts);
44867
+ g.ffn = g.ffn ?? num6(p.expertDim) ?? num6(p.ffDim);
44297
44868
  }
44298
44869
  if (c.type === "embedding" && g.vocab == null) {
44299
- g.vocab = num5(p.vocabSize);
44300
- g.hidden = g.hidden ?? num5(p.embeddingDim);
44870
+ g.vocab = num6(p.vocabSize);
44871
+ g.hidden = g.hidden ?? num6(p.embeddingDim);
44301
44872
  }
44302
44873
  }
44303
44874
  return g;
@@ -44313,7 +44884,7 @@ function memBoundBytes(c, shapes, hasRope) {
44313
44884
  const width = outS[outS.length - 1] || 1;
44314
44885
  const tokens = elems / width;
44315
44886
  const p = c.params ?? {};
44316
- const num5 = (v) => typeof v === "number" && v > 0 ? v : null;
44887
+ const num6 = (v) => typeof v === "number" && v > 0 ? v : null;
44317
44888
  const B = MEM_BYTES_PER_ELEM;
44318
44889
  switch (c.type) {
44319
44890
  case "rmsNorm":
@@ -44324,31 +44895,80 @@ function memBoundBytes(c, shapes, hasRope) {
44324
44895
  return elems * B.add;
44325
44896
  case "swiglu":
44326
44897
  case "geglu": {
44327
- const I = num5(p.intermediateSize) ?? num5(p.ffDim) ?? num5(p.hiddenFeatures);
44898
+ const I = num6(p.intermediateSize) ?? num6(p.ffDim) ?? num6(p.hiddenFeatures);
44328
44899
  return I ? tokens * I * B.swiglu : 0;
44329
44900
  }
44330
44901
  case "feedForward": {
44331
- const I = num5(p.intermediateSize) ?? num5(p.ffDim) ?? num5(p.hiddenFeatures);
44902
+ const I = num6(p.intermediateSize) ?? num6(p.ffDim) ?? num6(p.hiddenFeatures);
44332
44903
  return I ? tokens * I * B.gelu : 0;
44333
44904
  }
44334
44905
  case "embedding": {
44335
- const V = num5(p.vocabSize), D = num5(p.embeddingDim) ?? width;
44906
+ const V = num6(p.vocabSize), D = num6(p.embeddingDim) ?? width;
44336
44907
  return (V ? V * D * ACT_BYTES : 0) + tokens * D * 10;
44337
44908
  }
44338
44909
  default:
44339
- if (hasRope && ATTN.test(c.type)) {
44340
- const H = num5(p.numHeads), E = num5(p.embedDim) ?? width;
44910
+ if (hasRope && ATTN2.test(c.type)) {
44911
+ const H = num6(p.numHeads), E = num6(p.embedDim) ?? width;
44341
44912
  if (!H) return 0;
44342
- const hd = num5(p.headDim) ?? E / H;
44343
- const kv = num5(p.numKVHeads) ?? H;
44913
+ const hd = num6(p.headDim) ?? E / H;
44914
+ const kv = num6(p.numKVHeads) ?? H;
44344
44915
  return tokens * (H + kv) * hd * B.rope;
44345
44916
  }
44346
44917
  return 0;
44347
44918
  }
44348
44919
  }
44349
- function unitCost(comps, shapes, isPost, hasRope) {
44920
+ function gemmsOf(c, shapes, macs) {
44921
+ if (c.type === "feedForward") return macs > 0 ? [macs] : [];
44922
+ return gemmShapesOf(c, shapes, macs).map((g) => g.macs);
44923
+ }
44924
+ function gemmShapesOf(c, shapes, macs) {
44925
+ if (!(macs > 0)) return [];
44926
+ const sh = shapes.get(c.id);
44927
+ const inS = sh?.in ?? [];
44928
+ const outS = sh?.out ?? [];
44929
+ const T = inS.length >= 2 ? inS[inS.length - 2] : 1;
44930
+ const p = c.params ?? {};
44931
+ const num6 = (v) => typeof v === "number" && v > 0 ? v : null;
44932
+ const parts = [];
44933
+ const mm = (m, n2, k) => ({ macs: m * n2 * k, m, n: n2, k });
44934
+ if (c.type === "groupedQueryAttention" || c.type === "multiHeadAttention" || c.type === "causalAttention" || c.type === "selfAttention" || c.type === "attention") {
44935
+ const D = num6(p.embedDim) ?? num6(p.hiddenDim) ?? (inS[inS.length - 1] || null);
44936
+ if (D) {
44937
+ if (c.type === "groupedQueryAttention") {
44938
+ const H = num6(p.numHeads) ?? 32, kv = num6(p.numKVHeads) ?? H;
44939
+ const hd = num6(p.headDim) ?? Math.floor(D / H);
44940
+ parts.push(
44941
+ mm(T, H * hd, D),
44942
+ mm(T, kv * hd, D),
44943
+ mm(T, kv * hd, D),
44944
+ { macs: T * T * H * hd, m: T, n: T, k: hd, batch: H, attn: true },
44945
+ mm(T, D, H * hd)
44946
+ );
44947
+ } else {
44948
+ const H = num6(p.numHeads) ?? 1;
44949
+ parts.push(mm(T, D, D), mm(T, D, D), mm(T, D, D), { macs: T * T * D, m: T, n: T, k: Math.max(1, Math.floor(D / H)), batch: H, attn: true }, mm(T, D, D));
44950
+ }
44951
+ }
44952
+ } else if (c.type === "swiglu" || c.type === "geglu") {
44953
+ const D = num6(p.embedDim) ?? num6(p.inFeatures), I = num6(p.intermediateSize) ?? num6(p.hiddenFeatures) ?? num6(p.ffDim);
44954
+ if (D && I) parts.push(mm(T, I, D), mm(T, I, D), mm(T, D, I));
44955
+ } else if (c.type === "feedForward") {
44956
+ const D = num6(p.embedDim) ?? num6(p.hiddenDim), I = num6(p.ffDim) ?? (D ? 4 * D : null);
44957
+ if (D && I && Math.abs(2 * T * D * I - macs) <= macs * 1e-6) parts.push(mm(T, I, D), mm(T, D, I));
44958
+ } else if (c.type === "linear") {
44959
+ const K = inS[inS.length - 1], N = outS[outS.length - 1];
44960
+ const tokens = K && N ? macs / (K * N) : 0;
44961
+ parts.push(tokens >= 1 && Number.isInteger(Math.round(tokens)) && Math.abs(tokens - Math.round(tokens)) < 1e-6 ? mm(Math.round(tokens), N, K) : { macs });
44962
+ }
44963
+ const known = parts.reduce((a, b) => a + b.macs, 0);
44964
+ if (known > macs * (1 + 1e-9)) return [{ macs }];
44965
+ const rest = macs - known;
44966
+ if (rest > macs * 1e-6) parts.push({ macs: rest });
44967
+ return parts;
44968
+ }
44969
+ function unitCost(comps, shapes, isPost, hasRope, stack = "eager", qkNorm = false) {
44350
44970
  const stores = storesScoresUnder("sdpa");
44351
- const u = { params: 0, expertParams: 0, macs: 0, actElems: 0, largest: 0, boundaryElems: 0, logits: 0, memBytes: 0 };
44971
+ const u = { params: 0, expertParams: 0, macs: 0, gemms: [], gemmShapes: [], actElems: 0, largest: 0, boundaryElems: 0, logits: 0, memBytes: 0, ngBytes: 0, ngKernels: 0 };
44352
44972
  for (const c of comps) {
44353
44973
  const sh = shapes.get(c.id);
44354
44974
  const inS = sh?.in ?? [];
@@ -44356,8 +44976,15 @@ function unitCost(comps, shapes, isPost, hasRope) {
44356
44976
  const p = estimateLayerParams(c.type, c.params, inS.length ? inS : void 0) ?? 0;
44357
44977
  u.params += p;
44358
44978
  if (/moe/i.test(c.type)) u.expertParams += p;
44359
- u.macs += estimateLayerFlops(c.type, c.params ?? {}, inS, outS) || 0;
44979
+ const macs = estimateLayerFlops(c.type, c.params ?? {}, inS, outS) || 0;
44980
+ u.macs += macs;
44981
+ u.gemms.push(...gemmsOf(c, shapes, macs));
44982
+ u.gemmShapes.push(...gemmShapesOf(c, shapes, macs));
44360
44983
  u.memBytes += memBoundBytes(c, shapes, hasRope);
44984
+ const ng = nonGemmOf(c, outS, stack, qkNorm);
44985
+ const rp = hasRope ? ropeOf(c, outS, stack) : { bytes: 0, kernels: 0 };
44986
+ u.ngBytes += ng.bytes + rp.bytes;
44987
+ u.ngKernels += ng.kernels + rp.kernels;
44361
44988
  const l = layerMemoryTerms(c, shapes, stores);
44362
44989
  if (l) {
44363
44990
  u.actElems += weightedNoTransient(l);
@@ -44418,6 +45045,73 @@ function optimalPartition(w, k, head0 = 0, tailK = 0) {
44418
45045
  }
44419
45046
  return sizes;
44420
45047
  }
45048
+ function splitBySchedule(w, k, head0, tailK, step, seed, microbatches = 1) {
45049
+ const mOf = microbatches;
45050
+ const n2 = w.length;
45051
+ const costs = (sizes) => {
45052
+ const out = [];
45053
+ let s = 0;
45054
+ sizes.forEach((c, i) => {
45055
+ let f = 0;
45056
+ for (let j = s; j < s + c; j++) f += w[j];
45057
+ if (i === 0) f += head0;
45058
+ if (i === sizes.length - 1) f += tailK;
45059
+ out.push(f);
45060
+ s += c;
45061
+ });
45062
+ return out;
45063
+ };
45064
+ let best = seed.slice(), bestT = step(costs(best));
45065
+ const better = (t) => t < bestT * (1 - 1e-9);
45066
+ let count = 1;
45067
+ for (let i = 0; i < k - 1; i++) count = count * (n2 - 1 - i) / (i + 1);
45068
+ if (count <= 2e4) {
45069
+ const pre = [0];
45070
+ for (const x of w) pre.push(pre[pre.length - 1] + x);
45071
+ const sizes = new Array(k).fill(1);
45072
+ const rec = (i, at) => {
45073
+ const left = n2 - at;
45074
+ const bound = bestT / Math.max(1, mOf);
45075
+ if (i === k - 1) {
45076
+ const last = pre[n2] - pre[at] + tailK + (k === 1 ? head0 : 0);
45077
+ if (last >= bound) return;
45078
+ sizes[i] = left;
45079
+ const t = step(costs(sizes));
45080
+ if (better(t)) {
45081
+ best = sizes.slice();
45082
+ bestT = t;
45083
+ }
45084
+ return;
45085
+ }
45086
+ for (let c = 1; c <= left - (k - 1 - i); c++) {
45087
+ const part = pre[at + c] - pre[at] + (i === 0 ? head0 : 0);
45088
+ if (part >= bound) break;
45089
+ sizes[i] = c;
45090
+ rec(i + 1, at + c);
45091
+ }
45092
+ };
45093
+ rec(0, 0);
45094
+ return best;
45095
+ }
45096
+ for (let moved = true; moved; ) {
45097
+ moved = false;
45098
+ for (let b = 0; b < k - 1; b++) {
45099
+ for (const d of [1, -1]) {
45100
+ const s = best.slice();
45101
+ s[b] += d;
45102
+ s[b + 1] -= d;
45103
+ if (s[b] < 1 || s[b + 1] < 1) continue;
45104
+ const t = step(costs(s));
45105
+ if (better(t)) {
45106
+ best = s;
45107
+ bestT = t;
45108
+ moved = true;
45109
+ }
45110
+ }
45111
+ }
45112
+ }
45113
+ return best;
45114
+ }
44421
45115
  function evenSplit(blocks, pp) {
44422
45116
  const base = Math.floor(blocks / pp), rem = blocks % pp;
44423
45117
  return Array.from({ length: pp }, (_, i) => base + (i < rem ? 1 : 0));
@@ -44524,7 +45218,8 @@ function seqImbalance(hist, ranks, perRank, a, b, seed = 7) {
44524
45218
  }
44525
45219
  var pct = (x) => `${(x * 100).toFixed(1)}%`;
44526
45220
  var gb = (x) => `${x.toFixed(1)} GB`;
44527
- function checkParallelLayout(model, layout) {
45221
+ function checkParallelLayout(model, layout, opts = {}) {
45222
+ const useCurve = opts.gemmCurve !== false;
44528
45223
  const checked = [];
44529
45224
  const skipped = [];
44530
45225
  const findings = [];
@@ -44726,17 +45421,28 @@ function checkParallelLayout(model, layout) {
44726
45421
  const sized = withSeqLen(model, seqLen).model;
44727
45422
  const shapes = propagateShapes(sized).shapes;
44728
45423
  const hasRope = model.components.some((c) => c.type === "rope");
44729
- const preC = unitCost(split.pre, shapes, false, hasRope);
44730
- const postC = unitCost(split.post, shapes, true, hasRope);
45424
+ const stack = layout.kernelStack ?? "eager";
45425
+ const qkNorm = layout.qkNorm ?? model.components.some((c) => c.type === "qkNorm");
45426
+ const ngRate = NONGEMM_RATES[stack];
45427
+ const preC = unitCost(split.pre, shapes, false, hasRope, stack, qkNorm);
45428
+ const postC = unitCost(split.post, shapes, true, hasRope, stack, qkNorm);
44731
45429
  if (postC.logits === 0 && geo.vocab != null && geo.hidden != null) {
44732
45430
  postC.macs += seqLen * geo.hidden * geo.vocab;
45431
+ postC.gemms.push(seqLen * geo.hidden * geo.vocab);
45432
+ postC.gemmShapes.push({ macs: seqLen * geo.hidden * geo.vocab, m: seqLen, n: geo.vocab, k: geo.hidden });
44733
45433
  postC.logits = seqLen * geo.vocab;
44734
45434
  postC.params += geo.hidden * geo.vocab;
44735
45435
  postC.boundaryElems = Math.max(postC.boundaryElems, seqLen * geo.vocab);
44736
45436
  postC.largest = Math.max(postC.largest, seqLen * geo.vocab);
45437
+ postC.ngKernels += GEMM_KERNELS;
44737
45438
  if (!split.post.some((c) => /norm/i.test(c.type))) {
44738
45439
  const normType = split.blocks[0].find((c) => /norm/i.test(c.type))?.type;
44739
45440
  postC.memBytes += seqLen * geo.hidden * (normType === "layerNorm" ? MEM_BYTES_PER_ELEM.layerNorm : normType ? MEM_BYTES_PER_ELEM.rmsNorm : 0);
45441
+ const nr = normType === "layerNorm" ? ngRate.layerNorm : normType ? ngRate.rmsNorm : null;
45442
+ if (nr) {
45443
+ postC.ngBytes += seqLen * geo.hidden * nr.bytes;
45444
+ postC.ngKernels += nr.kernels;
45445
+ }
44740
45446
  }
44741
45447
  if (headLast && pp > 1) add({
44742
45448
  rule: "tied-head",
@@ -44748,13 +45454,52 @@ function checkParallelLayout(model, layout) {
44748
45454
  }
44749
45455
  const fusedCe = layout.fusedCrossEntropy === true;
44750
45456
  postC.memBytes += postC.logits * (fusedCe ? MEM_BYTES_PER_ELEM.crossEntropyFused : MEM_BYTES_PER_ELEM.crossEntropy);
44751
- const blockC = split.blocks.map((b) => unitCost(b, shapes, false, hasRope));
45457
+ postC.ngBytes += postC.logits * (fusedCe ? MEM_BYTES_PER_ELEM.crossEntropyFused : MEM_BYTES_PER_ELEM.crossEntropy);
45458
+ postC.ngKernels += postC.logits > 0 ? fusedCe ? 2 : 6 : 0;
45459
+ const blockC = split.blocks.map((b) => unitCost(b, shapes, false, hasRope, stack, qkNorm));
44752
45460
  const recompute = layout.activationCheckpointing ? 4 / 3 : 1;
44753
45461
  const flopsPerTok = (u, isBlock) => 6 * u.macs / seqLen * (isBlock ? recompute : 1);
44754
45462
  const lossPerTok = postC.logits / seqLen * LOSS_FLOPS_PER_LOGIT;
44755
45463
  const perGpu = micro / (tp * cp);
44756
- const mmMs = (u, isBlock) => gpu ? flopsPerTok(u, isBlock) * seqLen * perGpu / (gpu.bf16TFLOPS * 1e12 * COMPUTE_BOUND_MFU) * 1e3 : 0;
44757
- const memMs = (u, isBlock) => gpu ? u.memBytes * (isBlock ? recompute : 1) * perGpu / (gpu.memBandwidthGBs * 1e9 * MEM_BW_EFFICIENCY) * 1e3 : 0;
45464
+ const useShape = opts.gemmModel === "shape" && !!gpu && GEMM_SHAPE_MODEL_CARDS.includes(gpu.id);
45465
+ const mmMs = (u, isBlock) => {
45466
+ if (!gpu) return 0;
45467
+ let t = 0;
45468
+ if (useShape) {
45469
+ const peak = gpu.bf16TFLOPS * 1e12, bw = gpu.memBandwidthGBs * 1e9, sus = GEMM_SHAPE_CARDS[gpu.id].sustainedOfPeak;
45470
+ const tokens = micro / cp;
45471
+ for (const g of u.gemmShapes) {
45472
+ if (g.m && g.n && g.k) {
45473
+ if (g.attn) {
45474
+ const a = attentionMs(gpu.id, 3 * 2 * g.macs * perGpu, peak);
45475
+ if (a != null) {
45476
+ t += a;
45477
+ continue;
45478
+ }
45479
+ }
45480
+ const b = (g.batch ?? 1) * (g.attn ? micro / tp : 1);
45481
+ const M = g.attn ? g.m / cp : g.m * tokens, N = g.attn ? g.n : g.n / tp, K = g.k;
45482
+ const share = g.macs / (g.m * g.n * g.k * (g.batch ?? 1));
45483
+ t += share * ((gemmShapeMs(gpu.id, M, N, K, b, peak, bw) ?? 0) + (gemmShapeMs(gpu.id, M, K, N, b, peak, bw) ?? 0) + (gemmShapeMs(gpu.id, K, N, M, b, peak, bw) ?? 0));
45484
+ } else {
45485
+ t += 3 * 2 * g.macs * perGpu / (peak * sus) * 1e3;
45486
+ }
45487
+ }
45488
+ } else {
45489
+ for (const g of u.gemms) t += 3 * gemmMs(useCurve ? gpu.id : "", 2 * g * perGpu, gpu.bf16TFLOPS * 1e12, COMPUTE_BOUND_MFU, opts.gemmAxis);
45490
+ }
45491
+ return t * (isBlock ? recompute : 1);
45492
+ };
45493
+ const useNonGemm = opts.nonGemm === true && useShape;
45494
+ const unitParamsPerGpu = (u) => (u.params - u.expertParams) / tp + u.expertParams / (tp * ep);
45495
+ const memMs = (u, isBlock) => {
45496
+ if (!gpu) return 0;
45497
+ const rc = isBlock ? recompute : 1;
45498
+ if (!useNonGemm) return u.memBytes * rc * perGpu / (gpu.memBandwidthGBs * 1e9 * MEM_BW_EFFICIENCY) * 1e3;
45499
+ const mb = m ?? 1;
45500
+ const accum = mb > 1 ? GRAD_ACCUM_BYTES_PER_PARAM[stack] * unitParamsPerGpu(u) * (mb - 1) / mb : 0;
45501
+ return nonGemmMs(u.ngBytes * rc * perGpu + accum, u.ngKernels * rc, gpu.memBandwidthGBs);
45502
+ };
44758
45503
  const costBasis = gpu ? "time" : "flops";
44759
45504
  const unitCostOf = (u, kind) => {
44760
45505
  const isBlock = kind === "block";
@@ -44809,12 +45554,23 @@ function checkParallelLayout(model, layout) {
44809
45554
  const mean = sw.reduce((a, b) => a + b, 0) / sw.length;
44810
45555
  const maxW = Math.max(...sw);
44811
45556
  const slowest = sw.indexOf(maxW);
44812
- const best = pp > 1 ? optimalPartition(unitW, pp, head0W, tailW) : null;
45557
+ const simulated = opts.simulateSchedule !== false && m != null && pp > 1 && (v === 1 || m % pp === 0);
45558
+ const optMsOf = (u) => useNonGemm && gpu ? nonGemmMs(OPTIMIZER_BYTES_PER_PARAM[stack] * unitParamsPerGpu(u) / (zero >= 1 ? dp * cp : 1), 0, gpu.memBandwidthGBs) : 0;
45559
+ const unitO = unitList.map((x) => optMsOf(x.c));
45560
+ const optOf = (sizes) => useNonGemm ? Math.max(...stageSum(sizes, unitO, embFirst ? optMsOf(preC) : 0, headLast ? optMsOf(postC) : 0)) : 0;
45561
+ const optNow = optOf(lps);
45562
+ const pipeOf = (stages2) => m == null ? null : simulated ? simulatedStepTime(stages2, m, v) : pipelineStepTime(stages2, m, v);
45563
+ const stepOf = (stages2, opt = optNow) => {
45564
+ const t = pipeOf(stages2);
45565
+ return t == null ? null : t + opt;
45566
+ };
45567
+ const minMax = pp > 1 ? optimalPartition(unitW, pp, head0W, tailW) : null;
45568
+ const best = minMax && simulated ? splitBySchedule(unitW, pp, head0W, tailW, (st) => stepOf(st), minMax, m) : minMax;
44813
45569
  const bestW = best ? stageSum(best, unitW, head0W, tailW) : sw;
44814
45570
  const bestMax = Math.max(...bestW);
44815
- const stepOf = (stages2) => m != null ? pipelineStepTime(stages2, m, v) : null;
44816
45571
  const balanced = sw.map(() => mean);
44817
- const curStep = stepOf(sw), balStep = stepOf(balanced), bestStep = stepOf(bestW);
45572
+ const curStep = stepOf(sw), balStep = stepOf(balanced), bestStep = best ? stepOf(bestW, optOf(best)) : stepOf(bestW);
45573
+ const improves = best != null && (simulated && curStep != null && bestStep != null ? bestStep < curStep * (1 - 1e-9) : bestMax < maxW * (1 - 1e-9));
44818
45574
  const asymptoticSlowdown = maxW / mean - 1;
44819
45575
  const imbalance = {
44820
45576
  costBasis,
@@ -44824,11 +45580,11 @@ function checkParallelLayout(model, layout) {
44824
45580
  asymptoticSlowdown,
44825
45581
  step: {
44826
45582
  microbatches: m,
44827
- formula: m != null ? v > 1 ? `t = m x max + (sum - max) / v, m = ${m}, v = ${v} (interleaved)` : `t = m x max + (sum - max), m = ${m} (1F1B)` : "max / mean (microbatches per step unknown, so fill and drain are left out and this overstates the gap)",
45583
+ formula: m == null ? "max / mean (microbatches per step unknown, so fill and drain are left out and this overstates the gap)" : simulated ? `${v > 1 ? `interleaved schedule with v = ${v}` : "1F1B schedule"} simulated op by op, a port of Primus's simulator, m = ${m}, forward a third of each stage` : v > 1 ? `t = m x max + (sum - max) / v, m = ${m}, v = ${v} (interleaved)` : `t = m x max + (sum - max), m = ${m} (1F1B)`,
44828
45584
  currentMs: costBasis === "time" ? curStep : null,
44829
45585
  balancedMs: costBasis === "time" ? balStep : null
44830
45586
  },
44831
- rebalanced: best && bestMax < maxW * (1 - 1e-9) ? {
45587
+ rebalanced: best && improves ? {
44832
45588
  layersPerStage: best,
44833
45589
  maxOverMean: bestMax / mean,
44834
45590
  estStepSpeedup: curStep != null && bestStep != null ? curStep / bestStep - 1 : maxW / bestMax - 1,
@@ -45052,7 +45808,7 @@ function renderLayoutText(r, name = "model") {
45052
45808
  const line = (cells) => " " + cells.map((c, i) => i <= 2 ? c.padEnd(w[i]) : c.padStart(w[i])).join(" ");
45053
45809
  L.push(line(head2));
45054
45810
  for (const row of rows) L.push(line(row));
45055
- L.push(` * predicted fwd+bwd ms per microbatch per GPU: matmuls at ${Math.round(COMPUTE_BOUND_MFU * 100)}% of peak FLOPs plus memory-bound bytes (the mem-bound share) at ${Math.round(MEM_BW_EFFICIENCY * 100)}% of memory bandwidth. Not measured.`);
45811
+ L.push(` * predicted fwd+bwd ms per microbatch per GPU: matmuls at up to ${Math.round(COMPUTE_BOUND_MFU * 100)}% of peak FLOPs (less for short GEMMs${r.resolved.gpu && GEMM_CURVE_CARDS.includes(r.resolved.gpu) ? `, from a measured curve for this card` : ", no measured curve for this card so flat"}) plus memory-bound bytes (the mem-bound share) at ${Math.round(MEM_BW_EFFICIENCY * 100)}% of memory bandwidth. Not measured.`);
45056
45812
  const loss = r.stages.find((s) => s.lossLogitsGb > 0);
45057
45813
  if (loss) L.push(` Stage ${loss.index}'s peak includes ${gb(loss.lossLogitsGb)} of fp32 logits and their gradient for the loss (--fused-ce if the loss is fused or chunked).`);
45058
45814
  }
@@ -45455,8 +46211,791 @@ function renderMarkdown(r) {
45455
46211
 
45456
46212
  // src/utils/serveConfigCheck.ts
45457
46213
  init_paramEstimator();
46214
+
46215
+ // src/utils/serveEngineTables.generated.ts
46216
+ var ENGINE_QUANT_TABLES = [
46217
+ {
46218
+ "engine": "vllm",
46219
+ "tag": "v0.11.0",
46220
+ "commit": "b8b302cde434df8c9289a2b465406b47ebab1c2d",
46221
+ "date": "2025-10-10",
46222
+ "repo": "vllm-project/vllm",
46223
+ "methods": {
46224
+ "awq": {
46225
+ "cls": "AWQConfig",
46226
+ "minSm": 75,
46227
+ "at": "vllm/model_executor/layers/quantization/awq.py#L60"
46228
+ },
46229
+ "deepspeedfp": {
46230
+ "cls": "DeepSpeedFPConfig",
46231
+ "minSm": 60,
46232
+ "at": "vllm/model_executor/layers/quantization/deepspeedfp.py#L65"
46233
+ },
46234
+ "tpu_int8": {
46235
+ "cls": "Int8TpuConfig",
46236
+ "minSm": null,
46237
+ "at": "vllm/model_executor/layers/quantization/tpu_int8.py#L19"
46238
+ },
46239
+ "fp8": {
46240
+ "cls": "Fp8Config",
46241
+ "minSm": 80,
46242
+ "at": "vllm/model_executor/layers/quantization/fp8.py#L114"
46243
+ },
46244
+ "fbgemm_fp8": {
46245
+ "cls": "FBGEMMFp8Config",
46246
+ "minSm": 80,
46247
+ "at": "vllm/model_executor/layers/quantization/fbgemm_fp8.py#L50"
46248
+ },
46249
+ "modelopt": {
46250
+ "cls": "ModelOptFp8Config",
46251
+ "minSm": 89,
46252
+ "at": "vllm/model_executor/layers/quantization/modelopt.py#L85"
46253
+ },
46254
+ "modelopt_fp4": {
46255
+ "cls": "ModelOptNvFp4Config",
46256
+ "minSm": 80,
46257
+ "at": "vllm/model_executor/layers/quantization/modelopt.py#L643"
46258
+ },
46259
+ "bitblas": {
46260
+ "cls": "BitBLASConfig",
46261
+ "minSm": 70,
46262
+ "at": "vllm/model_executor/layers/quantization/bitblas.py#L117"
46263
+ },
46264
+ "gguf": {
46265
+ "cls": "GGUFConfig",
46266
+ "minSm": 60,
46267
+ "at": "vllm/model_executor/layers/quantization/gguf.py#L48"
46268
+ },
46269
+ "gptq_marlin_24": {
46270
+ "cls": "GPTQMarlin24Config",
46271
+ "minSm": 80,
46272
+ "at": "vllm/model_executor/layers/quantization/gptq_marlin_24.py#L99"
46273
+ },
46274
+ "gptq_marlin": {
46275
+ "cls": "GPTQMarlinConfig",
46276
+ "minSm": 80,
46277
+ "at": "vllm/model_executor/layers/quantization/gptq_marlin.py#L156"
46278
+ },
46279
+ "gptq_bitblas": {
46280
+ "cls": "GPTQBitBLASConfig",
46281
+ "minSm": 80,
46282
+ "at": "vllm/model_executor/layers/quantization/gptq_bitblas.py#L140"
46283
+ },
46284
+ "awq_marlin": {
46285
+ "cls": "AWQMarlinConfig",
46286
+ "minSm": 80,
46287
+ "at": "vllm/model_executor/layers/quantization/awq_marlin.py#L90"
46288
+ },
46289
+ "gptq": {
46290
+ "cls": "GPTQConfig",
46291
+ "minSm": 60,
46292
+ "at": "vllm/model_executor/layers/quantization/gptq.py#L107"
46293
+ },
46294
+ "compressed-tensors": {
46295
+ "cls": "CompressedTensorsConfig",
46296
+ "minSm": 70,
46297
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py#L90"
46298
+ },
46299
+ "bitsandbytes": {
46300
+ "cls": "BitsAndBytesConfig",
46301
+ "minSm": 70,
46302
+ "at": "vllm/model_executor/layers/quantization/bitsandbytes.py#L75"
46303
+ },
46304
+ "ptpc_fp8": {
46305
+ "cls": "PTPCFp8Config",
46306
+ "minSm": 80,
46307
+ "at": "vllm/model_executor/layers/quantization/fp8.py#L114"
46308
+ },
46309
+ "hqq": {
46310
+ "cls": "HQQMarlinConfig",
46311
+ "minSm": 80,
46312
+ "at": "vllm/model_executor/layers/quantization/hqq_marlin.py#L63"
46313
+ },
46314
+ "experts_int8": {
46315
+ "cls": "ExpertsInt8Config",
46316
+ "minSm": 80,
46317
+ "at": "vllm/model_executor/layers/quantization/experts_int8.py#L36"
46318
+ },
46319
+ "ipex": {
46320
+ "cls": "IPEXConfig",
46321
+ "minSm": null,
46322
+ "at": "vllm/model_executor/layers/quantization/ipex_quant.py#L31"
46323
+ },
46324
+ "quark": {
46325
+ "cls": "QuarkConfig",
46326
+ "minSm": 70,
46327
+ "at": "vllm/model_executor/layers/quantization/quark/quark.py#L52"
46328
+ },
46329
+ "moe_wna16": {
46330
+ "cls": "MoeWNA16Config",
46331
+ "minSm": 70,
46332
+ "at": "vllm/model_executor/layers/quantization/moe_wna16.py#L80"
46333
+ },
46334
+ "torchao": {
46335
+ "cls": "TorchAOConfig",
46336
+ "minSm": 75,
46337
+ "at": "vllm/model_executor/layers/quantization/torchao.py#L72"
46338
+ },
46339
+ "auto-round": {
46340
+ "cls": "AutoRoundConfig",
46341
+ "minSm": 60,
46342
+ "at": "vllm/model_executor/layers/quantization/auto_round.py#L96"
46343
+ },
46344
+ "rtn": {
46345
+ "cls": "RTNConfig",
46346
+ "minSm": 80,
46347
+ "at": "vllm/model_executor/layers/quantization/rtn.py#L65"
46348
+ },
46349
+ "inc": {
46350
+ "cls": "INCConfig",
46351
+ "minSm": null,
46352
+ "at": "vllm/model_executor/layers/quantization/inc.py#L32"
46353
+ },
46354
+ "mxfp4": {
46355
+ "cls": "Mxfp4Config",
46356
+ "minSm": 80,
46357
+ "at": "vllm/model_executor/layers/quantization/mxfp4.py#L121"
46358
+ },
46359
+ "petit_nvfp4": {
46360
+ "cls": "PetitNvFp4Config",
46361
+ "minSm": 90,
46362
+ "at": "vllm/model_executor/layers/quantization/petit.py#L75"
46363
+ }
46364
+ },
46365
+ "compressedTensorsSchemes": {
46366
+ "24": {
46367
+ "minSm": 90,
46368
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_24.py#L60"
46369
+ },
46370
+ "w4a16sparse24": {
46371
+ "minSm": 80,
46372
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_24.py#L49"
46373
+ },
46374
+ "w4a16fp4": {
46375
+ "minSm": 80,
46376
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_nvfp4.py#L26"
46377
+ },
46378
+ "w4a4fp4": {
46379
+ "minSm": 80,
46380
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4.py#L52"
46381
+ },
46382
+ "w4a8fp8": {
46383
+ "minSm": 90,
46384
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_fp8.py#L62"
46385
+ },
46386
+ "w4a8int": {
46387
+ "minSm": 1,
46388
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_int.py#L48"
46389
+ },
46390
+ "w8a16fp8": {
46391
+ "minSm": 80,
46392
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a16_fp8.py#L33"
46393
+ },
46394
+ "w8a8fp8": {
46395
+ "minSm": 89,
46396
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py#L55"
46397
+ },
46398
+ "w8a8int8": {
46399
+ "minSm": 75,
46400
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py#L32"
46401
+ },
46402
+ "wna16": {
46403
+ "minSm": 80,
46404
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py#L69"
46405
+ }
46406
+ }
46407
+ },
46408
+ {
46409
+ "engine": "vllm",
46410
+ "tag": "v0.19.1",
46411
+ "commit": "b1388b1fbf5aaef47937fabe98931211684666a6",
46412
+ "date": "2026-04-17",
46413
+ "repo": "vllm-project/vllm",
46414
+ "methods": {
46415
+ "awq": {
46416
+ "cls": "AWQConfig",
46417
+ "minSm": 75,
46418
+ "at": "vllm/model_executor/layers/quantization/awq.py#L73"
46419
+ },
46420
+ "fp8": {
46421
+ "cls": "Fp8Config",
46422
+ "minSm": 75,
46423
+ "at": "vllm/model_executor/layers/quantization/fp8.py#L145"
46424
+ },
46425
+ "fbgemm_fp8": {
46426
+ "cls": "FBGEMMFp8Config",
46427
+ "minSm": 80,
46428
+ "at": "vllm/model_executor/layers/quantization/fbgemm_fp8.py#L65"
46429
+ },
46430
+ "fp_quant": {
46431
+ "cls": "FPQuantConfig",
46432
+ "minSm": 100,
46433
+ "at": "vllm/model_executor/layers/quantization/fp_quant.py#L69"
46434
+ },
46435
+ "modelopt": {
46436
+ "cls": "ModelOptFp8Config",
46437
+ "minSm": 89,
46438
+ "at": "vllm/model_executor/layers/quantization/modelopt.py#L408"
46439
+ },
46440
+ "modelopt_fp4": {
46441
+ "cls": "ModelOptNvFp4Config",
46442
+ "minSm": 75,
46443
+ "at": "vllm/model_executor/layers/quantization/modelopt.py#L1013"
46444
+ },
46445
+ "modelopt_mxfp8": {
46446
+ "cls": "ModelOptMxFp8Config",
46447
+ "minSm": 100,
46448
+ "at": "vllm/model_executor/layers/quantization/modelopt.py#L1501"
46449
+ },
46450
+ "modelopt_mixed": {
46451
+ "cls": "ModelOptMixedPrecisionConfig",
46452
+ "minSm": 89,
46453
+ "at": "vllm/model_executor/layers/quantization/modelopt.py#L2084"
46454
+ },
46455
+ "gguf": {
46456
+ "cls": "GGUFConfig",
46457
+ "minSm": 60,
46458
+ "at": "vllm/model_executor/layers/quantization/gguf.py#L71"
46459
+ },
46460
+ "gptq_marlin": {
46461
+ "cls": "GPTQMarlinConfig",
46462
+ "minSm": 75,
46463
+ "at": "vllm/model_executor/layers/quantization/gptq_marlin.py#L183"
46464
+ },
46465
+ "awq_marlin": {
46466
+ "cls": "AWQMarlinConfig",
46467
+ "minSm": 75,
46468
+ "at": "vllm/model_executor/layers/quantization/awq_marlin.py#L206"
46469
+ },
46470
+ "gptq": {
46471
+ "cls": "GPTQConfig",
46472
+ "minSm": 60,
46473
+ "at": "vllm/model_executor/layers/quantization/gptq.py#L135"
46474
+ },
46475
+ "compressed-tensors": {
46476
+ "cls": "CompressedTensorsConfig",
46477
+ "minSm": 70,
46478
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py#L116"
46479
+ },
46480
+ "bitsandbytes": {
46481
+ "cls": "BitsAndBytesConfig",
46482
+ "minSm": 70,
46483
+ "at": "vllm/model_executor/layers/quantization/bitsandbytes.py#L104"
46484
+ },
46485
+ "experts_int8": {
46486
+ "cls": "ExpertsInt8Config",
46487
+ "minSm": 80,
46488
+ "at": "vllm/model_executor/layers/quantization/experts_int8.py#L42"
46489
+ },
46490
+ "quark": {
46491
+ "cls": "QuarkConfig",
46492
+ "minSm": 70,
46493
+ "at": "vllm/model_executor/layers/quantization/quark/quark.py#L88"
46494
+ },
46495
+ "moe_wna16": {
46496
+ "cls": "MoeWNA16Config",
46497
+ "minSm": 70,
46498
+ "at": "vllm/model_executor/layers/quantization/moe_wna16.py#L97"
46499
+ },
46500
+ "torchao": {
46501
+ "cls": "TorchAOConfig",
46502
+ "minSm": 75,
46503
+ "at": "vllm/model_executor/layers/quantization/torchao.py#L129"
46504
+ },
46505
+ "auto-round": {
46506
+ "cls": "INCConfig",
46507
+ "minSm": 60,
46508
+ "at": "vllm/model_executor/layers/quantization/inc.py#L105"
46509
+ },
46510
+ "inc": {
46511
+ "cls": "INCConfig",
46512
+ "minSm": 60,
46513
+ "at": "vllm/model_executor/layers/quantization/inc.py#L105"
46514
+ },
46515
+ "mxfp4": {
46516
+ "cls": "Mxfp4Config",
46517
+ "minSm": 80,
46518
+ "at": "vllm/model_executor/layers/quantization/mxfp4.py#L50"
46519
+ },
46520
+ "mxfp8": {
46521
+ "cls": "Mxfp8Config",
46522
+ "minSm": 100,
46523
+ "at": "vllm/model_executor/layers/quantization/mxfp8.py#L78"
46524
+ },
46525
+ "petit_nvfp4": {
46526
+ "cls": "PetitNvFp4Config",
46527
+ "minSm": 90,
46528
+ "at": "vllm/model_executor/layers/quantization/petit.py#L84"
46529
+ },
46530
+ "cpu_awq": {
46531
+ "cls": "CPUAWQConfig",
46532
+ "minSm": null,
46533
+ "at": "vllm/model_executor/layers/quantization/cpu_wna16.py#L40"
46534
+ }
46535
+ },
46536
+ "compressedTensorsSchemes": {
46537
+ "w4a16mxfp4": {
46538
+ "minSm": 80,
46539
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_mxfp4.py#L40"
46540
+ },
46541
+ "w4a16fp4": {
46542
+ "minSm": 75,
46543
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_nvfp4.py#L29"
46544
+ },
46545
+ "w4a4fp4": {
46546
+ "minSm": 75,
46547
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4.py#L31"
46548
+ },
46549
+ "w4a8fp8": {
46550
+ "minSm": 90,
46551
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_fp8.py#L68"
46552
+ },
46553
+ "w4a8int": {
46554
+ "minSm": 1,
46555
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_int.py#L56"
46556
+ },
46557
+ "w8a16fp8": {
46558
+ "minSm": 75,
46559
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a16_fp8.py#L49"
46560
+ },
46561
+ "w8a8fp8": {
46562
+ "minSm": 89,
46563
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py#L95"
46564
+ },
46565
+ "w8a8int8": {
46566
+ "minSm": 75,
46567
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py#L35"
46568
+ },
46569
+ "wna16": {
46570
+ "minSm": 75,
46571
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py#L79"
46572
+ }
46573
+ }
46574
+ },
46575
+ {
46576
+ "engine": "vllm",
46577
+ "tag": "v0.32.0",
46578
+ "commit": "5df63a7203cdb9328d824a27b682e77c7b9928be",
46579
+ "date": "2026-10-17",
46580
+ "repo": "vllm-project/vllm",
46581
+ "methods": {
46582
+ "awq": {
46583
+ "cls": "AutoAWQConfig",
46584
+ "minSm": 75,
46585
+ "at": "vllm/model_executor/layers/quantization/auto_awq.py#L233"
46586
+ },
46587
+ "awq_marlin": {
46588
+ "cls": "AutoAWQConfig",
46589
+ "minSm": 75,
46590
+ "at": "vllm/model_executor/layers/quantization/auto_awq.py#L233"
46591
+ },
46592
+ "auto_awq": {
46593
+ "cls": "AutoAWQConfig",
46594
+ "minSm": 75,
46595
+ "at": "vllm/model_executor/layers/quantization/auto_awq.py#L233"
46596
+ },
46597
+ "fp8": {
46598
+ "cls": "Fp8Config",
46599
+ "minSm": 75,
46600
+ "at": "vllm/model_executor/layers/quantization/fp8.py#L146"
46601
+ },
46602
+ "fbgemm_fp8": {
46603
+ "cls": "FBGEMMFp8Config",
46604
+ "minSm": 80,
46605
+ "at": "vllm/model_executor/layers/quantization/fbgemm_fp8.py#L66"
46606
+ },
46607
+ "fp_quant": {
46608
+ "cls": "FPQuantConfig",
46609
+ "minSm": 100,
46610
+ "at": "vllm/model_executor/layers/quantization/fp_quant.py#L63"
46611
+ },
46612
+ "modelopt": {
46613
+ "cls": "ModelOptFp8Config",
46614
+ "minSm": 80,
46615
+ "at": "vllm/model_executor/layers/quantization/modelopt.py#L445"
46616
+ },
46617
+ "modelopt_fp4": {
46618
+ "cls": "ModelOptNvFp4Config",
46619
+ "minSm": 75,
46620
+ "at": "vllm/model_executor/layers/quantization/modelopt.py#L768"
46621
+ },
46622
+ "modelopt_mxfp8": {
46623
+ "cls": "ModelOptMxFp8Config",
46624
+ "minSm": 80,
46625
+ "at": "vllm/model_executor/layers/quantization/modelopt.py#L1200"
46626
+ },
46627
+ "modelopt_mixed": {
46628
+ "cls": "ModelOptMixedPrecisionConfig",
46629
+ "minSm": 75,
46630
+ "at": "vllm/model_executor/layers/quantization/modelopt.py#L1616"
46631
+ },
46632
+ "auto_gptq": {
46633
+ "cls": "AutoGPTQConfig",
46634
+ "minSm": 60,
46635
+ "at": "vllm/model_executor/layers/quantization/auto_gptq.py#L182"
46636
+ },
46637
+ "gptq": {
46638
+ "cls": "AutoGPTQConfig",
46639
+ "minSm": 60,
46640
+ "at": "vllm/model_executor/layers/quantization/auto_gptq.py#L182"
46641
+ },
46642
+ "gptq_marlin": {
46643
+ "cls": "AutoGPTQConfig",
46644
+ "minSm": 60,
46645
+ "at": "vllm/model_executor/layers/quantization/auto_gptq.py#L182"
46646
+ },
46647
+ "compressed-tensors": {
46648
+ "cls": "CompressedTensorsConfig",
46649
+ "minSm": 70,
46650
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py#L123"
46651
+ },
46652
+ "experts_int8": {
46653
+ "cls": "ExpertsInt8Config",
46654
+ "minSm": 80,
46655
+ "at": "vllm/model_executor/layers/quantization/experts_int8.py#L42"
46656
+ },
46657
+ "quark": {
46658
+ "cls": "QuarkConfig",
46659
+ "minSm": 70,
46660
+ "at": "vllm/model_executor/layers/quantization/quark/quark.py#L127"
46661
+ },
46662
+ "moe_wna16": {
46663
+ "cls": "MoeWNA16Config",
46664
+ "minSm": 70,
46665
+ "at": "vllm/model_executor/layers/quantization/moe_wna16.py#L110"
46666
+ },
46667
+ "torchao": {
46668
+ "cls": "TorchAOConfig",
46669
+ "minSm": 75,
46670
+ "at": "vllm/model_executor/layers/quantization/torchao.py#L160"
46671
+ },
46672
+ "inc": {
46673
+ "cls": "INCConfig",
46674
+ "minSm": 60,
46675
+ "at": "vllm/model_executor/layers/quantization/inc/inc.py#L266"
46676
+ },
46677
+ "mxfp4": {
46678
+ "cls": "Mxfp4Config",
46679
+ "minSm": 80,
46680
+ "at": "vllm/model_executor/layers/quantization/mxfp4.py#L71"
46681
+ },
46682
+ "gpt_oss_mxfp4": {
46683
+ "cls": "GptOssMxfp4Config",
46684
+ "minSm": 80,
46685
+ "at": "vllm/model_executor/layers/quantization/mxfp4.py#L71"
46686
+ },
46687
+ "deepseek_v4_fp8": {
46688
+ "cls": "deepseek_config",
46689
+ "minSm": null,
46690
+ "at": null
46691
+ },
46692
+ "humming": {
46693
+ "cls": "HummingConfig",
46694
+ "minSm": 75,
46695
+ "at": "vllm/model_executor/layers/quantization/humming.py#L167"
46696
+ },
46697
+ "online": {
46698
+ "cls": "OnlineQuantizationConfig",
46699
+ "minSm": 75,
46700
+ "at": "vllm/model_executor/layers/quantization/online/base.py#L209"
46701
+ },
46702
+ "mxfp8": {
46703
+ "cls": "ModelOptMxFp8Config",
46704
+ "minSm": 80,
46705
+ "at": "vllm/model_executor/layers/quantization/modelopt.py#L1200"
46706
+ }
46707
+ },
46708
+ "compressedTensorsSchemes": {
46709
+ "w4a4mxfp4": {
46710
+ "minSm": 80,
46711
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_mxfp4.py#L46"
46712
+ },
46713
+ "w4a4fp4": {
46714
+ "minSm": 75,
46715
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4.py#L35"
46716
+ },
46717
+ "w4a8fp8": {
46718
+ "minSm": 90,
46719
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_fp8.py#L65"
46720
+ },
46721
+ "w4a8int": {
46722
+ "minSm": 1,
46723
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_int.py#L56"
46724
+ },
46725
+ "w4a8mxfp4": {
46726
+ "minSm": 80,
46727
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_mxfp4.py#L46"
46728
+ },
46729
+ "w8a16fp8": {
46730
+ "minSm": 75,
46731
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a16_fp8.py#L53"
46732
+ },
46733
+ "w8a8fp8": {
46734
+ "minSm": 89,
46735
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py#L83"
46736
+ },
46737
+ "w8a8int8": {
46738
+ "minSm": 75,
46739
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py#L35"
46740
+ },
46741
+ "w8a8mxfp8": {
46742
+ "minSm": 75,
46743
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_mxfp8.py#L37"
46744
+ },
46745
+ "wna16": {
46746
+ "minSm": 75,
46747
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py#L102"
46748
+ },
46749
+ "wna4int": {
46750
+ "minSm": 75,
46751
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa4.py#L111"
46752
+ },
46753
+ "wna8int": {
46754
+ "minSm": 75,
46755
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa8.py#L111"
46756
+ },
46757
+ "wna8o8int": {
46758
+ "minSm": 70,
46759
+ "at": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa8o8.py#L83"
46760
+ }
46761
+ }
46762
+ },
46763
+ {
46764
+ "engine": "sglang",
46765
+ "tag": "v0.5.22",
46766
+ "commit": "baa9befa381511cd4d56f83980951e5a45fffc6d",
46767
+ "date": "2026-10-13",
46768
+ "repo": "sgl-project/sglang",
46769
+ "methods": {
46770
+ "fp8": {
46771
+ "cls": "Fp8Config",
46772
+ "minSm": 80,
46773
+ "conditional": [
46774
+ 94,
46775
+ 100,
46776
+ 80
46777
+ ],
46778
+ "at": "python/sglang/srt/layers/quantization/fp8.py#L323"
46779
+ },
46780
+ "mxfp8": {
46781
+ "cls": "Fp8Config",
46782
+ "minSm": 80,
46783
+ "conditional": [
46784
+ 94,
46785
+ 100,
46786
+ 80
46787
+ ],
46788
+ "at": "python/sglang/srt/layers/quantization/fp8.py#L323"
46789
+ },
46790
+ "blockwise_int8": {
46791
+ "cls": "BlockInt8Config",
46792
+ "minSm": 80,
46793
+ "at": "python/sglang/srt/layers/quantization/blockwise_int8.py#L83"
46794
+ },
46795
+ "modelopt": {
46796
+ "cls": "ModelOptFp8Config",
46797
+ "minSm": 89,
46798
+ "at": "python/sglang/srt/layers/quantization/modelopt_quant.py#L461"
46799
+ },
46800
+ "modelopt_fp8": {
46801
+ "cls": "ModelOptFp8Config",
46802
+ "minSm": 89,
46803
+ "at": "python/sglang/srt/layers/quantization/modelopt_quant.py#L461"
46804
+ },
46805
+ "modelopt_fp4": {
46806
+ "cls": "ModelOptFp4Config",
46807
+ "minSm": 80,
46808
+ "at": "python/sglang/srt/layers/quantization/modelopt_quant.py#L1528"
46809
+ },
46810
+ "nvfp4_online": {
46811
+ "cls": "NvFp4OnlineConfig",
46812
+ "minSm": 100,
46813
+ "at": "python/sglang/srt/layers/quantization/nvfp4_online.py#L108"
46814
+ },
46815
+ "modelopt_mixed": {
46816
+ "cls": "ModelOptMixedPrecisionConfig",
46817
+ "minSm": 80,
46818
+ "at": "python/sglang/srt/layers/quantization/modelopt_quant.py#L1528"
46819
+ },
46820
+ "w8a8_int8": {
46821
+ "cls": "W8A8Int8Config",
46822
+ "minSm": 75,
46823
+ "at": "python/sglang/srt/layers/quantization/w8a8_int8.py#L87"
46824
+ },
46825
+ "w8a8_fp8": {
46826
+ "cls": "W8A8Fp8Config",
46827
+ "minSm": 89,
46828
+ "at": "python/sglang/srt/layers/quantization/w8a8_fp8.py#L66"
46829
+ },
46830
+ "awq": {
46831
+ "cls": "AWQConfig",
46832
+ "minSm": 75,
46833
+ "at": "python/sglang/srt/layers/quantization/awq/awq.py#L109"
46834
+ },
46835
+ "awq_marlin": {
46836
+ "cls": "AWQMarlinConfig",
46837
+ "minSm": 80,
46838
+ "at": "python/sglang/srt/layers/quantization/awq/awq.py#L307"
46839
+ },
46840
+ "bitsandbytes": {
46841
+ "cls": "BitsAndBytesConfig",
46842
+ "minSm": 70,
46843
+ "at": "python/sglang/srt/layers/quantization/bitsandbytes.py#L100"
46844
+ },
46845
+ "gguf": {
46846
+ "cls": "GGUFConfig",
46847
+ "minSm": 60,
46848
+ "at": "python/sglang/srt/layers/quantization/gguf.py#L107"
46849
+ },
46850
+ "gptq_marlin": {
46851
+ "cls": "GPTQMarlinConfig",
46852
+ "minSm": 80,
46853
+ "at": "python/sglang/srt/layers/quantization/gptq/gptq.py#L386"
46854
+ },
46855
+ "moe_wna16": {
46856
+ "cls": "MoeWNA16Config",
46857
+ "minSm": 70,
46858
+ "at": "python/sglang/srt/layers/quantization/moe_wna16.py#L126"
46859
+ },
46860
+ "compressed-tensors": {
46861
+ "cls": "CompressedTensorsConfig",
46862
+ "minSm": 70,
46863
+ "at": "python/sglang/srt/layers/quantization/compressed_tensors/compressed_tensors.py#L159"
46864
+ },
46865
+ "w4afp8": {
46866
+ "cls": "W4AFp8Config",
46867
+ "minSm": 90,
46868
+ "at": "python/sglang/srt/layers/quantization/w4afp8.py#L70"
46869
+ },
46870
+ "petit_nvfp4": {
46871
+ "cls": "PetitNvFp4Config",
46872
+ "minSm": 90,
46873
+ "at": "python/sglang/srt/layers/quantization/petit.py#L62"
46874
+ },
46875
+ "quark": {
46876
+ "cls": "QuarkConfig",
46877
+ "minSm": 70,
46878
+ "at": "python/sglang/srt/layers/quantization/quark/quark.py#L371"
46879
+ },
46880
+ "quark_mxfp4": {
46881
+ "cls": "QuarkConfig",
46882
+ "minSm": 70,
46883
+ "at": "python/sglang/srt/layers/quantization/quark/quark.py#L371"
46884
+ },
46885
+ "auto-round": {
46886
+ "cls": "AutoRoundConfig",
46887
+ "minSm": 60,
46888
+ "at": "python/sglang/srt/layers/quantization/auto_round.py#L131"
46889
+ },
46890
+ "auto-round-int8": {
46891
+ "cls": "W8A8Int8Config",
46892
+ "minSm": 75,
46893
+ "at": "python/sglang/srt/layers/quantization/w8a8_int8.py#L87"
46894
+ },
46895
+ "modelslim": {
46896
+ "cls": "ModelSlimConfig",
46897
+ "minSm": 0,
46898
+ "at": "python/sglang/srt/layers/quantization/modelslim/modelslim.py#L242"
46899
+ },
46900
+ "quark_int4fp8_moe": {
46901
+ "cls": "QuarkInt4Fp8Config",
46902
+ "minSm": 70,
46903
+ "at": "python/sglang/srt/layers/quantization/quark_int4fp8_moe.py#L91"
46904
+ },
46905
+ "humming": {
46906
+ "cls": "HummingConfig",
46907
+ "minSm": 75,
46908
+ "at": "python/sglang/srt/layers/quantization/humming.py#L488"
46909
+ },
46910
+ "mxfp_w4a8": {
46911
+ "cls": "Mxfp4W4A8Config",
46912
+ "minSm": 0,
46913
+ "at": "python/sglang/srt/layers/quantization/npu_mxfp4.py#L62"
46914
+ },
46915
+ "mxfp4": {
46916
+ "cls": "Mxfp4Config",
46917
+ "minSm": 80,
46918
+ "at": "python/sglang/srt/layers/quantization/mxfp4.py#L338"
46919
+ }
46920
+ },
46921
+ "compressedTensorsSchemes": {
46922
+ "w4a16fp4": {
46923
+ "minSm": 80,
46924
+ "at": "python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_nvfp4.py#L135"
46925
+ },
46926
+ "w4a16nvfp4moe": {
46927
+ "minSm": 80,
46928
+ "at": "python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_nvfp4_moe.py#L53"
46929
+ },
46930
+ "mxint4moe": {
46931
+ "minSm": 100,
46932
+ "at": "python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_mxint4_moe.py#L83"
46933
+ },
46934
+ "w4a4fp4": {
46935
+ "minSm": 100,
46936
+ "at": "python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4.py#L37"
46937
+ },
46938
+ "w4a4nvfp4moe": {
46939
+ "minSm": 100,
46940
+ "at": "python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4_moe.py#L50"
46941
+ },
46942
+ "w4afp8moe": {
46943
+ "minSm": 90,
46944
+ "at": "python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a8_fp8_moe.py#L102"
46945
+ },
46946
+ "w8a16fp8": {
46947
+ "minSm": 80,
46948
+ "at": "python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a16_fp8.py#L35"
46949
+ },
46950
+ "w8a8fp8": {
46951
+ "minSm": 89,
46952
+ "at": "python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py#L58"
46953
+ },
46954
+ "w8a8fp8moe": {
46955
+ "minSm": 80,
46956
+ "at": "python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8_moe.py#L80"
46957
+ },
46958
+ "w8a8int8": {
46959
+ "minSm": 80,
46960
+ "at": "python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py#L97"
46961
+ },
46962
+ "wna16": {
46963
+ "minSm": 80,
46964
+ "at": "python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py#L94"
46965
+ },
46966
+ "wna16moe": {
46967
+ "minSm": 80,
46968
+ "at": "python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16_moe.py#L96"
46969
+ },
46970
+ "wna16tritonmoe": {
46971
+ "minSm": 80,
46972
+ "at": "python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16_moe.py#L96"
46973
+ }
46974
+ }
46975
+ }
46976
+ ];
46977
+ var VLLM_RECIPES = { "repo": "vllm-project/recipes", "commit": "2338e9edec1d5df5f823abf3c1f19e7ba0b2ed0e", "date": "2026-10-18", "count": 215, "recipes": { "ByteDance-Seed/Seed-OSS-36B-Instruct": { "file": "models/ByteDance-Seed/Seed-OSS-36B-Instruct.yaml", "minVllmVersion": "0.11.0", "contextLength": 524288, "toolCallParser": "seed_oss", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 86, "extraArgs": ["--tensor-parallel-size", "8"] } } }, "google/diffusiongemma-26B-A4B-it": { "file": "models/Google/diffusiongemma-26B-A4B-it.yaml", "minVllmVersion": "0.24.0", "contextLength": 262144, "baseArgs": ["--max-num-seqs", "4"], "toolCallParser": "gemma4", "reasoningParser": "gemma4", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 64 }, "fp8": { "modelId": "RedHatAI/diffusiongemma-26B-A4B-it-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 32 }, "nvfp4": { "modelId": "RedHatAI/diffusiongemma-26B-A4B-it-NVFP4", "precision": "nvfp4", "vramMinimumGb": 24 }, "nvidia_nvfp4": { "modelId": "nvidia/diffusiongemma-26B-A4B-it-NVFP4", "precision": "nvfp4", "vramMinimumGb": 24 } }, "verifiedGpus": ["h100", "h200", "dgx_spark_gb10", "xeon6", "arc_pro_b60", "arc_pro_b70"] }, "google/gemma-4-12B-it": { "file": "models/Google/gemma-4-12B-it.yaml", "minVllmVersion": "0.23.0", "contextLength": 131072, "toolCallParser": "gemma4", "reasoningParser": "gemma4", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 29 }, "nvfp4": { "modelId": "RedHatAI/gemma-4-12B-it-NVFP4", "precision": "nvfp4", "vramMinimumGb": 8, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "w4a16": { "modelId": "google/gemma-4-12B-it-qat-w4a16-ct", "precision": "int4", "vramMinimumGb": 9 }, "fp8": { "modelId": "RedHatAI/gemma-4-12B-it-FP8-Dynamic", "precision": "fp8", "vramMinimumGb": 15, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["h100", "arc_pro_b60", "arc_pro_b70"] }, "google/gemma-4-26B-A4B-it": { "file": "models/Google/gemma-4-26B-A4B-it.yaml", "minVllmVersion": "0.25.0", "contextLength": 131072, "toolCallParser": "gemma4", "reasoningParser": "gemma4", "optInFeatures": ["text_only", "spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 64 }, "fp8": { "modelId": "RedHatAI/gemma-4-26B-A4B-it-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 32, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "nvfp4": { "modelId": "RedHatAI/gemma-4-26B-A4B-it-NVFP4", "precision": "nvfp4", "vramMinimumGb": 16, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "nvidia_nvfp4": { "modelId": "nvidia/Gemma-4-26B-A4B-NVFP4", "precision": "nvfp4", "vramMinimumGb": 16 } }, "verifiedGpus": ["h100", "h200", "mi300x", "mi325x", "mi355x", "trillium", "ironwood", "xeon6", "dgx_spark_gb10", "dgx_station_gb300", "rtx_pro_6000", "rtx_5090", "arc_pro_b60", "arc_pro_b70"] }, "google/gemma-4-31B-it": { "file": "models/Google/gemma-4-31B-it.yaml", "minVllmVersion": "0.19.1", "contextLength": 262144, "toolCallParser": "gemma4", "reasoningParser": "gemma4", "optInFeatures": ["text_only", "spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 75 }, "fp8": { "modelId": "RedHatAI/gemma-4-31B-it-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 38, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "nvfp4": { "modelId": "nvidia/gemma-4-31B-it-NVFP4", "precision": "nvfp4", "vramMinimumGb": 19, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_nvfp4": { "modelId": "RedHatAI/gemma-4-31B-it-NVFP4", "precision": "nvfp4", "vramMinimumGb": 19, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "w4a16": { "modelId": "google/gemma-4-31B-it-qat-w4a16-ct", "precision": "int4", "vramMinimumGb": 20 }, "redhat_fp8": { "modelId": "RedHatAI/gemma-4-31B-it-FP8-block", "precision": "fp8", "vramMinimumGb": 38, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["h100", "mi300x", "mi325x", "mi355x", "trillium", "ironwood", "arc_pro_b60", "arc_pro_b70"] }, "google/gemma-4-E2B-it": { "file": "models/Google/gemma-4-E2B-it.yaml", "minVllmVersion": "0.19.1", "contextLength": 131072, "toolCallParser": "gemma4", "reasoningParser": "gemma4", "optInFeatures": ["text_only", "spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 13 }, "fp8": { "modelId": "RedHatAI/gemma-4-E2B-it-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 6, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "w4a16": { "modelId": "google/gemma-4-E2B-it-qat-w4a16-ct", "precision": "int4", "vramMinimumGb": 8 }, "mobile": { "modelId": "google/gemma-4-E2B-it-qat-mobile-ct", "precision": "int2/4/8", "vramMinimumGb": 4 } }, "verifiedGpus": ["h100", "mi300x", "mi325x", "mi355x", "trillium", "ironwood", "xeon6"] }, "google/gemma-4-E4B-it": { "file": "models/Google/gemma-4-E4B-it.yaml", "minVllmVersion": "0.19.1", "contextLength": 131072, "toolCallParser": "gemma4", "reasoningParser": "gemma4", "optInFeatures": ["text_only", "spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 20 }, "fp8": { "modelId": "RedHatAI/gemma-4-E4B-it-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 10, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "w4a16": { "modelId": "google/gemma-4-E4B-it-qat-w4a16-ct", "precision": "int4", "vramMinimumGb": 10 }, "mobile": { "modelId": "google/gemma-4-E4B-it-qat-mobile-ct", "precision": "int2/4/8", "vramMinimumGb": 5 } }, "verifiedGpus": ["h100", "mi300x", "mi325x", "mi355x", "trillium", "ironwood", "xeon6"] }, "google/translategemma-27b-it": { "file": "models/Google/translategemma-27b-it.yaml", "minVllmVersion": "0.14.1", "contextLength": 131072, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 65 }, "vllm_optimized": { "modelId": "Infomaniak-AI/vllm-translategemma-27b-it", "precision": "bf16", "vramMinimumGb": 65 }, "small_4b": { "modelId": "google/translategemma-4b-it", "precision": "bf16", "vramMinimumGb": 10 } } }, "IFM/Jais-3-0.9B": { "file": "models/IFM/Jais-3-0.9B.yaml", "contextLength": 131072, "baseArgs": ["--trust-remote-code", "--chat-template-content-format", "string", "--dtype", "bfloat16", "--max-model-len", "131072", "--gpu-memory-utilization", "0.85"], "toolCallParser": "k2_horizon", "reasoningParser": "k2_horizon", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 3 } }, "verifiedGpus": ["h200"] }, "IFM/Jais-3-3.7B": { "file": "models/IFM/Jais-3-3.7B.yaml", "contextLength": 524288, "baseArgs": ["--trust-remote-code", "--chat-template-content-format", "string", "--dtype", "bfloat16"], "toolCallParser": "k2_horizon", "reasoningParser": "k2_horizon", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 13 } }, "verifiedGpus": ["h200"] }, "IFM/Jais-3-32B": { "file": "models/IFM/Jais-3-32B.yaml", "contextLength": 524288, "baseArgs": ["--trust-remote-code", "--chat-template-content-format", "string", "--dtype", "bfloat16"], "toolCallParser": "k2_horizon", "reasoningParser": "k2_horizon", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 84 } }, "verifiedGpus": ["h200"] }, "IFM/Jais-3-375B-A23B": { "file": "models/IFM/Jais-3-375B-A23B.yaml", "contextLength": 524288, "baseArgs": ["--trust-remote-code", "--chat-template-content-format", "string", "--dtype", "bfloat16"], "toolCallParser": "k2_horizon", "reasoningParser": "k2_horizon", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 911 } }, "verifiedGpus": ["h200", "mi355x"] }, "IFM/Jais-3-7B": { "file": "models/IFM/Jais-3-7B.yaml", "contextLength": 524288, "baseArgs": ["--trust-remote-code", "--chat-template-content-format", "string", "--dtype", "bfloat16"], "toolCallParser": "k2_horizon", "reasoningParser": "k2_horizon", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 22 } }, "verifiedGpus": ["h200"] }, "IFM/Jais-3-MoVA-36B-A4B": { "file": "models/IFM/Jais-3-MoVA-36B-A4B.yaml", "contextLength": 524288, "baseArgs": ["--trust-remote-code", "--chat-template-content-format", "string", "--dtype", "bfloat16", "--enable-expert-parallel"], "toolCallParser": "k2_horizon", "reasoningParser": "k2_horizon", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 90 } }, "verifiedGpus": ["h200"] }, "IFM/K2-Horizon-0.9B": { "file": "models/IFM/K2-Horizon-0.9B.yaml", "contextLength": 131072, "baseArgs": ["--trust-remote-code", "--chat-template-content-format", "string", "--dtype", "bfloat16", "--max-model-len", "131072", "--gpu-memory-utilization", "0.85"], "toolCallParser": "k2_horizon", "reasoningParser": "k2_horizon", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 3 } }, "verifiedGpus": ["h200"] }, "IFM/K2-Horizon-3.7B": { "file": "models/IFM/K2-Horizon-3.7B.yaml", "contextLength": 524288, "baseArgs": ["--trust-remote-code", "--chat-template-content-format", "string", "--dtype", "bfloat16"], "toolCallParser": "k2_horizon", "reasoningParser": "k2_horizon", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 13 } }, "verifiedGpus": ["h200"] }, "IFM/K2-Horizon-32B": { "file": "models/IFM/K2-Horizon-32B.yaml", "contextLength": 524288, "baseArgs": ["--trust-remote-code", "--chat-template-content-format", "string", "--dtype", "bfloat16"], "toolCallParser": "k2_horizon", "reasoningParser": "k2_horizon", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 84 } }, "verifiedGpus": ["h200"] }, "IFM/K2-Horizon-375B-A23B": { "file": "models/IFM/K2-Horizon-375B-A23B.yaml", "contextLength": 524288, "baseArgs": ["--trust-remote-code", "--chat-template-content-format", "string", "--dtype", "bfloat16"], "toolCallParser": "k2_horizon", "reasoningParser": "k2_horizon", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 911 } }, "verifiedGpus": ["h200", "mi355x"] }, "IFM/K2-Horizon-7B": { "file": "models/IFM/K2-Horizon-7B.yaml", "contextLength": 524288, "baseArgs": ["--trust-remote-code", "--chat-template-content-format", "string", "--dtype", "bfloat16"], "toolCallParser": "k2_horizon", "reasoningParser": "k2_horizon", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 22 } }, "verifiedGpus": ["h200"] }, "IFM/K2-Horizon-MoVA-36B-A4B": { "file": "models/IFM/K2-Horizon-MoVA-36B-A4B.yaml", "contextLength": 524288, "baseArgs": ["--trust-remote-code", "--chat-template-content-format", "string", "--dtype", "bfloat16", "--enable-expert-parallel"], "toolCallParser": "k2_horizon", "reasoningParser": "k2_horizon", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 90 } }, "verifiedGpus": ["h200"] }, "IndexTeam/IndexTTS-2.5": { "file": "models/IndexTeam/IndexTTS-2.5.yaml", "minVllmVersion": "0.27.0", "baseArgs": ["--trust-remote-code"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 96 } } }, "JetBrains/Mellum2-12B-A2.5B-Instruct": { "file": "models/JetBrains/Mellum2-12B-A2.5B-Instruct.yaml", "minVllmVersion": "0.23.0", "contextLength": 131072, "baseArgs": ["--max-model-len", "131072", "--trust-remote-code"], "toolCallParser": "hermes", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 29 } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x"] }, "JetBrains/Mellum2-12B-A2.5B-Thinking": { "file": "models/JetBrains/Mellum2-12B-A2.5B-Thinking.yaml", "minVllmVersion": "0.23.0", "contextLength": 131072, "baseArgs": ["--max-model-len", "131072"], "toolCallParser": "hermes", "reasoningParser": "qwen3", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 29 }, "fp8": { "modelId": "RedHatAI/Mellum2-12B-A2.5B-Thinking-FP8-Dynamic", "precision": "fp8", "vramMinimumGb": 15, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "nvfp4": { "modelId": "RedHatAI/Mellum2-12B-A2.5B-Thinking-NVFP4", "precision": "nvfp4", "vramMinimumGb": 8 } }, "verifiedGpus": ["h200"] }, "Lightricks/LTX-2.5-Diffusers": { "file": "models/Lightricks/LTX-2.5-Diffusers.yaml", "minVllmVersion": "0.27.0", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 80 }, "fp8": { "precision": "fp8", "vramMinimumGb": 61, "extraArgs": ["--quantization", "fp8"] } }, "verifiedGpus": ["h200", "b300"] }, "LiquidAI/LFM2.5-1.2B-Base": { "file": "models/LiquidAI/LFM2.5-1.2B-Base.yaml", "minVllmVersion": "0.23.0", "contextLength": 32768, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 3 } }, "verifiedGpus": ["h100", "h200", "b200"] }, "LiquidAI/LFM2.5-1.2B-Instruct": { "file": "models/LiquidAI/LFM2.5-1.2B-Instruct.yaml", "minVllmVersion": "0.23.0", "contextLength": 32768, "toolCallParser": "lfm2", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 3 } }, "verifiedGpus": ["h100", "h200", "b200"] }, "LiquidAI/LFM2.5-1.2B-JP-202606": { "file": "models/LiquidAI/LFM2.5-1.2B-JP-202606.yaml", "minVllmVersion": "0.23.0", "contextLength": 32768, "toolCallParser": "lfm2", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 3 } }, "verifiedGpus": ["h100", "h200", "b200"] }, "LiquidAI/LFM2.5-1.2B-JP": { "file": "models/LiquidAI/LFM2.5-1.2B-JP.yaml", "minVllmVersion": "0.23.0", "contextLength": 32768, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 3 } }, "verifiedGpus": ["h100", "h200", "b200"] }, "LiquidAI/LFM2.5-1.2B-Thinking": { "file": "models/LiquidAI/LFM2.5-1.2B-Thinking.yaml", "minVllmVersion": "0.23.0", "contextLength": 32768, "toolCallParser": "lfm2", "reasoningParser": "qwen3", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 3 } }, "verifiedGpus": ["h100", "h200", "b200"] }, "LiquidAI/LFM2.5-230M": { "file": "models/LiquidAI/LFM2.5-230M.yaml", "minVllmVersion": "0.23.0", "contextLength": 32768, "toolCallParser": "lfm2", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 1 } }, "verifiedGpus": ["h100", "h200", "b200"] }, "LiquidAI/LFM2.5-350M": { "file": "models/LiquidAI/LFM2.5-350M.yaml", "minVllmVersion": "0.23.0", "contextLength": 32768, "toolCallParser": "lfm2", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 1 } }, "verifiedGpus": ["h100", "h200", "b200"] }, "LiquidAI/LFM2.5-8B-A1B": { "file": "models/LiquidAI/LFM2.5-8B-A1B.yaml", "minVllmVersion": "0.23.0", "contextLength": 128e3, "toolCallParser": "lfm2", "reasoningParser": "qwen3", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 21 } }, "verifiedGpus": ["h100", "h200", "b200"] }, "LiquidAI/LFM2.5-VL-1.6B": { "file": "models/LiquidAI/LFM2.5-VL-1.6B.yaml", "minVllmVersion": "0.23.0", "contextLength": 32768, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 4 } }, "verifiedGpus": ["h100", "h200", "b200"] }, "LiquidAI/LFM2.5-VL-450M": { "file": "models/LiquidAI/LFM2.5-VL-450M.yaml", "minVllmVersion": "0.23.0", "contextLength": 32768, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 2 } }, "verifiedGpus": ["h100", "h200", "b200"] }, "MiniMaxAI/MiniMax-H3": { "file": "models/MiniMaxAI/MiniMax-H3.yaml", "minVllmVersion": "0.26.0", "baseArgs": ["--trust-remote-code", "--host", "0.0.0.0", "--port", "8000", "--num-gpus", "4", "--usp", "4", "--ring", "1", "--vae-patch-parallel-size", "4", "--vae-parallel-mode", "tile", "--vae-use-tiling"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 202 } }, "verifiedGpus": ["gb200", "b300", "dgx_spark_gb10", "rtx_4090_2x", "rtx_pro_5000_4x", "rtx_5090_2x", "rtx_pro_6000_2x", "mi300x", "mi325x", "mi355x", "ascend_950pr"] }, "MiniMaxAI/MiniMax-M2.1": { "file": "models/MiniMaxAI/MiniMax-M2.1.yaml", "minVllmVersion": "0.11.1", "contextLength": 196608, "baseArgs": ["--trust-remote-code"], "toolCallParser": "minimax_m2", "reasoningParser": "minimax_m2", "variants": { "default": { "precision": "fp8", "vramMinimumGb": 276 } }, "verifiedGpus": ["h100", "mi300x", "mi325x", "mi355x"] }, "MiniMaxAI/MiniMax-M2.5": { "file": "models/MiniMaxAI/MiniMax-M2.5.yaml", "minVllmVersion": "0.20.2", "contextLength": 196608, "baseArgs": ["--trust-remote-code"], "toolCallParser": "minimax_m2", "reasoningParser": "minimax_m2", "variants": { "default": { "precision": "fp8", "vramMinimumGb": 276 }, "nvfp4": { "modelId": "nvidia/MiniMax-M2.5-NVFP4", "precision": "nvfp4", "vramMinimumGb": 138, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_nvfp4": { "modelId": "RedHatAI/MiniMax-M2.5-NVFP4", "precision": "nvfp4", "vramMinimumGb": 146 } }, "verifiedGpus": ["h100", "h200", "mi300x", "mi325x", "mi355x"] }, "MiniMaxAI/MiniMax-M2.7": { "file": "models/MiniMaxAI/MiniMax-M2.7.yaml", "minVllmVersion": "0.20.0", "contextLength": 196608, "baseArgs": ["--trust-remote-code"], "toolCallParser": "minimax_m2", "reasoningParser": "minimax_m2", "variants": { "default": { "precision": "fp8", "vramMinimumGb": 276 }, "nvfp4": { "modelId": "nvidia/MiniMax-M2.7-NVFP4", "precision": "nvfp4", "vramMinimumGb": 138, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["h100", "h200", "mi300x", "mi325x", "mi355x", "dgx_station_gb300", "rtx_pro_6000_2x"] }, "MiniMaxAI/MiniMax-M2": { "file": "models/MiniMaxAI/MiniMax-M2.yaml", "minVllmVersion": "0.11.1", "contextLength": 196608, "baseArgs": ["--trust-remote-code"], "toolCallParser": "minimax_m2", "reasoningParser": "minimax_m2", "variants": { "default": { "precision": "fp8", "vramMinimumGb": 276 }, "nvfp4": { "modelId": "RedHatAI/MiniMax-M2-NVFP4", "precision": "nvfp4", "vramMinimumGb": 138, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["h100", "h200", "mi300x", "mi325x", "mi355x"] }, "MiniMaxAI/MiniMax-M3": { "file": "models/MiniMaxAI/MiniMax-M3.yaml", "minVllmVersion": "0.24.0", "nightlyRequired": true, "contextLength": 1048576, "baseArgs": ["--block-size", "128"], "toolCallParser": "minimax_m3", "reasoningParser": "minimax_m3", "optInFeatures": ["spec_decoding", "text_only", "thinking_always_on", "encoder_parallel"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 1025 }, "mxfp8": { "modelId": "MiniMaxAI/MiniMax-M3-MXFP8", "precision": "mxfp8", "vramMinimumGb": 513, "extraArgs": ["--attention_config.indexer_kv_dtype", "fp8"] }, "nvfp4": { "modelId": "nvidia/MiniMax-M3-NVFP4", "precision": "nvfp4", "vramMinimumGb": 257, "extraArgs": ["--trust-remote-code", "--kv-cache-dtype", "fp8", "--attention_config.backend", "FLASHINFER", "--attention_config.use_trtllm_attention", "true", "--attention_config.indexer_kv_dtype", "fp8", "--attention_config.minimax_m3_msa_decode_backend", "cutlass"] }, "mxfp4": { "modelId": "amd/MiniMax-M3-MXFP4", "precision": "mxfp4", "vramMinimumGb": 257 } }, "verifiedGpus": ["h200", "b200", "b300", "mi300x", "mi355x"] }, "OpenGVLab/InternVL3_5-8B": { "file": "models/OpenGVLab/InternVL3_5-8B.yaml", "minVllmVersion": "0.10.0", "contextLength": 40960, "baseArgs": ["--trust-remote-code"], "optInFeatures": ["text_only", "encoder_parallel"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 19 } }, "verifiedGpus": ["h100", "mi300x", "mi325x", "mi355x"] }, "OpenMOSS-Team/MOSS-Image-Base": { "file": "models/OpenMOSS-Team/MOSS-Image-Base.yaml", "minVllmVersion": "0.31.0", "baseArgs": ["--enforce-eager"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 33 }, "sft": { "modelId": "OpenMOSS-Team/MOSS-Image-SFT", "precision": "bf16", "vramMinimumGb": 33 } } }, "OpenMOSS-Team/MOSS-SoundEffect": { "file": "models/OpenMOSS-Team/MOSS-SoundEffect.yaml", "minVllmVersion": "0.22.0", "baseArgs": ["--omni", "--deploy-config", "vllm_omni/deploy/moss_sound_effect.yaml"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 32 } } }, "OpenMOSS-Team/MOSS-TTS-Realtime": { "file": "models/OpenMOSS-Team/MOSS-TTS-Realtime.yaml", "minVllmVersion": "0.22.0", "baseArgs": ["--omni"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 16 } } }, "OpenMOSS-Team/MOSS-TTS": { "file": "models/OpenMOSS-Team/MOSS-TTS.yaml", "minVllmVersion": "0.22.0", "baseArgs": ["--omni", "--deploy-config", "vllm_omni/deploy/moss_tts.yaml"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 32 } } }, "OpenMOSS-Team/MOSS-TTSD-v1.0": { "file": "models/OpenMOSS-Team/MOSS-TTSD-v1.0.yaml", "minVllmVersion": "0.22.0", "baseArgs": ["--omni", "--deploy-config", "vllm_omni/deploy/moss_ttsd.yaml"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 32 } } }, "OpenMOSS-Team/MOSS-Transcribe-Diarize": { "file": "models/OpenMOSS-Team/MOSS-Transcribe-Diarize.yaml", "minVllmVersion": "0.27.0", "baseArgs": ["--trust-remote-code"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 4 } } }, "OpenMOSS-Team/MOSS-VoiceGenerator": { "file": "models/OpenMOSS-Team/MOSS-VoiceGenerator.yaml", "minVllmVersion": "0.22.0", "baseArgs": ["--omni", "--deploy-config", "vllm_omni/deploy/moss_voice_generator.yaml"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 16 } } }, "PaddlePaddle/PaddleOCR-VL-1.5": { "file": "models/PaddlePaddle/PaddleOCR-VL-1.5.yaml", "minVllmVersion": "0.11.1", "contextLength": 131072, "baseArgs": ["--trust-remote-code", "--max-num-batched-tokens", "16384", "--no-enable-prefix-caching", "--mm-processor-cache-gb", "0"], "optInFeatures": ["text_only", "encoder_parallel"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 2 } } }, "PaddlePaddle/PaddleOCR-VL-1.6": { "file": "models/PaddlePaddle/PaddleOCR-VL-1.6.yaml", "minVllmVersion": "0.11.1", "contextLength": 131072, "baseArgs": ["--trust-remote-code", "--max-num-batched-tokens", "16384", "--no-enable-prefix-caching", "--mm-processor-cache-gb", "0"], "optInFeatures": ["text_only", "encoder_parallel"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 2 } } }, "PaddlePaddle/PaddleOCR-VL": { "file": "models/PaddlePaddle/PaddleOCR-VL.yaml", "minVllmVersion": "0.11.1", "contextLength": 131072, "baseArgs": ["--trust-remote-code", "--max-num-batched-tokens", "16384", "--no-enable-prefix-caching", "--mm-processor-cache-gb", "0"], "optInFeatures": ["text_only", "encoder_parallel"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 2 } } }, "Qwen/QwQ-32B": { "file": "models/Qwen/QwQ-32B.yaml", "minVllmVersion": "0.7.3", "contextLength": 40960, "toolCallParser": "hermes", "reasoningParser": "deepseek_r1", "optInFeatures": ["long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 77 }, "w8a8_int8": { "modelId": "RedHatAI/QwQ-32B-quantized.w8a8", "precision": "int8", "vramMinimumGb": 39 }, "awq": { "modelId": "Qwen/QwQ-32B-AWQ", "precision": "int4", "vramMinimumGb": 20, "extraArgs": ["--quantization", "awq"] } }, "verifiedGpus": ["xeon6"] }, "Qwen/Qwen-Image-2.1": { "file": "models/Qwen/Qwen-Image-2.1.yaml", "minVllmVersion": "0.29.0", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 40 }, "fp8": { "precision": "fp8", "vramMinimumGb": 40, "extraArgs": ["--diffusion-quantization-config", '{"transformer":{"method":"fp8","ignored_layers":["img_mlp"]}}'] } }, "verifiedGpus": ["gb300"] }, "Qwen/Qwen-Image": { "file": "models/Qwen/Qwen-Image.yaml", "minVllmVersion": "0.18.0", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 48 }, "fp8": { "precision": "fp8", "vramMinimumGb": 24, "extraArgs": ["--quantization", "fp8", "--ignored-layers", "img_mlp"] }, "int8": { "precision": "int8", "vramMinimumGb": 24, "extraArgs": ["--quantization", "int8"] } } }, "Qwen/Qwen2.5-32B": { "file": "models/Qwen/Qwen2.5-32B.yaml", "minVllmVersion": "0.6.2", "contextLength": 131072, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 77 }, "fp8": { "modelId": "RedHatAI/Qwen2.5-32B-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 39, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["trillium"] }, "Qwen/Qwen2.5-VL-72B-Instruct": { "file": "models/Qwen/Qwen2.5-VL-72B-Instruct.yaml", "minVllmVersion": "0.10.2", "contextLength": 128e3, "optInFeatures": ["text_only"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 173 }, "awq": { "modelId": "Qwen/Qwen2.5-VL-72B-Instruct-AWQ", "precision": "int4", "vramMinimumGb": 43, "extraArgs": ["--quantization", "awq"] }, "fp8": { "modelId": "RedHatAI/Qwen2.5-VL-72B-Instruct-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 87, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["mi300x", "mi325x", "mi355x"] }, "Qwen/Qwen2.5-VL-7B-Instruct": { "file": "models/Qwen/Qwen2.5-VL-7B-Instruct.yaml", "minVllmVersion": "0.10.2", "contextLength": 128e3, "optInFeatures": ["text_only"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 17 }, "awq": { "modelId": "Qwen/Qwen2.5-VL-7B-Instruct-AWQ", "precision": "int4", "vramMinimumGb": 5, "extraArgs": ["--quantization", "awq"] }, "fp8": { "modelId": "RedHatAI/Qwen2.5-VL-7B-Instruct-FP8-Dynamic", "precision": "fp8", "vramMinimumGb": 9, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["trillium", "xeon6"] }, "Qwen/Qwen3-1.7B": { "file": "models/Qwen/Qwen3-1.7B.yaml", "minVllmVersion": "0.8.5", "contextLength": 40960, "toolCallParser": "hermes", "reasoningParser": "qwen3", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 5 } }, "verifiedGpus": ["xeon6"] }, "Qwen/Qwen3-14B": { "file": "models/Qwen/Qwen3-14B.yaml", "minVllmVersion": "0.8.5", "contextLength": 40960, "toolCallParser": "hermes", "reasoningParser": "qwen3", "optInFeatures": ["reasoning", "long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 34 }, "fp8": { "modelId": "Qwen/Qwen3-14B-FP8", "precision": "fp8", "vramMinimumGb": 17 }, "awq": { "modelId": "Qwen/Qwen3-14B-AWQ", "precision": "int4", "vramMinimumGb": 10, "extraArgs": ["--quantization", "awq"] } }, "verifiedGpus": ["xeon6"] }, "Qwen/Qwen3-235B-A22B-Instruct-2507": { "file": "models/Qwen/Qwen3-235B-A22B-Instruct-2507.yaml", "minVllmVersion": "0.10.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "hermes", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 564 }, "fp8": { "modelId": "Qwen/Qwen3-235B-A22B-FP8", "precision": "fp8", "vramMinimumGb": 240 }, "nvfp4": { "modelId": "nvidia/Qwen3-235B-A22B-Instruct-2507-NVFP4", "precision": "nvfp4", "vramMinimumGb": 141, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_nvfp4": { "modelId": "RedHatAI/Qwen3-235B-A22B-Instruct-2507-NVFP4", "precision": "nvfp4", "vramMinimumGb": 152 } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x"] }, "Qwen/Qwen3-30B-A3B": { "file": "models/Qwen/Qwen3-30B-A3B.yaml", "minVllmVersion": "0.8.5", "contextLength": 40960, "toolCallParser": "hermes", "reasoningParser": "qwen3", "optInFeatures": ["long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 74 }, "ascend_w8a8": { "modelId": "Eco-Tech/Qwen3-30B-A3B-w8a8", "precision": "int8", "vramMinimumGb": 37, "extraArgs": ["--trust-remote-code", "--max-num-seqs", "100", "--max-model-len", "40960", "--max-num-batched-tokens", "16384", "--enable-expert-parallel", "--quantization", "ascend", "--distributed_executor_backend", "mp", "--no-enable-prefix-caching", "--async-scheduling", "--compilation-config", '{"cudagraph_mode": "FULL_DECODE_ONLY"}', "--additional-config", '{"enable_flashcomm1": true, "weight_nz_mode": 2}', "--gpu-memory-utilization", "0.95"] } }, "verifiedGpus": ["xeon6", "ascend_910c", "arc_pro_b70"] }, "Qwen/Qwen3-32B": { "file": "models/Qwen/Qwen3-32B.yaml", "minVllmVersion": "0.8.5", "contextLength": 40960, "toolCallParser": "hermes", "reasoningParser": "qwen3", "optInFeatures": ["spec_decoding", "long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 77 }, "fp8": { "modelId": "Qwen/Qwen3-32B-FP8", "precision": "fp8", "vramMinimumGb": 39 }, "awq": { "modelId": "Qwen/Qwen3-32B-AWQ", "precision": "int4", "vramMinimumGb": 20, "extraArgs": ["--quantization", "awq"] }, "redhat_fp8": { "modelId": "RedHatAI/Qwen3-32B-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 39, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8_block": { "modelId": "RedHatAI/Qwen3-32B-FP8-block", "precision": "fp8", "vramMinimumGb": 39, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "nvfp4": { "modelId": "RedHatAI/Qwen3-32B-NVFP4", "precision": "nvfp4", "vramMinimumGb": 22 }, "redhat_nvfp4": { "modelId": "RedHatAI/Qwen3-32B-NVFP4A16", "precision": "nvfp4", "vramMinimumGb": 22 } }, "verifiedGpus": ["trillium", "ironwood", "arc_pro_b60", "arc_pro_b70"] }, "Qwen/Qwen3-4B": { "file": "models/Qwen/Qwen3-4B.yaml", "minVllmVersion": "0.8.5", "contextLength": 40960, "toolCallParser": "hermes", "reasoningParser": "qwen3", "optInFeatures": ["long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 10 }, "fp8": { "modelId": "Qwen/Qwen3-4B-FP8", "precision": "fp8", "vramMinimumGb": 5 }, "redhat_fp8": { "modelId": "RedHatAI/Qwen3-4B-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 5, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["trillium", "xeon6"] }, "Qwen/Qwen3-8B": { "file": "models/Qwen/Qwen3-8B.yaml", "minVllmVersion": "0.8.5", "contextLength": 40960, "toolCallParser": "hermes", "reasoningParser": "qwen3", "optInFeatures": ["long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 20 } }, "verifiedGpus": ["xeon6"] }, "Qwen/Qwen3-ASR-1.7B": { "file": "models/Qwen/Qwen3-ASR-1.7B.yaml", "minVllmVersion": "0.16.0", "contextLength": 65536, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 4 } } }, "Qwen/Qwen3-Coder-480B-A35B-Instruct": { "file": "models/Qwen/Qwen3-Coder-480B-A35B-Instruct.yaml", "minVllmVersion": "0.10.0", "contextLength": 262144, "toolCallParser": "qwen3_coder", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 1152 }, "fp8": { "modelId": "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8", "precision": "fp8", "vramMinimumGb": 576 }, "nvfp4": { "modelId": "nvidia/Qwen3-Coder-480B-A35B-Instruct-NVFP4", "precision": "nvfp4", "vramMinimumGb": 288, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8": { "modelId": "RedHatAI/Qwen3-Coder-480B-A35B-Instruct-FP8", "precision": "fp8", "vramMinimumGb": 576, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x", "ironwood"] }, "Qwen/Qwen3-Next-80B-A3B-Instruct": { "file": "models/Qwen/Qwen3-Next-80B-A3B-Instruct.yaml", "minVllmVersion": "0.17.0", "contextLength": 262144, "toolCallParser": "hermes", "optInFeatures": ["spec_decoding", "long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 192 }, "fp8": { "modelId": "Qwen/Qwen3-Next-80B-A3B-Instruct-FP8", "precision": "fp8", "vramMinimumGb": 96 }, "nvfp4": { "modelId": "nvidia/Qwen3-Next-80B-A3B-Instruct-NVFP4", "precision": "nvfp4", "vramMinimumGb": 48, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8": { "modelId": "RedHatAI/Qwen3-Next-80B-A3B-Instruct-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 96, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8_plain": { "modelId": "RedHatAI/Qwen3-Next-80B-A3B-Instruct-FP8", "precision": "fp8", "vramMinimumGb": 96, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8_block": { "modelId": "RedHatAI/Qwen3-Next-80B-A3B-Instruct-FP8-block", "precision": "fp8", "vramMinimumGb": 96, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_nvfp4": { "modelId": "RedHatAI/Qwen3-Next-80B-A3B-Instruct-NVFP4", "precision": "nvfp4", "vramMinimumGb": 48 } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x"] }, "Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice": { "file": "models/Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice.yaml", "minVllmVersion": "0.20.0", "baseArgs": ["--omni"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 16 }, "voicedesign-1.7b": { "modelId": "Qwen/Qwen3-TTS-12Hz-1.7B-VoiceDesign", "precision": "bf16", "vramMinimumGb": 16 }, "base-1.7b": { "modelId": "Qwen/Qwen3-TTS-12Hz-1.7B-Base", "precision": "bf16", "vramMinimumGb": 16 }, "customvoice-0.6b": { "modelId": "Qwen/Qwen3-TTS-12Hz-0.6B-CustomVoice", "precision": "bf16", "vramMinimumGb": 8 }, "base-0.6b": { "modelId": "Qwen/Qwen3-TTS-12Hz-0.6B-Base", "precision": "bf16", "vramMinimumGb": 8 } } }, "Qwen/Qwen3-VL-235B-A22B-Instruct": { "file": "models/Qwen/Qwen3-VL-235B-A22B-Instruct.yaml", "minVllmVersion": "0.11.0", "contextLength": 262144, "optInFeatures": ["text_only", "long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 564 }, "fp8": { "modelId": "Qwen/Qwen3-VL-235B-A22B-Instruct-FP8", "precision": "fp8", "vramMinimumGb": 282 }, "nvfp4": { "modelId": "nvidia/Qwen3-VL-235B-A22B-Instruct-NVFP4", "precision": "nvfp4", "vramMinimumGb": 141, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8": { "modelId": "RedHatAI/Qwen3-VL-235B-A22B-Instruct-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 282, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8_block": { "modelId": "RedHatAI/Qwen3-VL-235B-A22B-Instruct-FP8-block", "precision": "fp8", "vramMinimumGb": 282, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_nvfp4": { "modelId": "RedHatAI/Qwen3-VL-235B-A22B-Instruct-NVFP4", "precision": "nvfp4", "vramMinimumGb": 150 } }, "verifiedGpus": ["h100", "h200", "b200", "mi300x", "mi325x", "mi355x"] }, "Qwen/Qwen3-VL-30B-A3B-Instruct": { "file": "models/Qwen/Qwen3-VL-30B-A3B-Instruct.yaml", "minVllmVersion": "0.11.0", "contextLength": 262144, "optInFeatures": ["text_only"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 72 } }, "verifiedGpus": ["xeon6"] }, "Qwen/Qwen3.5-0.8B": { "file": "models/Qwen/Qwen3.5-0.8B.yaml", "minVllmVersion": "0.17.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "qwen3_coder", "reasoningParser": "qwen3", "optInFeatures": ["text_only"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 2 } }, "verifiedGpus": ["arc_pro_b60", "arc_pro_b70"] }, "Qwen/Qwen3.5-122B-A10B": { "file": "models/Qwen/Qwen3.5-122B-A10B.yaml", "minVllmVersion": "0.17.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "qwen3_coder", "reasoningParser": "qwen3", "optInFeatures": ["spec_decoding", "text_only", "long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 293 }, "fp8": { "modelId": "Qwen/Qwen3.5-122B-A10B-FP8", "precision": "fp8", "vramMinimumGb": 147 }, "nvfp4": { "modelId": "RedHatAI/Qwen3.5-122B-A10B-NVFP4", "precision": "nvfp4", "vramMinimumGb": 74, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "gptq_int4": { "modelId": "Qwen/Qwen3.5-122B-A10B-GPTQ-Int4", "precision": "int4", "vramMinimumGb": 74 }, "redhat_fp8": { "modelId": "RedHatAI/Qwen3.5-122B-A10B-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 147, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["mi325x", "mi355x"] }, "Qwen/Qwen3.5-27B": { "file": "models/Qwen/Qwen3.5-27B.yaml", "minVllmVersion": "0.17.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "qwen3_coder", "reasoningParser": "qwen3", "optInFeatures": ["spec_decoding", "text_only", "long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 65 }, "fp8": { "modelId": "Qwen/Qwen3.5-27B-FP8", "precision": "fp8", "vramMinimumGb": 33 }, "gptq_int4": { "modelId": "Qwen/Qwen3.5-27B-GPTQ-Int4", "precision": "int4", "vramMinimumGb": 17 } }, "verifiedGpus": ["arc_pro_b60", "arc_pro_b70"] }, "Qwen/Qwen3.5-2B": { "file": "models/Qwen/Qwen3.5-2B.yaml", "minVllmVersion": "0.17.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "qwen3_coder", "reasoningParser": "qwen3", "optInFeatures": ["spec_decoding", "text_only"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 5 } }, "verifiedGpus": ["arc_pro_b60", "arc_pro_b70"] }, "Qwen/Qwen3.5-35B-A3B": { "file": "models/Qwen/Qwen3.5-35B-A3B.yaml", "minVllmVersion": "0.17.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "qwen3_coder", "reasoningParser": "qwen3", "optInFeatures": ["spec_decoding", "text_only", "long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 84 }, "fp8": { "modelId": "Qwen/Qwen3.5-35B-A3B-FP8", "precision": "fp8", "vramMinimumGb": 42 }, "gptq_int4": { "modelId": "Qwen/Qwen3.5-35B-A3B-GPTQ-Int4", "precision": "int4", "vramMinimumGb": 21 }, "redhat_fp8": { "modelId": "RedHatAI/Qwen3.5-35B-A3B-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 42, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["xeon6", "arc_pro_b60", "arc_pro_b70"] }, "Qwen/Qwen3.5-397B-A17B": { "file": "models/Qwen/Qwen3.5-397B-A17B.yaml", "minVllmVersion": "0.17.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "qwen3_coder", "reasoningParser": "qwen3", "optInFeatures": ["spec_decoding", "text_only", "long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 953 }, "nvfp4": { "modelId": "nvidia/Qwen3.5-397B-A17B-NVFP4", "precision": "nvfp4", "vramMinimumGb": 238, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "fp8": { "modelId": "RedHatAI/Qwen3.5-397B-A17B-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 477, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "gptq_int4": { "modelId": "Qwen/Qwen3.5-397B-A17B-GPTQ-Int4", "precision": "int4", "vramMinimumGb": 239 }, "amd_mxfp4": { "modelId": "amd/Qwen3.5-397B-A17B-MXFP4", "precision": "mxfp4", "vramMinimumGb": 287, "extraArgs": ["--attention-backend", "ROCM_AITER_FA", "--max-num-seqs", "64"] }, "ascend_w8a8_mtp": { "modelId": "Eco-Tech/Qwen3.5-397B-A17B-w8a8-mtp", "precision": "int8", "vramMinimumGb": 477, "extraArgs": ["--distributed-executor-backend", "mp", "--data-parallel-size", "1", "--quantization", "ascend", "--served-model-name", "qwen3.5", "--max-num-seqs", "128", "--max-model-len", "133000", "--max-num-batched-tokens", "8192", "--gpu-memory-utilization", "0.95", "--enable-prefix-caching", "--async-scheduling", "--compilation-config", '{"cudagraph_mode":"FULL_DECODE_ONLY"}', "--additional-config", '{"enable_cpu_binding":true}'] }, "ascend_w4a4_mxfp4": { "modelId": "Eco-Tech/Qwen3.5-397B-A17B-w4a4-mxfp4", "precision": "mxfp4", "vramMinimumGb": 239, "extraArgs": ["--distributed-executor-backend", "mp", "--data-parallel-size", "1", "--quantization", "ascend", "--served-model-name", "qwen3.5", "--max-num-seqs", "128", "--max-model-len", "133000", "--max-num-batched-tokens", "8192", "--gpu-memory-utilization", "0.95", "--enable-prefix-caching", "--async-scheduling", "--compilation-config", '{"cudagraph_mode":"FULL_DECODE_ONLY"}', "--additional-config", '{"enable_cpu_binding":true}'] } }, "verifiedGpus": ["h200", "gb200", "mi300x", "mi325x", "mi350x", "mi355x", "ascend_950dt"] }, "Qwen/Qwen3.5-4B": { "file": "models/Qwen/Qwen3.5-4B.yaml", "minVllmVersion": "0.17.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "qwen3_coder", "reasoningParser": "qwen3", "optInFeatures": ["spec_decoding", "text_only", "long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 10 }, "fp8": { "modelId": "RedHatAI/Qwen3.5-4B-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 5, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["xeon6", "arc_pro_b60", "arc_pro_b70"] }, "Qwen/Qwen3.5-9B": { "file": "models/Qwen/Qwen3.5-9B.yaml", "minVllmVersion": "0.17.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "qwen3_coder", "reasoningParser": "qwen3", "optInFeatures": ["spec_decoding", "text_only", "long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 22 }, "fp8": { "modelId": "RedHatAI/Qwen3.5-9B-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 11, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["arc_pro_b60", "arc_pro_b70"] }, "Qwen/Qwen3.6-27B": { "file": "models/Qwen/Qwen3.6-27B.yaml", "minVllmVersion": "0.17.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "qwen3_coder", "reasoningParser": "qwen3", "optInFeatures": ["spec_decoding", "text_only", "long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 65 }, "fp8": { "modelId": "Qwen/Qwen3.6-27B-FP8", "precision": "fp8", "vramMinimumGb": 33, "extraArgs": ["--max-num-seqs", "512"] }, "nvfp4": { "modelId": "nvidia/Qwen3.6-27B-NVFP4", "precision": "nvfp4", "vramMinimumGb": 27 }, "redhat_fp8": { "modelId": "RedHatAI/Qwen3.6-27B-FP8", "precision": "fp8", "vramMinimumGb": 33 }, "ascend_w8a8_mxfp8": { "modelId": "Eco-Tech/Qwen3.6-27B-w8a8-mxfp8", "precision": "mxfp8", "vramMinimumGb": 34, "extraArgs": ["--distributed-executor-backend", "mp", "--data-parallel-size", "8", "--quantization", "ascend", "--served-model-name", "qwen3.6", "--max-num-seqs", "32", "--max-model-len", "262144", "--max-num-batched-tokens", "16384", "--gpu-memory-utilization", "0.90", "--no-enable-prefix-caching", "--compilation-config", '{"cudagraph_mode":"FULL_DECODE_ONLY"}', "--additional-config", '{"enable_cpu_binding":true}'] }, "ascend_w8a8": { "modelId": "Eco-Tech/Qwen3.6-27B-w8a8", "precision": "int8", "vramMinimumGb": 33, "extraArgs": ["--data-parallel-size", "8", "--quantization", "ascend", "--served-model-name", "qwen3.6", "--max-num-seqs", "32", "--max-model-len", "133000", "--max-num-batched-tokens", "16384", "--gpu-memory-utilization", "0.90", "--no-enable-prefix-caching", "--compilation-config", '{"cudagraph_mode":"FULL_DECODE_ONLY"}', "--additional-config", '{"enable_cpu_binding":true}', "--async-scheduling"] } }, "verifiedGpus": ["dgx_spark_gb10", "rtx_pro_6000", "dgx_station_gb300", "rtx_5090", "ascend_950dt", "ascend_910c", "arc_pro_b60", "arc_pro_b70", "mi300x"] }, "Qwen/Qwen3.6-35B-A3B": { "file": "models/Qwen/Qwen3.6-35B-A3B.yaml", "minVllmVersion": "0.17.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "qwen3_coder", "reasoningParser": "qwen3", "optInFeatures": ["spec_decoding", "text_only", "long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 84 }, "fp8": { "modelId": "Qwen/Qwen3.6-35B-A3B-FP8", "precision": "fp8", "vramMinimumGb": 42 }, "nvfp4": { "modelId": "nvidia/Qwen3.6-35B-A3B-NVFP4", "precision": "nvfp4", "vramMinimumGb": 21 }, "redhat_nvfp4": { "modelId": "RedHatAI/Qwen3.6-35B-A3B-NVFP4", "precision": "nvfp4", "vramMinimumGb": 21, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8": { "modelId": "RedHatAI/Qwen3.6-35B-A3B-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 42, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8_plain": { "modelId": "RedHatAI/Qwen3.6-35B-A3B-FP8", "precision": "fp8", "vramMinimumGb": 42, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["dgx_spark_gb10", "h100", "h200", "mi300x", "mi325x", "mi355x", "rtx_pro_6000", "dgx_station_gb300", "rtx_5090", "arc_pro_b60", "arc_pro_b70"] }, "Qwen/Qwen3.8-2.4T-A95B": { "file": "models/Qwen/Qwen3.8-2.4T-A95B.yaml", "minVllmVersion": "nightly", "nightlyRequired": true, "contextLength": 262144, "toolCallParser": "qwen3_coder", "reasoningParser": "qwen3", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 5871 }, "fp8": { "modelId": "Qwen/Qwen3.8-2.4T-A95B-FP8", "precision": "fp8", "vramMinimumGb": 2996 }, "mxfp4": { "modelId": "Inferact/Qwen3.8-2.4T-A95B-MXFP4", "precision": "mxfp4", "vramMinimumGb": 1917 }, "nvfp4": { "modelId": "Inferact/Qwen3.8-2.4T-A95B-NVFP4", "precision": "nvfp4", "vramMinimumGb": 1737, "extraArgs": ["--linear-backend", "flashinfer_cutedsl"] }, "nvfp4_reap25": { "modelId": "RedHatAI/Qwen3.8-2.4T-A95B-NVFP4-REAP-25", "precision": "nvfp4", "vramMinimumGb": 1373 } }, "verifiedGpus": ["b300", "gb300"] }, "Qwen/Qwen3.8-27B": { "file": "models/Qwen/Qwen3.8-27B.yaml", "minVllmVersion": "0.17.0", "contextLength": 262144, "toolCallParser": "qwen3_coder", "reasoningParser": "qwen3", "optInFeatures": ["spec_decoding", "text_only", "long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 67 }, "fp8": { "modelId": "Qwen/Qwen3.8-27B-FP8", "precision": "fp8", "vramMinimumGb": 38 }, "nvfp4": { "modelId": "Inferact/Qwen3.8-27B-NVFP4", "precision": "nvfp4", "vramMinimumGb": 32 }, "nvfp4_nvidia": { "modelId": "nvidia/Qwen3.8-27B-NVFP4", "precision": "nvfp4", "vramMinimumGb": 32 }, "int4": { "modelId": "RedHatAI/Qwen3.8-27B-INT4", "precision": "int4", "vramMinimumGb": 24 }, "mxfp4": { "modelId": "RedHatAI/Qwen3.8-27B-MXFP4", "precision": "mxfp4", "vramMinimumGb": 24 }, "ascend_w8a8": { "modelId": "Eco-Tech/Qwen3.8-27B-w8a8", "precision": "int8", "vramMinimumGb": 39, "extraArgs": ["--quantization", "ascend", "--compilation-config", '{"cudagraph_mode":"FULL_DECODE_ONLY"}', "--additional-config", '{"enable_cpu_binding":true}', "--max-num-batched-tokens", "16384"] } }, "verifiedGpus": ["gb300", "b200", "rtx_5090", "rtx_5090_2x", "rtx_pro_6000", "dgx_spark_gb10", "ascend_950pr", "arc_pro_b60", "arc_pro_b70"] }, "Qwen/Qwen3.8-Flash-Next": { "file": "models/Qwen/Qwen3.8-Flash-Next.yaml", "minVllmVersion": "0.30.0", "nightlyRequired": true, "contextLength": 262144, "baseArgs": ["--max-num-seqs", "256", "--gpu-memory-utilization", "0.90", "--enable-prefix-caching"], "toolCallParser": "qwen3_coder", "reasoningParser": "qwen3", "optInFeatures": ["text_only", "long_context"], "variants": { "default": { "modelId": "Inferact/Qwen3.8-Flash-Next-NVFP4", "precision": "nvfp4", "vramMinimumGb": 130 }, "fp8": { "modelId": "Qwen/Qwen3.8-Flash-Next-FP8", "precision": "fp8", "vramMinimumGb": 250 }, "bf16": { "modelId": "Qwen/Qwen3.8-Flash-Next", "precision": "bf16", "vramMinimumGb": 423 } }, "verifiedGpus": ["h200", "h100", "gb200", "gb300", "mi355x", "rtx_pro_6000_4x", "dgx_station_gb300"] }, "Qwen/Qwen3Guard-Gen-8B": { "file": "models/Qwen/Qwen3Guard-Gen-8B.yaml", "minVllmVersion": "0.10.0", "contextLength": 32768, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 19 }, "small_4b": { "modelId": "Qwen/Qwen3Guard-Gen-4B", "precision": "bf16", "vramMinimumGb": 10 }, "tiny_0_6b": { "modelId": "Qwen/Qwen3Guard-Gen-0.6B", "precision": "bf16", "vramMinimumGb": 4 } }, "verifiedGpus": ["mi300x"] }, "Wan-AI/Wan2.2-T2V-A14B-Diffusers": { "file": "models/Wan-AI/Wan2.2-T2V-A14B-Diffusers.yaml", "minVllmVersion": "0.12.0", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 152 } } }, "XiaomiMiMo/MiMo-V2-Flash": { "file": "models/XiaomiMiMo/MiMo-V2-Flash.yaml", "minVllmVersion": "0.20.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code", "--generation-config", "vllm"], "toolCallParser": "mimo", "reasoningParser": "qwen3", "variants": { "default": { "precision": "fp8", "vramMinimumGb": 371, "extraArgs": ["--tensor-parallel-size", "4", "--gpu-memory-utilization", "0.9"] } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x"] }, "XiaomiMiMo/MiMo-V2.5-Pro": { "file": "models/XiaomiMiMo/MiMo-V2.5-Pro.yaml", "minVllmVersion": "0.21.0", "contextLength": 1048576, "baseArgs": ["--trust-remote-code", "--max-model-len auto", "--generation-config", "vllm"], "toolCallParser": "mimo", "reasoningParser": "mimo", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "fp8", "vramMinimumGb": 1224, "extraArgs": ["--tensor-parallel-size", "8", "--gpu-memory-utilization", "0.95", "--max-model-len", "auto"] } }, "verifiedGpus": ["h200"] }, "XiaomiMiMo/MiMo-V2.5": { "file": "models/XiaomiMiMo/MiMo-V2.5.yaml", "minVllmVersion": "0.21.0", "contextLength": 1048576, "baseArgs": ["--trust-remote-code", "--generation-config", "vllm"], "toolCallParser": "mimo", "reasoningParser": "mimo", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "fp8", "vramMinimumGb": 374, "extraArgs": ["--gpu-memory-utilization", "0.95", "--max-model-len", "auto"] } }, "verifiedGpus": ["h200"] }, "XiaomiMiMo/MiMo-V2.6-Flash-RL": { "file": "models/XiaomiMiMo/MiMo-V2.6-Flash-RL.yaml", "minVllmVersion": "0.31.0", "contextLength": 1048576, "baseArgs": ["--trust-remote-code", "--max-model-len", "auto", "--generation-config", "vllm"], "toolCallParser": "mimo", "reasoningParser": "mimo", "optInFeatures": ["spec_decoding"], "variants": { "default": { "modelId": "XiaomiMiMo/MiMo-V2.6-Flash-MOPD", "precision": "fp8", "vramMinimumGb": 208, "extraArgs": ["--tensor-parallel-size", "4", "--gpu-memory-utilization", "0.95"] }, "rl": { "precision": "fp8", "vramMinimumGb": 208, "extraArgs": ["--tensor-parallel-size", "4", "--gpu-memory-utilization", "0.95"] } }, "verifiedGpus": ["h200", "gb300", "mi300x", "mi325x", "mi355x"] }, "XiaomiMiMo/MiMo-V2.6-Pro-RL": { "file": "models/XiaomiMiMo/MiMo-V2.6-Pro-RL.yaml", "minVllmVersion": "0.31.0", "contextLength": 1048576, "baseArgs": ["--trust-remote-code", "--max-model-len", "auto", "--generation-config", "vllm"], "toolCallParser": "mimo", "reasoningParser": "mimo", "optInFeatures": ["spec_decoding"], "variants": { "default": { "modelId": "XiaomiMiMo/MiMo-V2.6-Pro-MOPD", "precision": "fp8", "vramMinimumGb": 680, "extraArgs": ["--tensor-parallel-size", "8", "--gpu-memory-utilization", "0.95"] }, "rl": { "precision": "fp8", "vramMinimumGb": 680, "extraArgs": ["--tensor-parallel-size", "8", "--gpu-memory-utilization", "0.95"] } }, "verifiedGpus": ["h200", "gb300", "mi355x"] }, "arcee-ai/Trinity-Large-Thinking": { "file": "models/arcee-ai/Trinity-Large-Thinking.yaml", "minVllmVersion": "0.11.1", "contextLength": 262144, "baseArgs": ["--dtype", "bfloat16"], "toolCallParser": "qwen3_coder", "reasoningParser": "deepseek_r1", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 955 }, "nvfp4": { "modelId": "arcee-ai/Trinity-Large-Thinking-NVFP4", "precision": "nvfp4", "vramMinimumGb": 239, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_nvfp4": { "modelId": "RedHatAI/Trinity-Large-Thinking-NVFP4", "precision": "nvfp4", "vramMinimumGb": 254 } } }, "baidu/ERNIE-4.5-21B-A3B-PT": { "file": "models/baidu/ERNIE-4.5-21B-A3B-PT.yaml", "minVllmVersion": "0.10.1", "contextLength": 131072, "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 106 }, "300b": { "modelId": "baidu/ERNIE-4.5-300B-A47B-PT", "precision": "bf16", "vramMinimumGb": 640, "extraArgs": ["--tensor-parallel-size", "8", "--gpu-memory-utilization", "0.95", "--quantization", "fp8"] } } }, "baidu/ERNIE-4.5-VL-28B-A3B-PT": { "file": "models/baidu/ERNIE-4.5-VL-28B-A3B-PT.yaml", "minVllmVersion": "0.11.0", "contextLength": 131072, "baseArgs": ["--trust-remote-code"], "optInFeatures": ["text_only"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 67 }, "424b": { "modelId": "baidu/ERNIE-4.5-VL-424B-A47B-PT", "precision": "bf16", "vramMinimumGb": 1120, "extraArgs": ["--trust-remote-code", "--tensor-parallel-size", "8"] }, "424b_fp8": { "modelId": "baidu/ERNIE-4.5-VL-424B-A47B-PT", "precision": "fp8", "vramMinimumGb": 640, "extraArgs": ["--trust-remote-code", "--tensor-parallel-size", "8", "--quantization", "fp8", "--cpu-offload-gb", "50"] } }, "verifiedGpus": ["mi300x", "mi325x", "mi355x"] }, "baidu/Unlimited-OCR": { "file": "models/baidu/Unlimited-OCR.yaml", "minVllmVersion": "0.25.0", "contextLength": 32768, "baseArgs": ["--trust-remote-code", "--logits_processors", "vllm.model_executor.models.unlimited_ocr:NGramPerReqLogitsProcessor", "--no-enable-prefix-caching", "--mm-processor-cache-gb", "0"], "optInFeatures": ["encoder_parallel"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 8 } } }, "bharatgenai/Param2-17B-A2.4B-Thinking": { "file": "models/bharatgenai/Param2-17B-A2.4B-Thinking.yaml", "minVllmVersion": "0.20.0", "contextLength": 32768, "baseArgs": ["--trust-remote-code", "--async-scheduling"], "toolCallParser": "hermes", "reasoningParser": "qwen3", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 41 } }, "verifiedGpus": ["h100", "l40s"] }, "black-forest-labs/flux-3-image-klein": { "file": "models/black-forest-labs/flux-3-image-klein.yaml", "minVllmVersion": "0.32.0", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 24 }, "fp8r": { "precision": "fp8", "vramMinimumGb": 17, "extraArgs": ["--stage-overrides", '{"0":{"additional_config":{"variant":"fp8r"}}}'] }, "nvfp4": { "precision": "nvfp4", "vramMinimumGb": 13, "extraArgs": ["--stage-overrides", '{"0":{"additional_config":{"variant":"nvfp4"}}}'] } }, "verifiedGpus": ["gb200"] }, "bosonai/higgs-audio-v3-tts-4b": { "file": "models/bosonai/higgs-audio-v3-tts-4b.yaml", "minVllmVersion": "0.22.0", "baseArgs": ["--omni", "--trust-remote-code"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 24 } } }, "deepseek-ai/DeepSeek-OCR-2": { "file": "models/deepseek-ai/DeepSeek-OCR-2.yaml", "minVllmVersion": "0.16.0", "contextLength": 8192, "baseArgs": ["--trust-remote-code", "--logits_processors", "vllm.model_executor.models.deepseek_ocr:NGramPerReqLogitsProcessor", "--no-enable-prefix-caching", "--mm-processor-cache-gb", "0"], "optInFeatures": ["text_only", "encoder_parallel"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 7 } } }, "deepseek-ai/DeepSeek-OCR": { "file": "models/deepseek-ai/DeepSeek-OCR.yaml", "minVllmVersion": "0.12.0", "contextLength": 8192, "baseArgs": ["--trust-remote-code", "--logits-processors", "vllm.model_executor.models.deepseek_ocr:NGramPerReqLogitsProcessor", "--mm-processor-cache-gb", "0"], "optInFeatures": ["text_only", "encoder_parallel"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 7 } }, "verifiedGpus": ["mi300x", "mi325x", "mi355x", "arc_pro_b60", "arc_pro_b70"] }, "deepseek-ai/DeepSeek-R1": { "file": "models/deepseek-ai/DeepSeek-R1.yaml", "minVllmVersion": "0.12.0", "contextLength": 163840, "baseArgs": ["--trust-remote-code"], "toolCallParser": "deepseek_v3", "reasoningParser": "deepseek_r1", "variants": { "default": { "precision": "fp8", "vramMinimumGb": 805 }, "r1_0528": { "modelId": "deepseek-ai/DeepSeek-R1-0528", "precision": "fp8", "vramMinimumGb": 805 }, "nvfp4": { "modelId": "nvidia/DeepSeek-R1-0528-NVFP4-v2", "precision": "nvfp4", "vramMinimumGb": 403, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "mxfp4": { "modelId": "amd/DeepSeek-R1-0528-MXFP4-MTP-MoEFP4", "precision": "mxfp4", "vramMinimumGb": 403, "extraArgs": ["--no-enable-expert-parallel", "--kv-cache-dtype", "fp8"] }, "redhat_nvfp4": { "modelId": "RedHatAI/DeepSeek-R1-NVFP4-FP8-BLOCK", "precision": "nvfp4", "vramMinimumGb": 444 } }, "verifiedGpus": ["h200", "b200", "gb200", "mi300x", "mi325x", "mi350x", "mi355x"] }, "deepseek-ai/DeepSeek-V3.1": { "file": "models/deepseek-ai/DeepSeek-V3.1.yaml", "minVllmVersion": "0.12.0", "contextLength": 163840, "baseArgs": ["--trust-remote-code", "--enable-expert-parallel"], "toolCallParser": "deepseek_v31", "reasoningParser": "deepseek_v3", "variants": { "default": { "precision": "fp8", "vramMinimumGb": 805 }, "nvfp4": { "modelId": "nvidia/DeepSeek-V3.1-NVFP4", "precision": "nvfp4", "vramMinimumGb": 403, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x"] }, "deepseek-ai/DeepSeek-V3.2-Exp": { "file": "models/deepseek-ai/DeepSeek-V3.2-Exp.yaml", "minVllmVersion": "0.12.0", "contextLength": 163840, "baseArgs": ["--trust-remote-code"], "toolCallParser": "deepseek_v32", "reasoningParser": "deepseek_v3", "variants": { "default": { "precision": "fp8", "vramMinimumGb": 805 } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x"] }, "deepseek-ai/DeepSeek-V3.2": { "file": "models/deepseek-ai/DeepSeek-V3.2.yaml", "minVllmVersion": "0.18.0", "contextLength": 163840, "baseArgs": ["--trust-remote-code", "--kernel-config.enable_flashinfer_autotune=False"], "toolCallParser": "deepseek_v32", "reasoningParser": "deepseek_v3", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "fp8", "vramMinimumGb": 805 }, "nvfp4": { "modelId": "nvidia/DeepSeek-V3.2-NVFP4", "precision": "nvfp4", "vramMinimumGb": 403, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_nvfp4": { "modelId": "RedHatAI/DeepSeek-V3.2-NVFP4-FP8-BLOCK", "precision": "nvfp4", "vramMinimumGb": 430 } }, "verifiedGpus": ["h100", "h200"] }, "deepseek-ai/DeepSeek-V3": { "file": "models/deepseek-ai/DeepSeek-V3.yaml", "minVllmVersion": "0.12.0", "contextLength": 163840, "baseArgs": ["--trust-remote-code", "--enable-expert-parallel"], "toolCallParser": "deepseek_v3", "reasoningParser": "deepseek_v3", "variants": { "default": { "precision": "fp8", "vramMinimumGb": 805 }, "v3_0324": { "modelId": "deepseek-ai/DeepSeek-V3-0324", "precision": "fp8", "vramMinimumGb": 805 }, "fp4": { "modelId": "nvidia/DeepSeek-V3-FP4", "precision": "fp4", "vramMinimumGb": 403 } }, "verifiedGpus": ["h200", "b200", "gb200", "mi300x", "mi325x", "mi350x", "mi355x"] }, "deepseek-ai/DeepSeek-V4-Flash-Vision-Exp": { "file": "models/deepseek-ai/DeepSeek-V4-Flash-Vision-Exp.yaml", "minVllmVersion": "0.30.0", "nightlyRequired": true, "contextLength": 1048576, "baseArgs": ["--kv-cache-dtype", "fp8", "--block-size", "256"], "toolCallParser": "deepseek_v4", "reasoningParser": "deepseek_v4", "variants": { "default": { "precision": "fp8", "vramMinimumGb": 202 } }, "verifiedGpus": ["gb200", "mi350x", "ascend_950dt_8x", "ascend_950pr_8x"] }, "deepseek-ai/DeepSeek-V4-Flash": { "file": "models/deepseek-ai/DeepSeek-V4-Flash.yaml", "minVllmVersion": "0.20.0", "contextLength": 1048576, "baseArgs": ["--trust-remote-code", "--kv-cache-dtype", "fp8", "--block-size", "256"], "toolCallParser": "deepseek_v4", "reasoningParser": "deepseek_v4", "optInFeatures": ["spec_decoding"], "variants": { "default": { "modelId": "deepseek-ai/DeepSeek-V4-Flash-0731", "precision": "fp8", "vramMinimumGb": 200 }, "fp8": { "precision": "fp8", "vramMinimumGb": 170 }, "nvfp4": { "modelId": "nvidia/DeepSeek-V4-Flash-NVFP4", "precision": "nvfp4", "vramMinimumGb": 170 }, "redhat_nvfp4": { "modelId": "RedHatAI/DeepSeek-V4-Flash-NVFP4-FP8", "precision": "nvfp4", "vramMinimumGb": 170 }, "dspark": { "modelId": "deepseek-ai/DeepSeek-V4-Flash-DSpark", "precision": "fp8", "vramMinimumGb": 200 }, "ascend_w8a8": { "modelId": "Eco-Tech/DeepSeek-V4-Flash-w8a8-mtp", "precision": "int8", "vramMinimumGb": 341, "extraArgs": ["--data-parallel-size", "2", "--quantization", "ascend", "--max-num-seqs", "32", "--max-num-batched-tokens", "10240", "--gpu-memory-utilization", "0.90", "--block-size", "128", "--compilation-config", '{"cudagraph_mode":"FULL_DECODE_ONLY"}', "--async-scheduling", "--api-server-count", "1", "--safetensors-load-strategy", "prefetch", "--additional-config", '{"ascend_compilation_config":{"enable_npugraph_ex":true,"enable_static_kernel":false},"enable_cpu_binding":true,"multistream_overlap_shared_expert":true}'] } }, "verifiedGpus": ["h200", "b200", "gb200", "b300", "gb300", "dgx_station_gb300", "dgx_spark_gb10", "rtx_pro_6000_8x", "mi300x", "mi325x", "mi355x", "ascend_950dt_8x", "ascend_950pr_8x", "ascend_910c"] }, "deepseek-ai/DeepSeek-V4-Pro": { "file": "models/deepseek-ai/DeepSeek-V4-Pro.yaml", "minVllmVersion": "0.20.0", "contextLength": 1048576, "baseArgs": ["--trust-remote-code", "--kv-cache-dtype", "fp8", "--block-size", "256"], "toolCallParser": "deepseek_v4", "reasoningParser": "deepseek_v4", "optInFeatures": ["spec_decoding"], "variants": { "default": { "modelId": "deepseek-ai/DeepSeek-V4-Pro-0813", "precision": "fp8", "vramMinimumGb": 960 }, "fp8": { "precision": "fp8", "vramMinimumGb": 960 }, "nvfp4": { "modelId": "nvidia/DeepSeek-V4-Pro-NVFP4", "precision": "nvfp4", "vramMinimumGb": 960 }, "dspark": { "modelId": "deepseek-ai/DeepSeek-V4-Pro-DSpark", "precision": "fp8", "vramMinimumGb": 960 }, "redhat_nvfp4": { "modelId": "RedHatAI/DeepSeek-V4-Pro-NVFP4-FP8", "precision": "nvfp4", "vramMinimumGb": 1e3 } }, "unsupportedGpus": ["mi300x", "mi325x"], "verifiedGpus": ["h200", "b200", "gb200", "b300", "gb300", "mi355x"] }, "deepseek-ai/DeepSeek-V4.1-Flash": { "file": "models/deepseek-ai/DeepSeek-V4.1-Flash.yaml", "minVllmVersion": "0.31.0", "contextLength": 1048576, "baseArgs": ["--tokenizer-mode", "deepseek_v41"], "toolCallParser": "deepseek_v41", "reasoningParser": "deepseek_v41", "optInFeatures": ["spec_decoding", "text_only"], "variants": { "default": { "modelId": "deepseek-ai/DeepSeek-V4.1-Flash-1017", "precision": "fp8", "vramMinimumGb": 614 }, "fp8": { "precision": "fp8", "vramMinimumGb": 614 } }, "verifiedGpus": ["h100", "h200", "b200", "gb200", "gb300", "b300", "mi300x", "mi325x", "mi350x", "mi355x", "dgx_station_gb300"] }, "dots-studio/dots3-note-prev": { "file": "models/dots-studio/dots3-note-prev.yaml", "minVllmVersion": "0.28.0", "contextLength": 524288, "baseArgs": ["--served-model-name", "dots3-note-prev", "--gpu-memory-utilization", "0.9", "--max-model-len", "262144", "--max-num-batched-tokens", "8192", "--block-size", "64", "--mm-processor-cache-gb", "32"], "toolCallParser": "dots", "reasoningParser": "qwen3", "optInFeatures": ["reasoning", "tool_calling", "text_only", "spec_decoding"], "variants": { "default": { "modelId": "dots-studio/dots3-note-prev-fp8", "precision": "fp8", "vramMinimumGb": 359 }, "bf16": { "modelId": "dots-studio/dots3-note-prev", "precision": "bf16", "vramMinimumGb": 692, "extraArgs": ["--gpu-memory-utilization", "0.95"] } }, "unsupportedGpus": ["b200", "gb200", "b300", "gb300", "mi300x", "mi325x", "mi355x"], "verifiedGpus": ["h100"] }, "fishaudio/drama-3": { "file": "models/fishaudio/drama-3.yaml", "minVllmVersion": "0.31.0", "baseArgs": ["--omni"], "variants": { "default": { "precision": "fp8", "vramMinimumGb": 48 } }, "verifiedGpus": ["h100"] }, "fishaudio/s2-pro": { "file": "models/fishaudio/s2-pro.yaml", "minVllmVersion": "0.19.0", "baseArgs": ["--omni"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 48 } } }, "ibm-granite/granite-3.2-2b-instruct": { "file": "models/ibm-granite/granite-3.2-2b-instruct.yaml", "minVllmVersion": "0.6.1", "contextLength": 131072, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 6 } }, "verifiedGpus": ["xeon6"] }, "inclusionAI/Ling-2.6-1T": { "file": "models/inclusionAI/Ling-2.6-1T.yaml", "minVllmVersion": "0.20.2", "contextLength": 262144, "baseArgs": ["--trust-remote-code", "--tensor-parallel-size", "8"], "variants": { "default": { "precision": "fp8", "vramMinimumGb": 1200 } }, "verifiedGpus": ["b300", "mi300x"] }, "inclusionAI/Ling-2.6-flash": { "file": "models/inclusionAI/Ling-2.6-flash.yaml", "minVllmVersion": "0.20.2", "contextLength": 131072, "baseArgs": ["--trust-remote-code", "--tensor-parallel-size", "4"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 250 } }, "verifiedGpus": ["h200", "mi300x"] }, "inclusionAI/Ling-3.0-flash-VL": { "file": "models/inclusionAI/Ling-3.0-flash-VL.yaml", "minVllmVersion": "nightly", "nightlyRequired": true, "contextLength": 131072, "baseArgs": ["--trust-remote-code", "--dtype", "bfloat16", "--gpu-memory-utilization", "0.9", "--enable-chunked-prefill", "--compilation-config", '{"cudagraph_mode":"FULL_AND_PIECEWISE"}', "--enable-prefix-caching"], "toolCallParser": "ling3", "reasoningParser": "ling3", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 300 }, "fp8": { "modelId": "inclusionAI/Ling-3.0-flash-VL-fp8", "precision": "fp8", "vramMinimumGb": 150 }, "fp4": { "modelId": "inclusionAI/Ling-3.0-flash-VL-fp4", "precision": "fp4", "vramMinimumGb": 85 }, "int4": { "modelId": "inclusionAI/Ling-3.0-flash-VL-int4", "precision": "int4", "vramMinimumGb": 95 } } }, "inclusionAI/Ling-3.0-flash": { "file": "models/inclusionAI/Ling-3.0-flash.yaml", "minVllmVersion": "0.28.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code", "--dtype", "bfloat16", "--gpu-memory-utilization", "0.9", "--enable-chunked-prefill", "--compilation-config", '{"cudagraph_mode":"FULL_AND_PIECEWISE"}', "--enable-prefix-caching"], "toolCallParser": "ling3", "reasoningParser": "ling3", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 300 }, "fp8": { "modelId": "inclusionAI/Ling-3.0-flash-fp8", "precision": "fp8", "vramMinimumGb": 150 }, "fp4": { "modelId": "inclusionAI/Ling-3.0-flash-fp4", "precision": "fp4", "vramMinimumGb": 85 }, "int4": { "modelId": "inclusionAI/Ling-3.0-flash-int4", "precision": "int4", "vramMinimumGb": 95 } }, "verifiedGpus": ["h200", "dgx_spark_gb10", "mi300x", "mi355x"] }, "inclusionAI/Ling-3.0-tiny": { "file": "models/inclusionAI/Ling-3.0-tiny.yaml", "minVllmVersion": "0.28.0", "contextLength": 131072, "baseArgs": ["--trust-remote-code", "--dtype", "bfloat16", "--gpu-memory-utilization", "0.85", "--enable-prefix-caching"], "toolCallParser": "ling3", "reasoningParser": "ling3", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 18 }, "fp8": { "modelId": "inclusionAI/Ling-3.0-tiny-fp8", "precision": "fp8", "vramMinimumGb": 11 }, "int4": { "modelId": "inclusionAI/Ling-3.0-tiny-int4", "precision": "int4", "vramMinimumGb": 8 } }, "verifiedGpus": ["h200"] }, "inclusionAI/Ling-3.1-flash": { "file": "models/inclusionAI/Ling-3.1-flash.yaml", "minVllmVersion": "nightly", "nightlyRequired": true, "contextLength": 262144, "baseArgs": ["--trust-remote-code", "--enable-expert-parallel", "--gpu-memory-utilization", "0.9", "--enable-chunked-prefill", "--compilation-config", '{"cudagraph_mode":"FULL_AND_PIECEWISE"}', "--enable-prefix-caching"], "toolCallParser": "ling3", "reasoningParser": "ling3", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "fp8", "vramMinimumGb": 689 } }, "verifiedGpus": ["mi355x"] }, "inclusionAI/Ming-omni-tts-0.5B": { "file": "models/inclusionAI/Ming-omni-tts-0.5B.yaml", "minVllmVersion": "0.22.0", "baseArgs": ["--omni", "--enforce-eager"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 16 } } }, "inclusionAI/Ring-1T-FP8": { "file": "models/inclusionAI/Ring-1T-FP8.yaml", "minVllmVersion": "0.11.0", "contextLength": 65536, "baseArgs": ["--trust-remote-code", "--tensor-parallel-size", "8", "--max-num-seqs", "32", "--kv-cache-dtype", "fp8", "--served-model-name", "Ring-1T-FP8"], "variants": { "default": { "precision": "fp8", "vramMinimumGb": 1200, "extraArgs": ["--gpu-memory-utilization", "0.97", "--compilation-config", '{"use_inductor": false}'] } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x"] }, "inclusionAI/Ring-2.6-1T": { "file": "models/inclusionAI/Ring-2.6-1T.yaml", "minVllmVersion": "0.20.2", "contextLength": 131072, "baseArgs": ["--trust-remote-code", "--tensor-parallel-size", "8"], "variants": { "default": { "precision": "fp8", "vramMinimumGb": 1200 } } }, "internlm/Intern-S1": { "file": "models/internlm/Intern-S1.yaml", "minVllmVersion": "0.10.2", "contextLength": 65536, "baseArgs": ["--trust-remote-code"], "toolCallParser": "internlm", "reasoningParser": "deepseek_r1", "optInFeatures": ["text_only"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 578 }, "fp8": { "modelId": "internlm/Intern-S1-FP8", "precision": "fp8", "vramMinimumGb": 289 } }, "verifiedGpus": ["mi300x", "mi325x", "mi355x"] }, "internlm/Intern-S2-397B": { "file": "models/internlm/Intern-S2-397B.yaml", "minVllmVersion": "0.22.1", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "qwen3_coder", "reasoningParser": "qwen3", "optInFeatures": ["spec_decoding", "text_only", "long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 969 }, "fp8": { "modelId": "internlm/Intern-S2-397B-FP8", "precision": "fp8", "vramMinimumGb": 488 } } }, "internlm/Intern-S2-Preview": { "file": "models/internlm/Intern-S2-Preview.yaml", "minVllmVersion": "0.22.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "qwen3_coder", "reasoningParser": "qwen3", "optInFeatures": ["spec_decoding", "text_only"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 87 }, "fp8": { "modelId": "internlm/Intern-S2-Preview-FP8", "precision": "fp8", "vramMinimumGb": 44 } }, "verifiedGpus": ["h200", "gb200"] }, "jinaai/jina-embeddings-v5-text-small": { "file": "models/jinaai/jina-embeddings-v5-text-small.yaml", "minVllmVersion": "0.20.0", "contextLength": 32768, "baseArgs": ["--trust-remote-code", "--runner", "pooling"], "variants": { "default": { "modelId": "jinaai/jina-embeddings-v5-text-small-retrieval", "precision": "bf16", "vramMinimumGb": 2 }, "text_matching": { "modelId": "jinaai/jina-embeddings-v5-text-small-text-matching", "precision": "bf16", "vramMinimumGb": 2 }, "classification": { "modelId": "jinaai/jina-embeddings-v5-text-small-classification", "precision": "bf16", "vramMinimumGb": 2 }, "clustering": { "modelId": "jinaai/jina-embeddings-v5-text-small-clustering", "precision": "bf16", "vramMinimumGb": 2 } } }, "jinaai/jina-reranker-m0": { "file": "models/jinaai/jina-reranker-m0.yaml", "minVllmVersion": "0.10.0", "contextLength": 32768, "baseArgs": ["--gpu-memory-utilization", "0.75", "--max-num-seqs", "32"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 6 } } }, "meituan-longcat/LongCat-Image-Edit": { "file": "models/meituan-longcat/LongCat-Image-Edit.yaml", "minVllmVersion": "0.12.0", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 36 } } }, "meta-llama/Llama-3.1-8B-Instruct": { "file": "models/meta-llama/Llama-3.1-8B-Instruct.yaml", "minVllmVersion": "0.6.0", "contextLength": 131072, "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 20 }, "w8a8_int8": { "modelId": "RedHatAI/Meta-Llama-3.1-8B-Instruct-quantized.w8a8", "precision": "int8", "vramMinimumGb": 10 }, "awq_int4": { "modelId": "hugging-quants/Meta-Llama-3.1-8B-Instruct-AWQ-INT4", "precision": "int4", "vramMinimumGb": 5, "extraArgs": ["--quantization", "awq"] }, "nvfp4": { "modelId": "nvidia/Llama-3.1-8B-Instruct-NVFP4", "precision": "nvfp4", "vramMinimumGb": 5, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "nvidia_fp8": { "modelId": "nvidia/Llama-3.1-8B-Instruct-FP8", "precision": "fp8", "vramMinimumGb": 10, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "fp8": { "modelId": "RedHatAI/Meta-Llama-3.1-8B-Instruct-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 10, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8": { "modelId": "RedHatAI/Meta-Llama-3.1-8B-Instruct-FP8", "precision": "fp8", "vramMinimumGb": 10, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8_block": { "modelId": "RedHatAI/Llama-3.1-8B-Instruct-FP8-block", "precision": "fp8", "vramMinimumGb": 10, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_nvfp4": { "modelId": "RedHatAI/Llama-3.1-8B-Instruct-NVFP4", "precision": "nvfp4", "vramMinimumGb": 6 } }, "verifiedGpus": ["h100", "h200", "mi300x", "mi325x", "mi355x", "trillium", "xeon6", "arc_pro_b60", "arc_pro_b70"] }, "meta-llama/Llama-3.1-8B": { "file": "models/meta-llama/Llama-3.1-8B.yaml", "minVllmVersion": "0.6.0", "contextLength": 131072, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 20 }, "w8a8_int8": { "modelId": "RedHatAI/Meta-Llama-3.1-8B-quantized.w8a8", "precision": "int8", "vramMinimumGb": 10 } }, "verifiedGpus": ["xeon6"] }, "meta-llama/Llama-3.2-1B-Instruct": { "file": "models/meta-llama/Llama-3.2-1B-Instruct.yaml", "minVllmVersion": "0.6.2", "contextLength": 131072, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 3 }, "w8a8_int8": { "modelId": "RedHatAI/Llama-3.2-1B-Instruct-quantized.w8a8", "precision": "int8", "vramMinimumGb": 2 }, "awq_int4": { "modelId": "AMead10/Llama-3.2-1B-Instruct-AWQ", "precision": "int4", "vramMinimumGb": 2, "extraArgs": ["--quantization", "awq"] } }, "verifiedGpus": ["xeon6"] }, "meta-llama/Llama-3.2-1B": { "file": "models/meta-llama/Llama-3.2-1B.yaml", "minVllmVersion": "0.6.2", "contextLength": 131072, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 3 } }, "verifiedGpus": ["xeon6"] }, "meta-llama/Llama-3.2-3B-Instruct": { "file": "models/meta-llama/Llama-3.2-3B-Instruct.yaml", "minVllmVersion": "0.6.2", "contextLength": 131072, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 8 }, "w8a8_int8": { "modelId": "RedHatAI/Llama-3.2-3B-Instruct-quantized.w8a8", "precision": "int8", "vramMinimumGb": 4 }, "awq_int4": { "modelId": "AMead10/Llama-3.2-3B-Instruct-AWQ", "precision": "int4", "vramMinimumGb": 3, "extraArgs": ["--quantization", "awq"] } }, "verifiedGpus": ["xeon6"] }, "meta-llama/Llama-3.3-70B-Instruct": { "file": "models/meta-llama/Llama-3.3-70B-Instruct.yaml", "minVllmVersion": "0.12.0", "contextLength": 131072, "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 170 }, "fp8": { "modelId": "nvidia/Llama-3.3-70B-Instruct-FP8", "precision": "fp8", "vramMinimumGb": 84, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8": { "modelId": "RedHatAI/Llama-3.3-70B-Instruct-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 84, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "nvfp4": { "modelId": "nvidia/Llama-3.3-70B-Instruct-NVFP4", "precision": "nvfp4", "vramMinimumGb": 42, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8_block": { "modelId": "RedHatAI/Llama-3.3-70B-Instruct-FP8-block", "precision": "fp8", "vramMinimumGb": 84, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_nvfp4": { "modelId": "RedHatAI/Llama-3.3-70B-Instruct-NVFP4", "precision": "nvfp4", "vramMinimumGb": 46 } }, "verifiedGpus": ["h100", "h200", "b200", "gb200", "mi300x", "mi325x", "mi355x", "trillium", "xeon6", "arc_pro_b70"] }, "meta-llama/Llama-4-Scout-17B-16E-Instruct": { "file": "models/meta-llama/Llama-4-Scout-17B-16E-Instruct.yaml", "minVllmVersion": "0.12.0", "contextLength": 10485760, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 262 }, "fp8": { "modelId": "nvidia/Llama-4-Scout-17B-16E-Instruct-FP8", "precision": "fp8", "vramMinimumGb": 131, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "nvfp4": { "modelId": "nvidia/Llama-4-Scout-17B-16E-Instruct-NVFP4", "precision": "nvfp4", "vramMinimumGb": 65, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8": { "modelId": "RedHatAI/Llama-4-Scout-17B-16E-Instruct-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 131, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_nvfp4": { "modelId": "RedHatAI/Llama-4-Scout-17B-16E-Instruct-NVFP4", "precision": "nvfp4", "vramMinimumGb": 65, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8_block": { "modelId": "RedHatAI/Llama-4-Scout-17B-16E-Instruct-FP8-block", "precision": "fp8", "vramMinimumGb": 131, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["h100", "b200", "gb200", "mi300x", "mi325x", "mi355x", "xeon6"] }, "meta-models/Muse-Glimmer-30B": { "file": "models/meta-models/Muse-Glimmer-30B.yaml", "minVllmVersion": "0.28.0", "contextLength": 131072, "baseArgs": ["--generation-config", "auto"], "toolCallParser": "muse_glimmer", "reasoningParser": "muse_glimmer", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 72 }, "fp8_block": { "modelId": "RedHatAI/Muse-Glimmer-30B-FP8-block", "precision": "fp8", "vramMinimumGb": 40 }, "nvfp4": { "modelId": "Inferact/Muse-Glimmer-30B-NVFP4-W4A4", "precision": "nvfp4", "vramMinimumGb": 31 } }, "verifiedGpus": ["gb300", "dgx_spark_gb10", "mi300x", "mi325x", "mi355x", "arc_pro_b60", "arc_pro_b70", "rtx_5090", "rtx_5090_2x"] }, "meta-models/Muse-Spark-Open-816B-A42B": { "file": "models/meta-models/Muse-Spark-Open-816B-A42B.yaml", "minVllmVersion": "0.33.0", "nightlyRequired": true, "contextLength": 1048576, "toolCallParser": "muse", "reasoningParser": "muse", "optInFeatures": ["spec_decoding"], "variants": { "bf16": { "modelId": "meta-models/Muse-Spark-Open-816B-A42B", "precision": "bf16", "vramMinimumGb": 1959 }, "bf16_online_mxfp4": { "modelId": "meta-models/Muse-Spark-Open-816B-A42B", "precision": "mxfp4", "vramMinimumGb": 567 }, "mxfp4": { "modelId": "amd/Muse-Spark-Open-816B-A42B-Quark-MXFP4", "precision": "mxfp4", "vramMinimumGb": 611 }, "default": { "modelId": "meta-models/Muse-Spark-Open-816B-A42B-NVFP4", "precision": "nvfp4", "vramMinimumGb": 640 } }, "verifiedGpus": ["h200", "gb200", "gb300", "mi350x", "mi355x"] }, "microsoft/Phi-4-mini-instruct": { "file": "models/microsoft/Phi-4-mini-instruct.yaml", "minVllmVersion": "0.7.0", "contextLength": 131072, "optInFeatures": ["text_only", "encoder_parallel"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 10 }, "mini_reasoning": { "modelId": "microsoft/Phi-4-mini-reasoning", "precision": "bf16", "vramMinimumGb": 10 }, "reasoning": { "modelId": "microsoft/Phi-4-reasoning", "precision": "bf16", "vramMinimumGb": 30 }, "multimodal": { "modelId": "microsoft/Phi-4-multimodal-instruct", "precision": "bf16", "vramMinimumGb": 16, "extraArgs": ["--trust-remote-code"] }, "fp8": { "modelId": "RedHatAI/Phi-4-mini-instruct-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 5, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["h100"] }, "microsoft/Phi-4-multimodal-instruct": { "file": "models/microsoft/Phi-4-multimodal-instruct.yaml", "minVllmVersion": "0.8.0", "contextLength": 131072, "baseArgs": ["--trust-remote-code"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 14 } }, "verifiedGpus": ["xeon6"] }, "microsoft/Phi-4-reasoning": { "file": "models/microsoft/Phi-4-reasoning.yaml", "minVllmVersion": "0.4.2", "contextLength": 32768, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 34 } }, "verifiedGpus": ["xeon6"] }, "mindlab-research/Macaron-V1-Coding-Venti": { "file": "models/mindlab-research/Macaron-V1-Coding-Venti.yaml", "minVllmVersion": "0.25.0", "contextLength": 1048576, "baseArgs": ["--kv-cache-dtype", "fp8_e4m3"], "toolCallParser": "glm47", "reasoningParser": "glm45", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 1786 }, "fp8": { "precision": "fp8", "vramMinimumGb": 893, "extraArgs": ["--quantization", "fp8"] } }, "verifiedGpus": ["b300"] }, "mistralai/Ministral-3-14B-Instruct-2512": { "file": "models/mistralai/Ministral-3-14B-Instruct-2512.yaml", "minVllmVersion": "0.11.0", "contextLength": 262144, "baseArgs": ["--tokenizer_mode", "mistral", "--config_format", "mistral", "--load_format", "mistral"], "toolCallParser": "mistral", "optInFeatures": ["text_only", "encoder_parallel"], "variants": { "default": { "precision": "fp8", "vramMinimumGb": 17 }, "8b": { "modelId": "mistralai/Ministral-3-8B-Instruct-2512", "precision": "fp8", "vramMinimumGb": 12 }, "3b": { "modelId": "mistralai/Ministral-3-3B-Instruct-2512", "precision": "fp8", "vramMinimumGb": 6 }, "fp8": { "modelId": "mistralai/Ministral-3-14B-Instruct-2512-FP8", "precision": "fp8", "vramMinimumGb": 17, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8": { "modelId": "RedHatAI/Ministral-3-14B-Instruct-2512-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 17, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "nvfp4": { "modelId": "RedHatAI/Ministral-3-14B-Instruct-2512-NVFP4", "precision": "nvfp4", "vramMinimumGb": 9 } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x"] }, "mistralai/Ministral-3-8B-Reasoning-2512": { "file": "models/mistralai/Ministral-3-8B-Reasoning-2512.yaml", "minVllmVersion": "0.11.0", "contextLength": 262144, "baseArgs": ["--tokenizer_mode", "mistral", "--config_format", "mistral", "--load_format", "mistral"], "toolCallParser": "mistral", "reasoningParser": "mistral", "optInFeatures": ["text_only", "encoder_parallel"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 22 }, "3b": { "modelId": "mistralai/Ministral-3-3B-Reasoning-2512", "precision": "bf16", "vramMinimumGb": 8 }, "14b": { "modelId": "mistralai/Ministral-3-14B-Reasoning-2512", "precision": "bf16", "vramMinimumGb": 32, "extraArgs": ["--tensor-parallel-size", "2"] } }, "verifiedGpus": ["h200", "gb200", "mi300x"] }, "mistralai/Mistral-Large-3-675B-Instruct-2512": { "file": "models/mistralai/Mistral-Large-3-675B-Instruct-2512.yaml", "minVllmVersion": "0.11.0", "contextLength": 294912, "baseArgs": ["--tokenizer_mode", "mistral", "--config_format", "mistral", "--load_format", "mistral"], "toolCallParser": "mistral", "optInFeatures": ["text_only"], "variants": { "default": { "precision": "fp8", "vramMinimumGb": 810, "extraArgs": ["--tensor-parallel-size", "8"] }, "nvfp4": { "modelId": "mistralai/Mistral-Large-3-675B-Instruct-2512-NVFP4", "precision": "nvfp4", "vramMinimumGb": 405, "extraArgs": ["--tensor-parallel-size", "4"] }, "fp8": { "modelId": "mistralai/Mistral-Large-3-675B-Instruct-2512-FP8", "precision": "fp8", "vramMinimumGb": 810, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_nvfp4": { "modelId": "RedHatAI/Mistral-Large-3-675B-Instruct-2512-NVFP4", "precision": "nvfp4", "vramMinimumGb": 405 } }, "verifiedGpus": ["h100", "b200"] }, "mistralai/Mistral-Medium-3.5-128B": { "file": "models/mistralai/Mistral-Medium-3.5-128B.yaml", "minVllmVersion": "0.18.0", "contextLength": 262144, "baseArgs": ["--tokenizer_mode", "mistral", "--config_format", "mistral", "--load_format", "mistral"], "toolCallParser": "mistral", "reasoningParser": "mistral", "optInFeatures": ["text_only", "encoder_parallel", "spec_decoding"], "variants": { "default": { "precision": "fp8", "vramMinimumGb": 154 } }, "verifiedGpus": ["mi300x"] }, "mistralai/Mistral-Small-4-119B-2603": { "file": "models/mistralai/Mistral-Small-4-119B-2603.yaml", "minVllmVersion": "0.20.0", "contextLength": 262144, "baseArgs": ["--max-model-len", "262144"], "toolCallParser": "mistral", "reasoningParser": "mistral", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "fp8", "vramMinimumGb": 143 }, "nvfp4": { "modelId": "mistralai/Mistral-Small-4-119B-2603-NVFP4", "precision": "nvfp4", "vramMinimumGb": 72 }, "redhat_nvfp4": { "modelId": "RedHatAI/Mistral-Small-4-119B-2603-NVFP4", "precision": "nvfp4", "vramMinimumGb": 72 } } }, "mistralai/Voxtral-4B-TTS-2603": { "file": "models/mistralai/Voxtral-4B-TTS-2603.yaml", "minVllmVersion": "0.20.0", "baseArgs": ["--omni"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 24 } } }, "mistralai/Voxtral-Mini-4B-Realtime-2602": { "file": "models/mistralai/Voxtral-Mini-4B-Realtime-2602.yaml", "minVllmVersion": "0.20.0", "contextLength": 131072, "baseArgs": ["--tokenizer-mode", "mistral", "--compilation_config", '{"cudagraph_mode": "PIECEWISE"}'], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 16 } }, "verifiedGpus": ["dgx_spark_gb10"] }, "moonshotai/Kimi-K2-Instruct": { "file": "models/moonshotai/Kimi-K2-Instruct.yaml", "minVllmVersion": "0.12.0", "contextLength": 131072, "baseArgs": ["--trust-remote-code", "--tokenizer-mode", "auto"], "toolCallParser": "kimi_k2", "variants": { "default": { "precision": "fp8", "vramMinimumGb": 1200 } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x"] }, "moonshotai/Kimi-K2-Thinking": { "file": "models/moonshotai/Kimi-K2-Thinking.yaml", "minVllmVersion": "0.12.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "kimi_k2", "reasoningParser": "kimi_k2", "variants": { "default": { "precision": "int4", "vramMinimumGb": 600 }, "nvfp4": { "modelId": "nvidia/Kimi-K2-Thinking-NVFP4", "precision": "nvfp4", "vramMinimumGb": 600, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "fp8": { "modelId": "RedHatAI/Kimi-K2-Thinking-FP8-Block", "precision": "fp8", "vramMinimumGb": 1200, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x"] }, "moonshotai/Kimi-K2.5": { "file": "models/moonshotai/Kimi-K2.5.yaml", "minVllmVersion": "0.19.1", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "kimi_k2", "reasoningParser": "kimi_k2", "optInFeatures": ["text_only"], "variants": { "default": { "precision": "int4", "vramMinimumGb": 714 }, "nvfp4": { "modelId": "nvidia/Kimi-K2.5-NVFP4", "precision": "nvfp4", "vramMinimumGb": 600, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "mxfp4": { "modelId": "amd/Kimi-K2.5-MXFP4", "precision": "mxfp4", "vramMinimumGb": 669, "extraArgs": ["--kv-cache-dtype", "fp8", "--mm-encoder-tp-mode", "data"] } }, "verifiedGpus": ["h200", "gb200", "mi300x", "mi325x", "mi355x"] }, "moonshotai/Kimi-K2.6": { "file": "models/moonshotai/Kimi-K2.6.yaml", "minVllmVersion": "0.25.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "kimi_k2", "reasoningParser": "kimi_k2", "optInFeatures": ["text_only"], "variants": { "default": { "precision": "int4", "vramMinimumGb": 714 }, "nvfp4": { "modelId": "nvidia/Kimi-K2.6-NVFP4", "precision": "nvfp4", "vramMinimumGb": 600, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "fp8": { "modelId": "RedHatAI/Kimi-K2.6-FP8-BLOCK", "precision": "fp8", "vramMinimumGb": 1200, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_nvfp4": { "modelId": "RedHatAI/Kimi-K2.6-NVFP4", "precision": "nvfp4", "vramMinimumGb": 600 } }, "verifiedGpus": ["h200", "b300", "gb200", "mi300x", "mi325x", "mi355x"] }, "moonshotai/Kimi-K2.7-Code": { "file": "models/moonshotai/Kimi-K2.7-Code.yaml", "minVllmVersion": "0.19.1", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "kimi_k2", "reasoningParser": "kimi_k2", "optInFeatures": ["text_only"], "variants": { "default": { "precision": "int4", "vramMinimumGb": 714 } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x"] }, "moonshotai/Kimi-K3": { "file": "models/moonshotai/Kimi-K3.yaml", "minVllmVersion": "0.29.0", "contextLength": 1048576, "baseArgs": ["--trust-remote-code", "--gpu-memory-utilization", "0.95"], "toolCallParser": "kimi_k3", "reasoningParser": "kimi_k3", "optInFeatures": ["spec_decoding", "text_only", "decode_context_parallelism"], "variants": { "default": { "precision": "mxfp4", "vramMinimumGb": 1680 }, "nvfp4": { "modelId": "RedHatAI/Kimi-K3-NVFP4", "precision": "nvfp4", "vramMinimumGb": 1650 }, "ascend_w4a8": { "modelId": "Eco-Tech/Kimi-K3-w4a8", "precision": "int4", "vramMinimumGb": 1711, "extraArgs": ["--quantization", "ascend", "--enable-prefix-caching", "--enable-expert-parallel", "--max-num-seqs", "16", "--max-model-len", "131072", "--max-num-batched-tokens", "24576", "--gpu-memory-utilization", "0.9", "--compilation-config", '{"cudagraph_mode":"FULL_DECODE_ONLY"}', "--mm-processor-cache-gb", "0", "--additional-config", '{"enable_cpu_binding":true, "enable_flashcomm1":true}', "--mm-encoder-tp-mode", "data", "--limit-mm-per-prompt", '{"vision_chunk": 2}', "--allowed-local-media-path", "/"] }, "fp8": { "modelId": "RedHatAI/Kimi-K3-FP8-BLOCK", "precision": "fp8", "vramMinimumGb": 3360 } }, "verifiedGpus": ["h200", "b200", "b300", "gb200", "gb300", "mi355x", "ascend_910c"] }, "moonshotai/Kimi-Linear-48B-A3B-Instruct": { "file": "models/moonshotai/Kimi-Linear-48B-A3B-Instruct.yaml", "minVllmVersion": "0.11.2", "contextLength": 1048576, "baseArgs": ["--trust-remote-code"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 115 } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x"] }, "nvidia/Cosmos3-Nano": { "file": "models/nvidia/Cosmos3-Nano.yaml", "minVllmVersion": "0.21.0", "contextLength": 262144, "baseArgs": ["--host", "0.0.0.0", "--port", "8000", "--init-timeout", "1800"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 39 } }, "verifiedGpus": ["h200", "h100"] }, "nvidia/Cosmos3-Super-Image2Video": { "file": "models/nvidia/Cosmos3-Super-Image2Video.yaml", "minVllmVersion": "0.21.0", "contextLength": 262144, "baseArgs": ["--host", "0.0.0.0", "--port", "8000", "--cfg-parallel-size", "2", "--ulysses-degree", "4", "--use-hsdp", "--hsdp-shard-size", "8", "--init-timeout", "1800"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 154 } }, "verifiedGpus": ["h200", "h100"] }, "nvidia/Cosmos3-Super-Text2Image": { "file": "models/nvidia/Cosmos3-Super-Text2Image.yaml", "minVllmVersion": "0.21.0", "contextLength": 262144, "baseArgs": ["--host", "0.0.0.0", "--port", "8000", "--cfg-parallel-size", "2", "--ulysses-degree", "4", "--tensor-parallel-size", "1", "--use-hsdp", "--hsdp-shard-size", "8", "--init-timeout", "1800"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 154 } }, "verifiedGpus": ["h200", "h100", "gb200"] }, "nvidia/Cosmos3-Super": { "file": "models/nvidia/Cosmos3-Super.yaml", "minVllmVersion": "0.21.0", "contextLength": 262144, "baseArgs": ["--host", "0.0.0.0", "--port", "8000", "--cfg-parallel-size", "2", "--ulysses-degree", "4", "--use-hsdp", "--hsdp-shard-size", "8", "--init-timeout", "1800"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 154 } }, "verifiedGpus": ["h200", "h100"] }, "nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16": { "file": "models/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16.yaml", "minVllmVersion": "0.17.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code", "--async-scheduling"], "toolCallParser": "qwen3_coder", "reasoningParser": "nano_v3", "optInFeatures": ["long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 72, "extraArgs": ["--kv-cache-dtype", "auto"] }, "fp8": { "modelId": "nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-FP8", "precision": "fp8", "vramMinimumGb": 35, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["h100", "h200", "arc_pro_b60", "arc_pro_b70"] }, "nvidia/NVIDIA-Nemotron-3-Nano-4B-BF16": { "file": "models/nvidia/NVIDIA-Nemotron-3-Nano-4B-BF16.yaml", "minVllmVersion": "0.11.2", "contextLength": 262144, "baseArgs": ["--trust-remote-code", "--async-scheduling"], "toolCallParser": "qwen3_coder", "reasoningParser": "nano_v3", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 10, "extraArgs": ["--kv-cache-dtype", "auto"] }, "fp8": { "modelId": "nvidia/NVIDIA-Nemotron-3-Nano-4B-FP8", "precision": "fp8", "vramMinimumGb": 5, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["h100", "h200", "b200", "arc_pro_b60", "arc_pro_b70"] }, "nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16": { "file": "models/nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16.yaml", "minVllmVersion": "0.17.1", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "qwen3_coder", "reasoningParser": "nemotron_v3", "optInFeatures": ["spec_decoding", "long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 298, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "fp8": { "modelId": "nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8", "precision": "fp8", "vramMinimumGb": 149, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "nvfp4": { "modelId": "nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4", "precision": "nvfp4", "vramMinimumGb": 75 }, "base_bf16": { "modelId": "nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-Base-BF16", "precision": "bf16", "vramMinimumGb": 298 } }, "verifiedGpus": ["h100", "h200", "b200", "dgx_station_gb300", "dgx_spark_gb10", "rtx_pro_6000"] }, "nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16": { "file": "models/nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16.yaml", "minVllmVersion": "0.22.0", "contextLength": 262144, "baseArgs": ["--served-model-name", "nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B", "--trust-remote-code", "--kv-cache-dtype", "fp8", "--max-num-seqs", "16", "--max-model-len", "262144", "--gpu-memory-utilization", "0.90", "--max-num-batched-tokens", "32768", "--enable-flashinfer-autotune", "--async-scheduling", "--mamba-backend", "triton", "--mamba-ssm-cache-dtype", "float32"], "toolCallParser": "qwen3_coder", "reasoningParser": "nemotron_v3", "optInFeatures": ["long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 1320 }, "fp4": { "modelId": "nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-NVFP4", "precision": "nvfp4", "vramMinimumGb": 330 } }, "verifiedGpus": ["b200"] }, "nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16": { "file": "models/nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16.yaml", "minVllmVersion": "0.27.1", "contextLength": 262144, "baseArgs": ["--mamba-backend", "flashinfer", "--mamba-cache-mode", "align", "--enable-prefix-caching", "--max-num-batched-tokens", "16384"], "toolCallParser": "qwen3_coder", "reasoningParser": "nemotron_v3", "optInFeatures": ["spec_decoding", "long_context"], "variants": { "default": { "modelId": "nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-NVFP4", "precision": "nvfp4", "vramMinimumGb": 18, "extraArgs": ["--kv-cache-dtype", "fp8", "--moe-backend", "marlin"] }, "bf16": { "modelId": "nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16", "precision": "bf16", "vramMinimumGb": 72, "extraArgs": ["--moe-backend", "flashinfer_cutlass"] } }, "verifiedGpus": ["h100", "dgx_spark_gb10", "rtx_pro_6000", "dgx_station_gb300"] }, "nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4": { "file": "models/nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4.yaml", "minVllmVersion": "0.31.0", "contextLength": 1048576, "baseArgs": ["--trust-remote-code"], "toolCallParser": "qwen3_coder", "reasoningParser": "nemotron_v3", "optInFeatures": ["local_media"], "variants": { "default": { "precision": "nvfp4", "vramMinimumGb": 91 }, "fp8": { "modelId": "RedHatAI/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-FP8", "precision": "fp8", "vramMinimumGb": 155, "extraArgs": ["--gpu-memory-utilization", "0.89", "--prefix-match-unit", "64", "--block-size", "64", "--compilation-config", '{"max_cudagraph_capture_size":192}', "--enable-expert-parallel", "--max-num-seqs", "128", "--max-model-len", "114688", "--max-num-batched-tokens", "16384", "--enable-prefix-caching", "--async-scheduling", "--mamba-backend", "flashinfer", "--mamba-ssm-cache-dtype", "float16", "--enable-mamba-cache-stochastic-rounding", "--mamba-cache-philox-rounds", "5", "--chat-template-content-format", "string", "--mamba-cache-mode", "align", "--enable-mamba-fine-grained-prefix-cache"] }, "bf16": { "modelId": "nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-BF16", "precision": "bf16", "vramMinimumGb": 299 }, "nvfp4_gb200_4x": { "modelId": "nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4", "precision": "nvfp4", "vramMinimumGb": 91, "extraArgs": ["--enable-expert-parallel", "--max-num-seqs", "512", "--max-model-len", "28672", "--no-enable-prefix-caching", "--async-scheduling", "--mamba-backend", "flashinfer", "--mamba-ssm-cache-dtype", "float16", "--enable-mamba-cache-stochastic-rounding", "--mamba-cache-philox-rounds", "5", "--chat-template-content-format", "string", "--mamba-cache-mode", "align"] }, "bf16_gb200_4x": { "modelId": "nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-BF16", "precision": "bf16", "vramMinimumGb": 299, "extraArgs": ["--enable-expert-parallel", "--max-num-seqs", "512", "--max-model-len", "28672", "--no-enable-prefix-caching", "--async-scheduling", "--mamba-backend", "flashinfer", "--mamba-ssm-cache-dtype", "float32", "--chat-template-content-format", "string", "--mamba-cache-mode", "align"] } }, "verifiedGpus": ["h100", "h200", "gb200", "dgx_spark_gb10", "rtx_pro_6000"] }, "nvidia/NVIDIA-Nemotron-Nano-12B-v2-VL-BF16": { "file": "models/nvidia/NVIDIA-Nemotron-Nano-12B-v2-VL-BF16.yaml", "minVllmVersion": "0.11.1", "contextLength": 131072, "baseArgs": ["--trust-remote-code"], "optInFeatures": ["text_only", "encoder_parallel"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 29 }, "fp8": { "modelId": "nvidia/NVIDIA-Nemotron-Nano-12B-v2-VL-FP8", "precision": "fp8", "vramMinimumGb": 14 }, "nvfp4": { "modelId": "nvidia/NVIDIA-Nemotron-Nano-12B-v2-VL-NVFP4-QAD", "precision": "nvfp4", "vramMinimumGb": 8 } }, "verifiedGpus": ["h100", "b200"] }, "nvidia/NVIDIA-Nemotron-Nano-9B-v2": { "file": "models/nvidia/NVIDIA-Nemotron-Nano-9B-v2.yaml", "minVllmVersion": "0.10.1", "contextLength": 131072, "baseArgs": ["--trust-remote-code"], "toolCallParser": "nemotron_json", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 22 }, "fp8": { "modelId": "nvidia/NVIDIA-Nemotron-Nano-9B-v2-FP8", "precision": "fp8", "vramMinimumGb": 11 }, "nvfp4": { "modelId": "nvidia/NVIDIA-Nemotron-Nano-9B-v2-NVFP4", "precision": "nvfp4", "vramMinimumGb": 6 }, "base": { "modelId": "nvidia/NVIDIA-Nemotron-Nano-9B-v2-Base", "precision": "bf16", "vramMinimumGb": 22 }, "japanese": { "modelId": "nvidia/NVIDIA-Nemotron-Nano-9B-v2-Japanese", "precision": "bf16", "vramMinimumGb": 22 }, "redhat_fp8": { "modelId": "RedHatAI/NVIDIA-Nemotron-Nano-9B-v2-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 11, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["h100", "h200", "b200"] }, "nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16": { "file": "models/nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16.yaml", "minVllmVersion": "0.20.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code", "--max-model-len", "131072", "--media-io-kwargs", '{"video": {"num_frames": 512, "fps": 1}}', "--video-pruning-rate", "0.5"], "toolCallParser": "qwen3_coder", "reasoningParser": "nemotron_v3", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 75 }, "fp8": { "modelId": "nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-FP8", "precision": "fp8", "vramMinimumGb": 38, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "nvfp4": { "modelId": "nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-NVFP4", "precision": "nvfp4", "vramMinimumGb": 28, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["h100", "h200", "b200"] }, "openai/gpt-oss-120b": { "file": "models/openai/gpt-oss-120b.yaml", "minVllmVersion": "0.10.1", "contextLength": 131072, "toolCallParser": "openai", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "mxfp4", "vramMinimumGb": 96 }, "amd_fp8": { "modelId": "amd/gpt-oss-120b-w-mxfp4-a-fp8", "precision": "mxfp4", "vramMinimumGb": 80 } }, "verifiedGpus": ["h100", "h200", "b200", "mi300x", "mi325x", "mi355x", "ironwood", "arc_pro_b70"] }, "openai/gpt-oss-20b": { "file": "models/openai/gpt-oss-20b.yaml", "minVllmVersion": "0.10.1", "contextLength": 131072, "toolCallParser": "openai", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "mxfp4", "vramMinimumGb": 16 } }, "verifiedGpus": ["h100", "h200", "b200", "mi300x", "mi325x", "mi355x", "arc_pro_b60", "arc_pro_b70", "xeon6"] }, "openai/whisper-large-v3": { "file": "models/openai/whisper-large-v3.yaml", "minVllmVersion": "0.7.0", "contextLength": 448, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 4 } }, "verifiedGpus": ["xeon6"] }, "openbmb/MiniCPM-V-4.6": { "file": "models/openbmb/MiniCPM-V-4.6.yaml", "minVllmVersion": "0.22.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "qwen3_coder", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 4 } } }, "openbmb/MiniCPM5-1B": { "file": "models/openbmb/MiniCPM5-1B.yaml", "minVllmVersion": "0.21.0", "contextLength": 131072, "optInFeatures": ["reasoning"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 3 } } }, "openbmb/MiniCPM5-2B": { "file": "models/openbmb/MiniCPM5-2B.yaml", "minVllmVersion": "0.21.0", "contextLength": 131072, "toolCallParser": "minicpm5", "optInFeatures": ["reasoning"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 5 } } }, "openbmb/VoxCPM2": { "file": "models/openbmb/VoxCPM2.yaml", "minVllmVersion": "0.21.0", "baseArgs": ["--omni"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 24 } } }, "pfnet/plamo-3-nict-31b-base": { "file": "models/pfnet/plamo-3-nict-31b-base.yaml", "minVllmVersion": "0.12.0", "contextLength": 4096, "baseArgs": ["--trust-remote-code", "--max-model-len", "4096"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 77 } } }, "poolside/Laguna-M.1": { "file": "models/poolside/Laguna-M.1.yaml", "minVllmVersion": "0.21.0", "contextLength": 262144, "toolCallParser": "poolside_v1", "reasoningParser": "poolside_v1", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 540 }, "fp8": { "modelId": "poolside/Laguna-M.1-FP8", "precision": "fp8", "vramMinimumGb": 270 }, "nvfp4": { "modelId": "poolside/Laguna-M.1-NVFP4", "precision": "nvfp4", "vramMinimumGb": 135 } } }, "poolside/Laguna-S-2.1": { "file": "models/poolside/Laguna-S-2.1.yaml", "minVllmVersion": "0.25.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "poolside_v1", "reasoningParser": "poolside_v1", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 282 }, "fp8": { "modelId": "poolside/Laguna-S-2.1-FP8", "precision": "fp8", "vramMinimumGb": 145 }, "nvfp4": { "modelId": "poolside/Laguna-S-2.1-NVFP4", "precision": "nvfp4", "vramMinimumGb": 86 }, "int4": { "modelId": "poolside/Laguna-S-2.1-INT4", "precision": "int4", "vramMinimumGb": 86 } }, "verifiedGpus": ["h200", "mi325x"] }, "poolside/Laguna-XS-2.1": { "file": "models/poolside/Laguna-XS-2.1.yaml", "minVllmVersion": "0.21.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "poolside_v1", "reasoningParser": "poolside_v1", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 80 }, "fp8": { "modelId": "poolside/Laguna-XS-2.1-FP8", "precision": "fp8", "vramMinimumGb": 40 }, "nvfp4": { "modelId": "poolside/Laguna-XS-2.1-NVFP4", "precision": "nvfp4", "vramMinimumGb": 26 }, "int4": { "modelId": "poolside/Laguna-XS-2.1-INT4", "precision": "int4", "vramMinimumGb": 29 } }, "verifiedGpus": ["h200"] }, "poolside/Laguna-XS.2": { "file": "models/poolside/Laguna-XS.2.yaml", "minVllmVersion": "0.21.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "poolside_v1", "reasoningParser": "poolside_v1", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 80 }, "fp8": { "modelId": "poolside/Laguna-XS.2-FP8", "precision": "fp8", "vramMinimumGb": 40 }, "nvfp4": { "modelId": "poolside/Laguna-XS.2-NVFP4", "precision": "nvfp4", "vramMinimumGb": 26 }, "int4": { "modelId": "poolside/Laguna-XS.2-INT4", "precision": "int4", "vramMinimumGb": 29 }, "redhat_fp8": { "modelId": "RedHatAI/Laguna-XS.2-FP8", "precision": "fp8", "vramMinimumGb": 40, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_nvfp4": { "modelId": "RedHatAI/Laguna-XS.2-NVFP4", "precision": "nvfp4", "vramMinimumGb": 22 } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x"] }, "reflection/Beam-1.0-501B-A23B": { "file": "models/reflection/Beam-1.0-501B-A23B.yaml", "minVllmVersion": "0.33.0", "contextLength": 1048576, "baseArgs": ["--kv-cache-dtype", "fp8"], "toolCallParser": "beam", "reasoningParser": "beam", "optInFeatures": ["spec_decoding"], "variants": { "default": { "modelId": "reflection/Beam-1.0-501B-A23B-NVFP4", "precision": "nvfp4", "vramMinimumGb": 353 }, "fp8": { "modelId": "reflection/Beam-1.0-501B-A23B-FP8", "precision": "fp8", "vramMinimumGb": 604, "extraArgs": ["--moe-backend", "triton"] }, "bf16": { "modelId": "reflection/Beam-1.0-501B-A23B", "precision": "bf16", "vramMinimumGb": 1204, "extraArgs": ["--kv-cache-dtype", "auto"] } }, "unsupportedGpus": ["mi300x", "mi325x", "mi350x", "mi355x"], "verifiedGpus": ["b300", "h200"] }, "stabilityai/stable-audio-open-1.0": { "file": "models/stabilityai/stable-audio-open-1.0.yaml", "minVllmVersion": "0.22.0", "baseArgs": ["--trust-remote-code", "--enforce-eager", "--gpu-memory-utilization", "0.9"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 19 } } }, "stabilityai/stable-diffusion-3.5-medium": { "file": "models/stabilityai/stable-diffusion-3.5-medium.yaml", "minVllmVersion": "0.12.0", "variants": { "default": { "precision": "bf16", "vramMinimumGb": 44 }, "large": { "modelId": "stabilityai/stable-diffusion-3.5-large", "precision": "bf16", "vramMinimumGb": 24 }, "large_turbo": { "modelId": "stabilityai/stable-diffusion-3.5-large-turbo", "precision": "bf16", "vramMinimumGb": 24 } }, "verifiedGpus": ["mi300x", "mi325x", "mi355x"] }, "stepfun-ai/Step-3.5-Flash": { "file": "models/stepfun-ai/Step-3.5-Flash.yaml", "minVllmVersion": "0.15.1", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "step3p5", "reasoningParser": "step3p5", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 470 }, "fp8": { "modelId": "stepfun-ai/Step-3.5-Flash-FP8", "precision": "fp8", "vramMinimumGb": 235 }, "int4": { "modelId": "stepfun-ai/Step-3.5-Flash-INT4", "precision": "int4", "vramMinimumGb": 118 }, "int8": { "modelId": "stepfun-ai/Step-3.5-Flash-INT8", "precision": "int8", "vramMinimumGb": 235 } }, "verifiedGpus": ["h200", "b200"] }, "stepfun-ai/Step-3.7-Flash": { "file": "models/stepfun-ai/Step-3.7-Flash.yaml", "minVllmVersion": "0.23.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code", "--enable-expert-parallel", "--disable-cascade-attn"], "toolCallParser": "step3p5", "reasoningParser": "step3p5", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 475 }, "fp8": { "modelId": "stepfun-ai/Step-3.7-Flash-FP8", "precision": "fp8", "vramMinimumGb": 238 }, "nvfp4": { "modelId": "stepfun-ai/Step-3.7-Flash-NVFP4", "precision": "nvfp4", "vramMinimumGb": 119, "extraArgs": ["--quantization", "modelopt", "--kv-cache-dtype", "fp8", "--gpu-memory-utilization", "0.9", "--async-scheduling"] } }, "verifiedGpus": ["h200", "b200", "dgx_station_gb300"] }, "stepfun-ai/Step-5-Preview": { "file": "models/stepfun-ai/Step-5-Preview.yaml", "contextLength": 1048576, "baseArgs": ["--data-parallel-backend", "mp", "--distributed-executor-backend", "mp", "--disable-custom-all-reduce", "--max-model-len", "1048576", "--max-num-batched-tokens", "16384", "--max-num-seqs", "64", "--gpu-memory-utilization", "0.85", "--enable-prefix-caching"], "toolCallParser": "step5", "reasoningParser": "step5", "variants": { "default": { "precision": "fp8", "vramMinimumGb": 773 }, "nvfp4": { "modelId": "stepfun-ai/Step-5-Preview-NVFP4", "precision": "nvfp4", "vramMinimumGb": 473 } }, "verifiedGpus": ["h200", "b300", "gb300"] }, "tencent/Hunyuan-A13B-Instruct": { "file": "models/tencent/Hunyuan-A13B-Instruct.yaml", "minVllmVersion": "0.11.0", "contextLength": 32768, "baseArgs": ["--trust-remote-code"], "optInFeatures": ["long_context"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 580 }, "fp8": { "modelId": "tencent/Hunyuan-A13B-Instruct-FP8", "precision": "fp8", "vramMinimumGb": 96, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["mi300x", "mi325x", "mi355x"] }, "tencent/HunyuanOCR": { "file": "models/tencent/HunyuanOCR.yaml", "minVllmVersion": "0.12.0", "contextLength": 32768, "baseArgs": ["--no-enable-prefix-caching", "--mm-processor-cache-gb", "0"], "optInFeatures": ["text_only", "encoder_parallel"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 2 } } }, "tencent/Hy3-preview": { "file": "models/tencent/Hy3-preview.yaml", "minVllmVersion": "0.20.0", "contextLength": 262144, "baseArgs": ["--trust-remote-code"], "toolCallParser": "hy_v3", "reasoningParser": "hy_v3", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 708 } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x"] }, "tencent/Hy3": { "file": "models/tencent/Hy3.yaml", "minVllmVersion": "0.28.0", "contextLength": 262144, "toolCallParser": "hy_v3", "reasoningParser": "hy_v3", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 708 }, "fp8": { "modelId": "tencent/Hy3-FP8", "precision": "fp8", "vramMinimumGb": 354 }, "nvfp4": { "modelId": "RedHatAI/Hy3-NVFP4-FP8", "precision": "nvfp4", "vramMinimumGb": 214 } }, "verifiedGpus": ["gb300", "mi300x", "mi355x"] }, "tencent/Hy4-preview": { "file": "models/tencent/Hy4-preview.yaml", "minVllmVersion": "0.29.0", "nightlyRequired": true, "contextLength": 1048576, "toolCallParser": "hy_v4", "reasoningParser": "hy_v4", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 1848 }, "fp8": { "modelId": "tencent/Hy4-preview-FP8", "precision": "mxfp8", "vramMinimumGb": 924 } }, "verifiedGpus": ["b200", "b300", "mi325x", "mi355x"] }, "thinkingmachines/Inkling-Small-NVFP4": { "file": "models/thinkingmachines/Inkling-Small.yaml", "minVllmVersion": "0.26.0", "nightlyRequired": true, "contextLength": 1048576, "baseArgs": ["--trust-remote-code", "--tokenizer-mode", "inkling"], "toolCallParser": "inkling", "reasoningParser": "inkling", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "nvfp4", "vramMinimumGb": 180, "extraArgs": ["--kernel-config.enable_flashinfer_autotune=False"] }, "mxfp4": { "modelId": "EmbeddedLLM/Inkling-Small-MXFP4", "precision": "mxfp4", "vramMinimumGb": 160 }, "bf16": { "modelId": "thinkingmachines/Inkling-Small", "precision": "bf16", "vramMinimumGb": 600 }, "fp8": { "modelId": "RedHatAI/Inkling-Small-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 332, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["mi300x", "mi355x"] }, "thinkingmachines/Inkling-NVFP4": { "file": "models/thinkingmachines/Inkling.yaml", "minVllmVersion": "0.26.0", "nightlyRequired": true, "contextLength": 1048576, "baseArgs": ["--trust-remote-code", "--tokenizer-mode", "inkling"], "toolCallParser": "inkling", "reasoningParser": "inkling", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "nvfp4", "vramMinimumGb": 651, "extraArgs": ["--kernel-config.enable_flashinfer_autotune=False"] }, "mxfp4": { "modelId": "lightseekorg/Inkling-MXFP4", "precision": "mxfp4", "vramMinimumGb": 540 }, "bf16": { "modelId": "thinkingmachines/Inkling", "precision": "bf16", "vramMinimumGb": 2400, "extraArgs": ["--kernel-config.enable_flashinfer_autotune=False"] }, "fp8": { "modelId": "RedHatAI/Inkling-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 1170, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8": { "modelId": "RedHatAI/Inkling-FP8-block", "precision": "fp8", "vramMinimumGb": 1170, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_nvfp4": { "modelId": "RedHatAI/Inkling-NVFP4", "precision": "nvfp4", "vramMinimumGb": 618 } }, "verifiedGpus": ["gb200", "b200", "h200", "mi300x", "mi355x"] }, "vllm-sr/d3-edge": { "file": "models/vllm-sr/d3-edge.yaml", "minVllmVersion": "nightly", "nightlyRequired": true, "contextLength": 262144, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 2 } }, "verifiedGpus": ["mi300x"] }, "vllm-sr/d3-flash": { "file": "models/vllm-sr/d3-flash.yaml", "minVllmVersion": "nightly", "nightlyRequired": true, "contextLength": 262144, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 21 } }, "verifiedGpus": ["mi300x"] }, "vllm-sr/d3-lite": { "file": "models/vllm-sr/d3-lite.yaml", "minVllmVersion": "nightly", "nightlyRequired": true, "contextLength": 262144, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 3 } }, "verifiedGpus": ["mi300x"] }, "vllm-sr/d3-mini": { "file": "models/vllm-sr/d3-mini.yaml", "minVllmVersion": "nightly", "nightlyRequired": true, "contextLength": 262144, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 11 } }, "verifiedGpus": ["mi300x"] }, "vllm-sr/d3-nano": { "file": "models/vllm-sr/d3-nano.yaml", "minVllmVersion": "nightly", "nightlyRequired": true, "contextLength": 262144, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 6 } }, "verifiedGpus": ["mi300x"] }, "vllm-sr/d3": { "file": "models/vllm-sr/d3.yaml", "minVllmVersion": "nightly", "nightlyRequired": true, "contextLength": 262144, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 63 } }, "verifiedGpus": ["mi300x"] }, "zai-org/GLM-4.5": { "file": "models/zai-org/GLM-4.5.yaml", "minVllmVersion": "0.11.0", "contextLength": 131072, "baseArgs": ["--trust-remote-code"], "toolCallParser": "glm45", "reasoningParser": "glm45", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 859 }, "fp8": { "modelId": "zai-org/GLM-4.5-FP8", "precision": "fp8", "vramMinimumGb": 430 } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x"] }, "zai-org/GLM-4.5V": { "file": "models/zai-org/GLM-4.5V.yaml", "minVllmVersion": "0.12.0", "contextLength": 65536, "baseArgs": ["--trust-remote-code", "--enable-expert-parallel", "--allowed-local-media-path", "/", "--mm-encoder-tp-mode", "data", "--mm-processor-cache-type", "shm"], "toolCallParser": "glm45", "reasoningParser": "glm45", "optInFeatures": ["text_only"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 257 }, "fp8": { "modelId": "zai-org/GLM-4.5V-FP8", "precision": "fp8", "vramMinimumGb": 128 } }, "verifiedGpus": ["h100", "h200", "mi300x", "mi325x", "mi355x"] }, "zai-org/GLM-4.6": { "file": "models/zai-org/GLM-4.6.yaml", "minVllmVersion": "0.11.0", "contextLength": 202752, "baseArgs": ["--trust-remote-code"], "toolCallParser": "glm45", "reasoningParser": "glm45", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 857 }, "fp8": { "modelId": "zai-org/GLM-4.6-FP8", "precision": "fp8", "vramMinimumGb": 428 }, "redhat_fp8": { "modelId": "RedHatAI/GLM-4.6-FP8-dynamic", "precision": "fp8", "vramMinimumGb": 429, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "redhat_fp8_plain": { "modelId": "RedHatAI/GLM-4.6-FP8", "precision": "fp8", "vramMinimumGb": 429, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "nvfp4": { "modelId": "RedHatAI/GLM-4.6-NVFP4", "precision": "nvfp4", "vramMinimumGb": 223 } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x"] }, "zai-org/GLM-4.6V": { "file": "models/zai-org/GLM-4.6V.yaml", "minVllmVersion": "0.12.0", "contextLength": 131072, "baseArgs": ["--trust-remote-code", "--enable-expert-parallel", "--allowed-local-media-path", "/", "--mm-encoder-tp-mode", "data", "--mm-processor-cache-type", "shm"], "toolCallParser": "glm45", "reasoningParser": "glm45", "optInFeatures": ["text_only"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 257 }, "fp8": { "modelId": "zai-org/GLM-4.6V-FP8", "precision": "fp8", "vramMinimumGb": 128 } }, "verifiedGpus": ["h100", "h200", "mi300x", "mi325x", "mi355x"] }, "zai-org/GLM-4.7": { "file": "models/zai-org/GLM-4.7.yaml", "minVllmVersion": "0.24.0", "contextLength": 202752, "baseArgs": ["--trust-remote-code"], "toolCallParser": "glm47", "reasoningParser": "glm47", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 859 }, "fp8": { "modelId": "zai-org/GLM-4.7-FP8", "precision": "fp8", "vramMinimumGb": 430 }, "nvfp4": { "modelId": "nvidia/GLM-4.7-NVFP4", "precision": "nvfp4", "vramMinimumGb": 215, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["h200", "mi300x", "mi325x", "mi355x"] }, "zai-org/GLM-5.1": { "file": "models/zai-org/GLM-5.1.yaml", "minVllmVersion": "0.24.0", "contextLength": 202752, "baseArgs": ["--trust-remote-code", "--chat-template-content-format=string"], "toolCallParser": "glm47", "reasoningParser": "glm47", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 1786 }, "fp8": { "modelId": "zai-org/GLM-5.1-FP8", "precision": "fp8", "vramMinimumGb": 893 }, "nvfp4": { "modelId": "nvidia/GLM-5.1-NVFP4", "precision": "nvfp4", "vramMinimumGb": 446, "extraArgs": ["--kv-cache-dtype", "fp8"] }, "mxfp4": { "modelId": "amd/GLM-5.1-MXFP4", "precision": "mxfp4", "vramMinimumGb": 447, "extraArgs": ["--kv-cache-dtype", "fp8_e4m3", "-cc.pass_config.fuse_allreduce_rms=False", "--block-size=1", "--enable-prefix-caching", "--max-num-seqs", "64"] } }, "verifiedGpus": ["h200", "mi325x", "mi350x", "mi355x"] }, "zai-org/GLM-5.2": { "file": "models/zai-org/GLM-5.2.yaml", "minVllmVersion": "0.24.0", "contextLength": 1048576, "baseArgs": ["--kv-cache-dtype", "fp8_e4m3"], "toolCallParser": "glm47", "reasoningParser": "glm47", "optInFeatures": ["spec_decoding"], "variants": { "default": { "modelId": "zai-org/GLM-5.2-FP8", "precision": "fp8", "vramMinimumGb": 893 }, "mxfp4": { "modelId": "amd/GLM-5.2-MXFP4", "precision": "mxfp4", "vramMinimumGb": 446 }, "nvfp4": { "modelId": "nvidia/GLM-5.2-NVFP4", "precision": "nvfp4", "vramMinimumGb": 558 }, "redhat_nvfp4": { "modelId": "RedHatAI/GLM-5.2-NVFP4-FP8", "precision": "nvfp4", "vramMinimumGb": 558 }, "bf16": { "precision": "bf16", "vramMinimumGb": 1786 }, "redhat_fp8": { "modelId": "RedHatAI/GLM-5.2-FP8", "precision": "fp8", "vramMinimumGb": 892 }, "redhat_nvfp4_plain": { "modelId": "RedHatAI/GLM-5.2-NVFP4", "precision": "nvfp4", "vramMinimumGb": 477 } }, "verifiedGpus": ["b300", "b200", "mi300x", "mi325x", "mi350x", "mi355x"] }, "zai-org/GLM-5.3-Flash": { "file": "models/zai-org/GLM-5.3-Flash.yaml", "minVllmVersion": "0.29.0", "nightlyRequired": true, "contextLength": 1048576, "toolCallParser": "glm47", "reasoningParser": "glm47", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "fp8", "vramMinimumGb": 386 }, "nvfp4": { "modelId": "RedHatAI/GLM-5.3-Flash-NVFP4", "precision": "nvfp4", "vramMinimumGb": 229 }, "bf16": { "modelId": "zai-org/GLM-5.3-Flash-BF16", "precision": "bf16", "vramMinimumGb": 772 } }, "verifiedGpus": ["h100", "b200", "gb200", "mi355x", "ascend_950pr_8x"] }, "zai-org/GLM-5.3": { "file": "models/zai-org/GLM-5.3.yaml", "minVllmVersion": "0.29.0", "contextLength": 1048576, "baseArgs": ["--kv-cache-dtype", "fp8_e4m3"], "toolCallParser": "glm47", "reasoningParser": "glm47", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "fp8", "vramMinimumGb": 893 }, "nvfp4": { "modelId": "Inferact/GLM-5.3-NVFP4", "precision": "nvfp4", "vramMinimumGb": 558 }, "w4a8": { "modelId": "gpustack/GLM-5.3-W4A8", "precision": "int4", "vramMinimumGb": 447, "extraArgs": ["--enable-expert-parallel", "--trust-remote-code"] }, "bf16": { "modelId": "zai-org/GLM-5.3-BF16", "precision": "bf16", "vramMinimumGb": 1786 } }, "verifiedGpus": ["b300", "h200", "mi325x", "mi350x", "ascend_950pr_8x", "dgx_station_gb300"] }, "zai-org/GLM-5": { "file": "models/zai-org/GLM-5.yaml", "minVllmVersion": "0.24.0", "contextLength": 202752, "baseArgs": ["--trust-remote-code", "--chat-template-content-format=string"], "toolCallParser": "glm47", "reasoningParser": "glm47", "optInFeatures": ["spec_decoding"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 1786 }, "fp8": { "modelId": "zai-org/GLM-5-FP8", "precision": "fp8", "vramMinimumGb": 893 }, "nvfp4": { "modelId": "nvidia/GLM-5-NVFP4", "precision": "nvfp4", "vramMinimumGb": 446, "extraArgs": ["--kv-cache-dtype", "fp8"] } }, "verifiedGpus": ["h200", "mi325x", "mi350x"] }, "zai-org/GLM-ASR-Nano-2512": { "file": "models/zai-org/GLM-ASR-Nano-2512.yaml", "minVllmVersion": "0.14.1", "contextLength": 8192, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 11 } } }, "zai-org/GLM-GA": { "file": "models/zai-org/GLM-GA.yaml", "minVllmVersion": "0.21.0", "contextLength": 131072, "baseArgs": ["--trust-remote-code", "--allowed-local-media-path", "/", "--mm-processor-cache-type", "shm", "--reasoning-parser", "glm45"], "optInFeatures": ["text_only"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 29 } } }, "zai-org/GLM-Image": { "file": "models/zai-org/GLM-Image.yaml", "minVllmVersion": "0.11.0", "contextLength": 4096, "baseArgs": ["--trust-remote-code"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 38 } }, "verifiedGpus": ["h100"] }, "zai-org/GLM-OCR": { "file": "models/zai-org/GLM-OCR.yaml", "minVllmVersion": "0.16.0", "contextLength": 131072, "optInFeatures": ["text_only", "encoder_parallel"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 2 } } }, "zai-org/GLM-TTS": { "file": "models/zai-org/GLM-TTS.yaml", "minVllmVersion": "0.22.0", "baseArgs": ["--omni", "--trust-remote-code"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 24 } } }, "zai-org/Glyph": { "file": "models/zai-org/Glyph.yaml", "minVllmVersion": "0.11.0", "contextLength": 131072, "baseArgs": ["--no-enable-prefix-caching", "--mm-processor-cache-gb", "0", "--limit-mm-per-prompt.video", "0"], "reasoningParser": "glm45", "optInFeatures": ["text_only", "encoder_parallel"], "variants": { "default": { "precision": "bf16", "vramMinimumGb": 24 } }, "verifiedGpus": ["h100", "mi300x", "mi325x"] }, "zai-org/glm-4-9b-hf": { "file": "models/zai-org/glm-4-9b-hf.yaml", "minVllmVersion": "0.6.5", "contextLength": 8192, "variants": { "default": { "precision": "bf16", "vramMinimumGb": 22 } }, "verifiedGpus": ["xeon6"] } } };
46978
+
46979
+ // src/utils/serveConfigCheck.ts
45458
46980
  var SERVE_ENGINES = ["vllm", "sglang", "llamacpp"];
45459
- var SERVE_BASIS = "Derived from config.json, the engine flags and the card, not measured. Card memory is the nominal GB; the engine's own reserve (activation profiling, CUDA graphs, communication buffers) is not counted, so every KV capacity and concurrency here is an upper bound. Template checks read files and do not render a conversation, so they cannot prove two stacks produce the same prompt.";
46981
+ var SERVE_VALIDATION = {
46982
+ llmdRuns: 16,
46983
+ llmdKvMae: 0.33,
46984
+ poolLogs: 21,
46985
+ poolTokensMae: 1.07,
46986
+ poolConcMae: 3.95,
46987
+ e2eLogs: 9,
46988
+ e2eKvMedian: 7.63,
46989
+ /** Table D, the CUDA graph term against vLLM's printed estimate, out-of-sample rows without #50780 (GiB). */
46990
+ graphLogs: 10,
46991
+ graphMaeGib: 0.38,
46992
+ graphConstantMaeGib: 0.63,
46993
+ /** Table E, vision-language launches end to end, KV GiB. */
46994
+ mmLogs: 10,
46995
+ mmKvMedian: 5.96
46996
+ };
46997
+ var SERVE_BASIS = `Predicted from config.json, the engine flags and the card, not measured. Memory follows each engine's own arithmetic, ported from its source (vLLM's KV cache groups and blocks, SGLang's mem_fraction_static formula, llama.cpp's sliding-window cells); the terms an engine measures at startup (vLLM's activation peak, non-torch memory and CUDA graph pool) are estimates and are marked as such. Checked against vLLM's own logged numbers: ${SERVE_VALIDATION.llmdRuns} llm-d-planner H100 runs, KV memory mean absolute error ${SERVE_VALIDATION.llmdKvMae}% (in-sample for one fitted factor); given the KV memory vLLM logged, ${SERVE_VALIDATION.poolLogs} public logs, token count ${SERVE_VALIDATION.poolTokensMae}% and concurrency ${SERVE_VALIDATION.poolConcMae}%; end to end on ${SERVE_VALIDATION.e2eLogs} public logs, median ${SERVE_VALIDATION.e2eKvMedian}% with outliers past 100%; vision-language launches end to end on ${SERVE_VALIDATION.mmLogs} public logs, median ${SERVE_VALIDATION.mmKvMedian}%; the CUDA graph term against the estimate vLLM printed, ${SERVE_VALIDATION.graphLogs} held-out public logs, mean absolute error ${SERVE_VALIDATION.graphMaeGib} GiB (scripts/serve-check-validation.ts). Template checks read files and do not render a conversation, so they cannot prove two stacks produce the same prompt.`;
46998
+ var SERVE_BASIS_UPPER_BOUND = "The config gave no layer geometry, so memory was sized from the graph alone: the engine's reserve (activation profiling, CUDA graphs, communication buffers) is not counted and the card's nominal GB is used, so every KV capacity and concurrency here is an upper bound.";
45460
46999
  var CARD_SM = {
45461
47000
  "b200": 100,
45462
47001
  "h200": 90,
@@ -45469,8 +47008,47 @@ var CARD_SM = {
45469
47008
  "t4": 75,
45470
47009
  "v100": 70,
45471
47010
  "rtx-4090": 89,
45472
- "rtx-3090": 86
47011
+ "rtx-3090": 86,
47012
+ // Serve-check cards below (SERVE_EXTRA_CARDS): CUDA compute capability from NVIDIA's public list (developer.nvidia.com/cuda-gpus).
47013
+ "a40": 86,
47014
+ "gh200-96g": 90,
47015
+ "gh200-144g": 90,
47016
+ "rtx-pro-6000": 120
45473
47017
  };
47018
+ var SERVE_EXTRA_CARDS = [
47019
+ { id: "a40", label: "A40 (48 GB)", tier: "datacenter", memoryGB: 48, bf16TFLOPS: 149.7, fp32TFLOPS: 37.4, memBandwidthGBs: 696, nvlinkGBs: 0, nodeEgressGBs: 0 },
47020
+ { id: "gh200-96g", label: "GH200 (96 GB HBM3)", tier: "datacenter", memoryGB: 96, bf16TFLOPS: 989, fp32TFLOPS: 67, memBandwidthGBs: 4e3, nvlinkGBs: 450, nodeEgressGBs: 400 },
47021
+ { id: "gh200-144g", label: "GH200 (144 GB HBM3e)", tier: "datacenter", memoryGB: 144, bf16TFLOPS: 989, fp32TFLOPS: 67, memBandwidthGBs: 4900, nvlinkGBs: 450, nodeEgressGBs: 400 },
47022
+ { id: "rtx-pro-6000", label: "RTX PRO 6000 Blackwell (96 GB)", tier: "datacenter", memoryGB: 96, bf16TFLOPS: 0, fp32TFLOPS: 0, memBandwidthGBs: 1792, nvlinkGBs: 0, nodeEgressGBs: 0 },
47023
+ { id: "ascend-910b", label: "Ascend 910B (64 GB)", tier: "datacenter", memoryGB: 64, bf16TFLOPS: 0, fp32TFLOPS: 0, memBandwidthGBs: 1600, nvlinkGBs: 0, nodeEgressGBs: 0 }
47024
+ ];
47025
+ var baseCardId = (id) => id.split("@")[0];
47026
+ var smOfCard = (id) => CARD_SM[baseCardId(id)] ?? null;
47027
+ function resolveServeGpu(id, memGiB) {
47028
+ let base = null;
47029
+ if (id != null && id !== "" && id !== "custom") {
47030
+ const norm = (s) => s.toLowerCase().replace(/[^a-z0-9]/g, "");
47031
+ const want = norm(id);
47032
+ base = SERVE_EXTRA_CARDS.find((g3) => norm(g3.id) === want) ?? null;
47033
+ if (!base) {
47034
+ const extraHits = SERVE_EXTRA_CARDS.filter((g3) => norm(g3.id).startsWith(want) || norm(g3.label).startsWith(want));
47035
+ const main = resolveLayoutGpu(id);
47036
+ if (main && !extraHits.length) base = main;
47037
+ else if (!main && extraHits.length === 1) base = extraHits[0];
47038
+ else if (main && extraHits.length) base = null;
47039
+ }
47040
+ if (!base) return null;
47041
+ }
47042
+ if (memGiB == null) return base;
47043
+ if (!(memGiB > 0)) return null;
47044
+ const g = Math.round(memGiB * 100) / 100;
47045
+ return {
47046
+ ...base ?? { id: "custom", label: "custom card", tier: "datacenter", bf16TFLOPS: 0, fp32TFLOPS: 0, memBandwidthGBs: 0, nvlinkGBs: 0, nodeEgressGBs: 0 },
47047
+ id: `${base?.id ?? "custom"}@${g}`,
47048
+ label: `${base ? base.label.replace(/\s*\(.*\)$/, "") : "custom card"} (${g} GiB, --gpu-mem)`,
47049
+ memoryGB: Math.round(g * GiB / 1e9 * 100) / 100
47050
+ };
47051
+ }
45474
47052
  var VLLM_QUANT_TABLE = 'vLLM docs, "Supported Hardware" quantization table (docs.vllm.ai/en/latest/features/quantization/)';
45475
47053
  var QUANT_SUPPORT = [
45476
47054
  {
@@ -45643,6 +47221,14 @@ function readTokenCount(v) {
45643
47221
  const n2 = Math.round(Number(m[1]) * mult);
45644
47222
  return n2 > 0 ? n2 : null;
45645
47223
  }
47224
+ function readHumanBytes(v) {
47225
+ const m = /^\s*(\d+(?:\.\d+)?)\s*([kKmMgGtT]?)\s*$/.exec(String(v ?? ""));
47226
+ if (!m) return null;
47227
+ const pow = { "": 0, k: 1, m: 2, g: 3, t: 4 }[m[2].toLowerCase()];
47228
+ const base = m[2] && m[2] === m[2].toUpperCase() ? 1024 : 1e3;
47229
+ const n2 = Math.round(Number(m[1]) * base ** pow);
47230
+ return n2 > 0 ? n2 : null;
47231
+ }
45646
47232
  var num3 = (v) => {
45647
47233
  const n2 = typeof v === "number" ? v : typeof v === "string" && v.trim() !== "" ? Number(v) : NaN;
45648
47234
  return Number.isFinite(n2) ? n2 : null;
@@ -45687,6 +47273,7 @@ var BOOL_FLAGS = /* @__PURE__ */ new Set([
45687
47273
  "--kv-unified",
45688
47274
  "-no-kvu",
45689
47275
  "--no-kv-unified",
47276
+ "--swa-full",
45690
47277
  "--mlock",
45691
47278
  "--no-mmap",
45692
47279
  "--verbose",
@@ -45694,7 +47281,8 @@ var BOOL_FLAGS = /* @__PURE__ */ new Set([
45694
47281
  "--metrics",
45695
47282
  "--embedding",
45696
47283
  "--embeddings",
45697
- "--async-scheduling"
47284
+ "--async-scheduling",
47285
+ "--skip-mm-profiling"
45698
47286
  ]);
45699
47287
  function parseServeCommand(cmd, engineHint) {
45700
47288
  const tokens = Array.isArray(cmd) ? cmd : tokenizeCommand(cmd);
@@ -45769,6 +47357,31 @@ function parseServeCommand(cmd, engineHint) {
45769
47357
  const ogc = parseJsonObject(get("--override-generation-config"));
45770
47358
  if (ogc) args.samplerFlags = readSampler(ogc);
45771
47359
  if (has("--enable-auto-tool-choice")) args.enableAutoToolChoice = true;
47360
+ setNum("maxNumBatchedTokens", get("--max-num-batched-tokens"), readTokenCount);
47361
+ if (has("--enforce-eager")) args.enforceEager = true;
47362
+ setNum("blockSize", get("--block-size"));
47363
+ setNum("kvCacheMemoryBytes", get("--kv-cache-memory-bytes"), readHumanBytes);
47364
+ const lim = get("--limit-mm-per-prompt");
47365
+ if (lim != null) {
47366
+ const o = parseJsonObject(lim) ?? Object.fromEntries(lim.split(",").map((kv) => kv.split("=")).filter((x) => x.length === 2).map(([k, v]) => [k.trim(), Number(v)]));
47367
+ const out = {};
47368
+ for (const [k, v] of Object.entries(o)) {
47369
+ const n2 = typeof v === "object" && v ? Number(v.count ?? NaN) : Number(v);
47370
+ if (Number.isFinite(n2) && n2 >= 0) out[k] = n2;
47371
+ }
47372
+ if (Object.keys(out).length) args.limitMmPerPrompt = out;
47373
+ }
47374
+ const mpk = parseJsonObject(get("--mm-processor-kwargs"));
47375
+ if (mpk) args.mmProcessorKwargs = mpk;
47376
+ if (has("--skip-mm-profiling")) args.skipMmProfiling = true;
47377
+ const cc = parseJsonObject(get("--compilation-config", "-cc", "-O"));
47378
+ if (cc) {
47379
+ if (Array.isArray(cc.cudagraph_capture_sizes)) args.cudagraphCaptureSizes = cc.cudagraph_capture_sizes.map(Number).filter((n2) => Number.isInteger(n2) && n2 > 0);
47380
+ if (posInt4(cc.max_cudagraph_capture_size) != null) args.maxCudagraphCaptureSize = posInt4(cc.max_cudagraph_capture_size);
47381
+ if (cc.cudagraph_mode != null) args.cudagraphMode = String(cc.cudagraph_mode).toUpperCase();
47382
+ }
47383
+ const spec = parseJsonObject(get("--speculative-config"));
47384
+ if (spec && posInt4(spec.num_speculative_tokens) != null) args.numSpeculativeTokens = posInt4(spec.num_speculative_tokens);
45772
47385
  } else {
45773
47386
  args.model = get("--model-path", "--model");
45774
47387
  setNum("tp", get("--tp-size", "--tp", "--tensor-parallel-size"));
@@ -45783,6 +47396,10 @@ function parseServeCommand(cmd, engineHint) {
45783
47396
  if (over?.rope_scaling && typeof over.rope_scaling === "object") args.ropeScaling = over.rope_scaling;
45784
47397
  if (over && posInt4(over.max_position_embeddings) != null) args.maxPositionOverride = posInt4(over.max_position_embeddings);
45785
47398
  args.generationConfigMode = get("--sampling-defaults");
47399
+ setNum("chunkedPrefillSize", get("--chunked-prefill-size"), num3);
47400
+ if (has("--disable-cuda-graph")) args.enforceEager = true;
47401
+ if (has("--enable-dp-attention")) args.dpAttention = true;
47402
+ if (/deepep/i.test(get("--moe-a2a-backend") ?? "")) args.deepep = true;
45786
47403
  }
45787
47404
  args.dtype = get("--dtype");
45788
47405
  args.quantization = get("--quantization", "-q");
@@ -45826,7 +47443,11 @@ function parseServeCommand(cmd, engineHint) {
45826
47443
  const rp = num3(get("--repeat-penalty"));
45827
47444
  if (rp != null) s.repetition_penalty = rp;
45828
47445
  if (Object.keys(s).length) args.samplerFlags = s;
47446
+ setNum("nUbatch", get("-ub", "--ubatch-size"));
47447
+ if (has("--swa-full")) args.swaFull = true;
45829
47448
  }
47449
+ has("--trust-remote-code");
47450
+ if (flags.size) args.flags = [...flags.keys()];
45830
47451
  for (const k of Object.keys(args)) if (args[k] == null) delete args[k];
45831
47452
  const ignored = [...flags.keys()].filter((f) => !used.has(f));
45832
47453
  return { engine, args, ignored };
@@ -45865,7 +47486,7 @@ function normalizeQuant(q) {
45865
47486
  return s;
45866
47487
  }
45867
47488
  function checkpointQuant(config) {
45868
- const qc = config?.quantization_config ?? null;
47489
+ const qc = config?.quantization_config ?? (config ? textConfigOf(config).quantization_config : null) ?? null;
45869
47490
  if (!qc || typeof qc !== "object") return { method: null, raw: null, bits: null, blockN: null };
45870
47491
  let raw = qc.quant_method != null ? String(qc.quant_method) : null;
45871
47492
  let bits = posInt4(qc.bits) ?? posInt4(qc.w_bit);
@@ -45882,7 +47503,8 @@ function checkpointQuant(config) {
45882
47503
  }
45883
47504
  if (raw === "bitsandbytes") bits = qc.load_in_8bit === true ? 8 : 4;
45884
47505
  const wbs = Array.isArray(qc.weight_block_size) ? qc.weight_block_size.map(posInt4) : null;
45885
- return { method: normalizeQuant(raw), raw, bits, blockN: wbs?.[0] ?? null };
47506
+ const store = qc.store_dtype != null ? normalizeQuant(String(qc.store_dtype)) : null;
47507
+ return { method: normalizeQuant(raw), raw, bits, blockN: wbs?.[0] ?? null, store };
45886
47508
  }
45887
47509
  var isMoe = (c) => /moe/i.test(c.type);
45888
47510
  var isLmHead = (c, comps) => c.type === "linear" && comps.filter((x) => x.type === "linear").pop() === c;
@@ -45917,6 +47539,11 @@ function ggufQuantOf(file) {
45917
47539
  }
45918
47540
  return null;
45919
47541
  }
47542
+ function derivedMaxLenRaw(config) {
47543
+ if (!config) return null;
47544
+ const c = textConfigOf(config);
47545
+ return posInt4(c.max_position_embeddings) ?? posInt4(c.n_positions) ?? null;
47546
+ }
45920
47547
  function derivedMaxLen(config, ropeOverride, maxPosOverride, graphMax) {
45921
47548
  const c = config ?? {};
45922
47549
  const native = maxPosOverride ?? posInt4(c.max_position_embeddings) ?? posInt4(c.n_positions) ?? posInt4(c.max_seq_len) ?? posInt4(c.seq_length) ?? graphMax ?? null;
@@ -45926,6 +47553,7 @@ function derivedMaxLen(config, ropeOverride, maxPosOverride, graphMax) {
45926
47553
  const type = String(rope.rope_type ?? rope.type ?? "").toLowerCase();
45927
47554
  const factor = num3(rope.factor);
45928
47555
  if (!factor || ["llama3", "longrope", "su", "mrope", "default"].includes(type)) return { len: native, native, rope };
47556
+ if (!ropeOverride && /gemma3/.test(String(c.model_type ?? ""))) return { len: native, native, rope };
45929
47557
  const base = type === "yarn" ? posInt4(rope.original_max_position_embeddings) ?? native : native;
45930
47558
  return { len: Math.floor(base * factor), native, rope };
45931
47559
  }
@@ -45947,12 +47575,907 @@ function templateHash(s) {
45947
47575
  }
45948
47576
  return (h >>> 0).toString(16).padStart(8, "0");
45949
47577
  }
47578
+ var VLLM_SRC = "vllm-project/vllm@83c9a547bf";
47579
+ var SGLANG_SRC = "sgl-project/sglang@80914b7c9b";
47580
+ var TRTLLM_SRC = "NVIDIA/TensorRT-LLM@8e4f13322e";
47581
+ var LLAMACPP_SRC = "ggml-org/llama.cpp@547208dca";
47582
+ var cdiv = (a, b) => Math.ceil(a / b);
47583
+ var GiB = 1024 ** 3;
47584
+ var CARD_NVSMI_MIB = {
47585
+ "b200": { mib: 183359, approx: true },
47586
+ "h200": { mib: 143771 },
47587
+ "h100-sxm": { mib: 81559 },
47588
+ "a100-80g": { mib: 81920 },
47589
+ "a100-40g": { mib: 40960 },
47590
+ "l40s": { mib: 46068 },
47591
+ "l4": { mib: 23034 },
47592
+ "a10g": { mib: 23028 },
47593
+ "t4": { mib: 15360 },
47594
+ "v100": { mib: 16384, approx: true },
47595
+ "rtx-4090": { mib: 24564 },
47596
+ "rtx-3090": { mib: 24576 },
47597
+ "a40": { mib: 46068, approx: true },
47598
+ "gh200-96g": { mib: 97871, approx: true },
47599
+ "gh200-144g": { mib: 146831, approx: true },
47600
+ "rtx-pro-6000": { mib: 97887, approx: true }
47601
+ };
47602
+ var CARD_TORCH_TOTAL_GIB = {
47603
+ "h100-sxm": { gib: 79.19, source: 'vLLM log, llm-d-planner accuracy report (H100-80GB "physical 79.19 GiB")' },
47604
+ "a100-80g": { gib: 79.15, source: 'vLLM log "total_gpu_memory (79.15GiB)" on A100-SXM4-80GB (github.com/vllm-project/vllm/issues/18446)' }
47605
+ };
47606
+ var TORCH_GAP_MIB = 81559 - 79.19 * 1024;
47607
+ function cardTotalGiB(cardId, nominalGb) {
47608
+ const at = /@(\d+(?:\.\d+)?)$/.exec(cardId);
47609
+ if (at) return { gib: Number(at[1]), source: "given by --gpu-mem" };
47610
+ const t = CARD_TORCH_TOTAL_GIB[cardId];
47611
+ if (t) return t;
47612
+ const n2 = CARD_NVSMI_MIB[cardId];
47613
+ if (n2) return { gib: Math.round((n2.mib - TORCH_GAP_MIB) / 1024 * 100) / 100, source: `derived: nvidia-smi ${n2.mib} MiB less the ${Math.round(TORCH_GAP_MIB)} MiB gap measured on H100` };
47614
+ return { gib: Math.round(nominalGb * 0.9899 * 100) / 100, source: "derived: nominal GB x 0.9899 (the H100 ratio)" };
47615
+ }
47616
+ function readEngineVersion(v) {
47617
+ const m = /^\s*v?(\d+)\.(\d+)(?:\.(\d+))?/.exec(String(v ?? ""));
47618
+ return m ? [Number(m[1]), Number(m[2]), Number(m[3] ?? 0)] : null;
47619
+ }
47620
+ var vAtLeast = (v, w) => {
47621
+ for (let i = 0; i < 3; i++) {
47622
+ if ((v[i] ?? 0) !== w[i]) return (v[i] ?? 0) > w[i];
47623
+ }
47624
+ return true;
47625
+ };
47626
+ var ASSUMED_VLLM_VERSION = "0.32.0";
47627
+ var ASSUMED_SGLANG_VERSION = "0.5.22";
47628
+ function vllmVersionDefaults(version, card, pp) {
47629
+ const v20 = vAtLeast(version, [0, 20, 0]);
47630
+ const v26 = vAtLeast(version, [0, 26, 0]);
47631
+ const totalGib = cardTotalGiB(card.id, card.memoryGB).gib;
47632
+ const big = totalGib >= 70 && !/a100/.test(card.id);
47633
+ const huge = totalGib >= 160 && vAtLeast(version, [0, 26, 0]);
47634
+ return {
47635
+ gpuMemoryUtilization: v20 ? 0.92 : 0.9,
47636
+ cudaGraphsCounted: v20,
47637
+ maxNumBatchedTokens: huge ? 16384 : big ? 8192 : 2048,
47638
+ maxNumSeqs: big || huge ? 1024 : 256,
47639
+ inFlightBatches: v26 ? pp > 1 ? pp : 2 : 1,
47640
+ printsTokensAs: vAtLeast(version, [0, 21, 0]) ? "concurrency" : "blocks",
47641
+ linearRecurrentAlign: vAtLeast(version, [0, 15, 0])
47642
+ };
47643
+ }
47644
+ function textConfigOf(c) {
47645
+ if (posInt4(c.num_hidden_layers) != null || posInt4(c.n_layer) != null || posInt4(c.num_layers) != null || posInt4(c.decoder_layers) != null) return c;
47646
+ for (const k of ["text_config", "llm_config", "language_config", "text_model_config"]) {
47647
+ const t = c[k];
47648
+ if (t && typeof t === "object") return t;
47649
+ }
47650
+ const th = c.thinker_config;
47651
+ if (th?.text_config && typeof th.text_config === "object") return th.text_config;
47652
+ return c;
47653
+ }
47654
+ var DTYPE_BYTES_OF = (s, fallback) => {
47655
+ const t = String(s ?? "").toLowerCase();
47656
+ if (/float32|fp32/.test(t)) return 4;
47657
+ if (/bfloat16|float16|bf16|fp16|half/.test(t)) return 2;
47658
+ return fallback;
47659
+ };
47660
+ function kvLayoutFromConfig(config, opts) {
47661
+ const top = config;
47662
+ const c = textConfigOf(config);
47663
+ const notes = [];
47664
+ const mt = String(top.model_type ?? c.model_type ?? "").toLowerCase();
47665
+ const tp = Math.max(1, opts.tp);
47666
+ const n2 = posInt4(c.num_hidden_layers) ?? posInt4(c.n_layer) ?? posInt4(c.num_layers) ?? posInt4(c.decoder_layers);
47667
+ if (n2 == null) return null;
47668
+ const hidden = posInt4(c.hidden_size) ?? posInt4(c.d_model) ?? posInt4(c.n_embd);
47669
+ const heads = posInt4(c.num_attention_heads) ?? posInt4(c.n_head) ?? posInt4(c.decoder_attention_heads);
47670
+ const kvHeads = posInt4(c.num_key_value_heads) ?? (c.multi_query === true ? 1 : null) ?? posInt4(c.num_kv_heads) ?? heads;
47671
+ const headDim = posInt4(c.head_dim) ?? (hidden && heads ? hidden / heads : null);
47672
+ const kvRank = kvHeads != null ? Math.max(1, Math.floor(kvHeads / tp)) : null;
47673
+ const replicated = kvHeads != null && tp > kvHeads;
47674
+ const attnBytes = kvRank != null && headDim != null ? kvRank * headDim * 2 * opts.kvBytes : null;
47675
+ if (Array.isArray(c.compress_ratios) && posInt4(c.sliding_window) != null && headDim != null) {
47676
+ const ratios = c.compress_ratios.map((x) => Number(x) || 0);
47677
+ const swin = posInt4(c.sliding_window);
47678
+ const rec = headDim * opts.kvBytes;
47679
+ const sources = new Set(Array.isArray(c.kv_source_layer_ids) ? c.kv_source_layer_ids.map(Number) : []);
47680
+ const idxSources = new Set(Array.isArray(c.index_source_layer_ids) ? c.index_source_layer_ids.map(Number) : []);
47681
+ const idxDim = posInt4(c.index_head_dim);
47682
+ const idxRec = idxDim != null ? idxDim + Math.floor(idxDim / 128) * 4 : null;
47683
+ const out = [];
47684
+ for (let i = 0; i < n2; i++) {
47685
+ out.push({ kind: "sliding", bytesPerToken: rec, window: swin });
47686
+ const r = ratios[i] ?? 0;
47687
+ if (r > 0 && sources.has(i)) out.push({ kind: "mla", bytesPerToken: rec, tokensPerState: r });
47688
+ if (r > 0 && idxSources.has(i) && idxRec != null) out.push({ kind: "mla", bytesPerToken: idxRec, tokensPerState: r });
47689
+ }
47690
+ const comp = out.filter((l) => l.kind === "mla");
47691
+ notes.push(`${mt}: ${n2} sliding-window records (window ${swin}, ${headDim} values, one KV head on every rank) plus ${comp.length} compressed full-length caches on the kv / index source layers (compress ratios ${[...new Set(comp.map((l) => l.tokensPerState))].join(", ")}); packed record widths and page alignment are not modelled (${VLLM_SRC.split("@")[0]} vllm/models/deepseek_v41/attention.py)`);
47692
+ return { layers: out, notes, kvHeadsPerRank: 1, replicated: false, recurrentFamily: null };
47693
+ }
47694
+ const kvLora = posInt4(c.kv_lora_rank);
47695
+ const rope = posInt4(c.qk_rope_head_dim);
47696
+ const mlaBytes = kvLora != null ? (kvLora + (rope ?? 0)) * opts.kvBytes : null;
47697
+ if (kvLora != null) notes.push(`MLA: ${kvLora} + ${rope ?? 0} latent values per token per layer, the same on every TP rank (${VLLM_SRC} MLAAttentionSpec, head_size_v = 0)`);
47698
+ const ssmBytes = DTYPE_BYTES_OF(c.mamba_ssm_cache_dtype, opts.modelBytes);
47699
+ const mambaState = () => {
47700
+ const conv = posInt4(c.conv_kernel) ?? posInt4(c.mamba_d_conv) ?? posInt4(c.d_conv) ?? posInt4(c.linear_conv_kernel_dim) ?? 4;
47701
+ const kda = c.linear_attn_config;
47702
+ if (kda && posInt4(kda.num_heads) && posInt4(kda.head_dim)) {
47703
+ const h = posInt4(kda.num_heads), d = posInt4(kda.head_dim), k = posInt4(kda.short_conv_kernel_size) ?? 4;
47704
+ return 3 * h * d / tp * (k - 1) * opts.modelBytes + h / tp * d * d * ssmBytes;
47705
+ }
47706
+ const nk = posInt4(c.linear_num_key_heads), nv = posInt4(c.linear_num_value_heads);
47707
+ const hk = posInt4(c.linear_key_head_dim), hv = posInt4(c.linear_value_head_dim);
47708
+ if (nk && nv && hk && hv) {
47709
+ const convDim2 = hk * nk * 2 + hv * nv;
47710
+ return convDim2 / tp * (conv - 1) * opts.modelBytes + nv / tp * hv * hk * ssmBytes;
47711
+ }
47712
+ const nh = posInt4(c.mamba_num_heads) ?? posInt4(c.mamba_n_heads) ?? (/mamba2|nemotron_h/.test(mt) ? posInt4(c.num_heads) : null);
47713
+ const hd = posInt4(c.mamba_head_dim) ?? posInt4(c.mamba_d_head) ?? (/mamba2/.test(mt) ? posInt4(c.head_dim) : null);
47714
+ const state = posInt4(c.ssm_state_size) ?? posInt4(c.mamba_d_state) ?? posInt4(c.state_size) ?? posInt4(c.d_state);
47715
+ if (nh && hd && state) {
47716
+ let ng = posInt4(c.n_groups) ?? posInt4(c.mamba_n_groups) ?? 1;
47717
+ if (ng % tp !== 0) ng = ng + (tp - ng);
47718
+ const inter2 = nh * hd;
47719
+ return (inter2 + 2 * ng * state) / tp * (conv - 1) * opts.modelBytes + nh / tp * hd * state * ssmBytes;
47720
+ }
47721
+ const expand = num3(c.mamba_expand) ?? num3(c.expand) ?? 2;
47722
+ const inter = posInt4(c.intermediate_size) && /^(falcon_)?mamba$/.test(mt) ? posInt4(c.intermediate_size) : hidden ? hidden * expand : null;
47723
+ if (inter && state) return inter / tp * (conv - 1) * opts.modelBytes + inter / tp * state * ssmBytes;
47724
+ return null;
47725
+ };
47726
+ let kinds = null;
47727
+ const lt = Array.isArray(c.layer_types) ? c.layer_types.map((x) => String(x).toLowerCase()) : null;
47728
+ const sw = posInt4(c.sliding_window) ?? posInt4(c.attention_window);
47729
+ const pattern = typeof c.hybrid_override_pattern === "string" ? c.hybrid_override_pattern : null;
47730
+ const blockTypes = Array.isArray(c.layers_block_type) ? c.layers_block_type.map((x) => String(x).toLowerCase()) : null;
47731
+ if (pattern) {
47732
+ kinds = [...pattern].map((ch) => ch === "M" ? "mamba" : ch === "*" ? "attn" : "none");
47733
+ notes.push(`hybrid_override_pattern: ${kinds.filter((k) => k === "mamba").length} Mamba-2 layers, ${kinds.filter((k) => k === "attn").length} attention layers, the rest MLP / MoE with no cache`);
47734
+ } else if (blockTypes) {
47735
+ kinds = blockTypes.map((t) => /mamba|linear/.test(t) ? "mamba" : /attention/.test(t) ? "attn" : "none");
47736
+ } else if (lt) {
47737
+ kinds = lt.map((t) => /linear|mamba|kda|deltanet/.test(t) ? "mamba" : /sliding/.test(t) ? "sliding" : /chunk/.test(t) ? "chunked" : /attention|full/.test(t) ? "attn" : "none");
47738
+ } else if (c.linear_attn_config && Array.isArray(c.linear_attn_config.kda_layers)) {
47739
+ const kdaSet = new Set(c.linear_attn_config.kda_layers.map(Number));
47740
+ kinds = Array.from({ length: n2 }, (_, i) => kdaSet.has(i + 1) ? "mamba" : "attn");
47741
+ } else if (posInt4(c.full_attention_interval) != null && posInt4(c.linear_num_value_heads) != null) {
47742
+ const k = posInt4(c.full_attention_interval);
47743
+ kinds = Array.from({ length: n2 }, (_, i) => (i + 1) % k === 0 ? "attn" : "mamba");
47744
+ } else if (posInt4(c.attn_layer_period) != null) {
47745
+ const per = posInt4(c.attn_layer_period), off = num3(c.attn_layer_offset) ?? 0;
47746
+ kinds = Array.from({ length: n2 }, (_, i) => i % per === off ? "attn" : "mamba");
47747
+ } else if (/^(mamba|mamba2|falcon_mamba)$/.test(mt)) {
47748
+ kinds = Array.from({ length: n2 }, () => "mamba");
47749
+ } else if (/^gemma2$|cost_wise_gemma/.test(mt) && sw) {
47750
+ kinds = Array.from({ length: n2 }, (_, i) => i % 2 === 0 ? "sliding" : "attn");
47751
+ } else if (/^gemma3/.test(mt) && sw) {
47752
+ const p = posInt4(c.sliding_window_pattern) ?? 6;
47753
+ kinds = Array.from({ length: n2 }, (_, i) => (i + 1) % p ? "sliding" : "attn");
47754
+ } else if (posInt4(c.attention_chunk_size) != null) {
47755
+ const nr = Array.isArray(c.no_rope_layers) ? c.no_rope_layers : null;
47756
+ const interval = posInt4(c.no_rope_layer_interval) ?? 4;
47757
+ kinds = Array.from({ length: n2 }, (_, i) => (nr ? Number(nr[i]) !== 0 : (i + 1) % interval !== 0) ? "chunked" : "attn");
47758
+ } else if (sw && c.use_sliding_window !== false && !/qwen2|qwen3/.test(mt)) {
47759
+ kinds = Array.from({ length: n2 }, () => "sliding");
47760
+ } else if (sw && c.use_sliding_window === true) {
47761
+ const mw = posInt4(c.max_window_layers) ?? 0;
47762
+ kinds = Array.from({ length: n2 }, (_, i) => i >= mw ? "sliding" : "attn");
47763
+ } else {
47764
+ kinds = Array.from({ length: n2 }, () => "attn");
47765
+ }
47766
+ if (Array.isArray(c.cross_attention_layers)) {
47767
+ const cross = new Set(c.cross_attention_layers.map(Number));
47768
+ kinds = kinds.map((k, i) => cross.has(i) ? "cross" : k);
47769
+ }
47770
+ const whisper = /whisper/.test(mt);
47771
+ const layers = [];
47772
+ const chunk = posInt4(c.attention_chunk_size);
47773
+ const visionTokens = (() => {
47774
+ const v = top.vision_config ?? {};
47775
+ const img = posInt4(v.image_size), patch = posInt4(v.patch_size), tiles = posInt4(v.max_num_tiles);
47776
+ return img && patch ? ((img / patch) ** 2 + 1) * (tiles ?? 1) : null;
47777
+ })();
47778
+ for (const k of kinds) {
47779
+ if (k === "none") continue;
47780
+ if (k === "mamba") {
47781
+ const s = mambaState();
47782
+ if (s == null) {
47783
+ notes.push("a recurrent layer whose state size the config does not give: counted as 0");
47784
+ continue;
47785
+ }
47786
+ layers.push({ kind: "mamba", bytesPerToken: 0, stateBytes: s });
47787
+ continue;
47788
+ }
47789
+ if (mlaBytes != null) {
47790
+ layers.push({ kind: "mla", bytesPerToken: mlaBytes });
47791
+ continue;
47792
+ }
47793
+ if (attnBytes == null) return null;
47794
+ if (k === "cross") {
47795
+ layers.push({ kind: "cross", bytesPerToken: attnBytes, encoderLen: visionTokens ?? 6404 });
47796
+ continue;
47797
+ }
47798
+ if (k === "sliding" && sw) {
47799
+ layers.push({ kind: "sliding", bytesPerToken: attnBytes, window: sw });
47800
+ continue;
47801
+ }
47802
+ if (k === "chunked" && chunk) {
47803
+ layers.push({ kind: "chunked", bytesPerToken: attnBytes, window: chunk });
47804
+ continue;
47805
+ }
47806
+ layers.push({ kind: "full", bytesPerToken: attnBytes });
47807
+ if (whisper) layers.push({ kind: "cross", bytesPerToken: attnBytes, encoderLen: posInt4(c.max_source_positions) ?? 1500 });
47808
+ }
47809
+ const count = (k) => layers.filter((l) => l.kind === k).length;
47810
+ if (count("sliding")) notes.push(`${count("sliding")} sliding-window layers (window ${sw}): each holds at most the window plus the tokens in flight, not the whole sequence (${VLLM_SRC} SlidingWindowSpec)`);
47811
+ if (count("chunked")) notes.push(`${count("chunked")} chunked-local layers (chunk ${chunk}): each holds one chunk plus the tokens in flight (ChunkedLocalAttentionSpec)`);
47812
+ if (count("mamba")) notes.push(`${count("mamba")} recurrent layers: a fixed state per sequence, not per token (MambaSpec)`);
47813
+ if (count("cross")) notes.push(`${count("cross")} cross-attention layers: vLLM reserves max_num_encoder_input_tokens (default: max_num_batched_tokens) of encoder cache per request, not decoder tokens (CrossAttentionSpec)`);
47814
+ if (replicated && mlaBytes == null) notes.push(`TP ${tp} is past ${kvHeads} KV heads: each rank holds 1 full KV head, so KV per GPU stops shrinking at TP ${kvHeads} (vLLM max(1, kv_heads // tp); ${TRTLLM_SRC} heuristics.py max(tp_size, num_key_value_heads))`);
47815
+ if (/deepseek_v32|deepseek_v4|kimi_linear|minimax_m[23]/.test(mt)) notes.push(`${mt}: sparse-attention indexer or compressed caches are not modelled; KV here is the dense part only`);
47816
+ const linear = posInt4(c.linear_num_value_heads) != null || (lt ?? []).some((x) => /linear|kda|deltanet/.test(x)) || c.linear_attn_config != null;
47817
+ return { layers, notes, kvHeadsPerRank: mlaBytes != null ? 1 : kvRank, replicated: replicated && mlaBytes == null, recurrentFamily: count("mamba") ? linear ? "linear" : "mamba" : null };
47818
+ }
47819
+ var kvBytesPerTokenOf = (l) => l.layers.reduce((s, x) => s + (x.kind === "mamba" || x.kind === "cross" ? 0 : x.bytesPerToken / (x.tokensPerState ?? 1)), 0);
47820
+ function vllmKvCapacity(layout, o) {
47821
+ const L = layout.layers;
47822
+ if (!L.length) return null;
47823
+ if (L.some((l) => l.tokensPerState != null)) return mixedPageCapacity(L, o);
47824
+ const attn = L.find((l) => l.kind !== "mamba");
47825
+ const mambaState = Math.max(0, ...L.filter((l) => l.kind === "mamba").map((l) => l.stateBytes ?? 0));
47826
+ let bs = o.blockSize ?? (L.some((l) => l.kind === "mla") ? 64 : 16);
47827
+ if (attn && mambaState > 0) {
47828
+ const align = Math.max(16, bs);
47829
+ bs = Math.max(bs, align * cdiv(mambaState, align * attn.bytesPerToken));
47830
+ }
47831
+ const page = attn ? bs * attn.bytesPerToken : mambaState;
47832
+ if (!(page > 0)) return null;
47833
+ const key = (l) => `${l.kind}:${l.window ?? ""}:${l.encoderLen ?? ""}`;
47834
+ const buckets = /* @__PURE__ */ new Map();
47835
+ for (const l of L) {
47836
+ const k = key(l);
47837
+ if (!buckets.has(k)) buckets.set(k, []);
47838
+ buckets.get(k).push(l);
47839
+ }
47840
+ const sizes = [...buckets.values()].map((b) => b.length);
47841
+ const minN = Math.min(...sizes), maxN = Math.max(...sizes);
47842
+ const groupSize = buckets.size === 1 ? maxN : maxN < minN * 1.5 ? maxN : minN;
47843
+ const bytesPerBlock = groupSize * page;
47844
+ const numBlocks = Math.max(0, Math.floor(o.budgetBytes / bytesPerBlock));
47845
+ const groups = [];
47846
+ let perReq = 0;
47847
+ for (const b of buckets.values()) {
47848
+ const spec = b[0];
47849
+ const nGroups = cdiv(b.length, groupSize);
47850
+ let blocks;
47851
+ if (spec.kind === "mamba") blocks = o.mambaAlign ? 2 : 1;
47852
+ else if (spec.kind === "sliding") blocks = cdiv(Math.min((spec.window ?? 0) - 1 + o.inFlightTokens, o.maxModelLen), bs) + 1;
47853
+ else if (spec.kind === "chunked") blocks = cdiv(Math.min((spec.window ?? 0) + o.inFlightTokens, o.maxModelLen), bs);
47854
+ else if (spec.kind === "cross") blocks = cdiv(o.encoderTokens ?? spec.encoderLen ?? 0, bs);
47855
+ else blocks = cdiv(o.maxModelLen, bs);
47856
+ groups.push({ kind: spec.kind, layers: b.length, blocksPerRequest: blocks * nGroups });
47857
+ perReq += blocks * nGroups;
47858
+ }
47859
+ const maxConcurrency = perReq > 0 ? numBlocks / perReq : 0;
47860
+ const nGroupsTotal = groups.reduce((s, g) => s + cdiv(g.layers, groupSize), 0);
47861
+ const printedTokens = o.printsTokensAs === "concurrency" ? Math.floor(maxConcurrency * o.maxModelLen) : Math.floor(numBlocks / nGroupsTotal) * bs;
47862
+ return { blockSize: bs, bytesPerBlock, numBlocks, groups, blocksPerRequest: perReq, maxConcurrency, printedTokens, poolTokens: numBlocks * bs };
47863
+ }
47864
+ function mixedPageCapacity(L, o) {
47865
+ const bs = o.blockSize ?? 64;
47866
+ const tokensHeld = (l) => l.kind === "sliding" ? Math.min((l.window ?? 0) - 1 + o.inFlightTokens, o.maxModelLen) : cdiv(o.maxModelLen, l.tokensPerState ?? 1);
47867
+ const buckets = /* @__PURE__ */ new Map();
47868
+ for (const l of L) {
47869
+ const k = `${l.kind}:${l.tokensPerState ?? ""}:${l.bytesPerToken}`;
47870
+ if (!buckets.has(k)) buckets.set(k, []);
47871
+ buckets.get(k).push(l);
47872
+ }
47873
+ let perReqBytes = 0, perReqBlocks = 0, bytesPerBlock = 0;
47874
+ const groups = [];
47875
+ for (const b of buckets.values()) {
47876
+ const blocks = cdiv(tokensHeld(b[0]), bs) + (b[0].kind === "sliding" ? 1 : 0);
47877
+ perReqBytes += b.length * blocks * bs * b[0].bytesPerToken;
47878
+ perReqBlocks += blocks;
47879
+ bytesPerBlock += b.length * bs * b[0].bytesPerToken;
47880
+ groups.push({ kind: b[0].kind, layers: b.length, blocksPerRequest: blocks });
47881
+ }
47882
+ const maxConcurrency = perReqBytes > 0 ? o.budgetBytes / perReqBytes : 0;
47883
+ const numBlocks = Math.max(0, Math.floor(maxConcurrency * perReqBlocks));
47884
+ return {
47885
+ blockSize: bs,
47886
+ bytesPerBlock: perReqBlocks > 0 ? perReqBytes / perReqBlocks : bytesPerBlock,
47887
+ numBlocks,
47888
+ groups,
47889
+ blocksPerRequest: perReqBlocks,
47890
+ maxConcurrency,
47891
+ printedTokens: Math.floor(maxConcurrency * o.maxModelLen),
47892
+ poolTokens: Math.floor(maxConcurrency * o.maxModelLen)
47893
+ };
47894
+ }
47895
+ function vllmNonKvReserve(config, o) {
47896
+ const c = config ? textConfigOf(config) : {};
47897
+ const vocab = posInt4(c.vocab_size) ?? posInt4((config ?? {}).vocab_size) ?? 32e3;
47898
+ const hidden = posInt4(c.hidden_size) ?? 4096;
47899
+ const inter = posInt4(c.intermediate_size) ?? hidden * 4;
47900
+ const moeInter = posInt4(c.moe_intermediate_size) ?? (posInt4(c.num_local_experts) || posInt4(c.num_experts) ? inter : null);
47901
+ const topk = posInt4(c.num_experts_per_tok) ?? posInt4(c.num_experts_per_token) ?? posInt4(c.moe_topk) ?? 2;
47902
+ const T = o.maxNumBatchedTokens;
47903
+ const rows = Math.min(o.maxNumSeqs, T);
47904
+ const sampler = rows * vocab * 16;
47905
+ const dense = T * (3 * inter / o.tp + 2 * hidden) * o.actBytes;
47906
+ const moe = moeInter != null ? T * topk * (3 * moeInter / o.tp + hidden) * o.actBytes : 0;
47907
+ const lmAct = Math.max(sampler, dense, moe) / GiB;
47908
+ const enc = o.encoder ?? null;
47909
+ const act = enc ? Math.max(enc.peakGib, enc.outputsGib + lmAct) : lmAct;
47910
+ const multiGpu = o.tp >= 2 && o.nvlink !== false;
47911
+ const nonTorch = multiGpu ? 2.1 : o.pp > 1 ? 0.07 : 0.27;
47912
+ const terms = [
47913
+ { what: "weights", gib: o.weightsGib, basis: 'computed from the config (vLLM reports it as "Model loading took")', measuredByEngine: false },
47914
+ { what: "activation peak", gib: act, basis: `estimate: the profile run at ${T.toLocaleString("en-US")} batched tokens and ${rows} sampler rows (${sampler >= Math.max(dense, moe) ? `sampler, ${rows} x ${vocab.toLocaleString("en-US")} vocab x 16 bytes` : moe > dense ? "fused-MoE intermediate caches" : "MLP intermediates"})${enc ? `; vision tower: ${enc.items} x ${enc.tokensPerItem}-token image items, peak ${enc.peakGib.toFixed(2)} GiB, outputs ${enc.outputsGib.toFixed(2)} GiB held through the text pass (${enc.peakGib >= enc.outputsGib + lmAct ? "the tower sets the peak" : "the text pass sets the peak"})` : ""}; vLLM measures it`, measuredByEngine: true },
47915
+ { what: "non-torch (NCCL, CUDA)", gib: nonTorch, basis: `estimate: ${o.tp >= 2 && !multiGpu ? "TP on a card without NVLink: no custom all-reduce buffers, TP 1 figure used (from two public PCIe logs)" : `llm-d-planner's measured mean for ${multiGpu ? "TP >= 2" : o.pp > 1 ? "PP only" : "TP 1"} on vLLM 0.19 / H100`}; vLLM measures it`, measuredByEngine: true }
47916
+ ];
47917
+ if (o.cudaGraphsCounted && !o.enforceEager) {
47918
+ const g = o.cudaGraph;
47919
+ if (g) terms.push({ what: "CUDA graphs", gib: g.gib, basis: g.basis, measuredByEngine: true });
47920
+ else terms.push({ what: "CUDA graphs", gib: 1.04, basis: "estimate: mean of the 0.51 to 1.85 GiB llm-d-planner observed; vLLM >= 0.20 captures throwaway graphs and measures it", measuredByEngine: true });
47921
+ }
47922
+ return terms;
47923
+ }
47924
+ function vllmCudaGraphSizes(version, o) {
47925
+ const q = 1 + (o.numSpeculativeTokens ?? 0);
47926
+ const mode = (o.mode ?? "FULL_AND_PIECEWISE").toUpperCase();
47927
+ const blackwell = o.sm != null && o.sm >= 100 && o.sm < 110 && vAtLeast(version, [0, 28, 0]);
47928
+ const platformMax = blackwell ? 1024 : 512;
47929
+ const mnbt = o.maxNumBatchedTokens;
47930
+ let max = o.maxCaptureSize ?? Math.min(o.maxNumSeqs * q * 2, platformMax);
47931
+ max = Math.min(mnbt, max);
47932
+ let sizes;
47933
+ if (o.captureSizes?.length) sizes = [...new Set(o.captureSizes.filter((x) => x <= mnbt))].sort((a, b) => a - b);
47934
+ else {
47935
+ sizes = [1, 2, 4].filter((x) => x <= max);
47936
+ for (let x = 8; x < Math.min(max + 1, 256); x += 8) sizes.push(x);
47937
+ for (let x = 256; x <= max; x += 16) sizes.push(x);
47938
+ if (vAtLeast(version, [0, 21, 0]) && mnbt <= max && !sizes.includes(mnbt)) sizes.push(mnbt);
47939
+ if (vAtLeast(version, [0, 29, 0]) && o.maxCaptureSize == null && q === 1 && o.maxNumSeqs <= max && o.maxNumSeqs <= mnbt) sizes.push(o.maxNumSeqs);
47940
+ sizes = [...new Set(sizes)].sort((a, b) => a - b);
47941
+ }
47942
+ if (q > 1 && sizes.length) {
47943
+ const cap = sizes[sizes.length - 1];
47944
+ const r = [...new Set(sizes.map((x) => Math.ceil(x / q) * q).filter((x) => x <= cap))].sort((a, b) => a - b);
47945
+ sizes = r.length ? r : q <= cap ? [q] : [];
47946
+ }
47947
+ const maxCaptureSize = sizes[sizes.length - 1] ?? 0;
47948
+ if (mode === "NONE") return { piecewise: [], full: [], maxCaptureSize: 0, mode, decodeQueryLen: q };
47949
+ const fullDecode = sizes.filter((x) => x <= o.maxNumSeqs * q && x >= q);
47950
+ return {
47951
+ piecewise: mode === "FULL" || mode === "FULL_DECODE_ONLY" ? [] : sizes,
47952
+ full: mode === "PIECEWISE" ? [] : mode === "FULL" ? sizes : fullDecode,
47953
+ maxCaptureSize,
47954
+ mode,
47955
+ decodeQueryLen: q
47956
+ };
47957
+ }
47958
+ var V2_DEFAULT_ARCHS = [
47959
+ { since: [0, 22, 0], archs: ["Qwen3ForCausalLM"] },
47960
+ { since: [0, 23, 0], archs: ["LlamaForCausalLM", "MistralForCausalLM", "Qwen3ForCausalLM"] },
47961
+ { since: [0, 24, 0], archs: ["Qwen3ForCausalLM", "DeepseekV2ForCausalLM", "Qwen2MoeForCausalLM", "GraniteMoeForCausalLM", "LlamaForCausalLM", "MistralForCausalLM"] },
47962
+ { since: [0, 25, 0], archs: ["DeepseekV2ForCausalLM", "Qwen2MoeForCausalLM", "GraniteMoeForCausalLM"] },
47963
+ { since: [0, 26, 0], archs: ["DeepseekV2ForCausalLM", "GraniteMoeForCausalLM", "InklingForCausalLM", "InklingForConditionalGeneration", "LongcatFlashNgramForCausalLM", "Qwen2MoeForCausalLM"] },
47964
+ { since: [0, 27, 0], archs: ["DeepseekV2ForCausalLM", "GraniteMoeForCausalLM", "InklingForCausalLM", "InklingForConditionalGeneration", "KimiK3ForConditionalGeneration", "LongcatFlashNgramForCausalLM", "Qwen2MoeForCausalLM"] },
47965
+ { since: [0, 28, 0], archs: ["DeepseekV2ForCausalLM", "DeepseekV4ForCausalLM", "GraniteMoeForCausalLM", "InklingForCausalLM", "InklingForConditionalGeneration", "KimiK3ForConditionalGeneration", "LongcatFlashNgramForCausalLM", "Qwen2MoeForCausalLM"] }
47966
+ ];
47967
+ function vllmV2RunnerSkipsGraphEstimate(version, architectures) {
47968
+ if (!vAtLeast(version, [0, 22, 0]) || vAtLeast(version, [0, 29, 0])) return false;
47969
+ const row = [...V2_DEFAULT_ARCHS].reverse().find((r) => vAtLeast(version, r.since));
47970
+ const archs = Array.isArray(architectures) ? architectures.map(String) : [];
47971
+ return !!row && archs.some((a) => row.archs.includes(a));
47972
+ }
47973
+ var CUDA_GRAPH_FIT = { firstBaseMib: 240, perPiecewiseMibPerLayer: 0, perFullMib: 0, perFullMibPerLayer: 0.2 };
47974
+ function vllmCudaGraphEstimate(config, o) {
47975
+ const a = o.args ?? {};
47976
+ const gptOss = Array.isArray(config?.architectures) && config.architectures.includes("GptOssForCausalLM") && a.cudagraphCaptureSizes == null && a.maxCudagraphCaptureSize == null;
47977
+ const sizes = vllmCudaGraphSizes(o.version, {
47978
+ maxNumSeqs: o.maxNumSeqs,
47979
+ maxNumBatchedTokens: o.maxNumBatchedTokens,
47980
+ sm: o.sm,
47981
+ numSpeculativeTokens: a.numSpeculativeTokens,
47982
+ captureSizes: a.cudagraphCaptureSizes,
47983
+ maxCaptureSize: a.maxCudagraphCaptureSize ?? (gptOss ? vAtLeast(o.version, [0, 12, 0]) ? 1024 : 992 : void 0),
47984
+ mode: a.cudagraphMode
47985
+ });
47986
+ const words = `PIECEWISE ${sizes.piecewise.length} sizes (largest ${sizes.piecewise[sizes.piecewise.length - 1] ?? 0}), FULL ${sizes.full.length} (largest ${sizes.full[sizes.full.length - 1] ?? 0})`;
47987
+ if (config && vllmV2RunnerSkipsGraphEstimate(o.version, config.architectures)) {
47988
+ return {
47989
+ gib: 0,
47990
+ sizes,
47991
+ firstGib: 0,
47992
+ perGraphGib: { piecewise: 0, full: 0 },
47993
+ skipped: "v2-runner",
47994
+ basis: `0: this architecture runs on Model Runner V2 by default in this release, whose profile_cudagraph_memory returned 0 until v0.29.0 (vllm-project/vllm#49224); the graphs (${words}) are still captured after the KV cache is sized`
47995
+ };
47996
+ }
47997
+ const c = config ? textConfigOf(config) : {};
47998
+ const layers = Math.ceil((posInt4(c.num_hidden_layers) ?? 32) / o.pp);
47999
+ const S = Math.max(sizes.piecewise[sizes.piecewise.length - 1] ?? 0, sizes.full[sizes.full.length - 1] ?? 0);
48000
+ const F = o.fit ?? CUDA_GRAPH_FIT;
48001
+ const lt = Array.isArray(c.layer_types) ? c.layer_types.map(String) : null;
48002
+ const interval = posInt4(c.full_attention_interval);
48003
+ const linearLayers = lt ? lt.filter((x) => /linear|deltanet|gdn/i.test(x)).length : interval ? (posInt4(c.num_hidden_layers) ?? 0) - Math.floor((posInt4(c.num_hidden_layers) ?? 0) / interval) : 0;
48004
+ const transientMib = vAtLeast(o.version, [0, 26, 0]) && !vAtLeast(o.version, [0, 27, 0]) && sizes.full.length > 0 && linearLayers > 0 ? o.maxNumBatchedTokens * linearLayers * (128 / 36) / 1024 / o.tp : 0;
48005
+ const firstMib = S > 0 ? F.firstBaseMib + transientMib : 0;
48006
+ const perP = Math.max(1, F.perPiecewiseMibPerLayer * (layers + 1));
48007
+ const perF = Math.max(1, F.perFullMib + (F.perFullMibPerLayer ?? 0) * (layers + 1));
48008
+ const nP = sizes.piecewise.length, nF = sizes.full.length;
48009
+ const totalMib = firstMib + (nP > 1 ? (nP - 1) * perP : 0) + (nF > 1 ? (nF - 1) * perF : 0);
48010
+ return {
48011
+ gib: totalMib / 1024,
48012
+ sizes,
48013
+ firstGib: firstMib / 1024,
48014
+ perGraphGib: { piecewise: perP / 1024, full: perF / 1024 },
48015
+ basis: `estimate of vLLM's own estimate: ${words}; first capture ${firstMib.toFixed(0)} MiB (the pool at ${S} tokens${transientMib ? `, of which ${transientMib.toFixed(0)} MiB is the v0.26 profiling transient on ${linearLayers} linear-attention layers, #50780` : ""}) + (N - 1) x ${perP.toFixed(1)} MiB per PIECEWISE graph + (N - 1) x ${perF.toFixed(1)} MiB per FULL graph, the structure of profile_cudagraph_memory with its two measured terms fitted to public logs`
48016
+ };
48017
+ }
48018
+ function visionTowerParams(config) {
48019
+ const v = config?.vision_config ?? null;
48020
+ if (!v || typeof v !== "object") return null;
48021
+ const mt = String(config?.model_type ?? "").toLowerCase();
48022
+ const h = posInt4(v.hidden_size) ?? posInt4(v.embed_dim);
48023
+ const depth = posInt4(v.depth) ?? posInt4(v.num_hidden_layers);
48024
+ if (!h || !depth) return null;
48025
+ const inter = posInt4(v.intermediate_size) ?? Math.round(h * (Number(v.mlp_ratio) || 4));
48026
+ const gated = /qwen2_5_vl/.test(mt);
48027
+ return depth * (4 * h * h + 4 * h + (gated ? 3 : 2) * h * inter + inter + 5 * h);
48028
+ }
48029
+ function vllmEncoderProfile(config, o) {
48030
+ if (!config || o.skip) return null;
48031
+ const v = config.vision_config ?? null;
48032
+ if (!v || typeof v !== "object") return null;
48033
+ const mt = String(config.model_type ?? "").toLowerCase();
48034
+ const arch = String(config.architectures?.[0] ?? "");
48035
+ const t = textConfigOf(config);
48036
+ const textHidden = posInt4(t.hidden_size) ?? posInt4(config.hidden_size) ?? 4096;
48037
+ const kw = o.mmProcessorKwargs ?? {};
48038
+ const limit = o.limitPerPrompt?.image;
48039
+ if (limit === 0) return null;
48040
+ let family;
48041
+ let tokens, patches, h, inter, gated, depth, pixelBytesPerItem;
48042
+ const notes = [];
48043
+ if (mt === "gemma3" || /Gemma3ForConditionalGeneration/.test(arch)) {
48044
+ family = "gemma3";
48045
+ const img = posInt4(v.image_size) ?? 896, patch = posInt4(v.patch_size) ?? 14;
48046
+ const perCrop = posInt4(config.mm_tokens_per_image) ?? 256;
48047
+ const crops = kw.do_pan_and_scan === true ? 1 + (posInt4(kw.pan_and_scan_max_num_crops) ?? 4) : 1;
48048
+ tokens = perCrop * crops;
48049
+ patches = (img / patch) ** 2 * crops;
48050
+ h = posInt4(v.hidden_size) ?? 1152;
48051
+ inter = posInt4(v.intermediate_size) ?? 4304;
48052
+ gated = false;
48053
+ depth = posInt4(v.num_hidden_layers) ?? 27;
48054
+ pixelBytesPerItem = crops * 3 * img * img * o.actBytes;
48055
+ } else if (/qwen2_vl|qwen2_5_vl|qwen3_vl/.test(mt) || /Qwen(2|2_5|3)VL/.test(arch)) {
48056
+ family = /qwen3_vl|Qwen3VL/.test(mt + arch) ? "qwen3-vl" : /qwen2_5_vl|Qwen2_5_VL/.test(mt + arch) ? "qwen2.5-vl" : "qwen2-vl";
48057
+ const patch = posInt4(v.patch_size) ?? (family === "qwen3-vl" ? 16 : 14);
48058
+ const merge = posInt4(v.spatial_merge_size) ?? 2;
48059
+ const temporal = posInt4(v.temporal_patch_size) ?? 2;
48060
+ const unit = (patch * merge) ** 2;
48061
+ const maxPixels = posInt4(kw.max_pixels) ?? posInt4(kw.size?.longest_edge) ?? (family === "qwen3-vl" ? 16777216 : 12845056);
48062
+ tokens = Math.max(1, Math.floor(maxPixels / unit));
48063
+ patches = tokens * merge * merge;
48064
+ h = posInt4(v.hidden_size) ?? posInt4(v.embed_dim) ?? 1280;
48065
+ if (family === "qwen2-vl") {
48066
+ h = posInt4(v.embed_dim) ?? 1280;
48067
+ inter = Math.round(h * (Number(v.mlp_ratio) || 4));
48068
+ gated = false;
48069
+ } else {
48070
+ inter = posInt4(v.intermediate_size) ?? (family === "qwen3-vl" ? 4304 : 3420);
48071
+ gated = family === "qwen2.5-vl";
48072
+ }
48073
+ depth = posInt4(v.depth) ?? posInt4(v.num_hidden_layers) ?? 32;
48074
+ pixelBytesPerItem = patches * 3 * temporal * patch * patch * o.actBytes;
48075
+ if (o.limitPerPrompt?.video !== 0 && o.maxModelLen > 2 * tokens) notes.push('video is not sized: at this max length vLLM may profile one video item instead of images, with more tokens than an image (the log says which: "profiled with N video items")');
48076
+ } else return null;
48077
+ const budget = Math.max(o.maxNumBatchedTokens, tokens);
48078
+ const perPrompt = Math.max(1, Math.min(limit ?? 999, Math.floor(o.maxModelLen / tokens)));
48079
+ const items = Math.max(1, Math.min(Math.floor(budget / tokens), o.maxNumSeqs * perPrompt));
48080
+ const P = items * patches;
48081
+ const peak = P * (2 * h + (gated ? 3 : 2) * inter) * o.actBytes + items * pixelBytesPerItem;
48082
+ const outputs = items * tokens * textHidden * o.actBytes;
48083
+ const towerParams = visionTowerParams(config) ?? depth * (4 * h * h + 4 * h + (gated ? 3 : 2) * h * inter + inter + 5 * h);
48084
+ return {
48085
+ family,
48086
+ modality: "image",
48087
+ tokensPerItem: tokens,
48088
+ patchesPerItem: patches,
48089
+ budgetTokens: budget,
48090
+ items,
48091
+ peakGib: peak / GiB,
48092
+ outputsGib: outputs / GiB,
48093
+ towerWeightsGib: towerParams * o.actBytes / GiB,
48094
+ basis: `estimate: vLLM profiles the vision tower with ${items} image item${items === 1 ? "" : "s"} of ${tokens.toLocaleString("en-US")} tokens (budget ${budget.toLocaleString("en-US")} = max(max_num_batched_tokens, one item); ${P.toLocaleString("en-US")} patches through ${depth} layers of width ${h}); the peak is one layer's MLP intermediates at that patch count plus the pixel input`,
48095
+ notes
48096
+ };
48097
+ }
48098
+ function sglangMemoryDefaults(o) {
48099
+ const g = o.gpuMemMiB;
48100
+ let cp, bs;
48101
+ if (g < 20 * 1024) {
48102
+ cp = 2048;
48103
+ bs = 8;
48104
+ } else if (g < 35 * 1024) {
48105
+ cp = 4096;
48106
+ bs = o.tp < 4 ? 48 : 160;
48107
+ } else if (g < 60 * 1024) {
48108
+ cp = 4096;
48109
+ bs = o.tp < 4 ? 32 : 160;
48110
+ } else if (g < 90 * 1024) {
48111
+ cp = 8192;
48112
+ bs = o.tp < 4 ? 256 : 512;
48113
+ } else if (g < 160 * 1024) {
48114
+ cp = 8192;
48115
+ bs = o.tp < 4 ? 256 : 512;
48116
+ } else {
48117
+ cp = 16384;
48118
+ bs = 512;
48119
+ }
48120
+ if (o.chunkedPrefill != null) cp = o.chunkedPrefill;
48121
+ if (o.maxRunningRequests != null && bs > o.maxRunningRequests) bs = o.maxRunningRequests;
48122
+ let prefillMax = o.mla ? 2048 : cp;
48123
+ if (/llama-2/i.test(o.modelPath ?? "")) prefillMax = Math.min(prefillMax, 4096);
48124
+ const sizes = [];
48125
+ for (let s = 4; s <= 32; s += 4) sizes.push(s);
48126
+ for (let s = 48; s <= 256; s += 16) sizes.push(s);
48127
+ for (let s = 288; s <= 512; s += 32) sizes.push(s);
48128
+ for (let s = 576; s <= 1024; s += 64) sizes.push(s);
48129
+ for (let s = 1280; s <= 4096; s += 256) sizes.push(s);
48130
+ for (let s = 4608; s <= prefillMax; s += 512) sizes.push(s);
48131
+ const prefillGraphSizes = sizes.filter((s) => s <= prefillMax).length;
48132
+ const terms = [];
48133
+ const act = Math.max(cp > 0 ? cp : 0, 2048);
48134
+ terms.push({ what: "constant (attention metadata) + activation slack", mb: 512 + act * 1.5 });
48135
+ terms.push({ what: `parallel slack (TP ${o.tp} x PP ${o.pp} / 8 x 1 GiB)`, mb: o.tp * o.pp / 8 * 1024 });
48136
+ if (!o.disableCudaGraph) {
48137
+ terms.push({ what: `decode CUDA graphs (max_bs ${bs} x 2 MB)`, mb: bs * 2 });
48138
+ if (o.dpAttention && o.dpAttention > 1) terms.push({ what: "DP-attention padding", mb: bs * o.dpAttention * 3 + (bs > 300 ? bs * o.dpAttention * 1.5 : 0) });
48139
+ terms.push({ what: o.mla ? "prefill CUDA graphs (MLA backend, 1.5 GiB)" : `prefill CUDA graphs (${prefillGraphSizes} sizes x 8 MB)`, mb: o.mla ? 1.5 * 1024 : prefillGraphSizes * 8 });
48140
+ }
48141
+ let reserved = terms.reduce((s, t) => s + t.mb, 0);
48142
+ if (g > 60 * 1024 && reserved < 10 * 1024) {
48143
+ terms.push({ what: "floor to 10 GiB above 60 GiB cards", mb: 10 * 1024 - reserved });
48144
+ reserved = 10 * 1024;
48145
+ }
48146
+ if (o.deepep && !o.disableCudaGraph) {
48147
+ terms.push({ what: "DeepEP all-to-all buffers", mb: 2048 });
48148
+ reserved += 2048;
48149
+ }
48150
+ return { chunkedPrefill: cp, decodeMaxBs: bs, prefillGraphSizes, reservedMb: reserved, memFractionStatic: Math.round((g - reserved) / g * 1e3) / 1e3, terms };
48151
+ }
48152
+ function llamacppSwaCells(nCtx, nSwa, nSeq, unified, nUbatch = 512) {
48153
+ return Math.min(Math.ceil(Math.min(nCtx, nSwa * (unified ? nSeq : 1) + nUbatch) / 256) * 256, Math.max(nCtx, Math.ceil(nCtx / 256) * 256));
48154
+ }
48155
+ var VLLM_PLUGIN_MIGRATIONS = {
48156
+ gguf: { since: "0.24.0", plugin: "vllm-gguf-plugin", pr: "#39612" },
48157
+ bitsandbytes: { since: "0.28.0", plugin: "vllm-bnb-plugin", pr: "#43529" }
48158
+ };
48159
+ function quantTableFor(engine, version) {
48160
+ const ts = ENGINE_QUANT_TABLES.filter((t) => t.engine === engine).map((t) => ({ t, v: readEngineVersion(t.tag) })).sort((a, b) => vAtLeast(a.v, b.v) ? 1 : -1);
48161
+ if (!ts.length) return null;
48162
+ if (!version) return ts[ts.length - 1].t;
48163
+ const fit = ts.filter((x) => vAtLeast(version, x.v));
48164
+ return (fit.length ? fit[fit.length - 1] : ts[0]).t;
48165
+ }
48166
+ function engineQuantKey(raw, qc) {
48167
+ if (!raw) return null;
48168
+ const m = String(raw).toLowerCase();
48169
+ if (m !== "compressed-tensors") return { method: m, scheme: null };
48170
+ const groups = qc?.config_groups ?? {};
48171
+ const g = Object.values(groups)[0];
48172
+ const w = g?.weights, a = g?.input_activations;
48173
+ let scheme = null;
48174
+ if (w?.num_bits === 8 && w.type === "float") scheme = a?.num_bits === 8 ? "w8a8fp8" : "w8a16fp8";
48175
+ else if (w?.num_bits === 4 && w.type === "float") scheme = a?.num_bits === 4 ? "w4a4fp4" : "w4a16fp4";
48176
+ else if (w?.num_bits === 8 && a?.num_bits === 8) scheme = "w8a8int8";
48177
+ else if (w?.num_bits === 4 && a?.num_bits === 8) scheme = a.type === "float" ? "w4a8fp8" : "w4a8int";
48178
+ else if (w?.num_bits) scheme = "wna16";
48179
+ return { method: "compressed-tensors", scheme };
48180
+ }
48181
+ var gib = (x) => `${x.toFixed(2)} GiB`;
48182
+ function engineMemory(x) {
48183
+ const { engine, args, card, layout, servedLen } = x;
48184
+ const findings = [];
48185
+ const checked = [];
48186
+ const weightsGib = x.weightsPerGpuBytes / GiB;
48187
+ const total = cardTotalGiB(card.id, card.memoryGB);
48188
+ const stage = x.pp > 1 ? { ...layout, layers: layout.layers.slice(0, cdiv(layout.layers.length, x.pp)) } : layout;
48189
+ const kvPerTok = kvBytesPerTokenOf(stage);
48190
+ const statePerSeq = stage.layers.reduce((s, l) => s + (l.stateBytes ?? 0), 0);
48191
+ const base = {
48192
+ weightsBasis: x.weights.basis,
48193
+ weightsGbTotal: x.weights.bytes / 1e9,
48194
+ weightsGbPerGpu: x.weightsPerGpuBytes / 1e9,
48195
+ kvBytesPerTokenPerGpu: kvPerTok,
48196
+ stateBytesPerSequencePerGpu: statePerSeq,
48197
+ method: "engine",
48198
+ cardTotalGib: total.gib,
48199
+ cardTotalSource: total.source,
48200
+ layoutNotes: stage.notes
48201
+ };
48202
+ if (engine === "vllm" && x.vllmDefaults) {
48203
+ const D = x.vllmDefaults;
48204
+ const util = args.gpuMemoryUtilization ?? D.gpuMemoryUtilization;
48205
+ const requested = total.gib * util;
48206
+ const used = x.usedGib ?? 0;
48207
+ const kvFixed = args.kvCacheMemoryBytes != null ? args.kvCacheMemoryBytes / GiB : null;
48208
+ const mnbt = args.maxNumBatchedTokens ?? D.maxNumBatchedTokens;
48209
+ const mns = args.maxNumSeqs ?? D.maxNumSeqs;
48210
+ const vt = x.engineVersionTuple ?? readEngineVersion(ASSUMED_VLLM_VERSION);
48211
+ const encoder = vllmEncoderProfile(x.config, { maxNumBatchedTokens: mnbt, maxNumSeqs: mns, maxModelLen: servedLen, actBytes: x.actBytes, limitPerPrompt: args.limitMmPerPrompt, mmProcessorKwargs: args.mmProcessorKwargs, skip: args.skipMmProfiling });
48212
+ const cudaGraph = D.cudaGraphsCounted && !args.enforceEager ? vllmCudaGraphEstimate(x.config, { version: vt, maxNumSeqs: mns, maxNumBatchedTokens: mnbt, sm: smOfCard(card.id), tp: x.tp, pp: x.pp, actBytes: x.actBytes, args }) : null;
48213
+ const reserve = vllmNonKvReserve(x.config, { weightsGib, tp: x.tp, pp: x.pp, maxNumSeqs: mns, maxNumBatchedTokens: mnbt, cudaGraphsCounted: D.cudaGraphsCounted, enforceEager: !!args.enforceEager, actBytes: x.actBytes, nvlink: card.nvlinkGBs > 0, encoder, cudaGraph });
48214
+ const reserveGib = reserve.reduce((s, r) => s + r.gib, 0);
48215
+ const kvBudget = kvFixed ?? requested - reserveGib;
48216
+ const capOf = (len) => vllmKvCapacity(stage, {
48217
+ budgetBytes: Math.max(0, kvBudget) * GiB,
48218
+ maxModelLen: len,
48219
+ blockSize: args.blockSize,
48220
+ inFlightTokens: D.inFlightBatches * mnbt,
48221
+ printsTokensAs: D.printsTokensAs,
48222
+ encoderTokens: mnbt,
48223
+ mambaAlign: D.linearRecurrentAlign && stage.recurrentFamily === "linear" && !(args.flags ?? []).includes("--no-enable-prefix-caching")
48224
+ });
48225
+ const cap = capOf(servedLen);
48226
+ if (!cap) return null;
48227
+ const perSeqBytes = cap.blocksPerRequest * cap.bytesPerBlock;
48228
+ const conc = cap.maxConcurrency;
48229
+ const budgetWord = kvFixed != null ? `--kv-cache-memory-bytes ${gib(kvFixed)} (gpu_memory_utilization not used for the KV size)` : `${gib(total.gib)} x ${util} = ${gib(requested)}`;
48230
+ const reserveWord = reserve.map((r) => `${r.what} ${gib(r.gib)}`).join(" + ");
48231
+ const memory = {
48232
+ ...base,
48233
+ budgetGbPerGpu: requested * GiB / 1e9,
48234
+ kvGbPerSequencePerGpu: perSeqBytes / 1e9,
48235
+ kvCapacityGbPerGpu: Math.max(0, kvBudget) * GiB / 1e9,
48236
+ tokenCapacity: cap.printedTokens,
48237
+ maxConcurrentFullLength: Math.floor(conc * 100) / 100,
48238
+ reserve,
48239
+ pool: { blockSize: cap.blockSize, numBlocks: cap.numBlocks, groups: cap.groups, printedTokens: cap.printedTokens },
48240
+ notCounted: [
48241
+ "vLLM measures the activation peak, the non-torch memory and the CUDA graph pool at startup; the figures here for those three are estimates (see each term)",
48242
+ "a second process on the same GPU, and memory another tenant frees or takes during profiling",
48243
+ ...encoder ? encoder.notes : x.config.audio_config || x.config.vision_config && !args.skipMmProfiling && args.limitMmPerPrompt?.image !== 0 ? ["the multimodal encoder's profiling run for this architecture (vLLM profiles the vision / audio tower too; sized here for gemma-3 and Qwen2/2.5/3-VL images only, so on this model the activation here is low)"] : []
48244
+ ]
48245
+ };
48246
+ if (used > 0) {
48247
+ checked.push("memory-in-use");
48248
+ if (total.gib - used < requested) {
48249
+ findings.push({
48250
+ rule: "free-under-requested",
48251
+ area: "memory",
48252
+ severity: "block",
48253
+ title: `${gib(used)} already in use leaves ${gib(total.gib - used)} free; vLLM asks for ${gib(total.gib)} x ${util} = ${gib(requested)}`,
48254
+ detail: `vLLM compares free memory with the requested share at startup and refuses ("Free memory on device ... on startup is less than desired GPU memory utilization (${util}, ${requested.toFixed(2)} GiB). Decrease GPU memory utilization or reduce GPU memory used by other processes.").`,
48255
+ fix: `Lower --gpu-memory-utilization to at most ${(Math.floor((total.gib - used) / total.gib * 100) / 100).toFixed(2)}, or free the memory first.`,
48256
+ source: `${VLLM_SRC} vllm/v1/worker/gpu_worker.py init_device`
48257
+ });
48258
+ }
48259
+ }
48260
+ if (kvFixed != null) {
48261
+ checked.push("kv-cache-memory-bytes");
48262
+ const need = weightsGib + reserveGib + kvFixed;
48263
+ if (need > total.gib - used) {
48264
+ findings.push({
48265
+ rule: "kv-bytes-over-card",
48266
+ area: "memory",
48267
+ severity: "block",
48268
+ title: `Weights ${gib(weightsGib)} + reserve ${gib(reserveGib)} + --kv-cache-memory-bytes ${gib(kvFixed)} = ${gib(need)} per GPU, over the ${gib(total.gib - used)} ${used > 0 ? "left free" : "on the card"}`,
48269
+ detail: "With the KV size fixed, vLLM skips the check against the utilization budget and allocates the cache as asked; the allocation runs out of memory at startup, or the first large batch does.",
48270
+ fix: `Set --kv-cache-memory-bytes to at most ${gib(Math.max(0, total.gib - used - weightsGib - reserveGib))}, raise TP, or free memory on the card.`
48271
+ });
48272
+ }
48273
+ }
48274
+ if (kvBudget <= 0) {
48275
+ const weightsOnly = weightsGib >= requested;
48276
+ findings.push({
48277
+ rule: weightsOnly ? "weights-over-budget" : "no-kv-memory",
48278
+ area: "memory",
48279
+ severity: "block",
48280
+ title: weightsOnly ? `Weights alone are ${gib(weightsGib)} per GPU${x.shareWord}, over the ${gib(requested)} budget` : `Weights plus vLLM's own reserve leave no memory for the KV cache`,
48281
+ detail: `Budget = ${budgetWord}. Out of it: ${reserveWord}. vLLM refuses at startup ("No available memory for the cache blocks. Try increasing \`gpu_memory_utilization\`").`,
48282
+ fix: "Raise TP (or PP), quantize the weights, raise --gpu-memory-utilization, or use a larger card.",
48283
+ source: `${VLLM_SRC} vllm/v1/core/kv_cache_planning.py _check_enough_kv_cache_memory`
48284
+ });
48285
+ } else if (conc < 1) {
48286
+ let lo = 0, hi = servedLen;
48287
+ while (lo < hi) {
48288
+ const mid = Math.ceil((lo + hi) / 2);
48289
+ const c = capOf(mid);
48290
+ if (c && c.maxConcurrency >= 1) lo = mid;
48291
+ else hi = mid - 1;
48292
+ }
48293
+ findings.push({
48294
+ rule: "kv-under-one-sequence",
48295
+ area: "memory",
48296
+ severity: "block",
48297
+ title: `One ${servedLen}-token request needs ${gib(perSeqBytes / GiB)} of KV per GPU; vLLM would have ${gib(kvBudget)}`,
48298
+ detail: `Budget = ${budgetWord}; out of it ${reserveWord}. vLLM refuses at startup ("To serve at least one request with the model's max seq len (${servedLen}), (${(perSeqBytes / GiB).toFixed(2)} GiB KV cache is needed, which is larger than the available KV cache memory (${kvBudget.toFixed(2)} GiB). Based on the available memory, the estimated maximum model length is ${lo}.").`,
48299
+ fix: `Serve at most ~${lo} tokens, raise --gpu-memory-utilization, use an fp8 KV cache (--kv-cache-dtype fp8), or raise TP.`,
48300
+ source: `${VLLM_SRC} vllm/v1/core/kv_cache_planning.py _check_enough_kv_cache_memory`
48301
+ });
48302
+ } else {
48303
+ checked.push("memory-fit");
48304
+ if (conc < 1.5) findings.push({
48305
+ rule: "kv-borderline",
48306
+ area: "memory",
48307
+ severity: "warn",
48308
+ title: `Only ~${conc.toFixed(2)} full-length requests fit after vLLM's own reserve`,
48309
+ detail: `${gib(kvBudget)} for KV against ${gib(perSeqBytes / GiB)} per ${servedLen}-token request. Three of the reserve terms are estimates of what vLLM measures, so at this margin the startup check can go either way.`,
48310
+ fix: "Leave more room: lower the max length, use an fp8 KV cache, or raise TP."
48311
+ });
48312
+ if (args.maxNumSeqs != null && args.maxNumSeqs > Math.floor(conc)) findings.push({
48313
+ rule: "seqs-over-capacity",
48314
+ area: "memory",
48315
+ severity: "warn",
48316
+ title: `--max-num-seqs ${args.maxNumSeqs}, but at most ${Math.floor(conc)} requests fit at the full ${servedLen} tokens`,
48317
+ detail: `vLLM's pool would hold ${cap.numBlocks.toLocaleString("en-US")} blocks of ${cap.blockSize} tokens; a full-length request takes ${cap.blocksPerRequest.toLocaleString("en-US")}. Shorter requests pack more, but once long ones arrive the scheduler preempts or queues past ~${Math.floor(conc)}.`,
48318
+ fix: `Set the flag to what fits (${Math.max(1, Math.floor(conc))}), shorten the max length, use an fp8 KV cache, or add GPUs as DP replicas.`
48319
+ });
48320
+ if (!findings.some((f) => f.rule === "seqs-over-capacity")) findings.push({
48321
+ rule: "kv-capacity",
48322
+ area: "memory",
48323
+ severity: "info",
48324
+ title: `vLLM would log "GPU KV cache size: ${cap.printedTokens.toLocaleString("en-US")} tokens" and "Maximum concurrency for ${servedLen.toLocaleString("en-US")} tokens per request: ${conc.toFixed(2)}x" (predicted)`,
48325
+ detail: `Per GPU: budget ${budgetWord}; ${reserveWord}; KV ${gib(kvBudget)} (${x.kvName}${stage.replicated ? ", KV heads replicated past TP" : ""}). Pool: ${cap.groups.map((g) => `${g.layers} ${g.kind} layer${g.layers === 1 ? "" : "s"}`).join(", ")} in blocks of ${cap.blockSize} tokens.`,
48326
+ fix: ""
48327
+ });
48328
+ }
48329
+ return { memory, findings, checked };
48330
+ }
48331
+ if (engine === "sglang" && x.sglDefault) {
48332
+ const def = x.sglDefault;
48333
+ const frac = args.memFractionStatic ?? def.memFractionStatic;
48334
+ const kvBudget = (total.gib - (x.usedGib ?? 0)) * frac - weightsGib;
48335
+ const cell = stage.layers.reduce((s, l) => s + (l.kind === "mamba" || l.kind === "cross" ? 0 : l.bytesPerToken), 0);
48336
+ const tokens = kvBudget > 0 && cell > 0 ? Math.floor(kvBudget * GiB / cell) : 0;
48337
+ const conc = tokens / servedLen;
48338
+ const reserveGib = total.gib * (1 - frac);
48339
+ const memory = {
48340
+ ...base,
48341
+ budgetGbPerGpu: total.gib * frac * GiB / 1e9,
48342
+ kvGbPerSequencePerGpu: (cell * servedLen + statePerSeq) / 1e9,
48343
+ kvCapacityGbPerGpu: Math.max(0, kvBudget) * GiB / 1e9,
48344
+ tokenCapacity: tokens,
48345
+ maxConcurrentFullLength: Math.floor(conc * 100) / 100,
48346
+ sglangDefault: { memFractionStatic: def.memFractionStatic, reservedMb: def.reservedMb, chunkedPrefill: def.chunkedPrefill, decodeMaxBs: def.decodeMaxBs, terms: def.terms },
48347
+ notCounted: [
48348
+ "SGLang measures free memory after loading; the CUDA context and NCCL buffers present before the load are not subtracted here",
48349
+ ...stage.layers.some((l) => l.kind === "sliding") ? ["SGLang's separate sliding-window pool: sliding layers are counted at the full length here, so the token count is a lower bound for them"] : [],
48350
+ ...stage.layers.some((l) => l.kind === "mamba") ? ["SGLang's separate Mamba state pool (max_mamba_cache_size)"] : []
48351
+ ]
48352
+ };
48353
+ if (args.memFractionStatic != null && args.memFractionStatic > def.memFractionStatic + 5e-4) {
48354
+ findings.push({
48355
+ rule: "mem-fraction-over-engine-default",
48356
+ area: "memory",
48357
+ severity: "warn",
48358
+ title: `--mem-fraction-static ${args.memFractionStatic} leaves ${gib(reserveGib)} outside the static pool; SGLang's own formula keeps ${(def.reservedMb / 1024).toFixed(2)} GiB there on this card`,
48359
+ detail: `The space outside weights + KV is where activations and CUDA graphs live. SGLang's default (${def.memFractionStatic}) reserves ${def.terms.map((t) => `${t.what} ${Math.round(t.mb)} MB`).join(", ")}. Setting a higher fraction contradicts the engine's own arithmetic for chunked_prefill_size ${def.chunkedPrefill} and decode CUDA graphs up to batch ${def.decodeMaxBs}, and is a common source of OOM under the first long prefill.`,
48360
+ fix: `Drop the flag (SGLang picks ${def.memFractionStatic}), or lower --chunked-prefill-size / --cuda-graph-max-bs alongside it.`,
48361
+ source: `${SGLANG_SRC} python/sglang/srt/arg_groups/memory_hook.py`
48362
+ });
48363
+ }
48364
+ if (kvBudget <= 0) {
48365
+ findings.push({
48366
+ rule: "weights-over-budget",
48367
+ area: "memory",
48368
+ severity: "block",
48369
+ title: `Weights ${gib(weightsGib)} per GPU${x.shareWord} are over ${gib(total.gib)} x ${frac} = ${gib(total.gib * frac)}`,
48370
+ detail: `SGLang refuses at startup ("Loaded weights leave no GPU memory for the KV cache under --mem-fraction-static=${frac}").`,
48371
+ fix: "Raise TP (or PP), quantize the weights, or use a larger card.",
48372
+ source: `${SGLANG_SRC} python/sglang/srt/mem_cache/kv_cache_configurator.py _profile_available_bytes`
48373
+ });
48374
+ } else if (conc < 1) {
48375
+ findings.push({
48376
+ rule: "kv-under-one-sequence",
48377
+ area: "memory",
48378
+ severity: "warn",
48379
+ title: `The KV pool holds ${tokens.toLocaleString("en-US")} tokens, under one ${servedLen}-token request`,
48380
+ detail: `${gib(kvBudget)} for KV at ${Math.round(cell).toLocaleString("en-US")} bytes per token (${x.kvName}). The server starts, and the longest requests it advertises cannot be scheduled.`,
48381
+ fix: `Serve at most ~${Math.floor(tokens / 1024) * 1024} tokens, use an fp8 KV cache, or raise TP.`
48382
+ });
48383
+ } else {
48384
+ checked.push("memory-fit");
48385
+ if (args.maxNumSeqs != null && args.maxNumSeqs > Math.floor(conc)) findings.push({
48386
+ rule: "seqs-over-capacity",
48387
+ area: "memory",
48388
+ severity: "warn",
48389
+ title: `--max-running-requests ${args.maxNumSeqs}, but at most ${Math.floor(conc)} requests fit at the full ${servedLen} tokens`,
48390
+ detail: `max_total_num_tokens would be ~${tokens.toLocaleString("en-US")} (${gib(kvBudget)} at ${Math.round(cell).toLocaleString("en-US")} bytes per token). Shorter requests pack more; long ones queue past ~${Math.floor(conc)}.`,
48391
+ fix: `Set the flag to what fits (${Math.max(1, Math.floor(conc))}), shorten the context, use an fp8 KV cache, or add DP replicas.`
48392
+ });
48393
+ if (!findings.some((f) => f.rule === "seqs-over-capacity")) findings.push({
48394
+ rule: "kv-capacity",
48395
+ area: "memory",
48396
+ severity: "info",
48397
+ title: `SGLang would allocate ~${tokens.toLocaleString("en-US")} KV tokens (max_total_num_tokens, predicted): ${Math.floor(conc)} full ${servedLen}-token requests`,
48398
+ detail: `Per GPU: ${gib(total.gib)} x mem_fraction_static ${frac}${args.memFractionStatic == null ? " (SGLang's own default)" : ""} = ${gib(total.gib * frac)}, less weights ${gib(weightsGib)}${x.shareWord}, at ${Math.round(cell).toLocaleString("en-US")} bytes per token (${x.kvName}).`,
48399
+ fix: ""
48400
+ });
48401
+ }
48402
+ return { memory, findings, checked };
48403
+ }
48404
+ if (engine === "llamacpp") {
48405
+ const nCtx = x.kvTokensAllocated ?? servedLen;
48406
+ const nSeq = args.nParallel ?? 1;
48407
+ const unified = args.kvUnified ?? args.nParallel == null;
48408
+ const ub = args.nUbatch ?? 512;
48409
+ const scale = x.kvBytes / 2;
48410
+ let kvAlloc = 0;
48411
+ const swaNotes = [];
48412
+ const tcfg = textConfigOf(x.config);
48413
+ const lora = num3(tcfg.kv_lora_rank) ?? 0, ropeD = num3(tcfg.qk_rope_head_dim) ?? 0;
48414
+ const mlaFactor = lora ? (2 * lora + ropeD) / (lora + ropeD) : 1;
48415
+ for (const l of stage.layers) {
48416
+ if (l.kind === "mamba") {
48417
+ kvAlloc += (l.stateBytes ?? 0) * nSeq;
48418
+ continue;
48419
+ }
48420
+ if (l.kind === "cross") continue;
48421
+ const perTok = l.bytesPerToken * scale * (l.kind === "mla" ? mlaFactor : 1);
48422
+ const cells = (l.kind === "sliding" || l.kind === "chunked") && !args.swaFull ? llamacppSwaCells(nCtx, l.window ?? nCtx, nSeq, unified, ub) : nCtx;
48423
+ if (cells < nCtx && !swaNotes.length) swaNotes.push(`sliding-window layers keep ${cells.toLocaleString("en-US")} cells, not ${nCtx.toLocaleString("en-US")} (GGML_PAD(min(n_ctx, n_swa x n_seq + n_ubatch), 256), ${LLAMACPP_SRC} src/llama-kv-cache-iswa.cpp)`);
48424
+ kvAlloc += perTok * cells;
48425
+ }
48426
+ const kvGb = kvAlloc / 1e9;
48427
+ const conc = unified ? Math.max(1, Math.floor(nCtx / servedLen)) : nSeq;
48428
+ const memory = {
48429
+ ...base,
48430
+ kvBytesPerTokenPerGpu: kvPerTok * scale,
48431
+ budgetGbPerGpu: card.memoryGB,
48432
+ kvGbPerSequencePerGpu: kvPerTok * scale * servedLen / 1e9,
48433
+ kvCapacityGbPerGpu: kvGb,
48434
+ tokenCapacity: nCtx,
48435
+ maxConcurrentFullLength: conc,
48436
+ layoutNotes: [...stage.notes, ...swaNotes],
48437
+ notCounted: ["llama.cpp's compute buffers (measured by --fit / llama-fit-params; not counted here)", "host RAM for layers left on the CPU"]
48438
+ };
48439
+ const need = x.weightsPerGpuBytes / 1e9 + kvGb;
48440
+ if (need > card.memoryGB - (x.usedGib ?? 0) * GiB / 1e9) {
48441
+ const ngl = args.nGpuLayers;
48442
+ const explicitAll = ngl === "all" || typeof ngl === "number" && ngl > 0;
48443
+ findings.push({
48444
+ rule: "memory-over-card",
48445
+ area: "memory",
48446
+ severity: explicitAll ? "block" : "warn",
48447
+ title: `Weights ${gbs(x.weightsPerGpuBytes / 1e9)} + KV for ${nCtx} tokens ${gbs(kvGb)} = ${gbs(need)} per GPU, over the ${card.label}`,
48448
+ detail: explicitAll ? "llama.cpp allocates the whole -c context up front; with these layers forced onto the GPU the allocation fails at load." : "With -ngl auto llama.cpp keeps the layers that do not fit on the CPU, which runs, at CPU memory bandwidth for those layers.",
48449
+ fix: "Lower -c, quantize the cache (-ctk q8_0 -ctv q8_0 halves it), pick a smaller quant, or offload fewer layers; llama-fit-params --model <file> prints the -c / -ngl / -ot llama.cpp itself would choose."
48450
+ });
48451
+ } else checked.push("memory-fit");
48452
+ return { memory, findings, checked };
48453
+ }
48454
+ return null;
48455
+ }
48456
+ var RECIPE_GPU_OF = { "h100-sxm": "h100", "h200": "h200", "b200": "b200", "l40s": "l40s", "a100-80g": "a100", "a100-40g": "a100" };
48457
+ function findRecipe(modelId) {
48458
+ if (!modelId) return null;
48459
+ const want = modelId.toLowerCase();
48460
+ for (const [id, rc] of Object.entries(VLLM_RECIPES.recipes)) if (id.toLowerCase() === want) return { id, recipe: rc, variant: "default" in rc.variants ? "default" : null };
48461
+ for (const [id, rc] of Object.entries(VLLM_RECIPES.recipes)) for (const [vn, v] of Object.entries(rc.variants)) if (v.modelId && v.modelId.toLowerCase() === want) return { id, recipe: rc, variant: vn };
48462
+ return null;
48463
+ }
45950
48464
  var gbs = (x) => `${x.toFixed(x < 10 ? 2 : 1)} GB`;
45951
48465
  var divisors2 = (n2) => {
45952
48466
  const d = [];
45953
48467
  for (let i = 1; i <= n2; i++) if (n2 % i === 0) d.push(i);
45954
48468
  return d;
45955
48469
  };
48470
+ function visionKeptSplit(split, config, quant) {
48471
+ if (!quant || !config?.vision_config) return split;
48472
+ const qc = config.quantization_config ?? textConfigOf(config).quantization_config ?? null;
48473
+ if (!qc) return split;
48474
+ const lists = ["ignore", "modules_to_not_convert", "llm_int8_skip_modules", "ignored_layers"].map((k) => qc[k]).filter(Array.isArray).flat().map(String);
48475
+ if (!lists.some((x) => /visual|vision/i.test(x))) return split;
48476
+ const vp = visionTowerParams(config) ?? 0;
48477
+ return { ...split, edge: Math.min(split.total, split.edge + vp) };
48478
+ }
45956
48479
  function weightBytes(split, dtypeBytes, quant, bits, engine, ggufType) {
45957
48480
  const { total, expert, edge } = split;
45958
48481
  if (engine === "llamacpp") {
@@ -45987,6 +48510,29 @@ function weightBytes(split, dtypeBytes, quant, bits, engine, ggufType) {
45987
48510
  }
45988
48511
  }
45989
48512
  }
48513
+ function textGeometry(tc, fallback) {
48514
+ const heads = posInt4(tc.num_attention_heads) ?? posInt4(tc.n_head);
48515
+ const experts = posInt4(tc.n_routed_experts) ?? posInt4(tc.num_experts) ?? posInt4(tc.num_local_experts) ?? posInt4(tc.moe_num_experts);
48516
+ const dense = posInt4(tc.intermediate_size);
48517
+ const moeW = posInt4(tc.moe_intermediate_size);
48518
+ const hasDense = (posInt4(tc.first_k_dense_replace) ?? 0) > 0 || Array.isArray(tc.mlp_layer_types) && tc.mlp_layer_types.some((x) => /dense/i.test(String(x)));
48519
+ return {
48520
+ numHeads: heads ?? fallback.numHeads,
48521
+ numKVHeads: posInt4(tc.num_key_value_heads) ?? heads ?? fallback.numKVHeads,
48522
+ hidden: posInt4(tc.hidden_size) ?? fallback.hidden,
48523
+ ffn: (experts ? hasDense ? dense ?? moeW : moeW ?? dense : dense) ?? fallback.ffn,
48524
+ numExperts: experts ?? (heads ? null : fallback.numExperts),
48525
+ vocab: posInt4(tc.vocab_size) ?? fallback.vocab
48526
+ };
48527
+ }
48528
+ var TEXT_MAX_LEN_DEFAULT = [[/^gemma3_text$/, 131072]];
48529
+ function textLengthConfig(tc) {
48530
+ if (posInt4(tc.max_position_embeddings) != null) return tc;
48531
+ const d = TEXT_MAX_LEN_DEFAULT.find(([re]) => re.test(String(tc.model_type ?? "")));
48532
+ return d ? { ...tc, max_position_embeddings: d[1] } : tc;
48533
+ }
48534
+ var PUBLISHED_WEIGHTS_TOLERANCE = 0.1;
48535
+ var STORED_FLOAT_BYTES = { F64: 8, F32: 4, F16: 2, BF16: 2 };
45990
48536
  function checkServeConfig(input) {
45991
48537
  const { engine, args, model } = input;
45992
48538
  const config = input.config ?? null;
@@ -45994,12 +48540,14 @@ function checkServeConfig(input) {
45994
48540
  const skipped = [];
45995
48541
  const findings = [];
45996
48542
  const add = (f) => findings.push(f);
45997
- const geo = geometryOf(model);
45998
48543
  const comps = model.components ?? [];
45999
- const hasMla = comps.some((c) => c.type === "mla");
46000
- const learned = comps.some((c) => c.type === "learnedPositionalEmbedding" || c.type === "positionalEncoding");
46001
- const card = input.gpu ? resolveLayoutGpu(input.gpu) : null;
46002
- const sm = card ? CARD_SM[card.id] ?? null : null;
48544
+ const tc = config ? textConfigOf(config) : null;
48545
+ const multimodal = !!config && !!tc && (tc !== config || config.vision_config != null || config.audio_config != null || config.thinker_config != null);
48546
+ const geo = multimodal ? textGeometry(tc, geometryOf(model)) : geometryOf(model);
48547
+ const hasMla = comps.some((c) => c.type === "mla") || multimodal && (posInt4(tc.kv_lora_rank) != null || Array.isArray(tc.compress_ratios));
48548
+ const learned = multimodal ? /^(opt|gpt2|gpt_bigcode|gptj|gpt_neo)$/.test(String(tc.model_type ?? "")) : comps.some((c) => c.type === "learnedPositionalEmbedding" || c.type === "positionalEncoding");
48549
+ const card = input.gpu != null || input.gpuMemGiB != null ? resolveServeGpu(input.gpu, input.gpuMemGiB) : null;
48550
+ const sm = card ? smOfCard(card.id) : null;
46003
48551
  const lc = engine === "llamacpp";
46004
48552
  const tp = lc ? 1 : Math.max(1, args.tp ?? 1);
46005
48553
  const pp = lc ? 1 : Math.max(1, args.pp ?? 1);
@@ -46010,6 +48558,35 @@ function checkServeConfig(input) {
46010
48558
  const modelType = String(config?.model_type ?? "");
46011
48559
  const ident = `${modelType} ${input.modelId ?? ""} ${model.name ?? ""}`;
46012
48560
  const ckpt = checkpointQuant(config);
48561
+ const defaultsAssumed = [];
48562
+ const givenVersion = input.engineVersion != null ? readEngineVersion(input.engineVersion) : null;
48563
+ const ver = lc ? null : givenVersion ?? readEngineVersion(engine === "vllm" ? ASSUMED_VLLM_VERSION : ASSUMED_SGLANG_VERSION);
48564
+ const versionLabel = lc ? null : `${engine === "vllm" ? "vLLM" : "SGLang"} ${givenVersion ? input.engineVersion : engine === "vllm" ? ASSUMED_VLLM_VERSION : ASSUMED_SGLANG_VERSION}`;
48565
+ if (!lc && !givenVersion) defaultsAssumed.push(`${versionLabel} (no --${engine}-version given; the newest release the tables were read from)`);
48566
+ const vllmDefaults = engine === "vllm" && card && ver ? vllmVersionDefaults(ver, card, pp) : null;
48567
+ if (vllmDefaults) {
48568
+ if (args.gpuMemoryUtilization == null) defaultsAssumed.push(`gpu_memory_utilization ${vllmDefaults.gpuMemoryUtilization} (vLLM ${vllmDefaults.gpuMemoryUtilization === 0.92 ? ">= 0.20.0" : "< 0.20.0"} default)`);
48569
+ defaultsAssumed.push(`CUDA graph memory ${vllmDefaults.cudaGraphsCounted ? args.enforceEager ? "none (--enforce-eager)" : "taken from the KV budget (vLLM >= 0.20.0)" : "not taken from the KV budget (vLLM < 0.20.0)"}`);
48570
+ if (args.maxNumBatchedTokens == null) defaultsAssumed.push(`max_num_batched_tokens ${vllmDefaults.maxNumBatchedTokens} (vllm serve default on ${card.label})`);
48571
+ if (args.maxNumSeqs == null) defaultsAssumed.push(`max_num_seqs ${vllmDefaults.maxNumSeqs} (vllm serve default on ${card.label})`);
48572
+ }
48573
+ const sglMib = card ? /@/.test(card.id) ? Math.round(cardTotalGiB(card.id, card.memoryGB).gib * 1024 + TORCH_GAP_MIB) : CARD_NVSMI_MIB[card.id]?.mib ?? card.memoryGB * 1024 : null;
48574
+ const sglDefault = engine === "sglang" && sglMib != null ? sglangMemoryDefaults({
48575
+ gpuMemMiB: sglMib,
48576
+ tp,
48577
+ pp,
48578
+ chunkedPrefill: args.chunkedPrefillSize,
48579
+ maxRunningRequests: args.maxNumSeqs,
48580
+ mla: hasMla || posInt4(config ? textConfigOf(config).kv_lora_rank : null) != null,
48581
+ dpAttention: args.dpAttention ? dp : void 0,
48582
+ deepep: args.deepep,
48583
+ disableCudaGraph: args.enforceEager,
48584
+ modelPath: args.model ?? input.modelId
48585
+ }) : null;
48586
+ if (sglDefault) {
48587
+ if (args.memFractionStatic == null) defaultsAssumed.push(`mem_fraction_static ${sglDefault.memFractionStatic} (SGLang's own formula on a ${sglMib} MiB card)`);
48588
+ if (args.chunkedPrefillSize == null) defaultsAssumed.push(`chunked_prefill_size ${sglDefault.chunkedPrefill} (SGLang tier default)`);
48589
+ }
46013
48590
  if (lc) {
46014
48591
  skipped.push({ check: "parallel", reason: "llama.cpp splits whole layers (and their KV) across GPUs by default (--split-mode layer), so no head or width divisibility applies." });
46015
48592
  } else {
@@ -46096,6 +48673,41 @@ function checkServeConfig(input) {
46096
48673
  });
46097
48674
  }
46098
48675
  }
48676
+ const ratios = tc && Array.isArray(tc.compress_ratios) ? tc.compress_ratios.map((x) => Number(x) || 0) : null;
48677
+ const nLayers = tc ? posInt4(tc.num_hidden_layers) : null;
48678
+ if (ratios && nLayers && pp > 1) {
48679
+ checked.push("pp-kv-sharing");
48680
+ const parts = Array.from({ length: pp }, () => Math.floor(nLayers / pp));
48681
+ for (let i = 2; i < nLayers % pp + 2; i++) parts[pp - i] += 1;
48682
+ const stageOf = [];
48683
+ parts.forEach((n2, st) => {
48684
+ for (let k = 0; k < n2; k++) stageOf.push(st);
48685
+ });
48686
+ const srcs = (k) => Array.isArray(tc[k]) ? tc[k].map(Number) : [];
48687
+ const kvS = srcs("kv_source_layer_ids"), ixS = srcs("index_source_layer_ids");
48688
+ const split = [];
48689
+ for (let i = 0; i < nLayers; i++) {
48690
+ if (!(ratios[i] > 0)) continue;
48691
+ for (const list2 of [kvS, ixS]) {
48692
+ const below = list2.filter((x) => x <= i);
48693
+ if (below.length && stageOf[Math.max(...below)] !== stageOf[i]) {
48694
+ split.push(i);
48695
+ break;
48696
+ }
48697
+ }
48698
+ }
48699
+ if (split.length) {
48700
+ add({
48701
+ rule: "pp-kv-sharing",
48702
+ area: "parallel",
48703
+ severity: "block",
48704
+ title: `PP ${pp} puts ${split.length} compressed-attention layer${split.length === 1 ? "" : "s"} on a different stage from the layer that owns their cache (first: layer ${split[0]})`,
48705
+ detail: `${modelType} layers read the compressed KV and indexer caches of the nearest kv / index source layer below them; vLLM refuses a pipeline split that separates the two ("PP splits inside a v4.1 kv-sharing group are not supported"). Stages here: ${parts.join(" / ")} layers.`,
48706
+ fix: "Use a PP size whose stage boundaries fall on source layers, or TP / EP instead of PP.",
48707
+ source: "vllm-project/vllm vllm/models/deepseek_v41/attention.py"
48708
+ });
48709
+ }
48710
+ }
46099
48711
  if (geo.numExperts != null) {
46100
48712
  checked.push("expert-parallel");
46101
48713
  if (ep) {
@@ -46150,7 +48762,7 @@ function checkServeConfig(input) {
46150
48762
  if (lc && (args.ropeScale != null || args.ropeScalingType != null) && String(args.ropeScalingType ?? "linear") !== "none") {
46151
48763
  ropeOverride = { rope_type: args.ropeScalingType ?? "linear", factor: args.ropeScale ?? 1, ...args.yarnOrigCtx ? { original_max_position_embeddings: args.yarnOrigCtx } : {} };
46152
48764
  }
46153
- const derived = derivedMaxLen(config, ropeOverride, args.maxPositionOverride, graphMax);
48765
+ const derived = derivedMaxLen(multimodal ? textLengthConfig(tc) : config, ropeOverride, args.maxPositionOverride, multimodal ? null : graphMax);
46154
48766
  let servedLen = null;
46155
48767
  let servedLenSource = "";
46156
48768
  let kvTokensAllocated = null;
@@ -46206,14 +48818,44 @@ function checkServeConfig(input) {
46206
48818
  }
46207
48819
  }
46208
48820
  } else skipped.push({ check: "context", reason: derived.native == null ? "the config states no maximum length (max_position_embeddings)." : "no served length." });
46209
- const cfgDtype = normDtype(String(config?.torch_dtype ?? config?.dtype ?? "")) ?? null;
48821
+ const cfgDtype = normDtype(String(config?.torch_dtype ?? config?.dtype ?? tc?.torch_dtype ?? tc?.dtype ?? "")) ?? null;
46210
48822
  const flagDtype = normDtype(args.dtype);
46211
48823
  let dtype = flagDtype && flagDtype !== "auto" ? flagDtype : cfgDtype && cfgDtype !== "auto" ? cfgDtype : "bf16";
48824
+ if (!lc && cfgDtype === "fp32" && (flagDtype == null || flagDtype === "auto")) {
48825
+ const fp16Unsafe = /^(gemma2|gemma3|gemma3_text|glm4)$/.test(modelType);
48826
+ dtype = engine === "vllm" ? sm == null || sm >= 80 ? "bf16" : fp16Unsafe ? "fp32" : "fp16" : /^gemma/.test(modelType) ? "bf16" : "fp16";
48827
+ defaultsAssumed.push(`dtype ${dtype}: the config says float32 and --dtype auto downcasts it (${engine === "vllm" ? "vLLM _resolve_auto_dtype" : "SGLang _get_and_verify_dtype"})`);
48828
+ }
46212
48829
  if (flagDtype === "fp32" && cfgDtype && cfgDtype !== "fp32") {
46213
48830
  }
46214
48831
  const flagQuant = normalizeQuant(args.quantization);
46215
48832
  const quant = lc ? "gguf" : flagQuant ?? ckpt.method;
46216
- const ggufType = lc ? ggufQuantOf(args.ggufFile) : null;
48833
+ const gguf = lc ? input.gguf ?? null : null;
48834
+ const ggufType = lc ? gguf?.fileType && GGUF_BPW[gguf.fileType] != null ? gguf.fileType : gguf?.dominantType ?? ggufQuantOf(args.ggufFile) : null;
48835
+ if (gguf) {
48836
+ checked.push("gguf-header");
48837
+ const cfgLayers = posInt4(config ? textConfigOf(config).num_hidden_layers : null);
48838
+ if (cfgLayers != null && gguf.blockCount != null && gguf.blockCount !== cfgLayers) {
48839
+ add({
48840
+ rule: "gguf-config-mismatch",
48841
+ area: "context",
48842
+ severity: "warn",
48843
+ title: `The GGUF has ${gguf.blockCount} blocks; the config.json given has ${cfgLayers} layers`,
48844
+ detail: `The repo named for the config is not the one ${gguf.source} was converted from (or the file is a pruned / merged build), so the context, template and sampler checks read the wrong model.`,
48845
+ fix: "Give the Hugging Face id the GGUF was converted from as the model."
48846
+ });
48847
+ }
48848
+ if (gguf.contextLength != null && derivedMaxLenRaw(config) != null && gguf.contextLength !== derivedMaxLenRaw(config)) {
48849
+ add({
48850
+ rule: "gguf-context",
48851
+ area: "context",
48852
+ severity: "info",
48853
+ title: `The GGUF records a ${gguf.contextLength}-token training context (${gguf.arch}.context_length); config.json says ${derivedMaxLenRaw(config)}`,
48854
+ detail: "llama.cpp reads the GGUF value (n_ctx_train), not config.json, for -c 0 and for its past-the-trained-length warning.",
48855
+ fix: ""
48856
+ });
48857
+ }
48858
+ }
46217
48859
  if (!lc && flagQuant && ckpt.method && flagQuant !== ckpt.method) {
46218
48860
  const compatible = flagQuant === "marlin" && (ckpt.method === "gptq" || ckpt.method === "awq");
46219
48861
  if (!compatible) {
@@ -46258,28 +48900,91 @@ function checkServeConfig(input) {
46258
48900
  }
46259
48901
  }
46260
48902
  if (quant != null) {
46261
- const row = QUANT_SUPPORT.find((r) => r.method === quant);
46262
- if (!row) skipped.push({ check: "quant-support", reason: `no support row for quant method "${quant}".` });
46263
- else if (sm < row.fallbackSm) {
46264
- add({
46265
- rule: "quant-unsupported",
46266
- area: "quant",
46267
- severity: "block",
46268
- title: `${quant} weights on ${card.label} (sm${sm}): not supported`,
46269
- detail: `${quant} needs sm${row.fallbackSm} or newer${row.nativeSm !== row.fallbackSm ? ` (sm${row.nativeSm} for the native kernels)` : ""}; the engine refuses at load.`,
46270
- fix: `Use a ${quant === "mxfp4" ? "bf16 build of the model" : "different quantization"} on this card, or an sm${row.fallbackSm}+ card.`,
46271
- source: row.source
46272
- });
46273
- } else if (sm < row.nativeSm) {
46274
- add({
46275
- rule: "quant-fallback",
46276
- area: "quant",
46277
- severity: "warn",
46278
- title: `${quant} on ${card.label} (sm${sm}) is not native: it runs on a fallback kernel`,
46279
- detail: `Native ${quant} kernels need sm${row.nativeSm}+. On this card it ${row.fallbackNote ?? "runs on a slower path"}.`,
46280
- fix: `Expect the memory saving and not the speedup; for native ${quant} use an sm${row.nativeSm}+ card.`,
46281
- source: row.source
46282
- });
48903
+ const table = quantTableFor(engine, ver);
48904
+ const rawMethod = (args.quantization ?? ckpt.raw ?? "").toLowerCase();
48905
+ const key = engineQuantKey(args.quantization ? rawMethod : ckpt.raw ?? null, args.quantization ? null : config?.quantization_config ?? null);
48906
+ const where = (at) => table && at ? `github.com/${table.repo}/blob/${table.commit.slice(0, 10)}/${at.replace("#L", "#L")}` : null;
48907
+ if (table && key) {
48908
+ const entry = table.methods[key.method] ?? (!args.quantization ? table.methods[`${key.method}_marlin`] : void 0);
48909
+ const label = `${engine === "vllm" ? "vLLM" : "SGLang"} ${table.tag}`;
48910
+ const plugin = engine === "vllm" ? VLLM_PLUGIN_MIGRATIONS[key.method] : void 0;
48911
+ if (plugin && ver && vAtLeast(ver, readEngineVersion(plugin.since))) {
48912
+ add({
48913
+ rule: "quant-method-plugin",
48914
+ area: "quant",
48915
+ severity: "warn",
48916
+ title: `${key.method} left vLLM's tree in ${plugin.since}: it loads only with ${plugin.plugin} installed`,
48917
+ detail: `${plugin.pr} moved it to an out-of-tree plugin; without the plugin the registry has no "${key.method}" and vLLM ${versionLabel?.replace("vLLM ", "")} refuses the model at load.`,
48918
+ fix: `uv pip install ${plugin.plugin}, or pin vLLM below ${plugin.since}.`,
48919
+ source: `github.com/vllm-project/vllm/pull/${plugin.pr.slice(1)}`
48920
+ });
48921
+ } else if (!entry) {
48922
+ add({
48923
+ rule: "quant-method-unknown",
48924
+ area: "quant",
48925
+ severity: "block",
48926
+ title: `${label} has no quantization method "${key.method}"`,
48927
+ detail: `The method registry at ${table.tag} (${Object.keys(table.methods).length} methods) does not list it, so the engine refuses it at load ("Invalid quantization method" / "Unknown quantization method").${engine === "vllm" && /bitsandbytes|gguf/.test(key.method) ? " vLLM removed it from the registry after 0.19." : ""}`,
48928
+ fix: `Use a release that lists it (pass --${engine}-version to check another), or a checkpoint in a method this release lists.`,
48929
+ source: `github.com/${table.repo}/blob/${table.commit.slice(0, 10)}/${engine === "vllm" ? "vllm/model_executor/layers/quantization/__init__.py" : "python/sglang/srt/layers/quantization/__init__.py"}`
48930
+ });
48931
+ } else {
48932
+ const scheme = key.scheme ? table.compressedTensorsSchemes[key.scheme] : null;
48933
+ const minSm = scheme?.minSm ?? entry.minSm;
48934
+ const at = scheme?.at ?? entry.at;
48935
+ if (minSm != null && sm < minSm) {
48936
+ add({
48937
+ rule: "quant-unsupported",
48938
+ area: "quant",
48939
+ severity: "block",
48940
+ title: `${key.method}${key.scheme ? ` (${key.scheme})` : ""} needs sm${minSm} on ${label}; ${card.label} is sm${sm}`,
48941
+ detail: `${label}'s ${entry.cls}${key.scheme ? ` / ${key.scheme} scheme` : ""} declares get_min_capability() = ${minSm}; the engine compares it with the card at load and refuses below it.`,
48942
+ fix: `Use a card at sm${minSm} or newer, a different quantization, or the unquantized checkpoint.`,
48943
+ source: where(at) ?? void 0
48944
+ });
48945
+ } else {
48946
+ const row = QUANT_SUPPORT.find((r) => r.method === quant);
48947
+ if (row && sm < row.nativeSm) {
48948
+ add({
48949
+ rule: "quant-fallback",
48950
+ area: "quant",
48951
+ severity: "warn",
48952
+ title: `${quant} on ${card.label} (sm${sm}) is not native: it runs on a fallback kernel`,
48953
+ detail: `${label} accepts it here (minimum sm${minSm ?? "?"}), but native ${quant} kernels need sm${row.nativeSm}+. On this card it ${row.fallbackNote ?? "runs on a slower path"}.`,
48954
+ fix: `Expect the memory saving and not the speedup; for native ${quant} use an sm${row.nativeSm}+ card.`,
48955
+ source: row.source
48956
+ });
48957
+ }
48958
+ }
48959
+ const other = quantTableFor(engine === "vllm" ? "sglang" : "vllm", null);
48960
+ const oe = other?.methods[key.method];
48961
+ const oMin = key.scheme ? other?.compressedTensorsSchemes[key.scheme]?.minSm ?? oe?.minSm : oe?.minSm;
48962
+ if (other && oMin != null && minSm != null && oMin !== minSm && sm >= Math.min(oMin, minSm) && sm < Math.max(oMin, minSm)) {
48963
+ add({
48964
+ rule: "quant-engine-differs",
48965
+ area: "quant",
48966
+ severity: "info",
48967
+ title: `${key.method}${key.scheme ? ` (${key.scheme})` : ""} on sm${sm}: ${label} needs sm${minSm}, ${other.engine === "vllm" ? "vLLM" : "SGLang"} ${other.tag} needs sm${oMin}`,
48968
+ detail: "The two engines gate the same method at different compute capabilities, so a launch that loads on one is refused by the other on this card.",
48969
+ fix: "Keep it in mind if the deployment moves engines.",
48970
+ source: [where(at), other && oe?.at ? `github.com/${other.repo}/blob/${other.commit.slice(0, 10)}/${oe.at}` : null].filter(Boolean).join("; ")
48971
+ });
48972
+ }
48973
+ }
48974
+ } else {
48975
+ const row = QUANT_SUPPORT.find((r) => r.method === quant);
48976
+ if (!row) skipped.push({ check: "quant-support", reason: `no support row for quant method "${quant}".` });
48977
+ else if (sm < row.fallbackSm) {
48978
+ add({
48979
+ rule: "quant-unsupported",
48980
+ area: "quant",
48981
+ severity: "block",
48982
+ title: `${quant} weights on ${card.label} (sm${sm}): not supported`,
48983
+ detail: `${quant} needs sm${row.fallbackSm} or newer${row.nativeSm !== row.fallbackSm ? ` (sm${row.nativeSm} for the native kernels)` : ""}; the engine refuses at load.`,
48984
+ fix: `Use a ${quant === "mxfp4" ? "bf16 build of the model" : "different quantization"} on this card, or an sm${row.fallbackSm}+ card.`,
48985
+ source: row.source
48986
+ });
48987
+ }
46283
48988
  }
46284
48989
  }
46285
48990
  }
@@ -46289,7 +48994,40 @@ function checkServeConfig(input) {
46289
48994
  else {
46290
48995
  const peak = inferencePeakFor(model, { promptTokens: servedLen, genTokens: 0, batch: 1, precision: "bf16" });
46291
48996
  const split = paramSplit(model);
46292
- const w = weightBytes(split, DTYPE_BYTES[dtype], quant, ckpt.bits, engine, ggufType);
48997
+ const sizeQuant = !lc && !flagQuant && ckpt.store === "mxfp4" ? "mxfp4" : quant;
48998
+ let w = gguf ? { bytes: gguf.tensorBytes, basis: `${gguf.tensorCount} tensors in the GGUF header, mostly ${gguf.dominantType ?? "?"}${gguf.fileType ? ` (file type ${gguf.fileType})` : ""}, summed at ggml's block sizes (${LLAMACPP_SRC} ggml-common.h); read from ${gguf.source}` } : weightBytes(visionKeptSplit(split, config, quant), DTYPE_BYTES[dtype], sizeQuant, ckpt.bits, engine, ggufType);
48999
+ const pub = input.publishedWeights ?? null;
49000
+ if (w && !lc && pub && pub.totalBytes > 0) {
49001
+ if (flagQuant && flagQuant !== ckpt.method && !(flagQuant === "marlin" && (ckpt.method === "gptq" || ckpt.method === "awq"))) {
49002
+ skipped.push({ check: "weights-vs-checkpoint", reason: `--quantization ${args.quantization} changes the weights at load, so the stored size says nothing about what is on the GPU.` });
49003
+ } else {
49004
+ checked.push("weights-vs-checkpoint");
49005
+ const dp2 = pub.dtypeParams ?? null;
49006
+ let loaded = pub.totalBytes;
49007
+ let how = `${(pub.totalBytes / 1e9).toFixed(1)} GB stored (${pub.source})`;
49008
+ if (quant == null && dp2 && Object.keys(dp2).length && Object.keys(dp2).every((k) => k in STORED_FLOAT_BYTES)) {
49009
+ const n2 = Object.values(dp2).reduce((a, b) => a + b, 0);
49010
+ const stored = Object.entries(dp2).reduce((a, [k, v]) => a + v * STORED_FLOAT_BYTES[k], 0);
49011
+ loaded = n2 * DTYPE_BYTES[dtype];
49012
+ if (Math.abs(stored - loaded) > 0.01 * loaded) how = `${(n2 / 1e9).toFixed(2)}B stored parameters (${Object.keys(dp2).join(", ")}, ${(stored / 1e9).toFixed(1)} GB on disk) loaded as ${dtype}, ${(loaded / 1e9).toFixed(1)} GB (${pub.source})`;
49013
+ }
49014
+ const off = w.bytes / loaded - 1;
49015
+ if (Math.abs(off) > PUBLISHED_WEIGHTS_TOLERANCE) {
49016
+ add({
49017
+ rule: "weights-vs-checkpoint",
49018
+ area: "memory",
49019
+ severity: "warn",
49020
+ title: `Weights read from config.json come to ${gbs(w.bytes / 1e9)}; the checkpoint itself is ${gbs(loaded / 1e9)} (${off > 0 ? "+" : ""}${(off * 100).toFixed(0)}%): memory below uses the checkpoint's size`,
49021
+ detail: `Derived: ${w.basis}. Published: ${how}${pub.saveFormat ? `, save_format ${pub.saveFormat}` : ""}. A gap past ${PUBLISHED_WEIGHTS_TOLERANCE * 100}% means the config does not describe the stored tensors the way this check reads them (a storage format the quantization_config does not name, modules kept 16-bit, a tower or expert set the reading missed). The published size counts every tensor in the repo, including any the engine skips (MTP layers, a speech talker), so for those it is an upper bound.`,
49022
+ fix: "Nothing to change in the launch; the verdict below is sized on the published bytes.",
49023
+ source: pub.source
49024
+ });
49025
+ w = { bytes: loaded, basis: `the checkpoint's own size, ${how}; config.json alone gave ${gbs(w.bytes / 1e9)}` };
49026
+ } else {
49027
+ w = { ...w, basis: `${w.basis}; within ${Math.abs(off * 100).toFixed(1)}% of the checkpoint's ${gbs(loaded / 1e9)}` };
49028
+ }
49029
+ }
49030
+ }
46293
49031
  if (!peak || !w || !(split.total > 0)) {
46294
49032
  skipped.push({ check: "memory", reason: !w && lc ? `the GGUF quant type is not readable from "${args.ggufFile ?? "(no -m)"}"; name the file with its type (e.g. model-Q4_K_M.gguf).` : "the graph has no parameter count to size." });
46295
49033
  } else {
@@ -46344,6 +49082,7 @@ function checkServeConfig(input) {
46344
49082
  kvCapacityGbPerGpu: Math.max(0, capGb),
46345
49083
  tokenCapacity,
46346
49084
  maxConcurrentFullLength: Math.floor(conc * 100) / 100,
49085
+ method: "upper-bound",
46347
49086
  notCounted: [
46348
49087
  "the engine's activation reserve from its profiling run, CUDA graphs and communication buffers (they come out of the same budget, so capacity here is an upper bound)",
46349
49088
  "the card's real usable memory, which is below the nominal figure",
@@ -46352,7 +49091,36 @@ function checkServeConfig(input) {
46352
49091
  };
46353
49092
  const budgetWord = lc ? `${card.memoryGB} GB on the card` : `${card.memoryGB} GB x ${fraction} = ${gbs(budgetGb)}`;
46354
49093
  const shareWord = lc ? gpus > 1 ? ` (layers split over ${gpus} GPUs)` : "" : ` after TP ${tp}${pp > 1 ? ` x PP ${pp}` : ""}${ep && split.expert > 0 ? " with experts spread by EP" : ""}`;
46355
- if (lc) {
49094
+ const layout = config ? kvLayoutFromConfig(config, { tp: lc ? 1 : tp, kvBytes: lc ? 2 : kvBytes, modelBytes: DTYPE_BYTES[dtype] }) : null;
49095
+ const eng = layout && config ? engineMemory({
49096
+ engine,
49097
+ args,
49098
+ card,
49099
+ config,
49100
+ layout,
49101
+ tp,
49102
+ pp,
49103
+ ep,
49104
+ servedLen,
49105
+ kvTokensAllocated,
49106
+ weightsPerGpuBytes: weightsPerGpu,
49107
+ weights: w,
49108
+ kvBytes,
49109
+ kvName,
49110
+ actBytes: DTYPE_BYTES[dtype],
49111
+ vllmDefaults,
49112
+ engineVersionTuple: ver,
49113
+ sglDefault,
49114
+ versionLabel,
49115
+ gpus,
49116
+ shareWord,
49117
+ usedGib: input.gpuMemUsedGiB
49118
+ }) : null;
49119
+ if (eng) {
49120
+ memory = eng.memory;
49121
+ checked.push(...eng.checked);
49122
+ for (const f of eng.findings) add(f);
49123
+ } else if (lc) {
46356
49124
  const need = weightsGb + kvPerTokGpu * (kvTokensAllocated ?? servedLen) / 1e9;
46357
49125
  const ngl = args.nGpuLayers;
46358
49126
  if (need > budgetGb) {
@@ -46481,6 +49249,91 @@ function checkServeConfig(input) {
46481
49249
  fix: "Add --tool-call-parser for this family (e.g. hermes for Qwen, llama3_json for Llama 3, kimi_k2, openai for gpt-oss)."
46482
49250
  });
46483
49251
  }
49252
+ if (engine === "vllm") {
49253
+ const hit = findRecipe(input.modelId ?? args.model ?? null);
49254
+ if (!hit) skipped.push({ check: "recipe", reason: `no vLLM recipe for "${input.modelId ?? args.model ?? "(no model id)"}" in the ${VLLM_RECIPES.count}-recipe index (vllm-project/recipes@${VLLM_RECIPES.commit.slice(0, 10)}).` });
49255
+ else {
49256
+ checked.push("recipe");
49257
+ const { id, recipe: rc, variant } = hit;
49258
+ const src = `github.com/vllm-project/recipes/blob/${VLLM_RECIPES.commit.slice(0, 10)}/${rc.file}`;
49259
+ const flags = new Set(args.flags ?? []);
49260
+ if (rc.minVllmVersion && ver && !vAtLeast(ver, readEngineVersion(rc.minVllmVersion))) {
49261
+ add({
49262
+ rule: "recipe-min-version",
49263
+ area: "template",
49264
+ severity: "warn",
49265
+ title: `The vLLM recipe for ${id} needs vLLM ${rc.minVllmVersion}; this launch assumes ${versionLabel}`,
49266
+ detail: "min_vllm_version is the earliest release the recipe maintainers say supports the model; an older release may lack the architecture, parser or kernels it relies on.",
49267
+ fix: `Run vLLM ${rc.minVllmVersion} or newer${rc.nightlyRequired ? " (the recipe says a nightly build is required)" : ""}.`,
49268
+ source: src
49269
+ });
49270
+ } else if (rc.nightlyRequired) {
49271
+ add({ rule: "recipe-nightly", area: "template", severity: "info", title: `The vLLM recipe for ${id} says a nightly build is required`, detail: `min_vllm_version ${rc.minVllmVersion ?? "?"} had not shipped when the recipe was written.`, fix: "Install from the nightly index, or check a newer release.", source: src });
49272
+ }
49273
+ if ((rc.baseArgs ?? []).includes("--trust-remote-code") && !flags.has("--trust-remote-code")) {
49274
+ add({
49275
+ rule: "recipe-trust-remote-code",
49276
+ area: "template",
49277
+ severity: "warn",
49278
+ title: `The vLLM recipe for ${id} launches with --trust-remote-code; this command does not`,
49279
+ detail: "The model ships Python code in its repo (a config class, tokenizer or architecture). Without the flag vLLM refuses to load it.",
49280
+ fix: "Add --trust-remote-code (after reading the repo code).",
49281
+ source: src
49282
+ });
49283
+ }
49284
+ if (rc.toolCallParser && args.toolCallParser && args.toolCallParser !== rc.toolCallParser) {
49285
+ add({
49286
+ rule: "recipe-tool-parser",
49287
+ area: "template",
49288
+ severity: "warn",
49289
+ title: `--tool-call-parser ${args.toolCallParser}, but the vLLM recipe for ${id} uses ${rc.toolCallParser}`,
49290
+ detail: "A parser written for another family does not recognise this model's tool-call syntax: tool calls come back as plain text in content, or are cut.",
49291
+ fix: `Use --tool-call-parser ${rc.toolCallParser}.`,
49292
+ source: src
49293
+ });
49294
+ } else if (rc.toolCallParser && args.enableAutoToolChoice && !args.toolCallParser) {
49295
+ const f = findings.find((x) => x.rule === "tool-parser-missing");
49296
+ if (f) {
49297
+ f.fix = `Add --tool-call-parser ${rc.toolCallParser} (the vLLM recipe for ${id}).`;
49298
+ f.source = src;
49299
+ }
49300
+ }
49301
+ if (rc.reasoningParser && args.reasoningParser && args.reasoningParser !== rc.reasoningParser) {
49302
+ add({
49303
+ rule: "recipe-reasoning-parser",
49304
+ area: "template",
49305
+ severity: "warn",
49306
+ title: `--reasoning-parser ${args.reasoningParser}, but the vLLM recipe for ${id} uses ${rc.reasoningParser}`,
49307
+ detail: "A reasoning parser looks for the family's own thinking markers; the wrong one leaves the reasoning inside content or swallows the answer.",
49308
+ fix: `Use --reasoning-parser ${rc.reasoningParser}.`,
49309
+ source: src
49310
+ });
49311
+ } else if (rc.reasoningParser && !args.reasoningParser) {
49312
+ const f = findings.find((x) => x.rule === "reasoning-parser-missing");
49313
+ if (f) {
49314
+ f.fix = `Add --reasoning-parser ${rc.reasoningParser} (the vLLM recipe for ${id}).`;
49315
+ f.source = src;
49316
+ } else add({
49317
+ rule: "recipe-reasoning-parser",
49318
+ area: "template",
49319
+ severity: "info",
49320
+ title: `The vLLM recipe for ${id} passes --reasoning-parser ${rc.reasoningParser}; this command does not`,
49321
+ detail: "Without it the reasoning text comes back inside message.content instead of reasoning_content.",
49322
+ fix: `Add --reasoning-parser ${rc.reasoningParser} if clients read reasoning_content.`,
49323
+ source: src
49324
+ });
49325
+ }
49326
+ const va = variant ? rc.variants[variant] : null;
49327
+ if (va?.extraArgs?.includes("--kv-cache-dtype") && !args.kvCacheDtype) {
49328
+ const want = va.extraArgs[va.extraArgs.indexOf("--kv-cache-dtype") + 1];
49329
+ add({ rule: "recipe-variant-args", area: "template", severity: "info", title: `The vLLM recipe's ${variant} variant passes --kv-cache-dtype ${want}`, detail: `${va.modelId ?? id} is served there with: ${va.extraArgs.join(" ")}.`, fix: `Add --kv-cache-dtype ${want} unless you measured otherwise.`, source: src });
49330
+ }
49331
+ const rg = card ? RECIPE_GPU_OF[card.id] : void 0;
49332
+ if (rg && rc.unsupportedGpus?.includes(rg)) {
49333
+ add({ rule: "recipe-gpu-unsupported", area: "template", severity: "warn", title: `The vLLM recipe for ${id} marks ${card.label} unsupported`, detail: "The recipe maintainers record a confirmed blocker on this card.", fix: "Use a card the recipe lists as verified or supported.", source: src });
49334
+ }
49335
+ }
49336
+ }
46484
49337
  const effSampler = effectiveSampler(input);
46485
49338
  for (const k of KNOWN_SERVE_ISSUES) {
46486
49339
  if (!k.match.test(modelType) && !k.match.test(input.modelId ?? "") && !k.match.test(model.name ?? "")) continue;
@@ -46555,15 +49408,18 @@ function checkServeConfig(input) {
46555
49408
  servedLen,
46556
49409
  servedLenSource,
46557
49410
  derivedMaxLen: derived.len,
46558
- memFraction: lc ? null : engine === "vllm" ? args.gpuMemoryUtilization ?? 0.9 : args.memFractionStatic ?? 0.88,
46559
- maxNumSeqs: args.maxNumSeqs ?? null
49411
+ memFraction: lc ? null : engine === "vllm" ? args.gpuMemoryUtilization ?? vllmDefaults?.gpuMemoryUtilization ?? 0.92 : args.memFractionStatic ?? sglDefault?.memFractionStatic ?? null,
49412
+ maxNumSeqs: args.maxNumSeqs ?? null,
49413
+ engineVersion: lc ? input.engineVersion ?? null : versionLabel,
49414
+ engineVersionAssumed: !lc && input.engineVersion == null,
49415
+ defaultsAssumed
46560
49416
  },
46561
49417
  checked,
46562
49418
  skipped,
46563
49419
  findings,
46564
49420
  memory,
46565
49421
  change,
46566
- basis: SERVE_BASIS
49422
+ basis: memory?.method === "upper-bound" ? `${SERVE_BASIS} ${SERVE_BASIS_UPPER_BOUND}` : SERVE_BASIS
46567
49423
  };
46568
49424
  }
46569
49425
  function effectiveSampler(input) {
@@ -46680,24 +49536,40 @@ function renderServeText(r, name = "model") {
46680
49536
  const par = r.engine === "llamacpp" ? "" : `TP ${R.tp} x PP ${R.pp} x DP ${R.dp}${R.expertParallel ? " + EP" : ""}, `;
46681
49537
  L.push(` ${par}${R.gpus} x ${R.gpu ?? "(no card given)"}${R.sm ? ` (sm${R.sm})` : ""}${r.engine === "llamacpp" ? "" : `, dtype ${R.dtype}`}, weights ${R.quant ?? "unquantized"}, KV cache ${R.kvCacheDtype}`);
46682
49538
  L.push(` served length ${R.servedLen ?? "n/a"} (${R.servedLenSource}); the model's derived maximum ${R.derivedMaxLen ?? "n/a"}`);
49539
+ if (R.engineVersion) L.push(` engine ${R.engineVersion}${R.engineVersionAssumed ? " (assumed; pass --" + r.engine + "-version to change)" : ""}`);
49540
+ for (const d of R.defaultsAssumed.filter((x) => !/^(vLLM|SGLang) /.test(x))) L.push(` default assumed: ${d}`);
46683
49541
  if (r.memory) {
46684
49542
  const m = r.memory;
46685
49543
  L.push("");
46686
- if (r.engine === "llamacpp") {
46687
- L.push(` memory per GPU card ${m.budgetGbPerGpu.toFixed(1)} GB, weights ${m.weightsGbPerGpu.toFixed(2)} GB, KV for ${m.tokenCapacity.toLocaleString("en-US")} tokens ${m.kvCapacityGbPerGpu.toFixed(2)} GB (allocated up front), total ${(m.weightsGbPerGpu + m.kvCapacityGbPerGpu).toFixed(2)} GB`);
49544
+ const g = (x) => `${x.toFixed(2)} GiB`;
49545
+ const gb2gib = (x) => x * 1e9 / 1024 ** 3;
49546
+ if (m.method === "engine" && r.engine === "vllm" && m.reserve && m.pool) {
49547
+ L.push(` memory per GPU, predicted: ${g(m.cardTotalGib)} x ${R.memFraction} = ${g(gb2gib(m.budgetGbPerGpu))}`);
49548
+ for (const t of m.reserve) L.push(` - ${t.what} ${g(t.gib)}${t.measuredByEngine ? " (estimate; vLLM measures this)" : ""}`);
49549
+ L.push(` = KV cache ${g(gb2gib(m.kvCapacityGbPerGpu))}: ${m.pool.numBlocks.toLocaleString("en-US")} blocks of ${m.pool.blockSize} tokens (${m.pool.groups.map((x) => `${x.layers} ${x.kind}`).join(", ")})`);
49550
+ L.push(` ${Math.round(m.kvBytesPerTokenPerGpu).toLocaleString("en-US")} KV bytes per token over the full-length layers; one full-length request ${g(gb2gib(m.kvGbPerSequencePerGpu))}`);
49551
+ L.push(` vLLM would print: GPU KV cache size: ${m.tokenCapacity.toLocaleString("en-US")} tokens; Maximum concurrency for ${(R.servedLen ?? 0).toLocaleString("en-US")} tokens per request: ${m.maxConcurrentFullLength.toFixed(2)}x`);
49552
+ } else if (m.method === "engine" && r.engine === "sglang") {
49553
+ L.push(` memory per GPU, predicted: ${g(m.cardTotalGib)} x mem_fraction_static ${R.memFraction}${m.sglangDefault && m.sglangDefault.memFractionStatic !== R.memFraction ? ` (SGLang's own default here: ${m.sglangDefault.memFractionStatic})` : " (SGLang's own default)"} = ${g(gb2gib(m.budgetGbPerGpu))}`);
49554
+ L.push(` - weights ${g(gb2gib(m.weightsGbPerGpu))}`);
49555
+ L.push(` = KV cache ${g(gb2gib(m.kvCapacityGbPerGpu))}: ~${m.tokenCapacity.toLocaleString("en-US")} tokens at ${Math.round(m.kvBytesPerTokenPerGpu).toLocaleString("en-US")} bytes per token, ${Math.floor(m.maxConcurrentFullLength)} full-length requests`);
49556
+ } else if (r.engine === "llamacpp") {
49557
+ L.push(` memory per GPU, predicted: card ${m.budgetGbPerGpu.toFixed(1)} GB, weights ${m.weightsGbPerGpu.toFixed(2)} GB, KV for ${m.tokenCapacity.toLocaleString("en-US")} tokens ${m.kvCapacityGbPerGpu.toFixed(2)} GB (allocated up front), total ${(m.weightsGbPerGpu + m.kvCapacityGbPerGpu).toFixed(2)} GB`);
46688
49558
  L.push(` ${Math.round(m.kvBytesPerTokenPerGpu).toLocaleString("en-US")} KV bytes per token; one full-length sequence ${m.kvGbPerSequencePerGpu.toFixed(2)} GB`);
46689
49559
  } else {
46690
- L.push(` memory per GPU budget ${m.budgetGbPerGpu.toFixed(1)} GB, weights ${m.weightsGbPerGpu.toFixed(2)} GB, KV room ${m.kvCapacityGbPerGpu.toFixed(2)} GB`);
49560
+ L.push(` memory per GPU, upper bound budget ${m.budgetGbPerGpu.toFixed(1)} GB, weights ${m.weightsGbPerGpu.toFixed(2)} GB, KV room ${m.kvCapacityGbPerGpu.toFixed(2)} GB`);
46691
49561
  L.push(` ${Math.round(m.kvBytesPerTokenPerGpu).toLocaleString("en-US")} KV bytes per token; one full-length sequence ${m.kvGbPerSequencePerGpu.toFixed(2)} GB`);
46692
49562
  L.push(` at most ${Math.floor(m.maxConcurrentFullLength)} concurrent full-length sequences (${m.tokenCapacity.toLocaleString("en-US")} tokens)`);
46693
49563
  }
46694
49564
  L.push(` weights: ${m.weightsBasis}`);
49565
+ if (m.cardTotalSource && m.method === "engine" && r.engine !== "llamacpp") L.push(` card total: ${m.cardTotalSource}`);
49566
+ for (const n2 of m.layoutNotes ?? []) L.push(` ${n2}`);
46695
49567
  }
46696
49568
  const order = { block: 0, warn: 1, info: 2 };
46697
- const fs = [...r.findings].sort((a, b) => order[a.severity] - order[b.severity]);
49569
+ const fs2 = [...r.findings].sort((a, b) => order[a.severity] - order[b.severity]);
46698
49570
  L.push("");
46699
- if (!fs.length) L.push(" no findings in the checks that ran");
46700
- for (const f of fs) {
49571
+ if (!fs2.length) L.push(" no findings in the checks that ran");
49572
+ for (const f of fs2) {
46701
49573
  const tag = f.severity === "block" ? "block" : f.severity === "warn" ? "warn " : "info ";
46702
49574
  L.push(` ${tag} ${f.title}`);
46703
49575
  if (f.detail) L.push(` ${f.detail}`);
@@ -46713,6 +49585,301 @@ function renderServeText(r, name = "model") {
46713
49585
  return L.join("\n");
46714
49586
  }
46715
49587
 
49588
+ // scripts/ggufHeader.ts
49589
+ import fs from "node:fs";
49590
+ var GGML_TYPES = {
49591
+ 0: { name: "F32", block: 1, size: 4 },
49592
+ 1: { name: "F16", block: 1, size: 2 },
49593
+ 2: { name: "Q4_0", block: 32, size: 18 },
49594
+ 3: { name: "Q4_1", block: 32, size: 20 },
49595
+ 6: { name: "Q5_0", block: 32, size: 22 },
49596
+ 7: { name: "Q5_1", block: 32, size: 24 },
49597
+ 8: { name: "Q8_0", block: 32, size: 34 },
49598
+ 9: { name: "Q8_1", block: 32, size: 36 },
49599
+ 10: { name: "Q2_K", block: 256, size: 84 },
49600
+ 11: { name: "Q3_K", block: 256, size: 110 },
49601
+ 12: { name: "Q4_K", block: 256, size: 144 },
49602
+ 13: { name: "Q5_K", block: 256, size: 176 },
49603
+ 14: { name: "Q6_K", block: 256, size: 210 },
49604
+ 15: { name: "Q8_K", block: 256, size: 292 },
49605
+ 16: { name: "IQ2_XXS", block: 256, size: 66 },
49606
+ 17: { name: "IQ2_XS", block: 256, size: 74 },
49607
+ 18: { name: "IQ3_XXS", block: 256, size: 98 },
49608
+ 19: { name: "IQ1_S", block: 256, size: 50 },
49609
+ 20: { name: "IQ4_NL", block: 32, size: 18 },
49610
+ 21: { name: "IQ3_S", block: 256, size: 110 },
49611
+ 22: { name: "IQ2_S", block: 256, size: 82 },
49612
+ 23: { name: "IQ4_XS", block: 256, size: 136 },
49613
+ 24: { name: "I8", block: 1, size: 1 },
49614
+ 25: { name: "I16", block: 1, size: 2 },
49615
+ 26: { name: "I32", block: 1, size: 4 },
49616
+ 27: { name: "I64", block: 1, size: 8 },
49617
+ 28: { name: "F64", block: 1, size: 8 },
49618
+ 29: { name: "IQ1_M", block: 256, size: 56 },
49619
+ 30: { name: "BF16", block: 1, size: 2 },
49620
+ 34: { name: "TQ1_0", block: 256, size: 54 },
49621
+ 35: { name: "TQ2_0", block: 256, size: 66 },
49622
+ 39: { name: "MXFP4", block: 32, size: 17 },
49623
+ 40: { name: "NVFP4", block: 64, size: 36 },
49624
+ 41: { name: "Q1_0", block: 128, size: 18 },
49625
+ 42: { name: "Q2_0", block: 64, size: 18 }
49626
+ };
49627
+ var LLAMA_FTYPES = {
49628
+ 0: "F32",
49629
+ 1: "F16",
49630
+ 2: "Q4_0",
49631
+ 3: "Q4_1",
49632
+ 7: "Q8_0",
49633
+ 8: "Q5_0",
49634
+ 9: "Q5_1",
49635
+ 10: "Q2_K",
49636
+ 11: "Q3_K_S",
49637
+ 12: "Q3_K_M",
49638
+ 13: "Q3_K_L",
49639
+ 14: "Q4_K_S",
49640
+ 15: "Q4_K_M",
49641
+ 16: "Q5_K_S",
49642
+ 17: "Q5_K_M",
49643
+ 18: "Q6_K",
49644
+ 19: "IQ2_XXS",
49645
+ 20: "IQ2_XS",
49646
+ 21: "Q2_K_S",
49647
+ 22: "IQ3_XS",
49648
+ 23: "IQ3_XXS",
49649
+ 24: "IQ1_S",
49650
+ 25: "IQ4_NL",
49651
+ 26: "IQ3_S",
49652
+ 27: "IQ3_M",
49653
+ 28: "IQ2_S",
49654
+ 29: "IQ2_M",
49655
+ 30: "IQ4_XS",
49656
+ 31: "IQ1_M",
49657
+ 32: "BF16",
49658
+ 36: "TQ1_0",
49659
+ 37: "TQ2_0",
49660
+ 38: "MXFP4_MOE",
49661
+ 39: "NVFP4",
49662
+ 40: "Q1_0",
49663
+ 41: "Q2_0"
49664
+ };
49665
+ var NeedMore = class extends Error {
49666
+ };
49667
+ var LONG_ARRAY = 256;
49668
+ function parseGgufHeader(buf) {
49669
+ const dv = new DataView(buf.buffer, buf.byteOffset, buf.byteLength);
49670
+ let o = 0;
49671
+ const need = (n2) => {
49672
+ if (o + n2 > buf.byteLength) throw new NeedMore();
49673
+ };
49674
+ const u8 = () => {
49675
+ need(1);
49676
+ return dv.getUint8(o++);
49677
+ };
49678
+ const u32 = () => {
49679
+ need(4);
49680
+ const v = dv.getUint32(o, true);
49681
+ o += 4;
49682
+ return v;
49683
+ };
49684
+ const u64 = () => {
49685
+ need(8);
49686
+ const v = Number(dv.getBigUint64(o, true));
49687
+ o += 8;
49688
+ return v;
49689
+ };
49690
+ const str = () => {
49691
+ const n2 = u64();
49692
+ need(n2);
49693
+ const s = new TextDecoder().decode(buf.subarray(o, o + n2));
49694
+ o += n2;
49695
+ return s;
49696
+ };
49697
+ const magic = new TextDecoder().decode(buf.subarray(0, 4));
49698
+ if (buf.byteLength >= 4 && magic !== "GGUF") throw new Error(`not a GGUF file (magic "${magic}")`);
49699
+ o = 4;
49700
+ const version = u32();
49701
+ if (version < 2 || version > 3) throw new Error(`unsupported GGUF version ${version}`);
49702
+ const tensorCount = u64();
49703
+ const kvCount = u64();
49704
+ const value = (t) => {
49705
+ switch (t) {
49706
+ case 0:
49707
+ return u8();
49708
+ case 1: {
49709
+ need(1);
49710
+ return dv.getInt8(o++);
49711
+ }
49712
+ case 2: {
49713
+ need(2);
49714
+ const v = dv.getUint16(o, true);
49715
+ o += 2;
49716
+ return v;
49717
+ }
49718
+ case 3: {
49719
+ need(2);
49720
+ const v = dv.getInt16(o, true);
49721
+ o += 2;
49722
+ return v;
49723
+ }
49724
+ case 4:
49725
+ return u32();
49726
+ case 5: {
49727
+ need(4);
49728
+ const v = dv.getInt32(o, true);
49729
+ o += 4;
49730
+ return v;
49731
+ }
49732
+ case 6: {
49733
+ need(4);
49734
+ const v = dv.getFloat32(o, true);
49735
+ o += 4;
49736
+ return v;
49737
+ }
49738
+ case 7:
49739
+ return u8() !== 0;
49740
+ case 8:
49741
+ return str();
49742
+ case 9: {
49743
+ const et = u32();
49744
+ const n2 = u64();
49745
+ if (n2 > LONG_ARRAY) {
49746
+ for (let i = 0; i < n2; i++) value(et);
49747
+ return { arrayOf: et, length: n2 };
49748
+ }
49749
+ const a = [];
49750
+ for (let i = 0; i < n2; i++) a.push(value(et));
49751
+ return a;
49752
+ }
49753
+ case 10:
49754
+ return u64();
49755
+ case 11: {
49756
+ need(8);
49757
+ const v = Number(dv.getBigInt64(o, true));
49758
+ o += 8;
49759
+ return v;
49760
+ }
49761
+ case 12: {
49762
+ need(8);
49763
+ const v = dv.getFloat64(o, true);
49764
+ o += 8;
49765
+ return v;
49766
+ }
49767
+ default:
49768
+ throw new Error(`unknown GGUF value type ${t}`);
49769
+ }
49770
+ };
49771
+ const kv = {};
49772
+ for (let i = 0; i < kvCount; i++) {
49773
+ const k = str();
49774
+ kv[k] = value(u32());
49775
+ }
49776
+ const tensors = [];
49777
+ for (let i = 0; i < tensorCount; i++) {
49778
+ const name = str();
49779
+ const nd = u32();
49780
+ const shape = [];
49781
+ for (let d = 0; d < nd; d++) shape.push(u64());
49782
+ const type = u32();
49783
+ const offset = u64();
49784
+ tensors.push({ name, shape, type, offset });
49785
+ }
49786
+ return { version, kv, tensors, headerBytes: o };
49787
+ }
49788
+ function tensorBytes(t) {
49789
+ const g = GGML_TYPES[t.type];
49790
+ if (!g) return null;
49791
+ const n2 = t.shape.reduce((a, b) => a * b, 1);
49792
+ return n2 / g.block * g.size;
49793
+ }
49794
+ async function readGgufHeader(src, fetchImpl = fetch, token, maxBytes = 256 * 1024 * 1024) {
49795
+ let size = 4 * 1024 * 1024;
49796
+ const local = !/^https?:\/\//.test(src);
49797
+ for (; ; ) {
49798
+ let buf;
49799
+ if (local) {
49800
+ const fd = fs.openSync(src, "r");
49801
+ try {
49802
+ const b = Buffer.alloc(size);
49803
+ const n2 = fs.readSync(fd, b, 0, size, 0);
49804
+ buf = new Uint8Array(b.buffer, b.byteOffset, n2);
49805
+ } finally {
49806
+ fs.closeSync(fd);
49807
+ }
49808
+ } else {
49809
+ const res = await fetchImpl(src, { headers: { Range: `bytes=0-${size - 1}`, ...token ? { Authorization: `Bearer ${token}` } : {} } });
49810
+ if (!res.ok && res.status !== 206) throw new Error(`HTTP ${res.status} reading ${src}`);
49811
+ buf = new Uint8Array(await res.arrayBuffer());
49812
+ }
49813
+ try {
49814
+ return parseGgufHeader(buf);
49815
+ } catch (e) {
49816
+ if (!(e instanceof NeedMore)) throw e;
49817
+ if (buf.byteLength < size) throw new Error("the file ends inside its header");
49818
+ if (size >= maxBytes) throw new Error(`header larger than ${maxBytes} bytes`);
49819
+ size *= 2;
49820
+ }
49821
+ }
49822
+ }
49823
+ function summarizeGguf(headers, source) {
49824
+ const kv = headers[0].kv;
49825
+ const arch = String(kv["general.architecture"] ?? "");
49826
+ const a = (k) => kv[`${arch}.${k}`];
49827
+ const n2 = (v) => typeof v === "number" ? v : null;
49828
+ const byType = /* @__PURE__ */ new Map();
49829
+ let total = 0, count = 0;
49830
+ for (const h of headers) for (const t of h.tensors) {
49831
+ const b = tensorBytes(t);
49832
+ if (b == null) continue;
49833
+ total += b;
49834
+ count++;
49835
+ byType.set(t.type, (byType.get(t.type) ?? 0) + b);
49836
+ }
49837
+ const dominant = [...byType.entries()].sort((x, y) => y[1] - x[1])[0]?.[0];
49838
+ const ft = n2(kv["general.file_type"]);
49839
+ const hkv = a("attention.head_count_kv");
49840
+ return {
49841
+ source,
49842
+ arch,
49843
+ fileType: ft != null ? LLAMA_FTYPES[ft] ?? `file_type ${ft}` : null,
49844
+ tensorBytes: total,
49845
+ tensorCount: count,
49846
+ dominantType: dominant != null ? GGML_TYPES[dominant].name : null,
49847
+ blockCount: n2(a("block_count")),
49848
+ contextLength: n2(a("context_length")),
49849
+ headCount: n2(a("attention.head_count")),
49850
+ headCountKv: Array.isArray(hkv) ? hkv : n2(hkv),
49851
+ keyLength: n2(a("attention.key_length")),
49852
+ valueLength: n2(a("attention.value_length")),
49853
+ embeddingLength: n2(a("embedding_length")),
49854
+ slidingWindow: n2(a("attention.sliding_window")),
49855
+ kvLoraRank: n2(a("attention.kv_lora_rank")),
49856
+ ropeDim: n2(a("rope.dimension_count"))
49857
+ };
49858
+ }
49859
+ async function ggufFromLaunch(a, fetchImpl = fetch, token) {
49860
+ try {
49861
+ if (a.model && /\.gguf$/i.test(a.model) && fs.existsSync(a.model)) return summarizeGguf([await readGgufHeader(a.model)], a.model);
49862
+ const ref = a.hfRepo ?? (a.model && /^[\w.-]+\/[\w.-]+(:[\w.-]+)?$/.test(a.model) && !/\.gguf$/i.test(a.model) && !fs.existsSync(a.model) ? a.model : null);
49863
+ if (!ref && a.model && /\.gguf$/i.test(a.model)) return { error: `${a.model} is not a readable local file` };
49864
+ if (!ref) return null;
49865
+ const [repo, tag] = ref.split(":");
49866
+ const res = await fetchImpl(`https://huggingface.co/api/models/${repo}/tree/main?recursive=1`, { headers: token ? { Authorization: `Bearer ${token}` } : {} });
49867
+ if (!res.ok) return { error: `the Hub listing for ${repo} answered ${res.status}` };
49868
+ const files = (await res.json()).filter((f) => f.type === "file" && /\.gguf$/i.test(f.path) && !/mmproj/i.test(f.path)).map((f) => f.path);
49869
+ const wanted = a.ggufFile && !a.ggufFile.includes(":") && /\.gguf$/i.test(a.ggufFile) ? a.ggufFile : null;
49870
+ const q = (tag ?? "Q4_K_M").toUpperCase().replace(/-/g, "_");
49871
+ const pick = wanted ? files.filter((f) => f.endsWith(wanted)) : files.filter((f) => new RegExp(`(^|[^A-Z0-9])${q}([^A-Z0-9]|$)`).test(f.toUpperCase().replace(/-/g, "_")));
49872
+ if (!pick.length) return { error: `no ${wanted ?? q} .gguf in ${repo} (${files.length} GGUF files listed)` };
49873
+ const split = /-(\d{5})-of-(\d{5})\.gguf$/i.exec(pick[0]);
49874
+ const shards = split ? pick.filter((f) => f.replace(/-\d{5}-of-\d{5}\.gguf$/i, "") === pick[0].replace(/-\d{5}-of-\d{5}\.gguf$/i, "")).sort() : [pick.sort((x, y) => x.length - y.length)[0]];
49875
+ const headers = [];
49876
+ for (const s of shards) headers.push(await readGgufHeader(`https://huggingface.co/${repo}/resolve/main/${s}`, fetchImpl, token));
49877
+ return summarizeGguf(headers, `huggingface.co/${repo}/${shards.length > 1 ? `${shards[0]} (+${shards.length - 1} shards)` : shards[0]}`);
49878
+ } catch (e) {
49879
+ return { error: e.message };
49880
+ }
49881
+ }
49882
+
46716
49883
  // src/utils/oomDiagnosis.ts
46717
49884
  var UNIT = { b: 1e-9, kib: 1024 / 1e9, kb: 1e-6, mib: 1024 ** 2 / 1e9, mb: 1e-3, gib: 1024 ** 3 / 1e9, gb: 1, tib: 1024 ** 4 / 1e9 };
46718
49885
  var num4 = (v, unit) => Number(v.replace(/,/g, "")) * (UNIT[unit.toLowerCase()] ?? NaN);
@@ -47030,6 +50197,199 @@ async function oomReport(text, opts = {}) {
47030
50197
  return { diagnosis: diagnoseOom(text, facts), facts };
47031
50198
  }
47032
50199
 
50200
+ // src/utils/vllmReceipt.ts
50201
+ var GiB2 = 1024 ** 3;
50202
+ var MiB = 1024 ** 2;
50203
+ var STARTUP_PLAN_SCHEMA = 1;
50204
+ var STARTUP_PLAN_REDUNDANCY_BYTES = 150 * MiB;
50205
+ var SRC = "vllm-project/vllm vllm/v1/worker/startup_plan.py, vllm/v1/worker/gpu_worker.py";
50206
+ var int = (v) => typeof v === "number" && Number.isInteger(v) ? v : null;
50207
+ function readStartupPlan(text, file = null) {
50208
+ const refused = [];
50209
+ let j = null;
50210
+ try {
50211
+ const v = JSON.parse(text);
50212
+ if (v && typeof v === "object" && !Array.isArray(v)) j = v;
50213
+ } catch {
50214
+ }
50215
+ if (!j) {
50216
+ return {
50217
+ kind: "startup-plan",
50218
+ file,
50219
+ fingerprint: null,
50220
+ kvCacheMemoryBytes: null,
50221
+ freeMemoryBaselineBytes: null,
50222
+ usable: false,
50223
+ refused: ['not JSON: vLLM logs "Ignoring unreadable startup plan" and profiles from scratch']
50224
+ };
50225
+ }
50226
+ const fingerprint = typeof j.fingerprint === "string" ? j.fingerprint : null;
50227
+ const kv = int(j.kv_cache_memory_bytes);
50228
+ const base = int(j.free_memory_baseline);
50229
+ if (j.schema !== STARTUP_PLAN_SCHEMA) refused.push(`schema ${JSON.stringify(j.schema ?? null)} is not ${STARTUP_PLAN_SCHEMA}: vLLM ignores a plan written by a different schema`);
50230
+ if (!fingerprint) refused.push("no fingerprint: vLLM ignores it");
50231
+ const named = file ? /startup_plan_([0-9a-f]+)\.json$/i.exec(file.split(/[\\/]/).pop() ?? "")?.[1] ?? null : null;
50232
+ if (fingerprint && file && named && named !== fingerprint) refused.push(`stored as startup_plan_${named}.json but carries fingerprint ${fingerprint}: vLLM looks a plan up by its fingerprint and ignores a mismatch`);
50233
+ if (kv == null) refused.push("kv_cache_memory_bytes is not an integer: vLLM does not apply it");
50234
+ else if (kv <= 0) refused.push(`kv_cache_memory_bytes is ${kv}: vLLM does not apply a non-positive value`);
50235
+ if (base == null) refused.push("free_memory_baseline is not an integer: vLLM does not apply it");
50236
+ return { kind: "startup-plan", file, fingerprint, kvCacheMemoryBytes: kv, freeMemoryBaselineBytes: base, usable: refused.length === 0, refused };
50237
+ }
50238
+ var num5 = (s) => s == null ? null : Number(s.replace(/,/g, ""));
50239
+ function readStartupLog(text, file = null) {
50240
+ const first = (re) => re.exec(text);
50241
+ const ver = first(/vLLM API server version (\d+\.\d+\.\d+[\w.+-]*)/) ?? first(/Initializing a V1 LLM engine \(v(\d+\.\d+\.\d+[\w.+-]*)\)/) ?? first(/vLLM Version\s*:\s*(\d+\.\d+\.\d+[\w.+-]*)/) ?? first(/\bvllm[= ](\d+\.\d+\.\d+)\b/);
50242
+ const kv = first(/Available KV cache memory: (-?[\d.]+) GiB/);
50243
+ const tok = first(/GPU KV cache size: ([\d,]+) tokens/);
50244
+ const conc = first(/Maximum concurrency for ([\d,]+) tokens per request: ([\d.]+)x/);
50245
+ const load = first(/Model loading took ([\d.]+) Gi?B/);
50246
+ const est = first(/Estimated CUDA graph memory: (-?[\d.]+) GiB total/);
50247
+ const pool = first(/CUDA graph pool memory: (-?[\d.]+) GiB \(actual\), (-?[\d.]+) GiB \(estimated\)/);
50248
+ const prof = first(/Profiling CUDA graph memory: ([^\n]*)/);
50249
+ const enc = first(/Encoder cache will be initialized with a budget of (\d+) tokens, and profiled with (\d+) (\w+) items/);
50250
+ const sug = first(/Replace gpu_memory_utilization config with `--kv-cache-memory=(\d+)`/);
50251
+ const applied = first(/Applying persisted startup plan \(fingerprint ([0-9a-f]+)\): kv_cache_memory_bytes=(\d+)/);
50252
+ const mode = (m) => {
50253
+ const r = prof ? new RegExp(`${m}=(\\d+) \\(largest=(\\d+)\\)`).exec(prof[1]) : null;
50254
+ return r ? { n: Number(r[1]), largest: Number(r[2]) } : null;
50255
+ };
50256
+ return {
50257
+ kind: "startup-log",
50258
+ file,
50259
+ vllmVersion: ver ? ver[1] : null,
50260
+ availableKvGib: num5(kv?.[1]),
50261
+ kvCacheTokens: num5(tok?.[1]),
50262
+ maxConcurrency: conc ? { tokensPerRequest: num5(conc[1]), x: Number(conc[2]) } : null,
50263
+ modelLoadingGib: num5(load?.[1]),
50264
+ cudaGraphEstimateGib: num5(est?.[1]) ?? num5(pool?.[2]),
50265
+ cudaGraphActualGib: num5(pool?.[1]),
50266
+ graphCapture: prof ? { piecewise: mode("PIECEWISE"), full: mode("FULL") } : null,
50267
+ encoderProfile: enc ? { budgetTokens: Number(enc[1]), items: Number(enc[2]), modality: enc[3] } : null,
50268
+ suggestedKvCacheMemoryBytes: sug?.[1] ? Number(sug[1]) : null,
50269
+ appliedPlan: applied ? { fingerprint: applied[1], kvCacheMemoryBytes: Number(applied[2]) } : null,
50270
+ planRefusedFreeMemory: /Startup plan not applied: current free memory/.test(text),
50271
+ kvFromFlag: /reserved [\d.]+ GiB memory for KV Cache as specified by kv_cache_memory_bytes/.test(text) && !applied
50272
+ };
50273
+ }
50274
+ function readReceiptInput(text, file = null) {
50275
+ const t = text.trimStart();
50276
+ if (t.startsWith("{")) {
50277
+ try {
50278
+ const j = JSON.parse(t);
50279
+ if (j && typeof j === "object" && ("schema" in j || "fingerprint" in j || "kv_cache_memory_bytes" in j)) return readStartupPlan(text, file);
50280
+ } catch {
50281
+ }
50282
+ }
50283
+ return readStartupLog(text, file);
50284
+ }
50285
+ var pct2 = (p, m) => m === 0 ? NaN : (p - m) / m * 100;
50286
+ var g2 = (b) => b / GiB2;
50287
+ function buildReceipt(inputs, p) {
50288
+ const rows = [];
50289
+ const notes = [];
50290
+ const plans = inputs.filter((x) => x.kind === "startup-plan");
50291
+ const logs = inputs.filter((x) => x.kind === "startup-log");
50292
+ const names = inputs.map((x) => x.file ?? "(stdin)");
50293
+ const versionNote = (v) => {
50294
+ if (!v || !p.engineVersion) return;
50295
+ const a = v.split(/[^\d]+/).slice(0, 3).join("."), b = p.engineVersion.split(/[^\d]+/).slice(0, 3).join(".");
50296
+ if (a !== b) notes.push(`the log is vLLM ${v}; the prediction used ${p.engineVersion}${p.engineVersionAssumed ? " (assumed)" : ""}. Pass --vllm-version ${a} so both describe the same release.`);
50297
+ };
50298
+ const usable = plans.filter((x) => x.usable);
50299
+ for (const x of plans) for (const r of x.refused) notes.push(`${x.file ?? "plan"}: ${r}. Not quoted as a measurement.`);
50300
+ for (const x of usable) {
50301
+ if (x.freeMemoryBaselineBytes > p.cardTotalGib * GiB2 * 1.001) {
50302
+ notes.push(`${x.file ?? "plan"}: recorded with ${g2(x.freeMemoryBaselineBytes).toFixed(2)} GiB free, more than this card's ${p.cardTotalGib.toFixed(2)} GiB total: it was measured on a different card and vLLM would not apply it here either. Not quoted.`);
50303
+ }
50304
+ }
50305
+ const fit = usable.filter((x) => x.freeMemoryBaselineBytes <= p.cardTotalGib * GiB2 * 1.001);
50306
+ if (fit.length) {
50307
+ const kv = Math.min(...fit.map((x) => x.kvCacheMemoryBytes));
50308
+ const pred = p.kvGib - g2(STARTUP_PLAN_REDUNDANCY_BYTES);
50309
+ rows.push({
50310
+ what: `KV cache memory per GPU (startup plan${fit.length > 1 ? `, smallest of ${fit.length} ranks` : ""})`,
50311
+ predicted: pred,
50312
+ measured: g2(kv),
50313
+ unit: "GiB",
50314
+ errPct: pct2(pred, g2(kv)),
50315
+ note: "plan value = requested memory - measured weights, non-torch, peak activation and the CUDA graph pool actually captured - 150 MiB; the prediction has the 150 MiB taken off to match"
50316
+ });
50317
+ notes.push(`a startup plan's fingerprint is a hash of vLLM's own config, device and torch build; it cannot be recomputed here, so this receipt assumes the plan was recorded for the launch command given. vLLM re-profiles on any mismatch and only applies a plan when free memory is at least the recorded ${g2(Math.min(...fit.map((x) => x.freeMemoryBaselineBytes))).toFixed(2)} GiB.`);
50318
+ }
50319
+ for (const L of logs) {
50320
+ versionNote(L.vllmVersion);
50321
+ if (L.appliedPlan) {
50322
+ notes.push(`${L.file ?? "log"}: this boot applied a persisted startup plan (fingerprint ${L.appliedPlan.fingerprint}) and skipped profiling, so its KV size (${g2(L.appliedPlan.kvCacheMemoryBytes).toFixed(2)} GiB) is the plan's, measured on an earlier boot.`);
50323
+ rows.push({
50324
+ what: "KV cache memory per GPU (plan applied at boot)",
50325
+ predicted: p.kvGib - g2(STARTUP_PLAN_REDUNDANCY_BYTES),
50326
+ measured: g2(L.appliedPlan.kvCacheMemoryBytes),
50327
+ unit: "GiB",
50328
+ errPct: pct2(p.kvGib - g2(STARTUP_PLAN_REDUNDANCY_BYTES), g2(L.appliedPlan.kvCacheMemoryBytes))
50329
+ });
50330
+ } else if (L.kvFromFlag) {
50331
+ notes.push(`${L.file ?? "log"}: --kv-cache-memory was set, so vLLM skipped profiling and the KV size is the flag's value, not a measurement.`);
50332
+ } else if (L.availableKvGib != null) {
50333
+ rows.push({ what: "Available KV cache memory per GPU", predicted: p.kvGib, measured: L.availableKvGib, unit: "GiB", errPct: pct2(p.kvGib, L.availableKvGib) });
50334
+ }
50335
+ if (L.planRefusedFreeMemory) notes.push(`${L.file ?? "log"}: vLLM found a plan but refused it for less free memory than its baseline, and profiled from scratch.`);
50336
+ if (L.kvCacheTokens != null && !L.kvFromFlag) rows.push({ what: "GPU KV cache size", predicted: p.tokens, measured: L.kvCacheTokens, unit: "tokens", errPct: pct2(p.tokens, L.kvCacheTokens) });
50337
+ if (L.maxConcurrency && !L.kvFromFlag) {
50338
+ if (L.maxConcurrency.tokensPerRequest === p.servedLen) rows.push({ what: `Maximum concurrency at ${p.servedLen.toLocaleString("en-US")} tokens`, predicted: p.maxConcurrency, measured: L.maxConcurrency.x, unit: "x", errPct: pct2(p.maxConcurrency, L.maxConcurrency.x) });
50339
+ else notes.push(`the log's concurrency line is for ${L.maxConcurrency.tokensPerRequest.toLocaleString("en-US")} tokens per request; the prediction is for ${p.servedLen.toLocaleString("en-US")}, so they are not compared.`);
50340
+ }
50341
+ if (L.modelLoadingGib != null) rows.push({ what: "Model loading (weights per GPU)", predicted: p.weightsGib, measured: L.modelLoadingGib, unit: "GiB", errPct: pct2(p.weightsGib, L.modelLoadingGib) });
50342
+ if (L.cudaGraphEstimateGib != null) rows.push({
50343
+ what: "CUDA graph memory (vLLM's own estimate)",
50344
+ predicted: p.cudaGraphGib,
50345
+ measured: L.cudaGraphEstimateGib,
50346
+ unit: "GiB",
50347
+ errPct: pct2(p.cudaGraphGib, L.cudaGraphEstimateGib),
50348
+ note: L.cudaGraphActualGib != null ? `vLLM then captured ${L.cudaGraphActualGib.toFixed(2)} GiB; the KV budget used the estimate` : void 0
50349
+ });
50350
+ if (L.suggestedKvCacheMemoryBytes != null) rows.push({
50351
+ what: "KV cache memory vLLM suggests for --kv-cache-memory",
50352
+ predicted: p.kvGib - g2(STARTUP_PLAN_REDUNDANCY_BYTES),
50353
+ measured: g2(L.suggestedKvCacheMemoryBytes),
50354
+ unit: "GiB",
50355
+ errPct: pct2(p.kvGib - g2(STARTUP_PLAN_REDUNDANCY_BYTES), g2(L.suggestedKvCacheMemoryBytes))
50356
+ });
50357
+ }
50358
+ if (!rows.length && !notes.length) notes.push(`nothing in ${names.join(", ")} that vLLM prints while sizing the cache (no "Available KV cache memory", "GPU KV cache size" or startup plan payload).`);
50359
+ return { source: `${names.join(", ")} (format: ${SRC})`, rows, notes, compared: rows.length > 0 };
50360
+ }
50361
+ function renderReceiptText(r) {
50362
+ const f = (v, u) => u === "tokens" ? Math.round(v).toLocaleString("en-US") : u === "x" ? `${v.toFixed(2)}x` : `${v.toFixed(2)} GiB`;
50363
+ let s = "\nReceipt: what vLLM measured, next to the prediction\n";
50364
+ s += ` from ${r.source}
50365
+ `;
50366
+ for (const row of r.rows) {
50367
+ const e = Number.isFinite(row.errPct) ? `${row.errPct >= 0 ? "+" : ""}${row.errPct.toFixed(1)}%` : "n/a";
50368
+ s += ` ${row.what}: predicted ${f(row.predicted, row.unit)}, measured ${f(row.measured, row.unit)} (${e})
50369
+ `;
50370
+ if (row.note) s += ` ${row.note}
50371
+ `;
50372
+ }
50373
+ for (const n2 of r.notes) s += ` note: ${n2}
50374
+ `;
50375
+ return s + "\n";
50376
+ }
50377
+ function predictionFromReport(r) {
50378
+ const m = r.memory;
50379
+ if (r.engine !== "vllm" || !m || m.method !== "engine" || r.resolved.servedLen == null || m.cardTotalGib == null) return null;
50380
+ return {
50381
+ kvGib: m.kvCapacityGbPerGpu * 1e9 / GiB2,
50382
+ tokens: m.tokenCapacity,
50383
+ maxConcurrency: m.maxConcurrentFullLength,
50384
+ servedLen: r.resolved.servedLen,
50385
+ weightsGib: m.weightsGbPerGpu * 1e9 / GiB2,
50386
+ cudaGraphGib: (m.reserve ?? []).filter((t) => /CUDA graph/i.test(t.what)).reduce((s, t) => s + t.gib, 0),
50387
+ cardTotalGib: m.cardTotalGib,
50388
+ engineVersion: r.resolved.engineVersion,
50389
+ engineVersionAssumed: r.resolved.engineVersionAssumed
50390
+ };
50391
+ }
50392
+
47033
50393
  // scripts/hfInspect.ts
47034
50394
  var HUB = "https://huggingface.co/api/models";
47035
50395
  async function hubInfo(modelId, fetchImpl) {
@@ -47178,11 +50538,20 @@ async function fetchServeSide(ref, fetchImpl = fetch) {
47178
50538
  return null;
47179
50539
  }
47180
50540
  };
47181
- const [config, tok, tmpl, gen] = await Promise.all([
50541
+ const [config, tok, tmpl, gen, index, api] = await Promise.all([
47182
50542
  get("config.json", true),
47183
50543
  get("tokenizer_config.json", true),
47184
50544
  get("chat_template.jinja", false),
47185
- get("generation_config.json", true)
50545
+ get("generation_config.json", true),
50546
+ get("model.safetensors.index.json", true),
50547
+ (async () => {
50548
+ try {
50549
+ const r = await fetchImpl(`${HUB}/${ref}`, { headers });
50550
+ return r.ok ? await r.json() : null;
50551
+ } catch {
50552
+ return null;
50553
+ }
50554
+ })()
47186
50555
  ]);
47187
50556
  if (!config || typeof config !== "object") return { error: `Hugging Face has no readable config.json for "${ref}" (check the id, or set HF_TOKEN for a gated repo)` };
47188
50557
  const cfg = config;
@@ -47193,19 +50562,45 @@ async function fetchServeSide(ref, fetchImpl = fetch) {
47193
50562
  modelId: ref,
47194
50563
  tokenizerConfig: tok && typeof tok === "object" ? tok : null,
47195
50564
  chatTemplateFile: typeof tmpl === "string" && tmpl.trim() ? tmpl : null,
47196
- generationConfig: gen && typeof gen === "object" ? gen : null
50565
+ generationConfig: gen && typeof gen === "object" ? gen : null,
50566
+ publishedWeights: publishedWeightsOf(ref, index, api)
47197
50567
  };
47198
50568
  }
50569
+ var STORED_BYTES = { F64: 8, F32: 4, F16: 2, BF16: 2, F8_E4M3: 1, F8_E5M2: 1, F8_E8M0: 1 };
50570
+ function publishedWeightsOf(ref, index, api) {
50571
+ const meta = index && typeof index === "object" ? index.metadata : null;
50572
+ const st = api && typeof api === "object" ? api.safetensors : null;
50573
+ const params = st?.parameters && typeof st.parameters === "object" ? st.parameters : null;
50574
+ const total = Number(meta?.total_size);
50575
+ if (Number.isFinite(total) && total > 0) {
50576
+ return { totalBytes: total, source: `huggingface.co/${ref} model.safetensors.index.json metadata.total_size`, dtypeParams: params, saveFormat: meta?.save_format != null ? String(meta.save_format) : null };
50577
+ }
50578
+ if (params && Object.keys(params).length && Object.keys(params).every((k) => k in STORED_BYTES)) {
50579
+ const bytes = Object.entries(params).reduce((a, [k, v]) => a + Number(v) * STORED_BYTES[k], 0);
50580
+ if (bytes > 0) return { totalBytes: bytes, source: `${HUB}/${ref} safetensors.parameters x dtype size`, dtypeParams: params, saveFormat: null };
50581
+ }
50582
+ return null;
50583
+ }
47199
50584
  async function serveCheckHFModel(ref, opts, fetchImpl = fetch) {
47200
50585
  const side = await fetchServeSide(ref, fetchImpl);
47201
50586
  if ("error" in side) return side;
50587
+ let gguf = null;
50588
+ let ggufError;
50589
+ if (opts.engine === "llamacpp" && opts.readGguf !== false) {
50590
+ const token = typeof process !== "undefined" ? process.env?.HF_TOKEN?.trim() : void 0;
50591
+ const g = await ggufFromLaunch({ model: opts.args.model, ggufFile: opts.args.ggufFile }, fetchImpl, token);
50592
+ if (g && "error" in g) ggufError = g.error;
50593
+ else gguf = g;
50594
+ }
47202
50595
  let against;
47203
50596
  if (opts.against) {
47204
50597
  const a = await fetchServeSide(opts.against, fetchImpl);
47205
50598
  if ("error" in a) return { error: `--against ${opts.against}: ${a.error}` };
47206
50599
  against = a;
47207
50600
  }
47208
- return { name: ref, report: checkServeConfig({ ...side, engine: opts.engine, args: opts.args, gpu: opts.gpu, gpus: opts.gpus, sampler: opts.sampler, against }) };
50601
+ const report = checkServeConfig({ ...side, engine: opts.engine, args: opts.args, gpu: opts.gpu, gpus: opts.gpus, sampler: opts.sampler, against, engineVersion: opts.engineVersion, gguf, gpuMemGiB: opts.gpuMemGiB, gpuMemUsedGiB: opts.gpuMemUsedGiB });
50602
+ if (ggufError) report.skipped.push({ check: "gguf-header", reason: `${ggufError}; the quant type was read from the file name instead.` });
50603
+ return { name: ref, report, ...ggufError ? { ggufError } : {} };
47209
50604
  }
47210
50605
  export {
47211
50606
  AGREE_TOLERANCE,
@@ -47215,6 +50610,7 @@ export {
47215
50610
  DEFAULT_INFERENCE_BATCH,
47216
50611
  DEFAULT_INFERENCE_PRECISION,
47217
50612
  DEFAULT_SEQ_LEN,
50613
+ GGML_TYPES,
47218
50614
  GGUF_BPW,
47219
50615
  INFERENCE_PRECISIONS,
47220
50616
  LAYOUT_BASIS,
@@ -47223,8 +50619,10 @@ export {
47223
50619
  QUANT_SUPPORT,
47224
50620
  SERVE_BASIS,
47225
50621
  SERVE_ENGINES,
50622
+ SERVE_EXTRA_CARDS,
47226
50623
  applyPrices,
47227
50624
  attentionPhrase,
50625
+ buildReceipt,
47228
50626
  checkServeConfig,
47229
50627
  dataFitHFModel,
47230
50628
  detectEngine,
@@ -47236,27 +50634,51 @@ export {
47236
50634
  keyFor,
47237
50635
  layoutHFModel,
47238
50636
  oomReport,
50637
+ parseGgufHeader,
47239
50638
  parseHumanSize,
47240
50639
  parseServeCommand,
50640
+ predictionFromReport,
47241
50641
  priceHFModel,
50642
+ publishedWeightsOf,
47242
50643
  readAttention,
47243
50644
  readHistogram,
47244
50645
  readInferencePrecision,
47245
50646
  readLayout,
50647
+ readReceiptInput,
47246
50648
  readSampler,
47247
50649
  readSeqLen,
50650
+ readStartupLog,
50651
+ readStartupPlan,
47248
50652
  renderLayoutText,
47249
50653
  renderLoraText,
47250
50654
  renderMarkdown,
47251
50655
  renderOomText,
50656
+ renderReceiptText,
47252
50657
  renderServeText,
47253
50658
  resolveLayoutGpu,
50659
+ resolveServeGpu,
47254
50660
  rightsize,
47255
50661
  serveCheckHFModel,
47256
50662
  specFromFlags,
47257
50663
  storedTwiceSentence,
50664
+ summarizeGguf,
47258
50665
  tokenizeCommand
47259
50666
  };
50667
+ /*! @license Data derived from NeuSight (MIT) and PyTorch (BSD-3-Clause); notices below.
50668
+ * GENERATED by scripts/gemm-efficiency/fit_gemm_efficiency.py. Do not edit by hand.
50669
+ *
50670
+ * Per-card GEMM efficiency SHAPE (measured throughput over the same card's
50671
+ * large-GEMM throughput) against log2 of the GEMM's time at that plateau, in
50672
+ * microseconds. Fitted offline from NeuSight's measured linear-kernel
50673
+ * latencies (https://github.com/scai-tech/NeuSight @ 6945927d9afc, MIT,
50674
+ * Copyright (c) 2025 Georgia Institute of Technology and Microsoft Corporation).
50675
+ * Datasheet peaks transcribed from PyTorch torch/_inductor/analysis/device_info.py
50676
+ * (https://github.com/pytorch/pytorch @ 6a6db44e15f9, BSD-3-Clause,
50677
+ * Copyright (c) 2016- Facebook, Inc and the PyTorch contributors). Full notices: NOTICE.
50678
+ * NeuSight's rows for these cards are FP32 GEMMs; see the fit script for the
50679
+ * one assumption that carries their shape over to bf16.
50680
+ */
50681
+ /*! @license Schedule tables and simulation ported from AMD-AGI/Primus, MIT, Copyright (c) 2025 Advanced Micro Devices, Inc. Full notice: NOTICE. */
47260
50682
  /*! Bundled license information:
47261
50683
 
47262
50684
  react/cjs/react.production.min.js: