Files
leleka/engine/strata/serve/web/index.html
T
Pavlo RatushnyiandClaude Sonnet 5.5 87e2633afe engine/strata: bring the Strata subtree to upstream 41cf05a0 (engine 0.1.50) with the local patches re-applied
Documented tree replacement (the history has no git-subtree metadata): 3-way merge of the old subtree
(570201a:engine/strata) against upstream 41cf05a06a25dd29103b7b27a2279a3f60c21876 (2026-10-25), merge base =
the old pin d9ab8435 (tree-identical to upstream 5b734e42; d9ab8435 is not an ancestor of upstream main).

Local patches re-applied by hand where they conflicted (15 files): STRATA_CUDA_STATIC profile, experimental KAR
experts and KAR PLE arms, keyless V-only arm (now beside upstream's K8V4 hybrid KV and fused norm+rope). Details,
conflict table and left-out files are in docs/upstream.md.

Left out (weights, captures, logs, media): new bench/results (2022 files), binary media and app assets (61),
docs/work/evidence (24), *.bin / *.gguf data files, and the 7 files the first import already left out.

scripts/build-cpu.sh: build the 11 CPU tests upstream registered since the old pin (they ran as "Not Run").
Checked: build-cpu.sh 16/16 ctest in WSL; sm_86 CUDA objects of the patched files compile, also with the KAR
macros on. No GPU run, no quality gate.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 12:49:15 +01:00

268 lines
17 KiB
HTML

<!doctype html>
<html lang="en" data-theme="light">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Strata</title>
<link rel="icon" href="web/favicon.svg" type="image/svg+xml">
<link rel="stylesheet" href="web/tokens.css">
<link rel="stylesheet" href="web/components.css">
<link rel="stylesheet" href="web/app.css">
<script>
// the theme before the first paint: the saved choice, else the system's
try {
const t = localStorage.getItem("strata.theme") ||
(matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
document.documentElement.dataset.theme = t;
} catch (e) {}
</script>
</head>
<body>
<header class="st-header">
<span class="st-header__brand">Strata</span>
<nav class="st-tabs" role="tablist" aria-label="Views">
<button class="st-tab" role="tab" id="tab-btn-chat" aria-controls="view-chat" aria-selected="true" data-tab="chat">
<svg class="st-icon st-icon--sm"><use href="web/sprite.svg#i-chat"/></svg>Chat</button>
<button class="st-tab" role="tab" id="tab-btn-images" aria-controls="view-images" aria-selected="false" data-tab="images" hidden>
<svg class="st-icon st-icon--sm"><use href="web/sprite.svg#i-image"/></svg>Images</button>
<button class="st-tab" role="tab" id="tab-btn-monitor" aria-controls="view-monitor" aria-selected="false" data-tab="monitor">
<svg class="st-icon st-icon--sm"><use href="web/sprite.svg#i-activity"/></svg>Monitor</button>
<button class="st-tab" role="tab" id="tab-btn-about" aria-controls="view-about" aria-selected="false" data-tab="about">
<svg class="st-icon st-icon--sm"><use href="web/sprite.svg#i-info"/></svg>About</button>
</nav>
<span class="st-header__spacer"></span>
<span class="st-pill" id="pill" data-state="idle" role="status" aria-live="polite">
<span class="st-pill__dot"></span><span id="pill-text">Connecting&hellip;</span></span>
<button class="st-btn st-btn--icon" id="theme-btn" title="Light / dark" aria-label="Switch between light and dark">
<svg class="st-icon"><use id="theme-icon" href="web/sprite.svg#i-moon"/></svg></button>
</header>
<main>
<!-- ============================ Chat ============================ -->
<section class="view view--chat" id="view-chat" role="tabpanel" aria-labelledby="tab-btn-chat">
<div class="chat-scroll" id="chat-scroll">
<div class="chat" id="chat">
<div class="chat-empty" id="chat-empty">
<div class="chat-empty__title">Ask anything</div>
<div class="chat-empty__sub" id="chat-empty-sub">The model runs on this PC. Nothing leaves it.</div>
</div>
</div>
</div>
<div class="composer-wrap">
<form class="st-composer" id="composer">
<div class="attachments" id="attachments" hidden></div>
<textarea id="input" rows="2" placeholder="Ask anything&hellip;" aria-label="Message"></textarea>
<div class="st-composer__bar">
<button type="button" class="st-btn st-btn--icon" id="attach-btn" title="Attach a text file (or drop it here)" aria-label="Attach a file">
<svg class="st-icon"><use href="web/sprite.svg#i-attach"/></svg></button>
<input type="file" id="file" multiple hidden>
<button type="button" class="st-btn st-btn--icon" id="new-btn" title="New chat" aria-label="New chat">
<svg class="st-icon"><use href="web/sprite.svg#i-new-chat"/></svg></button>
<button type="button" class="st-btn st-btn--icon" id="export-btn" title="Save this chat as Markdown" aria-label="Save this chat">
<svg class="st-icon"><use href="web/sprite.svg#i-download"/></svg></button>
<button type="button" class="st-btn st-btn--icon" id="sampling-btn" title="Sampling and thinking" aria-label="Sampling and thinking">
<svg class="st-icon"><use href="web/sprite.svg#i-settings"/></svg></button>
<span class="spacer"></span>
<span class="composer-hint" id="composer-hint"></span>
<button type="button" class="st-btn st-btn--secondary" id="stop-btn" hidden>
<svg class="st-icon st-icon--sm"><use href="web/sprite.svg#i-stop"/></svg>Stop</button>
<button type="submit" class="st-btn st-btn--primary st-btn--send" id="send-btn" aria-label="Send">
<svg class="st-icon"><use href="web/sprite.svg#i-send"/></svg></button>
</div>
</form>
</div>
</section>
<!-- ============================ Images ============================ -->
<section class="view view--images" id="view-images" role="tabpanel" aria-labelledby="tab-btn-images" hidden>
<div class="about">
<form class="st-card img-form" id="img-form">
<span class="card-title" id="img-title">Make an image</span>
<textarea class="st-input img-prompt" id="img-prompt" rows="3" placeholder="Describe the image&hellip;" aria-label="Prompt"></textarea>
<div class="img-row">
<label class="st-field">Size
<select class="st-input" id="img-size">
<option>1024x1024</option><option>1536x1024</option><option>1024x1536</option>
<option>768x768</option><option>512x512</option></select></label>
<label class="st-field">Seed
<input class="st-input" id="img-seed" type="number" min="0" placeholder="random"></label>
<button type="submit" class="st-btn st-btn--primary" id="img-go">Generate</button>
</div>
<span class="composer-hint" id="img-hint">One image at a time; a chat request waits for it (and the other way round).</span>
</form>
<div class="img-results" id="img-results"></div>
</div>
</section>
<!-- ============================ Monitor ============================ -->
<section class="view view--monitor" id="view-monitor" role="tabpanel" aria-labelledby="tab-btn-monitor" hidden>
<div class="monitor">
<div class="st-card state-card">
<div class="state-card__head">
<span class="card-title">Model state</span>
<span class="badges" id="state-badges">
<span class="st-badge" data-s="idle">Idle</span>
<span class="st-badge st-badge--reading" data-s="reading">Reading</span>
<span class="st-badge st-badge--generating" data-s="generating">Generating</span>
<span class="st-badge st-badge--queued" data-s="queued">Queued</span>
<span class="st-badge st-badge--error" data-s="error">Error</span>
</span>
</div>
<div class="state-card__row"><span id="state-label">Waiting for a request</span><span class="muted" id="state-detail"></span></div>
<div class="st-progress" id="state-progress"><div class="st-progress__bar" id="state-bar" style="width:0%"></div></div>
</div>
<div class="metrics" id="metrics">
<!-- filled by app.js: Speed, GPU load, VRAM, GPU temp, Power, PCIe, CPU, Disk read -->
</div>
<div class="monitor-row">
<div class="st-card ctx-card">
<span class="card-title">Context fill</span>
<div class="ctx-gauge">
<svg class="st-gauge" viewBox="0 0 120 120" aria-hidden="true">
<circle class="st-gauge__track" cx="60" cy="60" r="50" fill="none" stroke-width="10" stroke-linecap="round"
stroke-dasharray="235.6 314.2" transform="rotate(135 60 60)"/>
<circle class="st-gauge__fill" id="ctx-fill" cx="60" cy="60" r="50" fill="none" stroke-width="10"
stroke-linecap="round" stroke-dasharray="0 314.2" transform="rotate(135 60 60)"/>
</svg>
<div class="ctx-gauge__label"><span class="ctx-gauge__pct" id="ctx-pct">0%</span><span class="muted" id="ctx-sub">&ndash;</span></div>
</div>
<div class="bar-row"><span>Experts in VRAM</span><span class="muted" id="slots-text">&ndash;</span></div>
<div class="st-progress"><div class="st-progress__bar" id="slots-bar" style="width:0%"></div></div>
<div class="bar-row"><span>System RAM</span><span class="muted" id="ram-text">&ndash;</span></div>
<div class="st-progress" id="ram-progress"><div class="st-progress__bar" id="ram-bar" style="width:0%"></div></div>
<div class="bar-row"><span>GPU temperature</span><span class="muted" id="temp-text">&ndash;</span></div>
<div class="st-progress" data-tone="warn"><div class="st-progress__bar" id="temp-bar" style="width:0%"></div></div>
</div>
<div class="st-card req-card">
<div class="req-head"><span class="card-title">Recent requests</span>
<button class="st-btn st-btn--secondary" id="req-all" hidden>Show all</button></div>
<div class="table-wrap" id="req-wrap">
<table class="st-table">
<thead><tr><th>Time</th><th>Status</th><th class="num">Prompt</th><th class="num">Reused</th><th class="num">Output</th>
<th class="num" title="New prompt tokens per second, excluding reused cache tokens (engine prompt time)">Prefill t/s</th><th class="num">Decode t/s</th><th class="num" title="While writing the answer: the share of the experts looked up that were already in VRAM. Experts the GPU read over PCIe (--pcie-frac) are not counted in it; their share of all routed experts is shown after it (+N% PCIe)">VRAM hit rate</th><th class="num">Duration</th></tr></thead>
<tbody id="req-body"><tr><td colspan="9" class="muted">No requests yet</td></tr></tbody>
</table>
</div>
<p class="muted req-totals" id="req-totals"></p>
</div>
</div>
<div class="st-card cc-card" id="cc-card">
<div class="req-head"><span class="card-title">Conversation cache</span><span class="muted small" id="cc-sum"></span></div>
<div class="cc-bars" id="cc-bars" hidden>
<div><div class="bar-row"><span>Parked conversations</span><span class="muted" id="cc-slots-text">&ndash;</span></div>
<div class="st-progress"><div class="st-progress__bar" id="cc-slots-bar" style="width:0%"></div></div></div>
<div><div class="bar-row"><span>Their memory (RAM)</span><span class="muted" id="cc-mem-text">&ndash;</span></div>
<div class="st-progress"><div class="st-progress__bar" id="cc-mem-bar" style="width:0%"></div></div></div>
</div>
<dl class="facts" id="cc-facts"></dl>
<p class="muted small cc-note" id="cc-note"></p>
</div>
<div class="st-card mcp-card" id="mcp-card" hidden>
<div class="req-head"><span class="card-title">MCP servers</span><span class="muted small" id="mcp-sum"></span></div>
<div class="mcp-list" id="mcp-list"></div>
<p class="muted small mcp-note">Their tools run on this PC with your rights, when the model decides to call them
(in this page's chat only; switch it off in Sampling).</p>
</div>
</div>
</section>
<!-- ============================ About ============================ -->
<section class="view view--about" id="view-about" role="tabpanel" aria-labelledby="tab-btn-about" hidden>
<div class="about">
<div class="st-card">
<span class="card-title">Model and engine</span>
<dl class="facts" id="facts-engine"></dl>
</div>
<div class="st-card">
<span class="card-title">This PC</span>
<dl class="facts" id="facts-hw"></dl>
</div>
<div class="st-card">
<span class="card-title">Connect your tools</span>
<p class="muted">Any OpenAI- or Anthropic-compatible client works with these addresses.</p>
<dl class="facts" id="facts-api"></dl>
</div>
<div class="st-card">
<span class="card-title">Settings</span>
<div class="st-field">
<label class="st-label" for="api-key">API key <output>only if the server was started with one</output></label>
<input class="st-input" id="api-key" type="password" autocomplete="off" placeholder="Not needed">
</div>
<div class="toggle-row"><span>Dark theme</span>
<button class="st-toggle" id="dark-toggle" role="switch" aria-checked="false" aria-label="Dark theme"></button></div>
<p class="muted small">Chats, settings and the key are kept in this browser only.
<a href="https://github.com/Niko1221/Strata" target="_blank" rel="noopener noreferrer">Strata on GitHub</a></p>
</div>
<div class="st-card cfg-card" id="cfg-card" hidden>
<div class="req-head"><span class="card-title">Model settings</span><span class="muted small" id="cfg-file"></span></div>
<p class="muted small">Kept in the model's run config for every client. An empty field is the default. They
take effect the next time the model starts (close Strata's window and start it again).</p>
<form class="cfg-form" id="cfg-form"></form>
<div class="cfg-actions"><button class="st-btn st-btn--primary" id="cfg-save" type="button">Save</button>
<span class="muted small" id="cfg-msg" role="status"></span></div>
</div>
</div>
</section>
</main>
<!-- ============================ Sampling drawer ============================ -->
<aside class="st-drawer" id="drawer" data-open="false" aria-label="Sampling and thinking" aria-hidden="true">
<div class="st-drawer__head"><span class="card-title">Sampling</span>
<button class="st-btn st-btn--icon" id="drawer-close" aria-label="Close">
<svg class="st-icon"><use href="web/sprite.svg#i-chevron"/></svg></button></div>
<div class="st-drawer__body">
<div class="st-field">
<label class="st-label" for="s-thinking">Thinking <output id="o-thinking"></output></label>
<div class="seg" id="s-thinking" role="radiogroup" aria-label="Thinking">
<button type="button" role="radio" data-v="none">Off</button><button type="button" role="radio" data-v="low">Low</button>
<button type="button" role="radio" data-v="medium">Medium</button><button type="button" role="radio" data-v="high">High</button>
</div>
</div>
<div class="st-field">
<label class="st-label" for="s-temp">Temperature <output id="o-temp"></output></label>
<input class="st-slider" type="range" id="s-temp" min="0" max="1.5" step="0.05">
<span class="muted small">0 = always the most likely word (exact, repeatable)</span>
</div>
<div class="st-field">
<label class="st-label" for="s-topp">Top-p <output id="o-topp"></output></label>
<input class="st-slider" type="range" id="s-topp" min="0.05" max="1" step="0.05">
</div>
<div class="st-field">
<label class="st-label" for="s-topk">Top-k <output id="o-topk"></output></label>
<input class="st-slider" type="range" id="s-topk" min="1" max="64" step="1">
</div>
<div class="st-field">
<label class="st-label" for="s-max">Max tokens <output>empty = until done</output></label>
<input class="st-input" id="s-max" type="number" min="1" step="1" placeholder="Until done">
</div>
<div class="st-field">
<label class="st-label" for="s-seed">Seed <output>empty = random</output></label>
<input class="st-input" id="s-seed" type="number" min="1" step="1" placeholder="Random">
</div>
<div class="toggle-row"><span>Show thinking<br><span class="muted small">expanded while it streams</span></span>
<button class="st-toggle" id="s-show" role="switch" aria-checked="true" aria-label="Show thinking"></button></div>
<div class="toggle-row" id="mcp-row" hidden><span>Use tools from MCP servers<br><span class="muted small"
id="mcp-row-sub">the model may call them while it answers</span></span>
<button class="st-toggle" id="s-mcp" role="switch" aria-checked="true" aria-label="Use tools from MCP servers"></button></div>
<div class="toggle-row" id="esp-row" hidden><span>Experimental speed projection<br><span class="muted small">the
engine's control vector; off = the stock model. Switching reads the chat again once</span></span>
<button class="st-toggle" id="s-esp" role="switch" aria-checked="true" aria-label="Experimental speed projection"></button></div>
<div class="toggle-row"><span>Use for other apps too<br><span class="muted small">omp and other API clients get
these settings for anything they don't set themselves</span></span>
<button class="st-toggle" id="s-share" role="switch" aria-checked="false" aria-label="Use for other apps too"></button></div>
<div class="drawer-actions">
<button class="st-btn st-btn--secondary" id="s-reset" type="button">Reset</button>
<button class="st-btn st-btn--primary" id="s-apply" type="button">Apply</button>
</div>
</div>
</aside>
<div class="scrim" id="scrim" hidden></div>
<div class="st-toasts" id="toasts" aria-live="polite"></div>
<script src="web/app.js"></script>
</body>
</html>