@simplexai/localmodels-darwin-arm64 0.1.0-dev.48 → 0.1.0-dev.50
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 +82 -72
- package/modules/localmodels/__init__.py +1 -1
- package/modules/localmodels/budget.py +40 -14
- package/modules/localmodels/catalog.json +473 -36
- package/modules/localmodels/debug_mode.py +25 -0
- package/modules/localmodels/deploy.py +3 -0
- package/modules/localmodels/download-mirrors.json +47 -0
- package/modules/localmodels/engines-b12588-mix-c0c3de8.json +13 -1
- package/modules/localmodels/engines-strata-poly-0.2.19-poly.1.json +79 -0
- package/modules/localmodels/engines.py +31 -6
- package/modules/localmodels/gateway.py +23 -6
- package/modules/localmodels/gateway_bifrost.py +6 -2
- package/modules/localmodels/harness.py +8 -2
- package/modules/localmodels/harness_gateway.py +78 -17
- package/modules/localmodels/harness_probe.py +5 -1
- package/modules/localmodels/hosts.py +52 -5
- package/modules/localmodels/library_floor.py +76 -0
- package/modules/localmodels/library_jobs.py +60 -7
- package/modules/localmodels/library_model.py +38 -2
- package/modules/localmodels/library_poly.py +272 -0
- package/modules/localmodels/library_pricing.py +251 -79
- package/modules/localmodels/library_serve.py +27 -4
- package/modules/localmodels/library_state.py +16 -0
- package/modules/localmodels/library_status.py +46 -18
- package/modules/localmodels/library_vram.py +123 -0
- package/modules/localmodels/llm_rank.py +42 -1
- package/modules/localmodels/magpie_windows.py +312 -0
- package/modules/localmodels/probe.py +39 -37
- package/modules/localmodels/process_identity.py +26 -33
- package/modules/localmodels/process_identity_darwin.py +189 -0
- package/modules/localmodels/process_identity_linux.py +62 -30
- package/modules/localmodels/recommend.py +3 -1
- package/modules/localmodels/remote_ops.py +11 -0
- package/modules/localmodels/remote_ops_download.py +30 -5
- package/modules/localmodels/remote_ops_service.py +15 -46
- package/modules/localmodels/reuse.py +13 -6
- package/modules/localmodels/runtime_io.py +32 -18
- package/modules/localmodels/service_probe.py +1 -1
- package/modules/localmodels/setup_inspection.py +97 -80
- package/modules/localmodels/setup_inspection_harness.py +147 -0
- package/modules/localmodels/setup_text.py +24 -0
- package/modules/localmodels/setup_upgrade.py +155 -0
- package/modules/localmodels/stack.py +3 -1
- package/modules/localmodels/stack_auto.py +6 -2
- package/modules/localmodels/stack_clients.py +1 -1
- package/modules/localmodels/stack_compose.py +5 -1
- package/modules/localmodels/stack_down.py +25 -16
- package/modules/localmodels/stack_hardware.py +17 -3
- package/modules/localmodels/stack_picks.py +28 -13
- package/modules/localmodels/stack_remove.py +3 -1
- package/modules/localmodels/stack_route.py +5 -1
- package/modules/localmodels/stack_suite.py +29 -8
- package/modules/localmodels/stack_view_access.py +238 -58
- package/modules/localmodels/stack_view_hub.py +12 -7
- package/modules/localmodels/stack_view_serve.py +13 -6
- package/modules/localmodels/strata-poly-serve-0.2.19-poly.1.txt +428 -0
- package/modules/localmodels/strata_poly_server.py +14 -2
- package/modules/localmodels/suite.py +19 -3
- package/modules/localmodels/tool_archive.py +4 -0
- package/modules/localmodels/transport.py +3 -1
- package/modules/localmodels/tui.py +4 -1
- package/modules/localmodels/tui_dialogs.py +42 -9
- package/modules/localmodels/tui_modals.py +63 -16
- package/modules/localmodels/tui_screen.py +80 -53
- package/modules/localmodels/tui_views.py +36 -6
- package/modules/localmodels/vision.py +4 -2
- package/modules/localmodels/web/index.html +996 -300
- package/modules/localmodels/web/sizecalc/app.js +616 -88
- package/modules/localmodels/web/sizecalc/page.html +239 -106
- package/modules/localmodels/web/view/fleet.js +25 -2
- package/modules/localmodels/web/view/nav.js +19 -3
- package/modules/localmodels/web/view/view.css +110 -22
- package/modules/localmodels/web/view/view.js +40 -22
- package/modules/localmodels/win_probe.py +204 -0
- package/modules/{simplex_localmodels-0.1.0.dev48.dist-info → simplex_localmodels-0.1.0.dev50.dist-info}/METADATA +1 -1
- package/modules/{simplex_localmodels-0.1.0.dev48.dist-info → simplex_localmodels-0.1.0.dev50.dist-info}/RECORD +79 -69
- package/package.json +1 -1
- package/tool.json +1 -1
- /package/modules/{simplex_localmodels-0.1.0.dev48.dist-info → simplex_localmodels-0.1.0.dev50.dist-info}/WHEEL +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev48.dist-info → simplex_localmodels-0.1.0.dev50.dist-info}/entry_points.txt +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev48.dist-info → simplex_localmodels-0.1.0.dev50.dist-info}/licenses/NOTICE +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev48.dist-info → simplex_localmodels-0.1.0.dev50.dist-info}/licenses/localmodels/HERMES-LICENSE +0 -0
|
@@ -10,86 +10,128 @@
|
|
|
10
10
|
of device (the magnitude), then the memory ruler that shows why, then the selected device's
|
|
11
11
|
memory, the same model in other formats, and the method. */
|
|
12
12
|
:root {
|
|
13
|
-
--bg: #
|
|
14
|
-
--surface: #
|
|
15
|
-
--
|
|
16
|
-
--ink
|
|
17
|
-
--
|
|
18
|
-
--
|
|
19
|
-
--line
|
|
20
|
-
--
|
|
21
|
-
--accent
|
|
22
|
-
--
|
|
23
|
-
--
|
|
24
|
-
--
|
|
25
|
-
--
|
|
26
|
-
--
|
|
27
|
-
--s-
|
|
28
|
-
--s-
|
|
29
|
-
--s-
|
|
30
|
-
--
|
|
31
|
-
--f-
|
|
32
|
-
|
|
33
|
-
--
|
|
13
|
+
--bg: #f4f4f6;
|
|
14
|
+
--surface: #ffffff;
|
|
15
|
+
--surface-2: #f9f9fb;
|
|
16
|
+
--ink: #1c1c21;
|
|
17
|
+
--ink-2: #4a4a53;
|
|
18
|
+
--muted: #5e5e68;
|
|
19
|
+
--line: #e3e3e8;
|
|
20
|
+
--line-2: #d0d0d8;
|
|
21
|
+
--accent: #4f46e5;
|
|
22
|
+
--accent-wash: #eeedfd;
|
|
23
|
+
--good: #16713c;
|
|
24
|
+
--warn: #985100;
|
|
25
|
+
--bad: #d70015;
|
|
26
|
+
--none: #8b8b94;
|
|
27
|
+
--s-w: #6366f1;
|
|
28
|
+
--s-kv: #0d9488;
|
|
29
|
+
--s-ov: #64748b;
|
|
30
|
+
--s-off: #d97706;
|
|
31
|
+
--f-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, "PingFang SC",
|
|
32
|
+
"Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
|
|
33
|
+
--f-num: var(--f-sans);
|
|
34
|
+
--f-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
35
|
+
--r: 12px;
|
|
36
|
+
--r-sm: 8px;
|
|
34
37
|
}
|
|
35
38
|
@media (prefers-color-scheme: dark) {
|
|
36
39
|
:root:not([data-theme="light"]) {
|
|
37
|
-
--bg: #
|
|
38
|
-
--line: #
|
|
39
|
-
--good: #
|
|
40
|
-
--s-w: #
|
|
40
|
+
--bg: #121215; --surface: #1b1b1e; --surface-2: #232327; --ink: #ececf0; --ink-2: #c2c2c9; --muted: #aaaab4;
|
|
41
|
+
--line: #34343a; --line-2: #44444d; --accent: #9b95ff; --accent-wash: #2e2b52;
|
|
42
|
+
--good: #4ade80; --warn: #fdba74; --bad: #fb7185; --none: #737380;
|
|
43
|
+
--s-w: #6366f1; --s-kv: #0d9488; --s-ov: #64748b; --s-off: #f59e0b; color-scheme: dark;
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
:root[data-theme="light"] { color-scheme: light; }
|
|
44
47
|
:root[data-theme="dark"] {
|
|
45
|
-
--bg: #
|
|
46
|
-
--line: #
|
|
47
|
-
--good: #
|
|
48
|
-
--s-w: #
|
|
48
|
+
--bg: #121215; --surface: #1b1b1e; --surface-2: #232327; --ink: #ececf0; --ink-2: #c2c2c9; --muted: #aaaab4;
|
|
49
|
+
--line: #34343a; --line-2: #44444d; --accent: #9b95ff; --accent-wash: #2e2b52;
|
|
50
|
+
--good: #4ade80; --warn: #fdba74; --bad: #fb7185; --none: #737380;
|
|
51
|
+
--s-w: #6366f1; --s-kv: #0d9488; --s-ov: #64748b; --s-off: #f59e0b; color-scheme: dark;
|
|
49
52
|
}
|
|
50
53
|
@media (prefers-reduced-motion: reduce) {
|
|
51
54
|
*, *::before, *::after { animation: none !important; transition: none !important; }
|
|
52
55
|
}
|
|
53
56
|
* { box-sizing: border-box; }
|
|
54
57
|
[hidden] { display: none !important; }
|
|
58
|
+
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
|
|
55
59
|
html { -webkit-text-size-adjust: 100%; }
|
|
56
|
-
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-sans); font-size: 14px; line-height: 1.55; }
|
|
60
|
+
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-sans); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
|
|
57
61
|
.page { max-width: 1320px; margin: 0 auto; padding-block: 28px 64px;
|
|
58
62
|
padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
|
|
59
63
|
h1, h2, h3 { text-wrap: balance; margin: 0; }
|
|
60
|
-
h1 { font-size: clamp(
|
|
61
|
-
h2 { font-size:
|
|
62
|
-
h3 { font-size: 14px; font-weight:
|
|
64
|
+
h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 700; letter-spacing: -0.015em; }
|
|
65
|
+
h2 { font-size: 16px; font-weight: 650; }
|
|
66
|
+
h3 { font-size: 14px; font-weight: 650; }
|
|
63
67
|
p { margin: 0; }
|
|
64
|
-
code, .mono { font-family: var(--f-mono); font-size: 0.
|
|
68
|
+
code, .mono { font-family: var(--f-mono); font-size: 0.9em; }
|
|
65
69
|
a { color: var(--accent); }
|
|
66
|
-
.mast { display: grid; gap: 8px; margin-bottom: 22px;
|
|
70
|
+
.mast { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 22px; }
|
|
67
71
|
.eyebrow { font-size: 12px; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; }
|
|
68
|
-
.lede { color: var(--ink-2); font-size:
|
|
69
|
-
.mast-row { display: flex; justify-content: space-between; align-items:
|
|
70
|
-
.mast-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
|
71
|
-
|
|
72
|
+
.lede { color: var(--ink-2); font-size: 14.5px; max-width: 76ch; }
|
|
73
|
+
.mast-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; }
|
|
74
|
+
.mast-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
|
|
75
|
+
@media (max-width: 639px) { .mast-actions { margin-left: 0; } }
|
|
76
|
+
.theme { font: inherit; font-size: 12px; padding: 5px 11px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: border-color 0.15s, background 0.15s, color 0.15s; }
|
|
77
|
+
.theme:hover { color: var(--ink); border-color: var(--ink-2); }
|
|
72
78
|
.theme[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-wash); color: var(--ink); font-weight: 600; }
|
|
79
|
+
.theme.done, .cmd button.done { border-color: color-mix(in srgb, var(--good) 50%, var(--line)); background: color-mix(in srgb, var(--good) 12%, var(--surface)); color: var(--good); }
|
|
73
80
|
.bench { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
|
|
74
81
|
@media (min-width: 1040px) { .bench { grid-template-columns: 320px minmax(0, 1fr); } }
|
|
75
82
|
|
|
83
|
+
/* mobile sticky summary (< 1040px) */
|
|
84
|
+
.mobile-summary {
|
|
85
|
+
position: sticky; top: 0; z-index: 15; display: none;
|
|
86
|
+
align-items: center; justify-content: space-between; gap: 10px;
|
|
87
|
+
padding: 9px 12px; margin-bottom: 14px;
|
|
88
|
+
background: color-mix(in srgb, var(--surface) 94%, transparent);
|
|
89
|
+
backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
|
|
90
|
+
border: 1px solid var(--line-2); border-radius: var(--r-sm);
|
|
91
|
+
box-shadow: 0 4px 14px rgb(0 0 0 / 0.08);
|
|
92
|
+
font-size: 12.5px; font-variant-numeric: tabular-nums;
|
|
93
|
+
}
|
|
94
|
+
.mobile-summary.is-stale { opacity: 0.65; border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
|
|
95
|
+
.mobile-summary-vals { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 7px; min-width: 0; color: var(--ink-2); }
|
|
96
|
+
.mobile-summary-vals b { color: var(--ink); font-weight: 650; }
|
|
97
|
+
.mobile-summary-vals .ms-sep { color: var(--muted); }
|
|
98
|
+
.mobile-summary-jump {
|
|
99
|
+
flex: 0 0 auto; font: inherit; font-size: 12px; font-weight: 600;
|
|
100
|
+
padding: 4px 10px; border-radius: 999px;
|
|
101
|
+
border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
|
|
102
|
+
background: var(--accent-wash); color: var(--accent); cursor: pointer; white-space: nowrap;
|
|
103
|
+
transition: background 0.15s, color 0.15s, border-color 0.15s;
|
|
104
|
+
}
|
|
105
|
+
.mobile-summary-jump:hover { background: var(--accent); color: var(--surface); border-color: var(--accent); }
|
|
106
|
+
@media (max-width: 1039px) {
|
|
107
|
+
.mobile-summary { display: flex; }
|
|
108
|
+
.results { scroll-margin-top: 56px; }
|
|
109
|
+
}
|
|
110
|
+
|
|
76
111
|
/* controls */
|
|
77
|
-
.controls { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 16px 16px; display: grid; min-width: 0; }
|
|
112
|
+
.controls { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 16px 16px; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
|
|
78
113
|
@media (min-width: 1040px) {
|
|
79
114
|
.controls { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
|
|
80
115
|
}
|
|
81
|
-
.group { display: grid; gap: 10px; padding-block: 14px; border-bottom: 1px solid var(--line); min-width: 0; }
|
|
116
|
+
.group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding-block: 14px; border-bottom: 1px solid var(--line); min-width: 0; }
|
|
82
117
|
.group:last-child { border-bottom: 0; }
|
|
83
118
|
.group > .gt { font-size: 11px; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; }
|
|
84
|
-
.field { display: grid; gap: 5px; min-width: 0; }
|
|
119
|
+
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; min-width: 0; }
|
|
85
120
|
.field > label, .field > .lab { font-size: 12.5px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
|
|
86
|
-
.field .val { font-family: var(--f-mono); color: var(--ink); font-size: 12.5px; }
|
|
87
|
-
select, input[type="number"], input[type="text"] {
|
|
121
|
+
.field .val { font-family: var(--f-mono); color: var(--ink); font-size: 12.5px; font-variant-numeric: tabular-nums; }
|
|
122
|
+
select, input[type="number"], input[type="text"], input[type="search"] {
|
|
88
123
|
width: 100%; min-width: 0; font: inherit; font-size: 13.5px; color: var(--ink); background: var(--bg);
|
|
89
|
-
border: 1px solid var(--line-2); border-radius:
|
|
124
|
+
border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 6px 9px; }
|
|
125
|
+
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
|
|
126
|
+
select { padding-right: 28px; text-overflow: ellipsis; }
|
|
90
127
|
select:focus-visible, input:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
|
91
128
|
input[type="range"] { width: 100%; accent-color: var(--accent); margin: 2px 0; }
|
|
92
|
-
.
|
|
129
|
+
.field.is-inferred input, .field.is-inferred select { opacity: 0.56; cursor: not-allowed; border-style: dashed; }
|
|
130
|
+
.infer-note { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11.5px; color: var(--accent); background: var(--accent-wash); border-radius: 6px; padding: 3px 7px; font-variant-numeric: tabular-nums; }
|
|
131
|
+
.hint-row { display: inline-flex; align-items: center; gap: 6px; }
|
|
132
|
+
.link-btn { font: inherit; font-size: 11.5px; color: var(--accent); background: transparent; border: 0; padding: 0 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
|
|
133
|
+
.link-btn:hover { opacity: 0.8; }
|
|
134
|
+
.seg { display: flex; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
|
|
93
135
|
.seg input { position: absolute; opacity: 0; pointer-events: none; }
|
|
94
136
|
.seg label { flex: 1 1 0; text-align: center; padding: 5px 4px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); border-right: 1px solid var(--line-2); white-space: nowrap; background: var(--bg); }
|
|
95
137
|
.seg label:last-of-type { border-right: 0; }
|
|
@@ -97,42 +139,50 @@ input[type="range"] { width: 100%; accent-color: var(--accent); margin: 2px 0; }
|
|
|
97
139
|
.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: -2px; }
|
|
98
140
|
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
|
|
99
141
|
.hint { font-size: 12px; color: var(--muted); }
|
|
100
|
-
.err { margin-top: 10px; padding: 8px 10px; border-radius:
|
|
101
|
-
.presets { display:
|
|
102
|
-
.
|
|
142
|
+
.err { margin-top: 10px; padding: 8px 10px; border-radius: var(--r-sm); 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; }
|
|
143
|
+
.presets { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
|
|
144
|
+
.preset-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
|
|
145
|
+
.preset-glabel { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0.02em; }
|
|
146
|
+
.preset-chips { display: flex; flex-wrap: wrap; gap: 5px; }
|
|
147
|
+
.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; transition: background 0.12s, color 0.12s, border-color 0.12s; }
|
|
148
|
+
.presets button:hover { color: var(--ink); border-color: var(--ink-2); }
|
|
103
149
|
.presets button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
|
|
104
150
|
|
|
105
151
|
/* results */
|
|
106
|
-
.results { display: grid; gap: 20px; min-width: 0; }
|
|
152
|
+
.results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
|
|
107
153
|
.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
|
|
154
|
+
.stale-banner { padding: 8px 12px; border-radius: var(--r-sm); 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; }
|
|
155
|
+
.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 14px; font-size: 12.5px; }
|
|
110
156
|
.compare-base { color: var(--ink-2); }
|
|
111
157
|
.compare-base b { color: var(--ink); }
|
|
112
|
-
.compare-deltas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
|
113
|
-
.
|
|
158
|
+
.compare-deltas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 auto; }
|
|
159
|
+
.compare-unpin { margin-left: auto; font: inherit; font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: border-color 0.12s, color 0.12s, background 0.12s; }
|
|
160
|
+
.compare-unpin:hover { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
|
|
161
|
+
.delta-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-family: var(--f-mono); font-size: 12px; font-variant-numeric: tabular-nums; border: 1px solid var(--line); }
|
|
114
162
|
.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
163
|
.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
164
|
.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
165
|
.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
166
|
.delta-flat { color: var(--muted); background: var(--bg); }
|
|
119
|
-
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 14px; min-width: 0; }
|
|
167
|
+
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
|
|
168
|
+
@media (max-width: 600px) { .panel { padding: 14px; } }
|
|
120
169
|
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
|
|
121
170
|
.panel-head p { color: var(--muted); font-size: 12.5px; }
|
|
122
171
|
.readouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
|
|
123
172
|
@media (max-width: 760px) { .readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
124
|
-
.tile { background: var(--surface); padding: 14px 16px; display: grid; gap: 4px; align-content: start; min-width: 0; }
|
|
173
|
+
.tile { background: var(--surface); padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; align-content: start; min-width: 0; }
|
|
125
174
|
.tile .tl { font-size: 12px; color: var(--muted); }
|
|
126
|
-
.tile .tv { font-family: var(--f-num); font-size: clamp(
|
|
127
|
-
.tile .tv small { font-size: 0.
|
|
128
|
-
.tile .ts { font-size: 12px; color: var(--ink-2); }
|
|
175
|
+
.tile .tv { font-family: var(--f-num); font-size: clamp(19px, 2vw, 24px); font-weight: 650; line-height: 1.2; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; overflow-wrap: break-word; text-wrap: balance; }
|
|
176
|
+
.tile .tv small { font-size: 0.56em; font-weight: 500; color: var(--ink-2); margin-left: 3px; }
|
|
177
|
+
.tile .ts { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
|
|
129
178
|
.tile.hero { background: var(--accent-wash); }
|
|
130
179
|
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 1px 8px 1px 6px; border-radius: 999px; width: fit-content; white-space: nowrap; }
|
|
131
180
|
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
|
|
132
181
|
.pill.fits { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
|
|
133
182
|
.pill.offload { color: var(--warn); background: color-mix(in srgb, var(--s-off) 18%, transparent); }
|
|
134
183
|
.pill.no { color: var(--muted); background: color-mix(in srgb, var(--none) 18%, transparent); }
|
|
135
|
-
.tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line-2); border-radius:
|
|
184
|
+
.tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 0 5px; white-space: nowrap; }
|
|
185
|
+
.tag[title] { cursor: help; }
|
|
136
186
|
.tag.convert { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
|
|
137
187
|
.tag.fallback { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
|
|
138
188
|
|
|
@@ -140,24 +190,48 @@ input[type="range"] { width: 100%; accent-color: var(--accent); margin: 2px 0; }
|
|
|
140
190
|
.legend span { display: inline-flex; align-items: center; gap: 6px; }
|
|
141
191
|
.legend i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
|
|
142
192
|
.legend i.sq { border-radius: 3px; }
|
|
193
|
+
.legend i.over-swatch { border-radius: 3px; border: 1px solid color-mix(in srgb, var(--bad) 65%, transparent); background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--bad) 45%, transparent) 0 2px, transparent 2px 5px); }
|
|
143
194
|
.legend i.line { width: 16px; height: 0; border-radius: 0; border-top: 2px solid var(--ink); }
|
|
144
195
|
.legend i.dash { width: 16px; height: 0; border-radius: 0; border-top: 2px dashed var(--muted); }
|
|
145
196
|
|
|
146
197
|
/* the memory ruler */
|
|
147
|
-
.chart-wrap { position: relative; }
|
|
198
|
+
.chart-wrap { position: relative; min-width: 0; }
|
|
148
199
|
#ruler { width: 100%; height: auto; display: block; overflow: visible; }
|
|
149
200
|
#ruler text { font-family: var(--f-mono); font-size: 11px; fill: var(--muted); }
|
|
150
201
|
#ruler .tl { font-family: var(--f-sans); fill: var(--ink-2); font-size: 12px; }
|
|
151
202
|
#ruler .dl { font-family: var(--f-sans); fill: var(--ink-2); font-size: 10.5px; }
|
|
152
203
|
#ruler .need { font-family: var(--f-sans); fill: var(--ink); font-size: 12px; font-weight: 600; }
|
|
153
|
-
#ruler .halo { paint-order: stroke; stroke: var(--surface); stroke-width:
|
|
154
|
-
#ruler .dev { cursor: pointer; }
|
|
155
|
-
#ruler .dev
|
|
156
|
-
.
|
|
157
|
-
.tip
|
|
204
|
+
#ruler .halo { paint-order: stroke; stroke: var(--surface); stroke-width: 3.5px; stroke-linejoin: round; }
|
|
205
|
+
#ruler .dev { cursor: pointer; outline: none; }
|
|
206
|
+
#ruler .dev .sel-ring { fill: none; stroke: var(--accent); stroke-width: 2.2px; pointer-events: none; }
|
|
207
|
+
#ruler .dev:focus-visible circle.dot { stroke: var(--accent); stroke-width: 3px; }
|
|
208
|
+
.tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 10px; font-size: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / 0.16); min-width: 200px; max-width: min(290px, calc(100% - 8px)); display: grid; gap: 3px; z-index: 4; }
|
|
209
|
+
.tip-dev { display: grid; gap: 3px; }
|
|
210
|
+
.tip-dev + .tip-dev, .tip-dev.tip-sep { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 4px; }
|
|
211
|
+
.tip .th { font-weight: 600; margin-bottom: 2px; display: flex; align-items: center; gap: 6px; }
|
|
212
|
+
.tip .tip-cur { font-size: 10.5px; font-weight: 600; color: var(--accent); background: var(--accent-wash); border-radius: 4px; padding: 0 5px; }
|
|
213
|
+
.tip .tip-hint { border-top: 1px dashed var(--line); padding-top: 5px; margin-top: 4px; font-size: 11px; color: var(--muted); }
|
|
158
214
|
.tip .tr { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }
|
|
159
215
|
.tip .tr span:first-child { color: var(--ink-2); }
|
|
160
216
|
|
|
217
|
+
/* device filter bar */
|
|
218
|
+
.dev-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 4px; }
|
|
219
|
+
.filter-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
|
|
220
|
+
.filter-btn { font: inherit; font-size: 12px; padding: 5px 11px; border: 0; border-right: 1px solid var(--line-2); background: var(--bg); color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background 0.12s, color 0.12s; }
|
|
221
|
+
.filter-btn:last-child { border-right: 0; }
|
|
222
|
+
.filter-btn:hover { color: var(--ink); }
|
|
223
|
+
.filter-btn[aria-pressed="true"] { background: var(--ink); color: var(--surface); font-weight: 600; }
|
|
224
|
+
.filter-search-wrap { position: relative; flex: 1 1 180px; max-width: 280px; min-width: 0; }
|
|
225
|
+
.filter-search-wrap input { font-size: 12.5px; padding: 5px 28px 5px 10px; }
|
|
226
|
+
.filter-clear { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); font-size: 15px; line-height: 1; padding: 2px 5px; border-radius: 4px; cursor: pointer; }
|
|
227
|
+
.filter-clear:hover { color: var(--ink); background: var(--line); }
|
|
228
|
+
.filter-count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
229
|
+
@media (max-width: 600px) {
|
|
230
|
+
.filter-search-wrap { max-width: none; }
|
|
231
|
+
.filter-count { margin-left: 0; }
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.table-wrap, .scroll { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; }
|
|
161
235
|
table { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
|
|
162
236
|
th, td { text-align: left; padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
|
|
163
237
|
th { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; white-space: nowrap; }
|
|
@@ -165,55 +239,83 @@ td.n, th.n { text-align: right; font-family: var(--f-mono); font-size: 12.5px; w
|
|
|
165
239
|
tr.cur td { background: var(--accent-wash); }
|
|
166
240
|
tr.tierhead td { font-weight: 600; color: var(--ink); padding-top: 14px; border-bottom: 1px solid var(--line-2); }
|
|
167
241
|
tr.tierhead td span { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 8px; }
|
|
242
|
+
tr.empty-row td { text-align: center; padding: 20px 10px; color: var(--muted); }
|
|
168
243
|
tbody tr.dev { cursor: pointer; }
|
|
169
244
|
tbody tr.dev:hover td { background: color-mix(in srgb, var(--accent-wash) 60%, transparent); }
|
|
170
|
-
.
|
|
245
|
+
tbody tr.dev:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
|
|
171
246
|
|
|
172
247
|
/* memory bar of one device */
|
|
173
|
-
.mbar { display: grid; gap: 8px; }
|
|
174
|
-
.mbar .mh { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
|
|
248
|
+
.mbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
|
|
249
|
+
.mbar .mh { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; font-variant-numeric: tabular-nums; }
|
|
175
250
|
.mbar .mh b { color: var(--ink); font-weight: 600; }
|
|
176
|
-
.
|
|
177
|
-
.bar
|
|
251
|
+
.mbar .mh .oom-note { color: var(--bad); }
|
|
252
|
+
.bar-label { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
|
|
253
|
+
.bar-label b { color: var(--ink); font-weight: 600; }
|
|
254
|
+
.bar-label.host-label { color: color-mix(in srgb, var(--warn) 85%, var(--ink)); padding-top: 2px; }
|
|
255
|
+
.bar { position: relative; height: 30px; display: flex; gap: 2px; margin-top: 24px; margin-bottom: 16px; }
|
|
256
|
+
.bar.host-bar { height: 22px; margin-top: 20px; margin-bottom: 10px; }
|
|
257
|
+
.bar.host-bar .mark { border-left-color: var(--s-off); }
|
|
258
|
+
.bar.host-bar .mark span { color: var(--warn); }
|
|
259
|
+
.bar > div { height: 100%; min-width: 0; border-radius: 3px; }
|
|
178
260
|
.bar .free { border: 1px dashed var(--line-2); }
|
|
179
|
-
.bar .over { background: repeating-linear-gradient(
|
|
261
|
+
.bar .over { position: absolute; top: 0; height: 100%; pointer-events: none; border-radius: 0 4px 4px 0; border: 1px solid color-mix(in srgb, var(--bad) 70%, transparent); border-left: 0; background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--bad) 36%, transparent) 0 4px, color-mix(in srgb, var(--bad) 10%, transparent) 4px 8px); z-index: 1; }
|
|
180
262
|
.bar .mark { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 2px solid var(--ink); z-index: 2; }
|
|
181
|
-
.bar .mark
|
|
263
|
+
.bar.is-over .mark { border-left-color: var(--bad); }
|
|
264
|
+
.bar .mark span { position: absolute; top: -19px; transform: translateX(-50%); font-size: 11px; white-space: nowrap; color: var(--ink); background: var(--surface); padding: 0 3px; font-variant-numeric: tabular-nums; }
|
|
265
|
+
.bar.is-over .mark span { color: var(--bad); font-weight: 600; }
|
|
182
266
|
.bar .mark.end span { transform: translateX(-100%); }
|
|
183
267
|
.bar .mark.start span { transform: none; }
|
|
184
268
|
|
|
185
269
|
/* the format ladder */
|
|
186
|
-
.lad { display: grid; gap:
|
|
187
|
-
.lad .lr { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 190px); gap: 10px; align-items: center; font-size: 12.5px; }
|
|
188
|
-
.lad .
|
|
270
|
+
.lad { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
|
|
271
|
+
.lad .lr { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 190px); gap: 10px; align-items: center; font-size: 12.5px; padding: 4px 6px; margin: 0 -6px; border-radius: 6px; }
|
|
272
|
+
.lad .lr.clickable { cursor: pointer; transition: background 0.12s; }
|
|
273
|
+
.lad .lr.clickable:hover { background: color-mix(in srgb, var(--accent-wash) 75%, transparent); }
|
|
274
|
+
.lad .lr.clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
|
|
275
|
+
.lad .lr.on { background: color-mix(in srgb, var(--accent-wash) 50%, transparent); }
|
|
276
|
+
.lad .ln { font-family: var(--f-mono); color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
189
277
|
.lad .ln small { color: var(--muted); margin-left: 4px; }
|
|
190
278
|
.lad .lb { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
|
191
|
-
.lad .lb > div { height: 14px; border-radius: 0
|
|
279
|
+
.lad .lb > div { height: 14px; border-radius: 0 4px 4px 0; background: color-mix(in srgb, var(--s-w) 40%, var(--surface)); min-width: 2px; }
|
|
192
280
|
.lad .lr.on .lb > div { background: var(--s-w); }
|
|
193
281
|
.lad .lr.on .ln { font-weight: 600; }
|
|
194
|
-
.lad .lb em { font-style: normal; font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
|
|
282
|
+
.lad .lb em { font-style: normal; font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
195
283
|
.lad .lt { color: var(--ink-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
196
284
|
@media (max-width: 600px) {
|
|
197
285
|
.lad .lr { grid-template-columns: minmax(0, 1fr); gap: 2px; }
|
|
198
286
|
}
|
|
199
287
|
|
|
200
|
-
.cmd { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius:
|
|
201
|
-
.cmd button { position: absolute; top: 7px; right: 7px; font: inherit; font-family: var(--f-sans); font-size: 12px; padding: 3px 10px; border-radius:
|
|
288
|
+
.cmd { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 84px 10px 12px; font-family: var(--f-mono); font-size: 12.5px; white-space: pre-wrap; word-break: break-all; color: var(--ink); }
|
|
289
|
+
.cmd button { position: absolute; top: 7px; right: 7px; font: inherit; font-family: var(--f-sans); font-size: 12px; padding: 3px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color 0.15s, background 0.15s, color 0.15s; }
|
|
202
290
|
.two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
|
|
203
291
|
@media (min-width: 900px) { .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
|
|
204
292
|
.prose { display: grid; gap: 10px; max-width: 86ch; color: var(--ink-2); font-size: 13.5px; }
|
|
205
293
|
.prose b { color: var(--ink); }
|
|
206
294
|
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
|
|
295
|
+
.method-details { display: grid; grid-template-columns: minmax(0, 1fr); }
|
|
296
|
+
.method-details > summary {
|
|
297
|
+
list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
|
|
298
|
+
font-size: 15px; font-weight: 650; color: var(--ink); cursor: pointer; user-select: none;
|
|
299
|
+
padding: 2px 0; border-radius: 6px; transition: color 0.12s;
|
|
300
|
+
}
|
|
301
|
+
.method-details > summary::-webkit-details-marker { display: none; }
|
|
302
|
+
.method-details > summary::after { content: "▸"; font-size: 13px; color: var(--muted); transition: transform 0.15s, color 0.15s; }
|
|
303
|
+
.method-details[open] > summary::after { transform: rotate(90deg); color: var(--accent); }
|
|
304
|
+
.method-details > summary:hover { color: var(--accent); }
|
|
305
|
+
.method-details > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
306
|
+
.method-body { padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); }
|
|
207
307
|
.notes { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
|
|
208
308
|
.notes:empty { display: none; }
|
|
209
309
|
</style>
|
|
210
310
|
</head>
|
|
211
311
|
<body>
|
|
212
312
|
<div class="page">
|
|
313
|
+
<div id="live-status" class="sr-only" role="status" aria-live="polite"></div>
|
|
213
314
|
<header class="mast">
|
|
214
315
|
<div class="mast-row">
|
|
215
316
|
<div class="eyebrow">LOCALMODELS · SIZECALC · 估算,不是实测</div>
|
|
216
317
|
<div class="mast-actions">
|
|
318
|
+
<button class="theme" id="share-btn" type="button">复制链接</button>
|
|
217
319
|
<button class="theme" id="pin-btn" type="button" aria-pressed="false">固定当前方案作对比</button>
|
|
218
320
|
<button class="theme" id="theme" type="button">切换深浅色</button>
|
|
219
321
|
</div>
|
|
@@ -222,6 +324,13 @@ tbody tr.dev:hover td { background: color-mix(in srgb, var(--accent-wash) 60%, t
|
|
|
222
324
|
<p class="lede">给出模型是稠密还是 MoE、总参数和激活参数、量化方案,算出权重文件多大、跑起来占多少显存和内存,以及最小能放进哪一档设备:手机、轻薄本、家用 N 卡、大内存 Mac、工作站、单张服务器卡,还是 8 卡服务器。</p>
|
|
223
325
|
</header>
|
|
224
326
|
|
|
327
|
+
<div class="mobile-summary" id="mobile-summary" role="region" aria-label="实时估算摘要">
|
|
328
|
+
<div class="mobile-summary-vals" id="mobile-summary-vals">
|
|
329
|
+
<b id="ms-tier">—</b><span class="ms-sep" aria-hidden="true">·</span><span id="ms-run">—</span><span class="ms-sep" aria-hidden="true">·</span><span id="ms-file">—</span>
|
|
330
|
+
</div>
|
|
331
|
+
<button type="button" class="mobile-summary-jump" id="ms-jump">查看详情 ↓</button>
|
|
332
|
+
</div>
|
|
333
|
+
|
|
225
334
|
<div class="bench">
|
|
226
335
|
<aside class="controls" aria-label="参数">
|
|
227
336
|
<div class="err" id="err" role="alert" aria-live="polite" hidden></div>
|
|
@@ -237,7 +346,14 @@ tbody tr.dev:hover td { background: color-mix(in srgb, var(--accent-wash) 60%, t
|
|
|
237
346
|
<input type="radio" name="kind" id="k-moe" value="moe"><label for="k-moe">混合专家 MoE</label>
|
|
238
347
|
</div>
|
|
239
348
|
<div class="row2">
|
|
240
|
-
<div class="field"
|
|
349
|
+
<div class="field" id="params-field">
|
|
350
|
+
<label for="params">总参数 <span class="hint">B</span></label>
|
|
351
|
+
<input type="number" id="params" min="0.05" step="any" value="27">
|
|
352
|
+
<div class="infer-note" id="params-inferred" hidden>
|
|
353
|
+
<span id="params-inferred-text">由文件大小反推</span>
|
|
354
|
+
<button type="button" class="link-btn" id="clear-file-params">恢复手动</button>
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
241
357
|
<div class="field" id="active-field"><label for="active">激活参数 <span class="hint">B</span></label><input type="number" id="active" min="0.05" step="any" value="3"></div>
|
|
242
358
|
</div>
|
|
243
359
|
<div class="field">
|
|
@@ -256,16 +372,20 @@ tbody tr.dev:hover td { background: color-mix(in srgb, var(--accent-wash) 60%, t
|
|
|
256
372
|
</div>
|
|
257
373
|
<div class="group">
|
|
258
374
|
<div class="gt">量化</div>
|
|
259
|
-
<div class="field">
|
|
375
|
+
<div class="field" id="quant-field">
|
|
260
376
|
<label for="quant">量化方案 <span class="val" id="bits-val"></span></label>
|
|
261
377
|
<select id="quant"></select>
|
|
378
|
+
<div class="infer-note" id="quant-inferred" hidden>
|
|
379
|
+
<span id="quant-inferred-text">由文件大小反推</span>
|
|
380
|
+
<button type="button" class="link-btn" id="clear-file-quant">恢复手动</button>
|
|
381
|
+
</div>
|
|
262
382
|
</div>
|
|
263
383
|
<div class="field" id="custom-field" hidden>
|
|
264
|
-
<label for="custom-bits">每权重位数 <span class="hint">bpw</span></label>
|
|
384
|
+
<label for="custom-bits">每权重位数 <span class="hint" id="custom-bits-hint">1–32 bpw</span></label>
|
|
265
385
|
<input type="number" id="custom-bits" min="1" max="32" step="0.05" value="4.0">
|
|
266
386
|
</div>
|
|
267
387
|
<div class="field">
|
|
268
|
-
<label for="filesize">权重文件大小 <span class="hint">GB
|
|
388
|
+
<label for="filesize">权重文件大小 <span class="hint-row"><span class="hint">GB,已知则填</span><button type="button" class="link-btn" id="clear-file" hidden>清除</button></span></label>
|
|
269
389
|
<input type="number" id="filesize" min="0" step="any" placeholder="按参数 × 位数算">
|
|
270
390
|
</div>
|
|
271
391
|
<div class="seg" role="radiogroup" aria-label="已知文件大小时反推什么" id="infer-seg">
|
|
@@ -277,7 +397,7 @@ tbody tr.dev:hover td { background: color-mix(in srgb, var(--accent-wash) 60%, t
|
|
|
277
397
|
<div class="gt">运行姿态</div>
|
|
278
398
|
<div class="field">
|
|
279
399
|
<label for="ctx">上下文 / 每路 <span class="val" id="ctx-val"></span></label>
|
|
280
|
-
<input type="range" id="ctx" min="0" max="8" step="1" value="1">
|
|
400
|
+
<input type="range" id="ctx" min="0" max="8" step="1" value="1" aria-valuetext="8K tokens">
|
|
281
401
|
</div>
|
|
282
402
|
<div class="row2">
|
|
283
403
|
<div class="field"><label for="slots">并发路数</label><input type="number" id="slots" min="1" max="64" step="1" value="1"></div>
|
|
@@ -315,7 +435,7 @@ tbody tr.dev:hover td { background: color-mix(in srgb, var(--accent-wash) 60%, t
|
|
|
315
435
|
<span><i class="dash"></i>只算权重</span>
|
|
316
436
|
</div>
|
|
317
437
|
<div class="chart-wrap" id="ruler-wrap">
|
|
318
|
-
<svg id="ruler" role="
|
|
438
|
+
<svg id="ruler" role="group" aria-label="各档设备可用内存与模型需求"></svg>
|
|
319
439
|
<div class="tip" id="tip" hidden></div>
|
|
320
440
|
</div>
|
|
321
441
|
</section>
|
|
@@ -326,9 +446,20 @@ tbody tr.dev:hover td { background: color-mix(in srgb, var(--accent-wash) 60%, t
|
|
|
326
446
|
<p>点一行看它的内存拆分。tok/s 是单路 decode 的带宽上限,实测通常只到它的一半到八成</p>
|
|
327
447
|
</div>
|
|
328
448
|
<div class="mbar" id="mbar"></div>
|
|
329
|
-
<div class="
|
|
449
|
+
<div class="dev-filter-bar" id="dev-filter-bar" role="region" aria-label="筛选设备">
|
|
450
|
+
<div class="filter-seg" role="group" aria-label="运行状态筛选">
|
|
451
|
+
<button type="button" class="filter-btn" id="dev-filter-all" data-filter="all" aria-pressed="true">全部</button>
|
|
452
|
+
<button type="button" class="filter-btn" id="dev-filter-runnable" data-filter="runnable" aria-pressed="false">可运行</button>
|
|
453
|
+
</div>
|
|
454
|
+
<div class="filter-search-wrap">
|
|
455
|
+
<input type="search" id="dev-search" placeholder="搜索设备或芯片…" aria-label="搜索设备或芯片" autocomplete="off" spellcheck="false">
|
|
456
|
+
<button type="button" class="filter-clear" id="dev-search-clear" aria-label="清除搜索" hidden>×</button>
|
|
457
|
+
</div>
|
|
458
|
+
<span class="filter-count" id="dev-filter-count" aria-live="polite"></span>
|
|
459
|
+
</div>
|
|
460
|
+
<div class="table-wrap">
|
|
330
461
|
<table id="devtable">
|
|
331
|
-
<thead><tr><th>设备</th><th>引擎</th><th>格式</th><th class="n"
|
|
462
|
+
<thead><tr><th scope="col">设备</th><th scope="col">引擎</th><th scope="col">格式</th><th scope="col" class="n">需要 (GiB)</th><th scope="col" class="n">可用 (GiB)</th><th scope="col">结论</th><th scope="col" class="n">tok/s ≤</th></tr></thead>
|
|
332
463
|
<tbody></tbody>
|
|
333
464
|
</table>
|
|
334
465
|
</div>
|
|
@@ -336,7 +467,7 @@ tbody tr.dev:hover td { background: color-mix(in srgb, var(--accent-wash) 60%, t
|
|
|
336
467
|
|
|
337
468
|
<div class="two">
|
|
338
469
|
<section class="panel">
|
|
339
|
-
<div class="panel-head"><h2>同一模型换量化</h2><p
|
|
470
|
+
<div class="panel-head"><h2>同一模型换量化</h2><p>点一行切换量化;显示文件大小与最小能放进的档位</p></div>
|
|
340
471
|
<div class="lad" id="ladder"></div>
|
|
341
472
|
</section>
|
|
342
473
|
<section class="panel">
|
|
@@ -350,29 +481,31 @@ tbody tr.dev:hover td { background: color-mix(in srgb, var(--accent-wash) 60%, t
|
|
|
350
481
|
|
|
351
482
|
<section class="panel">
|
|
352
483
|
<div class="panel-head"><h2>量化方案速查</h2><p>典型文件的平均每权重位数,含嵌入和不量化的层</p></div>
|
|
353
|
-
<div class="
|
|
484
|
+
<div class="table-wrap">
|
|
354
485
|
<table id="fmttable">
|
|
355
|
-
<thead><tr><th>格式</th><th>家族</th><th class="n">bpw</th><th>来源</th><th class="n">1B 参数</th><th>默认引擎</th><th>说明</th></tr></thead>
|
|
486
|
+
<thead><tr><th scope="col">格式</th><th scope="col">家族</th><th scope="col" class="n">bpw</th><th scope="col">来源</th><th scope="col" class="n">1B 参数</th><th scope="col">默认引擎</th><th scope="col">说明</th></tr></thead>
|
|
356
487
|
<tbody></tbody>
|
|
357
488
|
</table>
|
|
358
489
|
</div>
|
|
359
490
|
</section>
|
|
360
491
|
|
|
361
|
-
<section class="panel" id="method">
|
|
362
|
-
<
|
|
363
|
-
|
|
364
|
-
<
|
|
365
|
-
<
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
492
|
+
<section class="panel" id="method" aria-label="计算口径与术语说明">
|
|
493
|
+
<details class="method-details">
|
|
494
|
+
<summary>计算口径与术语说明(展开查看)</summary>
|
|
495
|
+
<div class="prose method-body">
|
|
496
|
+
<ul>
|
|
497
|
+
<li><b>权重文件</b> = 总参数 × bpw ÷ 8。bpw 是整个文件的平均值,不是名义位宽:GGUF k-quant 把 output 和部分 attn_v / ffn_down 升到 Q6_K,分组量化每组还要存 scale(和 zero),AWQ / GPTQ / FP8 / NF4 通常把嵌入和 lm_head 留在 16 bit。表里「实测文件 (file)」是 llama.cpp README 中 Llama-3.1-8B 的整文件实测,「块公式 (block)」只算块结构(整文件会再高 0.2–0.8),「推导 (derived)」是张量结构加 16 bit 嵌入、按 30B 级模型推算,「精确 (exact)」是未量化的名义位宽。3B 以下的小模型嵌入占比大,实际文件明显更大(Qwen3-0.6B 的 Q4_K_M 是 5.30 bpw);知道真实文件大小时直接填,最准。</li>
|
|
498
|
+
<li><b>KV 缓存</b> = KV 每 token × 上下文 × 路数 × KV 类型系数(f16 = 1,fp8 = ½,q8_0 = 34/64,q4_0 = 18/64)。没填时按激活参数估:128 KiB × (激活参数 / 8B)<sup>0.45</sup>,以 Llama-3.1-8B 为基准,对 70B、32B、235B-A22B、30B-A3B 误差在 20% 内;滑窗混合约取三分之一,线性 / SSM 混合取四分之一,MLA 取不到三分之一。只有 4 个 KV 头的模型(如 Qwen2.5-7B)实际只有估值的一半。</li>
|
|
499
|
+
<li><b>引擎开销</b>:llama.cpp 用仓库在 CUDA 上实测的常数(进程 448 MiB + 计算缓冲 612 MiB + 上下文 × 512 × 2 字节);vLLM 估 2 GiB 且只占整卡 92%(<code>gpu_memory_utilization</code> 默认值);MLX 估 1.05 GiB。</li>
|
|
500
|
+
<li><b>可用内存</b>:独立显卡扣 1 GiB(分配器余量 + 显示);Mac 取 Metal 默认工作集(仓库实测 16/24 GB 机型为 74%)与「总量 − 系统预留 − 2 GiB」的较小者,再扣 0.5 GiB;安卓按 Android 17 Memory Limiter 给前台 App 的上限(8 / 12 / 16 GB 机型 5 / 8 / 10 GiB);iOS 没有公开数字,暂按一半 RAM,真机以 <code>os_proc_available_memory()</code> 为准。8 卡服务器按张量并行合计。</li>
|
|
501
|
+
<li><b>卸载</b>:只算家用 N 卡 + 系统内存,按 llama.cpp 的做法:MoE 把路由专家(<code>--n-cpu-moe</code>)挪到内存,注意力、共享部分和 KV 留在卡上;稠密模型整层连同这些层的 KV(<code>-ngl</code>)挪过去。系统内存要留 4 GiB 和 llama-server 的 0.86 GiB。MoE 按「激活参数里一半在路由专家之外」切分(Qwen3-30B-A3B 1.5 / 3.3B、gpt-oss-120b 2.5 / 5.1B、DeepSeek V3 17 / 37B),Mixtral 这类 8 选 2 的老 MoE 卡上部分会估高。</li>
|
|
502
|
+
<li><b>速度上限</b> = 带宽 ÷ 每 token 读取的字节(激活权重 + 一路的 KV);卸载时把显卡和内存两段读取时间相加。多卡忽略通信。</li>
|
|
503
|
+
<li><b>格式支持</b>:<span class="tag native">原生</span>(native)原生 kernel;<span class="tag fallback">回退</span>(fallback)能跑但走回退路径(如 Ampere 上的 FP8 Marlin);<span class="tag convert">需转换</span>(convert)这台设备不跑这种格式,按同样大小换成 GGUF / MLX 计算。</li>
|
|
504
|
+
</ul>
|
|
505
|
+
<p id="refs-intro"><b>参考与对照的现有工具</b>(逐项比较见 <code>research/2026-11-13-model-size-tools.md</code>):</p>
|
|
506
|
+
<ul id="refs"></ul>
|
|
507
|
+
</div>
|
|
508
|
+
</details>
|
|
376
509
|
</section>
|
|
377
510
|
</main>
|
|
378
511
|
</div>
|