@simplexai/localmodels-linux-x64 0.1.0-dev.35 → 0.1.0-dev.37
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/bootstrap.identity +1 -1
- package/bootstrap.sha256 +124 -102
- package/kit.py +1 -0
- package/modules/localmodels/__init__.py +1 -1
- package/modules/localmodels/__main__.py +9 -3
- package/modules/localmodels/bifrost_config.py +188 -0
- package/modules/localmodels/budget.py +15 -2
- package/modules/localmodels/catalog.json +235 -2
- package/modules/localmodels/catalog.py +51 -320
- package/modules/localmodels/catalog_add.py +2 -8
- package/modules/localmodels/catalog_recipes.py +321 -0
- package/modules/localmodels/cli_parser.py +4 -1
- package/modules/localmodels/console.py +5 -4
- package/modules/localmodels/contracts.py +13 -3
- package/modules/localmodels/debug_cli.py +158 -0
- package/modules/localmodels/debug_mode.py +727 -0
- package/modules/localmodels/debug_stub_server.py +192 -0
- package/modules/localmodels/decode_calibration.json +1 -1
- package/modules/localmodels/decode_calibration.py +34 -17
- package/modules/localmodels/engines-strata-0.1.59.1.json +31 -0
- package/modules/localmodels/gateway.py +21 -155
- package/modules/localmodels/gateway_accept.py +201 -0
- package/modules/localmodels/gateway_bifrost.py +19 -184
- package/modules/localmodels/gateway_cli.py +11 -4
- package/modules/localmodels/gateway_foundations.py +2 -4
- package/modules/localmodels/gateway_probe.py +0 -1
- package/modules/localmodels/gateway_server.py +2 -3
- package/modules/localmodels/gpu_specs.py +12 -0
- package/modules/localmodels/guard.py +2 -7
- package/modules/localmodels/harness.py +16 -129
- package/modules/localmodels/harness_cleanup.py +135 -0
- package/modules/localmodels/harness_gateway.py +16 -14
- package/modules/localmodels/harness_probe.py +12 -4
- package/modules/localmodels/hosts.py +25 -2
- package/modules/localmodels/http_local.py +59 -0
- package/modules/localmodels/install.py +23 -8
- package/modules/localmodels/library_gateway.py +9 -9
- package/modules/localmodels/library_jobs.py +76 -27
- package/modules/localmodels/library_serve.py +12 -1
- package/modules/localmodels/library_state.py +6 -1
- package/modules/localmodels/llm_rank.py +155 -7
- package/modules/localmodels/metal_probe.py +11 -7
- package/modules/localmodels/probe.py +108 -174
- package/modules/localmodels/process_identity.py +109 -154
- package/modules/localmodels/process_windows.py +86 -0
- package/modules/localmodels/recommend.py +32 -3
- package/modules/localmodels/recommend_cli.py +14 -6
- package/modules/localmodels/remote_ops.py +65 -0
- package/modules/localmodels/remote_ops_download.py +2 -2
- package/modules/localmodels/remote_ops_prepare.py +19 -0
- package/modules/localmodels/remote_ops_service.py +14 -2
- package/modules/localmodels/runtime_args.py +10 -3
- package/modules/localmodels/runtime_auth.py +5 -9
- package/modules/localmodels/runtime_cli.py +128 -129
- package/modules/localmodels/runtime_discovery.py +84 -0
- package/modules/localmodels/runtime_install.py +101 -0
- package/modules/localmodels/runtime_releases.py +302 -0
- package/modules/localmodels/service_stop.py +8 -108
- package/modules/localmodels/service_upgrade.py +394 -63
- package/modules/localmodels/services_cli.py +24 -14
- package/modules/localmodels/setup_inspection.py +97 -9
- package/modules/localmodels/setup_text.py +7 -0
- package/modules/localmodels/sizecalc.py +0 -1
- package/modules/localmodels/stack.py +14 -221
- package/modules/localmodels/stack_arena.py +732 -0
- package/modules/localmodels/stack_args.py +15 -9
- package/modules/localmodels/stack_auto.py +384 -3
- package/modules/localmodels/stack_aux_gpu.py +4 -3
- package/modules/localmodels/stack_capacity.py +138 -0
- package/modules/localmodels/stack_cleanup.py +9 -4
- package/modules/localmodels/stack_cli.py +286 -0
- package/modules/localmodels/stack_compose.py +76 -32
- package/modules/localmodels/stack_console.py +9 -6
- package/modules/localmodels/stack_hardware.py +96 -270
- package/modules/localmodels/stack_hardware_text.py +263 -0
- package/modules/localmodels/stack_journal.py +3 -9
- package/modules/localmodels/stack_ledger.py +48 -18
- package/modules/localmodels/stack_lifecycle.py +33 -312
- package/modules/localmodels/stack_mcp.py +729 -0
- package/modules/localmodels/stack_memory.py +0 -2
- package/modules/localmodels/stack_picks.py +73 -18
- package/modules/localmodels/stack_plan.py +23 -5
- package/modules/localmodels/stack_preflight.py +11 -19
- package/modules/localmodels/stack_remove.py +373 -0
- package/modules/localmodels/stack_route.py +101 -17
- package/modules/localmodels/stack_suite.py +16 -10
- package/modules/localmodels/stack_summary.py +14 -0
- package/modules/localmodels/stack_try.py +238 -24
- package/modules/localmodels/stack_try_client.py +53 -15
- package/modules/localmodels/stack_try_docs.py +2 -2
- package/modules/localmodels/stack_view.py +24 -171
- package/modules/localmodels/stack_view_access.py +114 -1
- package/modules/localmodels/stack_view_agent.py +3 -13
- package/modules/localmodels/stack_view_hub.py +9 -10
- package/modules/localmodels/stack_view_llm.py +1 -1
- package/modules/localmodels/stack_view_sandbox.py +2 -2
- package/modules/localmodels/stack_view_schema.py +183 -0
- package/modules/localmodels/stack_view_serve.py +7 -1
- package/modules/localmodels/stack_view_service.py +1 -2
- package/modules/localmodels/stack_view_text.py +13 -9
- package/modules/localmodels/stack_warm.py +3 -0
- package/modules/localmodels/stack_warm_store.py +517 -0
- package/modules/localmodels/tui.py +28 -4
- package/modules/localmodels/tui_dialogs.py +136 -0
- package/modules/localmodels/tui_modals.py +279 -0
- package/modules/localmodels/tui_screen.py +113 -154
- package/modules/localmodels/tui_views.py +134 -203
- package/modules/localmodels/web/index.html +510 -101
- package/modules/localmodels/web/sizecalc/app.js +363 -10
- package/modules/localmodels/web/sizecalc/page.html +27 -3
- package/modules/localmodels/web/view/fleet.html +11 -2
- package/modules/localmodels/web/view/fleet.js +191 -17
- package/modules/localmodels/web/view/i18n.js +3 -2
- package/modules/localmodels/web/view/index.html +1 -1
- package/modules/localmodels/web/view/nav.js +22 -3
- package/modules/localmodels/web/view/view.css +63 -18
- package/modules/localmodels/web/view/view.js +169 -32
- package/modules/{simplex_localmodels-0.1.0.dev35.dist-info → simplex_localmodels-0.1.0.dev37.dist-info}/METADATA +1 -1
- package/modules/{simplex_localmodels-0.1.0.dev35.dist-info → simplex_localmodels-0.1.0.dev37.dist-info}/RECORD +120 -98
- package/package.json +1 -1
- package/tool.json +1 -1
- package/modules/localmodels/engines-strata-0.1.49.1.json +0 -31
- /package/modules/{simplex_localmodels-0.1.0.dev35.dist-info → simplex_localmodels-0.1.0.dev37.dist-info}/WHEEL +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev35.dist-info → simplex_localmodels-0.1.0.dev37.dist-info}/entry_points.txt +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev35.dist-info → simplex_localmodels-0.1.0.dev37.dist-info}/licenses/NOTICE +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev35.dist-info → simplex_localmodels-0.1.0.dev37.dist-info}/licenses/localmodels/HERMES-LICENSE +0 -0
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
// The page: reads the controls, prices them with SizeCalc (calc.js) and draws the answer.
|
|
2
|
-
|
|
2
|
+
const ATT_ZH = { full: "全注意力 GQA", swa: "滑窗混合", hybrid: "线性 / SSM 混合", mla: "MLA 潜向量" };
|
|
3
|
+
const EXACT_ZH = {
|
|
4
|
+
"active parameters cannot exceed total parameters": "激活参数量不能大于总参数量",
|
|
5
|
+
"active parameters must be positive and at most the total": "激活参数量必须大于 0 且不能大于总参数量",
|
|
6
|
+
"parameters must be greater than zero": "参数量必须大于 0",
|
|
7
|
+
"weight file size must be greater than zero": "权重文件大小必须大于 0",
|
|
8
|
+
"parameters and file size must be positive": "参数量和权重文件大小必须大于 0",
|
|
9
|
+
"give two of params, format and file size": "请提供总参数、量化格式和权重文件大小中的至少两项",
|
|
10
|
+
"context must be at least 1 token": "上下文长度至少为 1 token",
|
|
11
|
+
"slots must be at least 1": "并发槽位数至少为 1",
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
function zhMsg(msg) {
|
|
15
|
+
if (msg == null) return "";
|
|
16
|
+
const s = String(msg).trim();
|
|
17
|
+
if (!s) return "";
|
|
18
|
+
if (EXACT_ZH[s]) return EXACT_ZH[s];
|
|
19
|
+
if (s.startsWith("unknown format: ")) return `未知格式:${s.slice("unknown format: ".length)}`;
|
|
20
|
+
if (s.startsWith("unknown format ")) return `未知格式:${s.slice("unknown format ".length)}`;
|
|
21
|
+
if (s.startsWith("unknown KV cache type: ")) return `未知 KV 缓存类型:${s.slice("unknown KV cache type: ".length)}`;
|
|
22
|
+
let m = s.match(/^(.+) bits per weight is outside 1-32$/);
|
|
23
|
+
if (m) return `每权重位数 ${m[1]} 超出 1–32 范围`;
|
|
24
|
+
m = s.match(/^guessed for (\S+) attention$/);
|
|
25
|
+
if (m) return `按${ATT_ZH[m[1]] || m[1]}注意力参数量估算`;
|
|
26
|
+
m = s.match(/^([\d.]+[A-Za-z]*) parameters inferred from the file size at ([\d.]+) bpw$/);
|
|
27
|
+
if (m) return `按 ${m[2]} bpw 从权重文件大小反推出总参数量约为 ${m[1]}`;
|
|
28
|
+
m = s.match(/^([\d.]+) bits per weight; the nearest listed format is (.+)$/);
|
|
29
|
+
if (m) return `按文件大小折合每权重 ${m[1]} bits;表中最接近的格式是 ${m[2]}`;
|
|
30
|
+
m = s.match(/^the file holds ([\d.]+) bits per weight, (.+?) is typically ([\d.]+): check the parameter count \(embeddings, vision tower, MTP heads\)$/);
|
|
31
|
+
if (m) return `该文件每权重占 ${m[1]} bits,而 ${m[2]} 通常约为 ${m[3]} bpw:请核对总参数量(如嵌入层、视觉塔、MTP 头)`;
|
|
32
|
+
if (s.startsWith("EXL bit rates leave out the 16-bit embeddings and 6-bit head")) {
|
|
33
|
+
return "EXL 标称位数不含 16-bit 嵌入层与 6-bit 输出头,实际权重文件会比估算更大;已知真实大小时可填入「权重文件大小」。";
|
|
34
|
+
}
|
|
35
|
+
m = s.match(/^small model: embeddings are a large share, so real files run above the table \(([^)]+)\); give --file-size when known$/);
|
|
36
|
+
if (m) {
|
|
37
|
+
const ex = m[1].replace(" holds ", " 实测为 ").replace(" bits per weight", " bpw");
|
|
38
|
+
return `小模型嵌入层占比高,实际文件通常会高于表内平均位数(例如 ${ex});已知真实大小时可直接填入「权重文件大小」。`;
|
|
39
|
+
}
|
|
40
|
+
return s;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (typeof document !== "undefined") (() => {
|
|
3
44
|
const calc = SizeCalc(SIZECALC_DATA);
|
|
4
45
|
const D = SIZECALC_DATA;
|
|
5
46
|
const GiB = 1073741824;
|
|
@@ -71,11 +112,12 @@
|
|
|
71
112
|
// still stand: changing the shape or the format drops an override the new shape would contradict.
|
|
72
113
|
let presetId = null;
|
|
73
114
|
const fromPreset = { filesize: false, kvpt: false };
|
|
74
|
-
function
|
|
115
|
+
function setPresetControls(p) {
|
|
75
116
|
presetId = p.id;
|
|
76
117
|
fromPreset.filesize = Boolean(p.file);
|
|
77
118
|
fromPreset.kvpt = true;
|
|
78
|
-
$(
|
|
119
|
+
$("k-moe").checked = Boolean(p.active);
|
|
120
|
+
$("k-dense").checked = !p.active;
|
|
79
121
|
$("params").value = p.params;
|
|
80
122
|
if (p.active) $("active").value = p.active;
|
|
81
123
|
$("attention").value = p.attention;
|
|
@@ -83,7 +125,11 @@
|
|
|
83
125
|
$("quant").value = p.quant;
|
|
84
126
|
$("filesize").value = p.file || "";
|
|
85
127
|
$("i-bits").checked = true;
|
|
128
|
+
$("i-params").checked = false;
|
|
86
129
|
selected = null;
|
|
130
|
+
}
|
|
131
|
+
function applyPreset(p) {
|
|
132
|
+
setPresetControls(p);
|
|
87
133
|
update();
|
|
88
134
|
}
|
|
89
135
|
|
|
@@ -110,7 +156,7 @@
|
|
|
110
156
|
attention: $("attention").value,
|
|
111
157
|
kvPerToken: kv != null && kv > 0 ? Math.round(kv * 1024) : null,
|
|
112
158
|
context: CONTEXTS[Number($("ctx").value)],
|
|
113
|
-
slots:
|
|
159
|
+
slots: num("slots"),
|
|
114
160
|
kvType: $("kvtype").value,
|
|
115
161
|
hostRam: Math.max(0, num("hostram") ?? 64) * GiB,
|
|
116
162
|
};
|
|
@@ -127,6 +173,190 @@
|
|
|
127
173
|
// ── render ────────────────────────────────────────────────────────
|
|
128
174
|
let selected = null;
|
|
129
175
|
let last = null;
|
|
176
|
+
let pinned = null;
|
|
177
|
+
|
|
178
|
+
function tierIndex(t) {
|
|
179
|
+
const idx = D.tiers.findIndex(([id]) => id === t);
|
|
180
|
+
return idx === -1 ? D.tiers.length : idx;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function comparisonDevice(r) {
|
|
184
|
+
if (selected) {
|
|
185
|
+
const cur = r.devices.find((d) => d.device === selected);
|
|
186
|
+
if (cur) return cur;
|
|
187
|
+
}
|
|
188
|
+
const t = r.tiers.find((x) => x.verdict === "fits") || r.tiers.find((x) => x.verdict === "offload");
|
|
189
|
+
return (t && r.devices.find((d) => d.device === t.device)) || r.devices[r.devices.length - 1] || null;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function currentLabel(r) {
|
|
193
|
+
const preset = presetId ? PRESETS.find((p) => p.id === presetId) : null;
|
|
194
|
+
const base = preset
|
|
195
|
+
? preset.name
|
|
196
|
+
: `${(r.model.params / 1e9).toFixed(1)}B${r.model.kind === "moe" ? ` (A${(r.model.active_params / 1e9).toFixed(1)}B)` : ""}`;
|
|
197
|
+
return `${base} · ${r.format.name}`;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function syncPinButton() {
|
|
201
|
+
const pinBtn = $("pin-btn");
|
|
202
|
+
if (!pinBtn) return;
|
|
203
|
+
pinBtn.textContent = pinned ? "取消对比" : "固定当前方案作对比";
|
|
204
|
+
pinBtn.setAttribute("aria-pressed", String(Boolean(pinned)));
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function renderCompare(r) {
|
|
208
|
+
const bar = $("compare-bar");
|
|
209
|
+
if (!bar) return;
|
|
210
|
+
if (!pinned) {
|
|
211
|
+
bar.hidden = true;
|
|
212
|
+
bar.innerHTML = "";
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
bar.hidden = false;
|
|
216
|
+
const curTierId = r.magnitude.fits;
|
|
217
|
+
const curTier = tierName(curTierId);
|
|
218
|
+
const df = r.file_bytes - pinned.fileBytes;
|
|
219
|
+
const dr = r.runtime.total - pinned.runTotal;
|
|
220
|
+
const fileCls = Math.abs(df) < 1e6 ? "delta-flat" : df > 0 ? "delta-up" : "delta-down";
|
|
221
|
+
const runCls = Math.abs(dr) < 1e6 ? "delta-flat" : dr > 0 ? "delta-up" : "delta-down";
|
|
222
|
+
const fmtDelta = (bytes, unit) => {
|
|
223
|
+
const div = unit === "GiB" ? GiB : 1e9;
|
|
224
|
+
if (Math.abs(bytes / div) < 0.005) return `±0 ${unit}`;
|
|
225
|
+
const absStr = unit === "GiB" ? gib(Math.abs(bytes)) : gb(Math.abs(bytes));
|
|
226
|
+
return `${bytes > 0 ? "+" : "-"}${absStr} ${unit}`;
|
|
227
|
+
};
|
|
228
|
+
const pinnedTierId = "tierId" in pinned
|
|
229
|
+
? pinned.tierId
|
|
230
|
+
: (D.tiers.find(([id]) => TIER_ZH[id][0] === pinned.tier)?.[0] ?? null);
|
|
231
|
+
let tierChip;
|
|
232
|
+
if (curTier === pinned.tier) {
|
|
233
|
+
tierChip = `<span class="delta-chip delta-flat">量级:${esc(curTier)}(不变)</span>`;
|
|
234
|
+
} else {
|
|
235
|
+
const tierCls = tierIndex(curTierId) > tierIndex(pinnedTierId) ? "delta-up" : "delta-down";
|
|
236
|
+
tierChip = `<span class="delta-chip ${tierCls}">量级:${esc(pinned.tier)} → ${esc(curTier)}</span>`;
|
|
237
|
+
}
|
|
238
|
+
const dev = (pinned.deviceId && r.devices.find((d) => d.device === pinned.deviceId)) || comparisonDevice(r);
|
|
239
|
+
const curDecode = dev?.decode_ceiling_tok_s || 0;
|
|
240
|
+
let decodeChip = "";
|
|
241
|
+
if (pinned.decode > 0 || curDecode > 0) {
|
|
242
|
+
const devNote = dev ? `(${SHORT[dev.device] || dev.name})` : "";
|
|
243
|
+
if (pinned.decode > 0 && curDecode > 0) {
|
|
244
|
+
const dd = curDecode - pinned.decode;
|
|
245
|
+
const dCls = Math.abs(dd) < 0.05 ? "delta-flat" : dd > 0 ? "delta-up better" : "delta-down worse";
|
|
246
|
+
const dText = Math.abs(dd) < 0.05 ? "±0 tok/s" : `${dd > 0 ? "+" : "-"}${tok(Math.abs(dd))} tok/s`;
|
|
247
|
+
decodeChip = `<span class="delta-chip ${dCls}">decode${esc(devNote)}:${esc(dText)}</span>`;
|
|
248
|
+
} else if (curDecode > 0) {
|
|
249
|
+
decodeChip = `<span class="delta-chip delta-up better">decode${esc(devNote)}:可运行(${tok(curDecode)} tok/s)</span>`;
|
|
250
|
+
} else {
|
|
251
|
+
decodeChip = `<span class="delta-chip delta-down worse">decode${esc(devNote)}:不可运行</span>`;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
bar.innerHTML = `<div class="compare-base">对比基准:<b>${esc(pinned.label)}</b>(${gb(pinned.fileBytes)} GB · ${gib(pinned.runTotal)} GiB · ${esc(pinned.tier)})</div>
|
|
255
|
+
<div class="compare-deltas">
|
|
256
|
+
<span class="delta-chip ${fileCls}">权重:${esc(fmtDelta(df, "GB"))}</span>
|
|
257
|
+
<span class="delta-chip ${runCls}">运行:${esc(fmtDelta(dr, "GiB"))}</span>
|
|
258
|
+
${tierChip}
|
|
259
|
+
${decodeChip}
|
|
260
|
+
</div>`;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
function parseHashMap() {
|
|
264
|
+
if (typeof location === "undefined" || !location.hash || location.hash === "#") return null;
|
|
265
|
+
const raw = location.hash.startsWith("#") ? location.hash.slice(1) : location.hash;
|
|
266
|
+
if (!raw) return null;
|
|
267
|
+
const out = {};
|
|
268
|
+
for (const part of raw.split("&")) {
|
|
269
|
+
if (!part) continue;
|
|
270
|
+
const eq = part.indexOf("=");
|
|
271
|
+
const rawKey = eq === -1 ? part : part.slice(0, eq);
|
|
272
|
+
const rawVal = eq === -1 ? "" : part.slice(eq + 1);
|
|
273
|
+
try {
|
|
274
|
+
const k = decodeURIComponent(rawKey.replace(/\+/g, " "));
|
|
275
|
+
const v = decodeURIComponent(rawVal.replace(/\+/g, " "));
|
|
276
|
+
if (k) out[k] = v;
|
|
277
|
+
} catch { /* ignore malformed percent-encoding */ }
|
|
278
|
+
}
|
|
279
|
+
return Object.keys(out).length ? out : null;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
function parseCtxIndex(raw) {
|
|
283
|
+
if (raw == null || raw === "") return null;
|
|
284
|
+
const text = String(raw).trim().toLowerCase();
|
|
285
|
+
if (/^\d+$/.test(text)) {
|
|
286
|
+
const idx = Number(text);
|
|
287
|
+
if (idx >= 0 && idx < CONTEXTS.length) return idx;
|
|
288
|
+
}
|
|
289
|
+
const m = text.match(/^(\d+(?:\.\d+)?)([km])?$/);
|
|
290
|
+
if (!m) return null;
|
|
291
|
+
const mul = m[2] === "m" ? 1048576 : m[2] === "k" ? 1024 : 1;
|
|
292
|
+
const tokens = Math.round(Number(m[1]) * mul);
|
|
293
|
+
if (!Number.isFinite(tokens) || tokens <= 0) return null;
|
|
294
|
+
let best = 0;
|
|
295
|
+
let bestDiff = Infinity;
|
|
296
|
+
for (let idx = 0; idx < CONTEXTS.length; idx++) {
|
|
297
|
+
const diff = Math.abs(CONTEXTS[idx] - tokens);
|
|
298
|
+
if (diff < bestDiff) { bestDiff = diff; best = idx; }
|
|
299
|
+
}
|
|
300
|
+
return best;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
function applyQuantParam(quantRaw, bitsRaw) {
|
|
304
|
+
if (quantRaw == null || quantRaw === "") return;
|
|
305
|
+
const q = String(quantRaw).trim();
|
|
306
|
+
if (q === "custom" || q === "custom-exl") {
|
|
307
|
+
$("quant").value = q;
|
|
308
|
+
const b = Number(bitsRaw);
|
|
309
|
+
if (bitsRaw != null && Number.isFinite(b) && b >= 1 && b <= 32) $("custom-bits").value = String(b);
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
const upper = q.toUpperCase();
|
|
313
|
+
const matched = D.formats.find((f) => f.name.toUpperCase() === upper);
|
|
314
|
+
if (matched) {
|
|
315
|
+
$("quant").value = matched.name;
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
if (upper.startsWith("EXL2-") || upper.startsWith("EXL3-")) {
|
|
319
|
+
const b = Number(q.slice(5));
|
|
320
|
+
if (Number.isFinite(b) && b >= 1 && b <= 32) {
|
|
321
|
+
$("quant").value = "custom-exl";
|
|
322
|
+
$("custom-bits").value = String(b);
|
|
323
|
+
}
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
const b = Number(q);
|
|
327
|
+
if (Number.isFinite(b) && b >= 1 && b <= 32) {
|
|
328
|
+
$("quant").value = "custom";
|
|
329
|
+
$("custom-bits").value = String(b);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
function syncHash(i) {
|
|
334
|
+
if (typeof history === "undefined" || typeof history.replaceState !== "function") return;
|
|
335
|
+
const pairs = [];
|
|
336
|
+
const add = (key, val) => {
|
|
337
|
+
if (val != null && String(val) !== "") {
|
|
338
|
+
pairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(val))}`);
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
if (presetId) add("preset", presetId);
|
|
342
|
+
add("kind", i.moe ? "moe" : "dense");
|
|
343
|
+
add("params", $("params").value.trim());
|
|
344
|
+
if (i.moe) add("active", $("active").value.trim());
|
|
345
|
+
add("att", i.attention);
|
|
346
|
+
add("kvpt", $("kvpt").value.trim());
|
|
347
|
+
add("quant", i.quant);
|
|
348
|
+
if (i.quant.startsWith("custom")) add("bits", $("custom-bits").value.trim());
|
|
349
|
+
add("file", $("filesize").value.trim());
|
|
350
|
+
if ($("filesize").value.trim() !== "") add("infer", i.inferParams ? "params" : "bits");
|
|
351
|
+
add("ctx", i.context);
|
|
352
|
+
add("slots", $("slots").value.trim());
|
|
353
|
+
add("kv", i.kvType);
|
|
354
|
+
add("ram", $("hostram").value.trim());
|
|
355
|
+
const next = "#" + pairs.join("&");
|
|
356
|
+
if (typeof location === "undefined" || location.hash !== next) {
|
|
357
|
+
history.replaceState(null, "", next);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
130
360
|
|
|
131
361
|
function update() {
|
|
132
362
|
for (const b of $("presets").querySelectorAll("button")) b.setAttribute("aria-pressed", String(b.dataset.id === presetId));
|
|
@@ -135,8 +365,11 @@
|
|
|
135
365
|
$("infer-seg").hidden = num("filesize") == null;
|
|
136
366
|
const i = readInputs();
|
|
137
367
|
$("ctx-val").textContent = `${ctxLabel(i.context)} tokens`;
|
|
368
|
+
const resultsEl = document.querySelector(".results");
|
|
138
369
|
let r;
|
|
139
370
|
try {
|
|
371
|
+
if (i.slots != null && (!Number.isFinite(i.slots) || i.slots < 1)) throw new Error("slots must be at least 1");
|
|
372
|
+
const slots = Math.max(1, Math.round(i.slots ?? 1));
|
|
140
373
|
const { shape, notes } = calc.shape({
|
|
141
374
|
params: i.inferParams ? null : i.params,
|
|
142
375
|
active: i.active,
|
|
@@ -145,13 +378,19 @@
|
|
|
145
378
|
attention: i.attention,
|
|
146
379
|
kvPerToken: i.kvPerToken,
|
|
147
380
|
});
|
|
148
|
-
const p = calc.posture({ context: i.context, slots
|
|
381
|
+
const p = calc.posture({ context: i.context, slots, kvType: i.kvType, hostRam: i.hostRam });
|
|
149
382
|
r = calc.report(shape, p, notes);
|
|
150
383
|
r.shape = shape;
|
|
151
384
|
r.posture = p;
|
|
152
385
|
$("err").textContent = "";
|
|
386
|
+
$("err").hidden = true;
|
|
387
|
+
$("stale-note").hidden = true;
|
|
388
|
+
resultsEl?.classList.remove("is-stale");
|
|
153
389
|
} catch (e) {
|
|
154
|
-
$("err").textContent = e.message;
|
|
390
|
+
$("err").textContent = zhMsg(e.message);
|
|
391
|
+
$("err").hidden = false;
|
|
392
|
+
$("stale-note").hidden = false;
|
|
393
|
+
resultsEl?.classList.add("is-stale");
|
|
155
394
|
return;
|
|
156
395
|
}
|
|
157
396
|
last = r;
|
|
@@ -162,6 +401,7 @@
|
|
|
162
401
|
renderDevices(r);
|
|
163
402
|
renderLadder(r);
|
|
164
403
|
renderCmd(r, i);
|
|
404
|
+
syncHash(i);
|
|
165
405
|
}
|
|
166
406
|
|
|
167
407
|
function tierName(t) {
|
|
@@ -187,10 +427,11 @@
|
|
|
187
427
|
$("r-read-s").textContent = r.model.kind === "moe"
|
|
188
428
|
? `MoE 只读激活的 ${(r.model.active_params / 1e9).toFixed(1)}B;${(r.model.expert_share * 100).toFixed(0)}% 权重在路由专家里`
|
|
189
429
|
: "稠密模型每 token 读一遍全部权重";
|
|
190
|
-
const notes =
|
|
191
|
-
if (r.kv_source !== "given") notes.push(`KV 每 token 是按参数估的(${r.kv_source});知道真实值就填进去,或用 memcalc 读 config.json。`);
|
|
430
|
+
const notes = r.notes.map(zhMsg);
|
|
431
|
+
if (r.kv_source !== "given") notes.push(`KV 每 token 是按参数估的(${zhMsg(r.kv_source)});知道真实值就填进去,或用 memcalc 读 config.json。`);
|
|
192
432
|
if (i.context > 131072) notes.push("上下文超过 128K:很多模型训练长度到不了这里,先查模型的 max_position_embeddings。");
|
|
193
433
|
$("notes").innerHTML = notes.map((n) => `<p>· ${esc(n)}</p>`).join("");
|
|
434
|
+
renderCompare(r);
|
|
194
435
|
}
|
|
195
436
|
|
|
196
437
|
function renderRuler(r) {
|
|
@@ -354,7 +595,7 @@
|
|
|
354
595
|
if (i.attention !== "full") a.push(`--attention ${i.attention}`);
|
|
355
596
|
if (i.kvPerToken != null) a.push(`--kv-per-token ${+(i.kvPerToken / 1024).toFixed(1)}KiB`);
|
|
356
597
|
if (i.context !== D.constants.default_context) a.push(`--context ${ctxLabel(i.context).toLowerCase()}`);
|
|
357
|
-
if (i.slots > 1) a.push(`--slots ${i.slots}`);
|
|
598
|
+
if (i.slots != null && Math.round(i.slots) > 1) a.push(`--slots ${Math.round(i.slots)}`);
|
|
358
599
|
if (i.kvType !== "f16") a.push(`--kv ${i.kvType}`);
|
|
359
600
|
if (i.hostRam !== D.constants.default_host_ram) a.push(`--host-ram ${i.hostRam / GiB}GiB`);
|
|
360
601
|
$("cmd").textContent = a.join(" ");
|
|
@@ -425,7 +666,119 @@
|
|
|
425
666
|
const dark = root.dataset.theme ? root.dataset.theme === "dark" : matchMedia("(prefers-color-scheme: dark)").matches;
|
|
426
667
|
root.dataset.theme = dark ? "light" : "dark";
|
|
427
668
|
});
|
|
669
|
+
$("pin-btn")?.addEventListener("click", () => {
|
|
670
|
+
if (pinned) {
|
|
671
|
+
pinned = null;
|
|
672
|
+
} else if (last) {
|
|
673
|
+
const dev = comparisonDevice(last);
|
|
674
|
+
pinned = {
|
|
675
|
+
label: currentLabel(last),
|
|
676
|
+
fileBytes: last.file_bytes,
|
|
677
|
+
runTotal: last.runtime.total,
|
|
678
|
+
tier: tierName(last.magnitude.fits),
|
|
679
|
+
tierId: last.magnitude.fits,
|
|
680
|
+
deviceId: dev?.device || null,
|
|
681
|
+
deviceName: dev?.name || "",
|
|
682
|
+
decode: dev?.decode_ceiling_tok_s || 0,
|
|
683
|
+
};
|
|
684
|
+
}
|
|
685
|
+
syncPinButton();
|
|
686
|
+
if (last) renderCompare(last);
|
|
687
|
+
});
|
|
428
688
|
let raf = 0;
|
|
429
689
|
addEventListener("resize", () => { cancelAnimationFrame(raf); raf = requestAnimationFrame(() => last && renderRuler(last)); });
|
|
430
|
-
|
|
690
|
+
|
|
691
|
+
function initFromHash() {
|
|
692
|
+
const fallback = PRESETS.find((p) => p.id === "qwen38-27b");
|
|
693
|
+
const map = parseHashMap();
|
|
694
|
+
const preset = map?.preset ? PRESETS.find((p) => p.id === map.preset) : null;
|
|
695
|
+
if (!map || (!preset && map.params == null && map.file == null)) {
|
|
696
|
+
applyPreset(fallback);
|
|
697
|
+
return;
|
|
698
|
+
}
|
|
699
|
+
if (preset) {
|
|
700
|
+
setPresetControls(preset);
|
|
701
|
+
} else {
|
|
702
|
+
presetId = null;
|
|
703
|
+
fromPreset.filesize = false;
|
|
704
|
+
fromPreset.kvpt = false;
|
|
705
|
+
$("k-dense").checked = true;
|
|
706
|
+
$("k-moe").checked = false;
|
|
707
|
+
$("filesize").value = "";
|
|
708
|
+
$("kvpt").value = "";
|
|
709
|
+
$("i-bits").checked = true;
|
|
710
|
+
$("i-params").checked = false;
|
|
711
|
+
selected = null;
|
|
712
|
+
}
|
|
713
|
+
const shapeMatchesPreset = !preset || (
|
|
714
|
+
(map.kind == null || map.kind === (preset.active ? "moe" : "dense"))
|
|
715
|
+
&& (map.params == null || Number(map.params) === preset.params)
|
|
716
|
+
&& (map.active == null || Number(map.active) === preset.active)
|
|
717
|
+
&& (map.att == null || map.att === preset.attention)
|
|
718
|
+
&& (map.quant == null || map.quant === preset.quant)
|
|
719
|
+
);
|
|
720
|
+
if (!shapeMatchesPreset) {
|
|
721
|
+
presetId = null;
|
|
722
|
+
if (map.file == null && map.infer !== "params") {
|
|
723
|
+
$("filesize").value = "";
|
|
724
|
+
fromPreset.filesize = false;
|
|
725
|
+
}
|
|
726
|
+
if (map.kvpt == null) {
|
|
727
|
+
$("kvpt").value = "";
|
|
728
|
+
fromPreset.kvpt = false;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
if (map.kind === "moe") { $("k-moe").checked = true; $("k-dense").checked = false; }
|
|
732
|
+
else if (map.kind === "dense") { $("k-dense").checked = true; $("k-moe").checked = false; }
|
|
733
|
+
if (map.params != null) {
|
|
734
|
+
const pVal = Number(map.params);
|
|
735
|
+
if (Number.isFinite(pVal) && pVal > 0) $("params").value = map.params;
|
|
736
|
+
}
|
|
737
|
+
if (map.active != null) {
|
|
738
|
+
const aVal = Number(map.active);
|
|
739
|
+
if (Number.isFinite(aVal) && aVal > 0) $("active").value = map.active;
|
|
740
|
+
}
|
|
741
|
+
if (map.att && ["full", "swa", "hybrid", "mla"].includes(map.att)) $("attention").value = map.att;
|
|
742
|
+
if (map.kvpt != null) {
|
|
743
|
+
if (map.kvpt === "") { $("kvpt").value = ""; fromPreset.kvpt = false; }
|
|
744
|
+
else {
|
|
745
|
+
const kVal = Number(map.kvpt);
|
|
746
|
+
if (Number.isFinite(kVal) && kVal >= 0) {
|
|
747
|
+
$("kvpt").value = map.kvpt;
|
|
748
|
+
if (!preset || kVal !== preset.kv) fromPreset.kvpt = false;
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
applyQuantParam(map.quant, map.bits);
|
|
753
|
+
if (map.file != null) {
|
|
754
|
+
if (map.file === "") { $("filesize").value = ""; fromPreset.filesize = false; }
|
|
755
|
+
else {
|
|
756
|
+
const fVal = Number(map.file);
|
|
757
|
+
if (Number.isFinite(fVal) && fVal > 0) {
|
|
758
|
+
$("filesize").value = map.file;
|
|
759
|
+
if (!preset || fVal !== preset.file) fromPreset.filesize = false;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
if (map.infer === "params") { $("i-params").checked = true; $("i-bits").checked = false; }
|
|
764
|
+
else if (map.infer === "bits") { $("i-bits").checked = true; $("i-params").checked = false; }
|
|
765
|
+
const ctxIdx = parseCtxIndex(map.ctx);
|
|
766
|
+
if (ctxIdx != null) $("ctx").value = String(ctxIdx);
|
|
767
|
+
if (map.slots != null) {
|
|
768
|
+
const sVal = Number(map.slots);
|
|
769
|
+
if (Number.isFinite(sVal) && sVal >= 1) $("slots").value = String(Math.round(sVal));
|
|
770
|
+
}
|
|
771
|
+
if (map.kv && ["f16", "fp8", "q8_0", "q4_0"].includes(map.kv)) $("kvtype").value = map.kv;
|
|
772
|
+
if (map.ram != null) {
|
|
773
|
+
const rVal = Number(map.ram);
|
|
774
|
+
if (Number.isFinite(rVal) && rVal >= 0) $("hostram").value = map.ram;
|
|
775
|
+
}
|
|
776
|
+
last = null;
|
|
777
|
+
update();
|
|
778
|
+
if (!last) applyPreset(fallback);
|
|
779
|
+
}
|
|
780
|
+
syncPinButton();
|
|
781
|
+
initFromHash();
|
|
782
|
+
addEventListener("hashchange", initFromHash);
|
|
431
783
|
})();
|
|
784
|
+
if (typeof module !== "undefined") module.exports = { zhMsg };
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<meta name="color-scheme" content="light dark">
|
|
6
7
|
<title>模型体量计算器</title>
|
|
7
8
|
<style>
|
|
8
9
|
/* Layout: a control rail on the left, the answer on the right. The answer leads with the class
|
|
@@ -39,12 +40,16 @@
|
|
|
39
40
|
--s-w: #3987e5; --s-kv: #d95926; --s-ov: #6b7380; --s-off: #c98500; color-scheme: dark;
|
|
40
41
|
}
|
|
41
42
|
}
|
|
43
|
+
:root[data-theme="light"] { color-scheme: light; }
|
|
42
44
|
:root[data-theme="dark"] {
|
|
43
45
|
--bg: #0f1114; --surface: #17191d; --ink: #eceef1; --ink-2: #b7bdc6; --muted: #868d98;
|
|
44
46
|
--line: #262a30; --line-2: #383d45; --accent: #6ea8f0; --accent-wash: #16243a;
|
|
45
47
|
--good: #2fb52f; --warn: #e0a030; --bad: #e66767; --none: #4b515a;
|
|
46
48
|
--s-w: #3987e5; --s-kv: #d95926; --s-ov: #6b7380; --s-off: #c98500; color-scheme: dark;
|
|
47
49
|
}
|
|
50
|
+
@media (prefers-reduced-motion: reduce) {
|
|
51
|
+
*, *::before, *::after { animation: none !important; transition: none !important; }
|
|
52
|
+
}
|
|
48
53
|
* { box-sizing: border-box; }
|
|
49
54
|
[hidden] { display: none !important; }
|
|
50
55
|
html { -webkit-text-size-adjust: 100%; }
|
|
@@ -62,7 +67,9 @@ a { color: var(--accent); }
|
|
|
62
67
|
.eyebrow { font-size: 12px; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; }
|
|
63
68
|
.lede { color: var(--ink-2); font-size: 15px; }
|
|
64
69
|
.mast-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
|
|
70
|
+
.mast-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
|
65
71
|
.theme { font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
|
|
72
|
+
.theme[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-wash); color: var(--ink); font-weight: 600; }
|
|
66
73
|
.bench { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
|
|
67
74
|
@media (min-width: 1040px) { .bench { grid-template-columns: 320px minmax(0, 1fr); } }
|
|
68
75
|
|
|
@@ -90,13 +97,25 @@ input[type="range"] { width: 100%; accent-color: var(--accent); margin: 2px 0; }
|
|
|
90
97
|
.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: -2px; }
|
|
91
98
|
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
|
|
92
99
|
.hint { font-size: 12px; color: var(--muted); }
|
|
93
|
-
.err {
|
|
100
|
+
.err { margin-top: 10px; padding: 8px 10px; border-radius: 7px; border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--line)); background: color-mix(in srgb, var(--bad) 9%, var(--surface)); color: var(--bad); font-size: 12px; }
|
|
94
101
|
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
95
102
|
.presets button { font: inherit; font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
|
|
96
103
|
.presets button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
|
|
97
104
|
|
|
98
105
|
/* results */
|
|
99
106
|
.results { display: grid; gap: 20px; min-width: 0; }
|
|
107
|
+
.results.is-stale > :not(.stale-banner) { opacity: 0.42; pointer-events: none; transition: opacity 0.15s; }
|
|
108
|
+
.stale-banner { padding: 8px 12px; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); color: color-mix(in srgb, var(--warn) 82%, var(--ink)); font-size: 12.5px; font-weight: 500; }
|
|
109
|
+
.compare-bar { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; font-size: 12.5px; }
|
|
110
|
+
.compare-base { color: var(--ink-2); }
|
|
111
|
+
.compare-base b { color: var(--ink); }
|
|
112
|
+
.compare-deltas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
|
113
|
+
.delta-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-family: var(--f-mono); font-size: 12px; border: 1px solid var(--line); }
|
|
114
|
+
.delta-up { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
|
|
115
|
+
.delta-down { color: var(--good); background: color-mix(in srgb, var(--good) 10%, var(--surface)); border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
|
|
116
|
+
.delta-up.better { color: var(--good); background: color-mix(in srgb, var(--good) 10%, var(--surface)); border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
|
|
117
|
+
.delta-down.worse { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
|
|
118
|
+
.delta-flat { color: var(--muted); background: var(--bg); }
|
|
100
119
|
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 14px; min-width: 0; }
|
|
101
120
|
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
|
|
102
121
|
.panel-head p { color: var(--muted); font-size: 12.5px; }
|
|
@@ -194,7 +213,10 @@ tbody tr.dev:hover td { background: color-mix(in srgb, var(--accent-wash) 60%, t
|
|
|
194
213
|
<header class="mast">
|
|
195
214
|
<div class="mast-row">
|
|
196
215
|
<div class="eyebrow">LOCALMODELS · SIZECALC · 估算,不是实测</div>
|
|
197
|
-
<
|
|
216
|
+
<div class="mast-actions">
|
|
217
|
+
<button class="theme" id="pin-btn" type="button" aria-pressed="false">固定当前方案作对比</button>
|
|
218
|
+
<button class="theme" id="theme" type="button">切换深浅色</button>
|
|
219
|
+
</div>
|
|
198
220
|
</div>
|
|
199
221
|
<h1>模型体量计算器</h1>
|
|
200
222
|
<p class="lede">给出模型是稠密还是 MoE、总参数和激活参数、量化方案,算出权重文件多大、跑起来占多少显存和内存,以及最小能放进哪一档设备:手机、轻薄本、家用 N 卡、大内存 Mac、工作站、单张服务器卡,还是 8 卡服务器。</p>
|
|
@@ -202,6 +224,7 @@ tbody tr.dev:hover td { background: color-mix(in srgb, var(--accent-wash) 60%, t
|
|
|
202
224
|
|
|
203
225
|
<div class="bench">
|
|
204
226
|
<aside class="controls" aria-label="参数">
|
|
227
|
+
<div class="err" id="err" role="alert" aria-live="polite" hidden></div>
|
|
205
228
|
<div class="group">
|
|
206
229
|
<div class="gt">预设模型</div>
|
|
207
230
|
<div class="presets" id="presets"></div>
|
|
@@ -266,10 +289,11 @@ tbody tr.dev:hover td { background: color-mix(in srgb, var(--accent-wash) 60%, t
|
|
|
266
289
|
<input type="number" id="hostram" min="0" step="8" value="64">
|
|
267
290
|
</div>
|
|
268
291
|
</div>
|
|
269
|
-
<p class="err" id="err" role="alert"></p>
|
|
270
292
|
</aside>
|
|
271
293
|
|
|
272
294
|
<main class="results">
|
|
295
|
+
<div class="stale-banner" id="stale-note" role="status" hidden>当前输入有误,下方仍为上一次有效参数的计算结果。</div>
|
|
296
|
+
<div class="compare-bar" id="compare-bar" hidden></div>
|
|
273
297
|
<section class="readouts" aria-label="结论">
|
|
274
298
|
<div class="tile hero"><span class="tl">量级:最小能放进</span><span class="tv" id="r-tier">—</span><span class="ts" id="r-tier-s"></span></div>
|
|
275
299
|
<div class="tile"><span class="tl">权重文件</span><span class="tv" id="r-file">—</span><span class="ts" id="r-file-s"></span></div>
|
|
@@ -13,14 +13,23 @@
|
|
|
13
13
|
<main>
|
|
14
14
|
<div class="top">
|
|
15
15
|
<div class="crumb"><span>View hub</span> / <b>Computers</b></div>
|
|
16
|
-
<span class="tag" id="fleet-sum"></span>
|
|
16
|
+
<span class="tag" id="fleet-sum" aria-live="polite"></span>
|
|
17
17
|
<div class="grow"></div>
|
|
18
18
|
<button class="icon-btn" id="theme" type="button" title="Appearance: system / light / dark" aria-label="theme"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4"><circle cx="8" cy="8" r="5.5"/><path d="M8 2.5v11" /><path d="M8 2.5a5.5 5.5 0 0 1 0 11Z" fill="currentColor"/></svg></button>
|
|
19
19
|
</div>
|
|
20
20
|
<section class="card">
|
|
21
21
|
<header><h2>Computers</h2><span class="sub">read-only · each one's view agent sends its stack here</span></header>
|
|
22
22
|
<p class="explain">One row per computer added with <code>stack view-hub add</code>. Open one to see its whole board, or switch computers from the list in its top bar. Several stacks sharing a GPU each show it; the total above counts each card once.</p>
|
|
23
|
-
<div
|
|
23
|
+
<div class="fl-bar">
|
|
24
|
+
<input id="fleet-q" type="search" placeholder="Filter computers, models or GPUs..." aria-label="Filter computers">
|
|
25
|
+
<div class="seg" role="group" aria-label="Filter by status">
|
|
26
|
+
<button type="button" class="chip fl-filter" data-filter="all" aria-pressed="true">All</button>
|
|
27
|
+
<button type="button" class="chip fl-filter" data-filter="attention" aria-pressed="false">Needs attention</button>
|
|
28
|
+
<button type="button" class="chip fl-filter" data-filter="live" aria-pressed="false">Live</button>
|
|
29
|
+
<button type="button" class="chip fl-filter" data-filter="waiting" aria-pressed="false">Waiting</button>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div id="fleet-rows"></div>
|
|
24
33
|
</section>
|
|
25
34
|
</main>
|
|
26
35
|
<script src="fleet.js"></script>
|