okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-clean-3 (321794636): docs and history (cleanup step 3, items 3.0-3.10); release manifest and capability table with checks, history/ with pointers, link check, tools/ split, bench index; owner OK'd the wording 11-082b36e8a02

main
37.1 KiB384 linesraw
1<!DOCTYPE html>
2<html>
3<head>
4<meta charset="utf-8">
5<meta name="viewport" content="width=device-width, initial-scale=1">
6<script src="./support.js"></script>
7</head>
8<body>
9<x-dc>
10<helmet>
11<style>
12@font-face{font-family:'GT Walsheim Pro';src:url('fonts/GTWalsheimPro-Regular.woff2') format('woff2');font-weight:400;font-display:swap;}
13@font-face{font-family:'GT Walsheim Pro';src:url('fonts/GTWalsheimPro-Medium.woff2') format('woff2');font-weight:500;font-display:swap;}
14@font-face{font-family:'GT Walsheim Pro';src:url('fonts/GTWalsheimPro-Bold.woff2') format('woff2');font-weight:700;font-display:swap;}
15@font-face{font-family:'GT Walsheim Pro';src:url('fonts/GTWalsheimPro-Black.woff2') format('woff2');font-weight:900;font-display:swap;}
16*{box-sizing:border-box;}
17html,body{margin:0;padding:0;background:#f9fafb;}
18a{color:#0c8a60;text-decoration:none;}
19a:hover{text-decoration:underline;}
20details>summary::-webkit-details-marker{display:none;}
21</style>
22</helmet>
23<div style="min-height:100vh;background:#f9fafb;color:#221e1f;font-family:'GT Walsheim Pro',system-ui,sans-serif;-webkit-font-smoothing:antialiased;padding-bottom:80px;">
24
25  <header style="display:flex;align-items:center;gap:16px;padding:16px 32px;background:#ffffff;border-bottom:1px solid #dee5ee;">
26    <div style="display:flex;flex-direction:column;gap:4px;">
27      <h1 style="margin:0;font-weight:700;font-size:24px;letter-spacing:-0.01em;">Model</h1>
28      <span style="font-size:13px;color:#6f6f6f;">One model, tuned for your PC. Pick the version that fits.</span>
29    </div>
30  </header>
31
32  <main style="max-width:1200px;margin:0 auto;padding:28px 28px 0;display:flex;flex-direction:column;gap:28px;">
33
34    <section style="display:flex;flex-wrap:wrap;align-items:center;gap:24px;padding:24px;background:#ffffff;border:1px solid #dee5ee;border-radius:24px;box-shadow:0 4px 4px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.04);">
35      <div style="flex:1 1 420px;min-width:0;display:flex;gap:18px;align-items:flex-start;">
36        <span style="display:flex;align-items:center;justify-content:center;flex:none;width:64px;height:64px;border-radius:18px;background:#f9fafb;border:1px solid #eeeeee;"><img src="brand/logo/strata-mark-light.svg" width="40" height="40" alt=""/></span>
37        <div style="display:flex;flex-direction:column;gap:10px;min-width:0;">
38          <h2 style="margin:0;font-weight:900;font-size:30px;line-height:1.05;letter-spacing:-0.02em;">Qwen3.8-Flash-Next</h2>
39          <p style="margin:0;max-width:560px;font-size:15px;line-height:1.55;color:#303030;">The one model Strata is built around. It's a mixture of experts: 30B parameters in total, but only 3B work on each word, so it runs fast on a home PC.</p>
40          <div style="display:flex;flex-wrap:wrap;gap:8px;">
41            <span style="display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 11px;border-radius:999px;background:#f7f7f7;border:1px solid #dee5ee;font-size:12px;font-weight:500;color:#303030;"><span style="display:inline-block;width:14px;height:14px;background:#2F384C;mask:url(icons/layers.svg) center/contain no-repeat;"></span>30B total · 3B active</span>
42            <span style="display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 11px;border-radius:999px;background:#f7f7f7;border:1px solid #dee5ee;font-size:12px;font-weight:500;color:#303030;"><span style="display:inline-block;width:14px;height:14px;background:#2F384C;mask:url(icons/chat.svg) center/contain no-repeat;"></span>Up to 1M context</span>
43            <span style="display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 11px;border-radius:999px;background:#f7f7f7;border:1px solid #dee5ee;font-size:12px;font-weight:500;color:#303030;"><span style="display:inline-block;width:14px;height:14px;background:#2F384C;mask:url(icons/tool.svg) center/contain no-repeat;"></span>Text · code · tools</span>
44          </div>
45        </div>
46      </div>
47
48      <div style="flex:0 1 380px;min-width:280px;display:flex;flex-direction:column;gap:14px;padding:18px;border-radius:18px;background:#f9fafb;border:1px solid #eeeeee;">
49        <sc-if value="{{ heroSwitching }}" hint-placeholder-val="{{ false }}">
50          <div style="display:flex;flex-direction:column;gap:10px;">
51            <span style="display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;letter-spacing:0.05em;text-transform:uppercase;color:#0c8a60;"><span style="width:7px;height:7px;border-radius:50%;background:#10b981;"></span>Loading</span>
52            <span style="font-weight:700;font-size:18px;">{{ switchName }}</span>
53            <div style="height:6px;border-radius:999px;background:#eef1f4;overflow:hidden;"><div style="{{ switchBar }}height:100%;border-radius:999px;background:#10b981;"></div></div>
54            <span style="font-size:12px;color:#6f6f6f;">{{ switchStep }}</span>
55          </div>
56        </sc-if>
57        <sc-if value="{{ heroRunning }}" hint-placeholder-val="{{ true }}">
58          <div style="display:flex;align-items:flex-start;justify-content:space-between;gap:12px;">
59            <div style="display:flex;flex-direction:column;gap:6px;">
60              <span style="display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;letter-spacing:0.05em;text-transform:uppercase;color:#0c8a60;"><span style="width:7px;height:7px;border-radius:50%;background:#10b981;box-shadow:0 0 0 4px #d1fae5;"></span>Running</span>
61              <span style="font-weight:700;font-size:18px;">{{ runName }}</span>
62              <code style="font-family:ui-monospace,Consolas,monospace;font-size:12px;color:#6f6f6f;">{{ runQuant }}</code>
63            </div>
64            <div style="display:flex;flex-direction:column;align-items:flex-end;gap:2px;">
65              <span style="font-weight:900;font-size:30px;line-height:1;font-variant-numeric:tabular-nums;">{{ runSpeed }}</span>
66              <span style="font-size:12px;color:#6f6f6f;">tok/s</span>
67            </div>
68          </div>
69          <div style="display:flex;gap:8px;">
70            <a href="Engine v3.dc.html" style="flex:1;display:flex;align-items:center;justify-content:center;gap:8px;height:40px;border:1.5px solid #dee5ee;border-radius:14px;background:#ffffff;color:#221e1f;font:700 14px 'GT Walsheim Pro',sans-serif;text-decoration:none;" style-hover="background:#f7f7f7;text-decoration:none;"><span style="display:inline-block;width:16px;height:16px;background:#2F384C;mask:url(icons/gauge.svg) center/contain no-repeat;"></span>Tune engine</a>
71            <button onClick="{{ unload }}" style="flex:1;height:40px;border:1.5px solid #dee5ee;border-radius:14px;background:#ffffff;color:#221e1f;font:700 14px 'GT Walsheim Pro',sans-serif;cursor:pointer;" style-hover="background:#f7f7f7;">Unload</button>
72          </div>
73        </sc-if>
74        <sc-if value="{{ heroIdle }}" hint-placeholder-val="{{ false }}">
75          <div style="display:flex;flex-direction:column;gap:6px;">
76            <span style="display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;letter-spacing:0.05em;text-transform:uppercase;color:#6f6f6f;"><span style="width:7px;height:7px;border-radius:50%;background:#c9d1db;"></span>Not loaded</span>
77            <span style="font-size:14px;line-height:1.45;color:#303030;">Nothing is using your graphics card right now.</span>
78          </div>
79          <button onClick="{{ loadRec }}" style="height:42px;border:0;border-radius:14px;background:#10b981;color:#ffffff;font:700 14px 'GT Walsheim Pro',sans-serif;cursor:pointer;box-shadow:0 6px 16px rgba(16,185,129,.24);" style-hover="background:#0c8a60;">{{ loadRecLabel }}</button>
80        </sc-if>
81      </div>
82    </section>
83
84    <section style="display:flex;flex-direction:column;gap:16px;">
85      <div style="display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;">
86        <div style="display:flex;flex-direction:column;gap:4px;">
87          <h2 style="margin:0;font-weight:700;font-size:22px;letter-spacing:-0.01em;">Choose a version</h2>
88          <span style="font-size:14px;line-height:1.5;color:#6f6f6f;max-width:640px;">Same model, packed at different sizes. Smaller versions are faster and use less memory; bigger ones are a little more precise.</span>
89        </div>
90        <span style="display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 12px;border-radius:999px;background:#ffffff;border:1px solid #dee5ee;font-size:13px;font-weight:500;color:#303030;"><span style="display:inline-block;width:16px;height:16px;background:#2F384C;mask:url(icons/gpu.svg) center/contain no-repeat;"></span>{{ hwLabel }}</span>
91      </div>
92
93      <div style="background:#ffffff;border:1px solid #dee5ee;border-radius:24px;padding:20px 20px 16px;display:flex;flex-direction:column;gap:14px;box-shadow:0 4px 4px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.04);">
94        <div style="display:flex;flex-wrap:wrap;gap:16px;font-size:12px;font-weight:500;color:#303030;">
95          <span style="display:flex;align-items:center;gap:8px;"><span style="width:12px;height:12px;border-radius:4px;background:#ecfdf5;border:1.5px solid #10b981;"></span>Fast on your PC</span>
96          <span style="display:flex;align-items:center;gap:8px;"><span style="width:12px;height:12px;border-radius:4px;background:#fff6e0;border:1.5px solid #e39b0b;"></span>Works, but slower</span>
97          <span style="display:flex;align-items:center;gap:8px;"><span style="width:12px;height:12px;border-radius:4px;background:repeating-linear-gradient(45deg,#eef1f4 0 3px,#f7f7f7 3px 6px);border:1.5px solid #c9d1db;"></span>Too big for your PC</span>
98        </div>
99        <div style="overflow-x:auto;margin:0 -4px;padding:4px;">
100          <div style="display:grid;grid-template-columns:repeat(7,minmax(112px,1fr));gap:0;min-width:784px;">
101            <sc-for list="{{ quants }}" as="q" hint-placeholder-count="7">
102              <button onClick="{{ q.select }}" style="{{ q.colStyle }}position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;padding:12px 6px 16px;border:0;cursor:pointer;font-family:'GT Walsheim Pro',sans-serif;text-align:center;transition:background 160ms,box-shadow 160ms;">
103                <span style="{{ q.zoneBar }}position:absolute;left:0;right:0;top:0;height:3px;"></span>
104                <span style="{{ q.conStyle }}position:absolute;top:57px;height:2px;background:#dee5ee;"></span>
105                <span style="height:22px;display:flex;align-items:center;">
106                  <sc-if value="{{ q.isRec }}" hint-placeholder-val="{{ false }}"><span style="display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:999px;background:#221e1f;color:#ffffff;font-size:11px;font-weight:700;">Recommended</span></sc-if>
107                </span>
108                <span style="{{ q.node }}position:relative;z-index:1;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;box-sizing:border-box;transition:transform 160ms;"><span style="{{ q.nodeInner }}display:inline-block;"></span></span>
109                <span style="display:flex;flex-direction:column;align-items:center;gap:3px;">
110                  <span style="font-weight:700;font-size:14px;color:#221e1f;">{{ q.name }}</span>
111                  <code style="font-family:ui-monospace,Consolas,monospace;font-size:11px;color:#6f6f6f;">{{ q.id }}</code>
112                </span>
113                <span style="display:flex;flex-direction:column;align-items:center;gap:2px;font-size:12px;font-variant-numeric:tabular-nums;">
114                  <span style="color:#303030;">{{ q.sizeLabel }}</span>
115                  <span style="{{ q.speedStyle }}font-weight:700;">{{ q.speedLabel }}</span>
116                </span>
117                <span style="height:18px;font-size:11px;font-weight:700;color:#0c8a60;">{{ q.stateTag }}</span>
118              </button>
119            </sc-for>
120          </div>
121        </div>
122        <div style="display:flex;justify-content:space-between;font-size:12px;font-weight:500;color:#6f6f6f;padding:0 6px;">
123          <span>← Smaller and faster</span><span>More precise →</span>
124        </div>
125      </div>
126
127      <div style="display:flex;flex-wrap:wrap;gap:20px;padding:24px;background:#ffffff;border:1px solid #dee5ee;border-radius:24px;box-shadow:0 4px 4px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.04);">
128        <div style="flex:1 1 520px;min-width:0;display:flex;flex-direction:column;gap:18px;">
129          <div style="display:flex;align-items:center;gap:12px;flex-wrap:wrap;">
130            <h3 style="margin:0;font-weight:700;font-size:22px;">{{ sel.name }}</h3>
131            <code style="font-family:ui-monospace,Consolas,monospace;font-size:13px;color:#6f6f6f;">{{ sel.id }}</code>
132            <span style="{{ sel.chipStyle }}display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:700;"><span style="width:6px;height:6px;border-radius:50%;background:currentColor;"></span>{{ sel.chip }}</span>
133          </div>
134          <p style="margin:0;font-size:15px;line-height:1.55;color:#303030;max-width:640px;">{{ sel.blurb }}</p>
135          <div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;">
136            <div style="display:flex;flex-direction:column;gap:8px;padding:14px;border-radius:16px;background:#f7f7f7;">
137              <span style="font-size:12px;font-weight:500;color:#6f6f6f;">Quality</span>
138              <span style="font-weight:900;font-size:24px;line-height:1;font-variant-numeric:tabular-nums;">{{ sel.quality }}<span style="font-weight:500;font-size:13px;color:#6f6f6f;">% of original</span></span>
139              <div style="height:6px;border-radius:999px;background:#e3e8ee;overflow:hidden;"><div style="{{ sel.qualityBar }}height:100%;border-radius:999px;background:#2F384C;"></div></div>
140            </div>
141            <div style="display:flex;flex-direction:column;gap:8px;padding:14px;border-radius:16px;background:#f7f7f7;">
142              <span style="font-size:12px;font-weight:500;color:#6f6f6f;">Writing speed</span>
143              <span style="font-weight:900;font-size:24px;line-height:1;font-variant-numeric:tabular-nums;">{{ sel.speed }}<span style="font-weight:500;font-size:13px;color:#6f6f6f;"> tok/s</span></span>
144              <div style="height:6px;border-radius:999px;background:#e3e8ee;overflow:hidden;"><div style="{{ sel.speedBar }}height:100%;border-radius:999px;"></div></div>
145            </div>
146            <div style="display:flex;flex-direction:column;gap:8px;padding:14px;border-radius:16px;background:#f7f7f7;">
147              <span style="font-size:12px;font-weight:500;color:#6f6f6f;">Download size</span>
148              <span style="font-weight:900;font-size:24px;line-height:1;font-variant-numeric:tabular-nums;">{{ sel.size }}<span style="font-weight:500;font-size:13px;color:#6f6f6f;"> GB</span></span>
149              <span style="font-size:12px;color:#6f6f6f;">{{ sel.diskNote }}</span>
150            </div>
151            <div style="display:flex;flex-direction:column;gap:8px;padding:14px;border-radius:16px;background:#f7f7f7;">
152              <span style="font-size:12px;font-weight:500;color:#6f6f6f;">Memory needed</span>
153              <span style="font-weight:900;font-size:24px;line-height:1;font-variant-numeric:tabular-nums;">{{ sel.need }}<span style="font-weight:500;font-size:13px;color:#6f6f6f;"> GB</span></span>
154              <div style="display:flex;gap:2px;height:6px;border-radius:999px;background:#e3e8ee;overflow:hidden;"><div style="{{ sel.memGpu }}height:100%;background:#10b981;"></div><div style="{{ sel.memSys }}height:100%;background:#2F384C;"></div><div style="{{ sel.memOver }}height:100%;background:repeating-linear-gradient(45deg,#e0283f 0 3px,#f37a89 3px 6px);"></div></div>
155              <span style="font-size:12px;color:#6f6f6f;font-variant-numeric:tabular-nums;">{{ sel.memNote }}</span>
156            </div>
157          </div>
158          <details style="border-top:1px solid #eeeeee;padding-top:14px;">
159            <summary style="list-style:none;display:flex;align-items:center;gap:8px;cursor:pointer;font-size:13px;font-weight:700;color:#303030;">Technical details<span style="display:inline-block;width:14px;height:14px;background:#6f6f6f;mask:url(icons/chevron.svg) center/contain no-repeat;"></span></summary>
160            <div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px 24px;margin-top:12px;font-family:ui-monospace,Consolas,monospace;font-size:12px;color:#303030;">
161              <span style="display:flex;justify-content:space-between;gap:10px;"><span style="color:#6f6f6f;">bits / weight</span><span>{{ sel.bits }}</span></span>
162              <span style="display:flex;justify-content:space-between;gap:10px;"><span style="color:#6f6f6f;">perplexity vs BF16</span><span>{{ sel.ppl }}</span></span>
163              <span style="display:flex;justify-content:space-between;gap:10px;"><span style="color:#6f6f6f;">experts in VRAM</span><span>{{ sel.expertsVram }}</span></span>
164              <span style="display:flex;justify-content:space-between;gap:10px;"><span style="color:#6f6f6f;">file</span><span style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">{{ sel.file }}</span></span>
165            </div>
166          </details>
167        </div>
168
169        <div style="flex:0 1 280px;min-width:240px;display:flex;flex-direction:column;justify-content:center;gap:10px;padding:20px;border-radius:18px;background:#f9fafb;border:1px solid #eeeeee;">
170          <sc-if value="{{ act.running }}" hint-placeholder-val="{{ false }}">
171            <span style="display:flex;align-items:center;gap:8px;font-weight:700;font-size:15px;color:#0c8a60;"><span style="display:inline-block;width:18px;height:18px;background:#10b981;mask:url(icons/check.svg) center/contain no-repeat;"></span>This version is running</span>
172            <span style="font-size:13px;line-height:1.45;color:#6f6f6f;">All chats use it. Tune speed and memory on the Engine page.</span>
173            <button onClick="{{ unload }}" style="height:42px;border:1.5px solid #dee5ee;border-radius:14px;background:#ffffff;color:#221e1f;font:700 14px 'GT Walsheim Pro',sans-serif;cursor:pointer;" style-hover="background:#f7f7f7;">Unload</button>
174          </sc-if>
175          <sc-if value="{{ act.installed }}" hint-placeholder-val="{{ false }}">
176            <span style="font-weight:700;font-size:15px;">Downloaded and ready</span>
177            <span style="font-size:13px;line-height:1.45;color:#6f6f6f;">{{ act.switchNote }}</span>
178            <button onClick="{{ act.switchTo }}" style="{{ act.btnState }}height:44px;border:0;border-radius:14px;background:#10b981;color:#ffffff;font:700 14px 'GT Walsheim Pro',sans-serif;cursor:pointer;box-shadow:0 6px 16px rgba(16,185,129,.24);" style-hover="background:#0c8a60;">Switch to this version</button>
179            <button onClick="{{ act.remove }}" style="{{ act.btnState }}display:flex;align-items:center;justify-content:center;gap:8px;height:38px;border:0;border-radius:12px;background:transparent;color:#b01a2e;font:700 13px 'GT Walsheim Pro',sans-serif;cursor:pointer;" style-hover="background:#fdecee;"><span style="display:inline-block;width:15px;height:15px;background:currentColor;mask:url(icons/trash.svg) center/contain no-repeat;"></span>Delete · frees {{ sel.size }} GB</button>
180          </sc-if>
181          <sc-if value="{{ act.downloading }}" hint-placeholder-val="{{ false }}">
182            <div style="display:flex;justify-content:space-between;font-size:13px;font-variant-numeric:tabular-nums;"><span style="font-weight:700;">Downloading</span><span style="color:#6f6f6f;">{{ act.dlPct }}%</span></div>
183            <div style="height:8px;border-radius:999px;background:#eef1f4;overflow:hidden;"><div style="{{ act.dlBar }}height:100%;border-radius:999px;background:#10b981;transition:width 120ms linear;"></div></div>
184            <span style="font-size:12px;color:#6f6f6f;font-variant-numeric:tabular-nums;">{{ act.dlNote }}</span>
185            <button onClick="{{ act.cancel }}" style="height:38px;border:1.5px solid #dee5ee;border-radius:12px;background:#ffffff;color:#221e1f;font:700 13px 'GT Walsheim Pro',sans-serif;cursor:pointer;" style-hover="background:#f7f7f7;">Cancel</button>
186          </sc-if>
187          <sc-if value="{{ act.available }}" hint-placeholder-val="{{ true }}">
188            <span style="font-weight:700;font-size:15px;">Not downloaded yet</span>
189            <span style="font-size:13px;line-height:1.45;color:#6f6f6f;">{{ act.availNote }}</span>
190            <button onClick="{{ act.download }}" style="display:flex;align-items:center;justify-content:center;gap:8px;height:44px;border:0;border-radius:14px;background:#10b981;color:#ffffff;font:700 14px 'GT Walsheim Pro',sans-serif;cursor:pointer;box-shadow:0 6px 16px rgba(16,185,129,.24);" style-hover="background:#0c8a60;"><span style="display:inline-block;width:16px;height:16px;background:#ffffff;mask:url(icons/download.svg) center/contain no-repeat;"></span>Download · {{ sel.size }} GB</button>
191          </sc-if>
192          <sc-if value="{{ act.tooBig }}" hint-placeholder-val="{{ false }}">
193            <span style="display:flex;align-items:center;gap:8px;font-weight:700;font-size:15px;color:#b01a2e;"><span style="display:inline-block;width:18px;height:18px;background:currentColor;mask:url(icons/warning.svg) center/contain no-repeat;"></span>Too big for this PC</span>
194            <span style="font-size:13px;line-height:1.45;color:#6f6f6f;">{{ act.bigNote }}</span>
195            <button onClick="{{ act.pickRec }}" style="height:42px;border:1.5px solid #dee5ee;border-radius:14px;background:#ffffff;color:#221e1f;font:700 14px 'GT Walsheim Pro',sans-serif;cursor:pointer;" style-hover="background:#f7f7f7;">See the recommended one</button>
196          </sc-if>
197        </div>
198      </div>
199    </section>
200
201    <section style="display:flex;flex-direction:column;gap:14px;">
202      <div style="display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;">
203        <h2 style="margin:0;font-weight:700;font-size:22px;letter-spacing:-0.01em;">On this PC</h2>
204        <span style="font-size:13px;color:#6f6f6f;font-variant-numeric:tabular-nums;">{{ storageLabel }}</span>
205      </div>
206      <div style="background:#ffffff;border:1px solid #dee5ee;border-radius:20px;padding:8px;box-shadow:0 4px 4px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.04);">
207        <sc-for list="{{ installedRows }}" as="row" hint-placeholder-count="2">
208          <div style="{{ row.style }}display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:14px 16px;border-radius:14px;">
209            <span style="{{ row.dot }}flex:none;width:10px;height:10px;border-radius:50%;"></span>
210            <div style="flex:1 1 220px;min-width:0;display:flex;flex-direction:column;gap:2px;">
211              <span style="font-weight:700;font-size:15px;">{{ row.name }} <code style="font-family:ui-monospace,Consolas,monospace;font-weight:400;font-size:12px;color:#6f6f6f;margin-left:6px;">{{ row.id }}</code></span>
212              <span style="font-size:13px;color:#6f6f6f;font-variant-numeric:tabular-nums;">{{ row.meta }}</span>
213            </div>
214            <div style="display:flex;align-items:center;gap:6px;">
215              <sc-if value="{{ row.canSwitch }}" hint-placeholder-val="{{ false }}">
216                <button onClick="{{ row.switchTo }}" style="height:36px;padding:0 14px;border:1.5px solid #dee5ee;border-radius:12px;background:#ffffff;color:#221e1f;font:700 13px 'GT Walsheim Pro',sans-serif;cursor:pointer;" style-hover="background:#f7f7f7;">Switch</button>
217                <button onClick="{{ row.remove }}" title="Delete" style="display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:0;border-radius:10px;background:transparent;cursor:pointer;" style-hover="background:#fdecee;"><span style="display:inline-block;width:16px;height:16px;background:#6f6f6f;mask:url(icons/trash.svg) center/contain no-repeat;"></span></button>
218              </sc-if>
219              <sc-if value="{{ row.isRunning }}" hint-placeholder-val="{{ false }}">
220                <span style="display:inline-flex;align-items:center;height:26px;padding:0 10px;border-radius:999px;background:#ecfdf5;color:#0c8a60;font-size:12px;font-weight:700;">Running</span>
221              </sc-if>
222              <sc-if value="{{ row.isDl }}" hint-placeholder-val="{{ false }}">
223                <span style="font-size:12px;font-weight:700;color:#303030;font-variant-numeric:tabular-nums;">{{ row.dlPct }}%</span>
224              </sc-if>
225            </div>
226          </div>
227        </sc-for>
228        <div style="display:flex;flex-direction:column;gap:8px;padding:14px 16px 12px;margin-top:4px;border-top:1px solid #eeeeee;">
229          <div style="display:flex;height:8px;border-radius:999px;background:#eef1f4;overflow:hidden;"><div style="{{ storageBar }}height:100%;border-radius:999px;background:#2F384C;transition:width 300ms;"></div></div>
230          <span style="font-size:12px;color:#6f6f6f;font-variant-numeric:tabular-nums;">{{ storageNote }}</span>
231        </div>
232      </div>
233    </section>
234  </main>
235
236  <sc-if value="{{ toast }}" hint-placeholder-val="{{ false }}">
237    <div style="position:fixed;right:24px;bottom:24px;display:flex;align-items:center;gap:12px;padding:14px 18px;border-radius:14px;background:#ffffff;border:1px solid #dee5ee;box-shadow:0 10px 40px rgba(15,23,42,.08),0 1px 3px rgba(15,23,42,.06);font-size:14px;z-index:40;">
238      <span style="display:inline-block;width:20px;height:20px;background:#10b981;mask:url(icons/check.svg) center/contain no-repeat;"></span>
239      <span style="display:flex;flex-direction:column;gap:2px;"><span style="font-weight:700;">{{ toastTitle }}</span><span style="color:#6f6f6f;">{{ toastSub }}</span></span>
240    </div>
241  </sc-if>
242</div>
243</x-dc>
244<script type="text/x-dc" data-dc-script data-props="{&quot;hardware&quot;:{&quot;editor&quot;:&quot;enum&quot;,&quot;options&quot;:[&quot;this&quot;,&quot;laptop&quot;,&quot;workstation&quot;],&quot;default&quot;:&quot;this&quot;,&quot;tsType&quot;:&quot;'this'|'laptop'|'workstation'&quot;}}">
245const Q = [
246  ['Q2_K', 'Smallest', 2.9, 90.8, '+9.1%', 96],
247  ['Q3_K_M', 'Compact', 3.9, 95.4, '+3.8%', 90],
248  ['Q4_K_M', 'Balanced', 4.9, 98.1, '+1.2%', 84],
249  ['Q5_K_M', 'High quality', 5.7, 99.0, '+0.5%', 78],
250  ['Q6_K', 'Very high', 6.6, 99.5, '+0.2%', 72],
251  ['Q8_0', 'Near-original', 8.5, 99.9, '+0.04%', 64],
252  ['BF16', 'Original', 16, 100, '0', 50],
253].map(([id, name, bits, quality, ppl, base]) => ({ id, name, bits, quality, ppl, base, size: +(30.5 * bits / 8).toFixed(1) }));
254const HW = {
255  this: { label: 'RTX 4070 · 12 GB · 32 GB RAM', vram: 12, ram: 32, disk: 1000, used: 588 },
256  laptop: { label: 'RTX 4060 Laptop · 8 GB · 16 GB RAM', vram: 8, ram: 16, disk: 512, used: 401 },
257  workstation: { label: 'RTX 4090 · 24 GB · 64 GB RAM', vram: 24, ram: 64, disk: 2000, used: 910 },
258};
259
260class Component extends DCLogic {
261  state = { running: 'Q4_K_M', installed: ['Q4_K_M', 'Q3_K_M'], selected: null, dl: {}, switching: null, toast: null };
262  componentWillUnmount() { (this.timers || []).forEach(clearInterval); clearTimeout(this.tt); }
263  hw() { return HW[this.props.hardware ?? 'this'] || HW.this; }
264  fit(q) {
265    const hw = this.hw(), vAvail = hw.vram * 0.92, cap = vAvail + hw.ram * 0.6, need = +(q.size + 2.5).toFixed(1);
266    if (need > cap) return { zone: 'none', need, gpuPart: Math.min(need, vAvail), sysPart: Math.max(0, cap - vAvail), over: need - cap, speed: 0, cap };
267    const frac = vAvail / need, speed = q.base * (0.35 + 0.65 * Math.min(1, frac * 1.3));
268    return { zone: speed >= 60 ? 'fast' : 'slow', need, gpuPart: Math.min(need, vAvail), sysPart: Math.max(0, need - vAvail), over: 0, speed, cap, onGpu: Math.min(100, Math.round(frac * 100)) };
269  }
270  rec() {
271    const fits = Q.map(q => [q, this.fit(q)]).filter(([, f]) => f.zone !== 'none');
272    const fast = fits.filter(([, f]) => f.zone === 'fast');
273    if (fast.length) return fast[fast.length - 1][0].id;
274    if (fits.length) return fits[0][0].id;
275    return Q[0].id;
276  }
277  toastMsg(t, s) { this.setState({ toast: { t, s } }); clearTimeout(this.tt); this.tt = setTimeout(() => this.setState({ toast: null }), 3000); }
278  download(id) {
279    if (this.state.dl[id] != null) return;
280    this.setState(s => ({ dl: { ...s.dl, [id]: 0 } }));
281    const iv = setInterval(() => {
282      const p = (this.state.dl[id] ?? 0) + 1.6 + Math.random() * 1.4;
283      if (this.state.dl[id] == null) { clearInterval(iv); return; }
284      if (p >= 100) { clearInterval(iv); this.setState(s => { const dl = { ...s.dl }; delete dl[id]; return { dl, installed: [...s.installed, id] }; }); this.toastMsg('Download complete', `${Q.find(q => q.id === id).name} is ready to use.`); return; }
285      this.setState(s => ({ dl: { ...s.dl, [id]: p } }));
286    }, 120);
287    (this.timers ||= []).push(iv);
288  }
289  cancel(id) { this.setState(s => { const dl = { ...s.dl }; delete dl[id]; return { dl }; }); }
290  switchTo(id) {
291    if (this.state.switching) return;
292    const steps = ['Unloading the current version…', 'Loading weights from disk…', 'Moving experts to the graphics card…', 'Warming up…'];
293    this.setState({ switching: { to: id, p: 0 } });
294    const iv = setInterval(() => {
295      const p = this.state.switching.p + 2.6;
296      if (p >= 100) { clearInterval(iv); this.setState({ running: id, switching: null }); const q = Q.find(x => x.id === id); this.toastMsg('Now running ' + q.name, `${this.fit(q).speed.toFixed(0)} tok/s on this PC.`); return; }
297      this.setState({ switching: { to: id, p, step: steps[Math.min(3, Math.floor(p / 25))] } });
298    }, 60);
299    (this.timers ||= []).push(iv);
300  }
301  remove(id) { if (id === this.state.running) return; this.setState(s => ({ installed: s.installed.filter(x => x !== id) })); this.toastMsg('Version deleted', `${Q.find(q => q.id === id).size} GB freed.`); }
302
303  renderVals() {
304    const s = this.state, hw = this.hw(), recId = this.rec();
305    const selId = s.selected ?? s.running ?? recId;
306    const zoneCol = { fast: ['#f3fcf8', '#10b981'], slow: ['#fffaf0', '#e39b0b'], none: ['repeating-linear-gradient(45deg,#f4f6f8 0 4px,#fafbfc 4px 8px)', '#c9d1db'] };
307    const quants = Q.map((q, i) => {
308      const f = this.fit(q), sel = q.id === selId, inst = s.installed.includes(q.id), run = q.id === s.running, dl = s.dl[q.id] != null;
309      const [bg, zc] = zoneCol[f.zone];
310      const node = run ? 'background:#10b981;border:0;box-shadow:0 0 0 5px #d1fae5;' : inst ? 'background:#2F384C;border:0;' : f.zone === 'none' ? 'background:#ffffff;border:2px dashed #c9d1db;' : 'background:#ffffff;border:2px solid #2F384C;';
311      return {
312        id: q.id, name: q.name, sizeLabel: q.size + ' GB',
313        speedLabel: f.zone === 'none' ? 'Won\u2019t fit' : f.speed.toFixed(0) + ' tok/s',
314        speedStyle: f.zone === 'none' ? 'color:#9aa3ab;' : f.zone === 'slow' ? 'color:#8a5a00;' : 'color:#0c8a60;',
315        stateTag: run ? 'Running' : dl ? `Downloading ${Math.floor(s.dl[q.id])}%` : inst ? 'Downloaded' : '',
316        isRec: q.id === recId,
317        select: () => this.setState({ selected: q.id }),
318        colStyle: (sel ? 'background:#ffffff;box-shadow:0 0 0 2px #221e1f inset,0 10px 24px rgba(15,23,42,.10);border-radius:16px;z-index:2;' : `background:${bg};`) + (i === 0 && !sel ? 'border-radius:14px 0 0 14px;' : '') + (i === Q.length - 1 && !sel ? 'border-radius:0 14px 14px 0;' : ''),
319        zoneBar: `background:${zc};` + (sel ? 'left:14px;right:14px;border-radius:0 0 3px 3px;' : '') + (i === 0 ? 'border-top-left-radius:14px;' : '') + (i === Q.length - 1 ? 'border-top-right-radius:14px;' : ''),
320        conStyle: i === 0 ? 'left:50%;right:0;' : i === Q.length - 1 ? 'left:0;right:50%;' : 'left:0;right:0;',
321        node: node + (sel ? 'transform:scale(1.15);' : ''),
322        nodeInner: run || inst ? 'width:8px;height:8px;border-radius:50%;background:#ffffff;' : 'width:0;height:0;',
323      };
324    });
325    const q = Q.find(x => x.id === selId), f = this.fit(q), run = q.id === s.running, inst = s.installed.includes(q.id), dl = s.dl[q.id];
326    const qualityTxt = q.quality >= 99.5 ? 'Practically identical to the original.' : q.quality >= 98 ? 'Hard to tell apart from the original in everyday use.' : q.quality >= 95 ? 'Slightly less precise on hard reasoning and code.' : 'Noticeably less precise. Best when memory is very tight.';
327    const fitTxt = f.zone === 'none' ? `It needs about ${f.need} GB of memory, and this PC has about ${f.cap.toFixed(0)} GB free for models.` : f.sysPart < 0.05 ? 'Runs entirely on your graphics card, the fastest way to run it.' : f.zone === 'fast' ? 'Most of it runs on your graphics card. Rarely used experts sit in system memory, so it\u2019s still fast.' : 'It fits, but more of it lives in slower system memory, so replies come noticeably slower.';
328    const total = Math.max(f.need, f.cap), pw = v => `width:${(v / total * 100).toFixed(1)}%;`;
329    const freeDisk = hw.disk - hw.used - s.installed.reduce((a, id) => a + Q.find(x => x.id === id).size, 0);
330    const chip = run ? ['Running', 'background:#ecfdf5;color:#0c8a60;'] : dl != null ? ['Downloading', 'background:#e8f4ff;color:#0668c2;'] : inst ? ['Downloaded', 'background:#f7f7f7;color:#303030;'] : f.zone === 'none' ? ['Too big', 'background:#fdecee;color:#b01a2e;'] : q.id === recId ? ['Recommended', 'background:#221e1f;color:#ffffff;'] : ['Available', 'background:#f7f7f7;color:#303030;'];
331    const runQ = Q.find(x => x.id === s.running), swQ = s.switching && Q.find(x => x.id === s.switching.to);
332    const modelGb = s.installed.reduce((a, id) => a + Q.find(x => x.id === id).size, 0);
333    const dlLeft = dl != null ? (q.size * (1 - dl / 100)) : 0;
334
335    return {
336      hwLabel: 'Checked for ' + hw.label,
337      heroSwitching: !!s.switching, heroRunning: !s.switching && !!s.running, heroIdle: !s.switching && !s.running,
338      switchName: swQ ? `${swQ.name} · ${swQ.id}` : '', switchBar: `width:${s.switching?.p ?? 0}%;transition:width 60ms linear;`, switchStep: s.switching?.step ?? 'Unloading the current version…',
339      runName: runQ?.name ?? '', runQuant: runQ ? runQ.id + ' · ' + runQ.size + ' GB' : '', runSpeed: runQ ? this.fit(runQ).speed.toFixed(0) : '',
340      unload: () => { this.setState({ running: null }); this.toastMsg('Model unloaded', 'Your graphics card is free.'); },
341      loadRec: () => { const id = s.installed.includes(recId) ? recId : s.installed[0]; if (id) this.switchTo(id); },
342      loadRecLabel: 'Load ' + (Q.find(x => x.id === (s.installed.includes(recId) ? recId : s.installed[0]))?.name ?? 'model'),
343      quants,
344      sel: {
345        id: q.id, name: q.name, chip: chip[0], chipStyle: chip[1],
346        blurb: qualityTxt + ' ' + fitTxt,
347        quality: q.quality.toFixed(1), qualityBar: `width:${((q.quality - 85) / 15 * 100).toFixed(1)}%;`,
348        speed: f.zone === 'none' ? '—' : f.speed.toFixed(0),
349        speedBar: `width:${(f.speed / 96 * 100).toFixed(1)}%;background:${f.zone === 'slow' ? '#e39b0b' : '#10b981'};`,
350        size: q.size, diskNote: inst ? 'Already on this PC' : `${freeDisk.toFixed(0)} GB free on disk`,
351        need: f.need, memGpu: pw(f.gpuPart), memSys: pw(f.sysPart), memOver: pw(f.over),
352        memNote: f.zone === 'none' ? `${f.over.toFixed(1)} GB more than this PC has` : f.sysPart < 0.05 ? `All ${f.need} GB on graphics card` : `${f.gpuPart.toFixed(1)} GB graphics card + ${f.sysPart.toFixed(1)} GB system`,
353        bits: q.bits.toFixed(1), ppl: q.ppl, expertsVram: f.zone === 'none' ? '—' : (f.onGpu ?? 100) + '%', file: `qwen3.8-flash-next-${q.id}.gguf`,
354      },
355      act: {
356        running: run, installed: inst && !run && dl == null, downloading: dl != null, available: !inst && dl == null && f.zone !== 'none', tooBig: !inst && dl == null && f.zone === 'none',
357        switchNote: s.running ? `Switching takes about 5 seconds. Your chats stay open.` : 'Load it to start chatting.',
358        switchTo: () => this.switchTo(q.id), remove: () => this.remove(q.id), btnState: s.switching ? 'opacity:.5;pointer-events:none;' : '',
359        dlPct: dl != null ? Math.floor(dl) : 0, dlBar: `width:${dl ?? 0}%;`, dlNote: dl != null ? `${(q.size - dlLeft).toFixed(1)} of ${q.size} GB · 112 MB/s · about ${Math.max(1, Math.round(dlLeft * 1024 / 112 / 60))} min left` : '',
360        cancel: () => this.cancel(q.id), download: () => this.download(q.id),
361        availNote: f.zone === 'fast' ? `Fits well on this PC. You'll be able to switch to it as soon as it's downloaded.` : 'It will run, but slower than the recommended version.',
362        bigNote: `It needs about ${f.need} GB and this PC has about ${f.cap.toFixed(0)} GB. A PC with more graphics or system memory could run it.`,
363        pickRec: () => this.setState({ selected: recId }),
364      },
365      installedRows: [...s.installed, ...Object.keys(s.dl)].map(id => {
366        const qq = Q.find(x => x.id === id), ff = this.fit(qq), isRun = id === s.running, isDl = s.dl[id] != null;
367        return {
368          id, name: qq.name, isRunning: isRun, isDl, canSwitch: !isRun && !isDl, dlPct: isDl ? Math.floor(s.dl[id]) : 0,
369          meta: `${qq.size} GB on disk · ${qq.quality}% quality · ${ff.zone === 'none' ? 'won\u2019t fit' : ff.speed.toFixed(0) + ' tok/s'}${isDl ? ' · downloading' : ''}`,
370          dot: isRun ? 'background:#10b981;box-shadow:0 0 0 4px #d1fae5;' : isDl ? 'background:#0f97ff;' : 'background:#2F384C;',
371          style: id === selId ? 'background:#f7f7f7;' : '',
372          switchTo: () => this.switchTo(id), remove: () => this.remove(id),
373        };
374      }),
375      storageLabel: `${modelGb.toFixed(1)} GB of model files`,
376      storageBar: `width:${((hw.used + modelGb) / hw.disk * 100).toFixed(1)}%;`,
377      storageNote: `${freeDisk.toFixed(0)} GB free of ${hw.disk >= 1000 ? (hw.disk / 1000) + ' TB' : hw.disk + ' GB'} · models use ${modelGb.toFixed(1)} GB`,
378      toast: !!s.toast, toastTitle: s.toast?.t ?? '', toastSub: s.toast?.s ?? '',
379    };
380  }
381}
382</script>
383</body>
384</html>