[PR #1060] [CLOSED] Monitor: per-GPU view, more cards, and a layout you can rearrange #3001

Closed
opened 2026-11-04 02:04:48 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1060
Author: @Efs-O
Created: 10/6/2026
Status: ❌ Closed

Base: main ← Head: monitor/cards-gpu-selector


📝 Commits (10+)

  • f4e96d5 tests: gdn_rec_head also compares the PP (variant 4) and two-column (variant 5) recurrence kernels, bitwise
  • 16bc95a prefill: STRATA_HCD_EXACT=1 - the HC down projection by a WMMA kernel with hipBLASLt solution 1176/1177 k order (StaggerU included), bitwise
  • 502fcef #606: the fused SwiGLU q8_1 quantizers keep the block's scale and sum finite too
  • 64d0136 cache: preserve checkpoints when split allocation fails
  • a0d0056 prefill: fused-expert exact wins (table16 via direct selector, float4 moe_combine, LDS alias + occupancy)
  • 5f5452b serve: park_current's try covers the checkpoint split too (#752): a host OOM skips parking
  • 8b19a38 Layer split: --vram-reserve-later-mib, a separate reserve for the later cards
  • ea83d0d Resident RAM mode with a layer split
  • d2d981f setup: the low-RAM mode's resident variant on several GPUs (#642)
  • cd62e5e serve: a split's stage-0 GPU profile line keeps its text (#848); later stages say which stage

📊 Changes

11 files changed (+1613 additions, -79 deletions)

View changed files

📝 docs/DETAILS.md (+23 -1)
➕ serve/forge_stats.py (+86 -0)
📝 serve/server.py (+6 -1)
📝 serve/telemetry.py (+211 -29)
➕ serve/test_forge_stats.py (+171 -0)
➕ serve/test_lhm.py (+158 -0)
📝 serve/test_monitor.py (+101 -0)
📝 serve/test_server.py (+144 -1)
📝 serve/web/app.css (+42 -3)
📝 serve/web/app.js (+646 -38)
📝 serve/web/index.html (+25 -6)

📄 Description

Multi-GPU

  • A GPU selector in the Model state card: All / GPU 0 / GPU 1 … (a dropdown above 6 cards). It switches the GPU load, VRAM, temperature, power and PCIe cards to one card's values and history.
  • NVIDIA cards the engine does not use (a vision-encoder card, for example) are listed and marked "not in use". All keeps the engine-only totals.
  • PCIe shows in/out rates and link gen/width per card.
  • A single-card machine looks as before: no selector.

New cards and table columns

  • Speculation (draft acceptance), Prompt reuse, Prefill time, VRAM free (the tightest card; warns under 1 GiB, danger under 0.5 GiB), all-GPU power, session time.
  • Recent requests gains Prefill and Drafts columns, plus a Clear button that empties the table on this page only (nothing is sent to the server; a refresh brings the rows back).
  • Temperature graphs scale to their own range, so a 25-30 °C swing is visible instead of a flat line.
  • Missing values say "No requests yet" or "Not reported by this engine" instead of a bare dash.

Optional sensors

  • CPU temperature and power from LibreHardwareMonitor's local web server (127.0.0.1:8085 by default, STRATA_LHM_URL to change it, empty to disable). This adds a CPU temp card, the package power under the CPU load (the CPU card, renamed to match "GPU load") and a measured "GPUs + CPU" power card. It reads the first CPU's package sensors by name ("CPU Package" on Intel; "Core (Tctl/Tdie)" and "Package" on AMD), because LHM's sensor numbers differ between CPU models. On Windows without LHM running, the CPU temp card says "Needs LibreHardwareMonitor" and its tooltip explains how to turn on LHM's web server. On other systems the card is hidden.
  • Forge card, off by default. With STRATA_FORGE_URL=http://127.0.0.1:8799 set, it shows the active chat of Forge (a VS Code coding assistant for local models): turns, tool calls and tokens, read from Forge's local, read-only /stats. Disclosure: Forge is my own project and I run it on top of Strata. If you'd rather not have it in Strata, say so and I'll drop it from the PR.

Both are localhost-only. LHM is polled every 2 s and backs off for 30 s after a failure. Forge is never contacted unless STRATA_FORGE_URL is set.

Layout

  • The cards sit in one 4-column grid (2 columns on narrow screens).
  • Drag a card to reorder it: with the mouse, with press-and-hold on touch, or with Alt+←/→ from the keyboard (the new position is announced to screen readers). Dropping outside the cards puts it back.
  • The × on a card hides it.
  • Order and hidden cards are saved in the browser (localStorage). A "Reset layout · 2 icons hidden" link above the cards brings everything back. It only appears when something has changed.

/metrics

Every new field is optional, and single-card and AMD output is unchanged:

  • hardware.gpus[*]: power_limit, pcie_rx_mb, pcie_tx_mb, pcie_gen, pcie_gen_max, pcie_width
  • history.gpus: per-card history
  • hardware.other_gpus and hardware.all_gpu_power
  • hardware.cpu_temp and hardware.cpu_power (LHM)
  • hardware_static.os
  • forge at the top level (null when the card is off)

They are documented in docs/DETAILS.md.

Testing

  • python -m unittest serve.test_monitor serve.test_server serve.test_forge_stats serve.test_lhm on current main: 238 pass. The AMD sensor names are covered by a test fixture; I have no AMD machine to try it on.
  • Checked in Edge at 1600 and 390 px wide, in light and dark: drag with the mouse, emulated touch and the keyboard; hide, reload, reset.
  • Larger machines simulated by rewriting /metrics in the browser: 6 cards (buttons, wrapping to two rows at 390 px), 5 + 1 not in use, and 7 + 1 (dropdown). The per-card lines switch to summaries above 3 cards, with every card in the tooltip.
  • Run on Windows with an i9-9900KF, two RTX 5060 Ti running the model and an RTX 3060 for the vision encoder, with LHM running.
  • Rebased onto current main as one commit.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1060 **Author:** [@Efs-O](https://github.com/Efs-O) **Created:** 10/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `monitor/cards-gpu-selector` --- ### 📝 Commits (10+) - [`f4e96d5`](https://github.com/Niko1221/Strata/commit/f4e96d55b6f13622bae6b3ded2f81ca16cbd78f6) tests: gdn_rec_head also compares the PP (variant 4) and two-column (variant 5) recurrence kernels, bitwise - [`16bc95a`](https://github.com/Niko1221/Strata/commit/16bc95ab3e5293a6dd557ad0ec7e2a5eef23640a) prefill: STRATA_HCD_EXACT=1 - the HC down projection by a WMMA kernel with hipBLASLt solution 1176/1177 k order (StaggerU included), bitwise - [`502fcef`](https://github.com/Niko1221/Strata/commit/502fcef6ff29325427ecfb5409b242ac7bea18e1) #606: the fused SwiGLU q8_1 quantizers keep the block's scale and sum finite too - [`64d0136`](https://github.com/Niko1221/Strata/commit/64d01362bee3aa109fb340d9b4144a62d9192522) cache: preserve checkpoints when split allocation fails - [`a0d0056`](https://github.com/Niko1221/Strata/commit/a0d00560fdb3bd728001cac756e223b12e3a09e9) prefill: fused-expert exact wins (table16 via direct selector, float4 moe_combine, LDS alias + occupancy) - [`5f5452b`](https://github.com/Niko1221/Strata/commit/5f5452bec6fabe7c76b44af2397b29daac95feb4) serve: park_current's try covers the checkpoint split too (#752): a host OOM skips parking - [`8b19a38`](https://github.com/Niko1221/Strata/commit/8b19a38a57a80ee9c2bd03d677d8b55fc961d34b) Layer split: --vram-reserve-later-mib, a separate reserve for the later cards - [`ea83d0d`](https://github.com/Niko1221/Strata/commit/ea83d0dc5ef3fd481c53ee6bd99dd8016e10ce78) Resident RAM mode with a layer split - [`d2d981f`](https://github.com/Niko1221/Strata/commit/d2d981f5b2841cfcefcc88872730785b9d23bd78) setup: the low-RAM mode's resident variant on several GPUs (#642) - [`cd62e5e`](https://github.com/Niko1221/Strata/commit/cd62e5e07f5efa6be42a8ccfbbc82b78f6abfe93) serve: a split's stage-0 GPU profile line keeps its text (#848); later stages say which stage ### 📊 Changes **11 files changed** (+1613 additions, -79 deletions) <details> <summary>View changed files</summary> 📝 `docs/DETAILS.md` (+23 -1) ➕ `serve/forge_stats.py` (+86 -0) 📝 `serve/server.py` (+6 -1) 📝 `serve/telemetry.py` (+211 -29) ➕ `serve/test_forge_stats.py` (+171 -0) ➕ `serve/test_lhm.py` (+158 -0) 📝 `serve/test_monitor.py` (+101 -0) 📝 `serve/test_server.py` (+144 -1) 📝 `serve/web/app.css` (+42 -3) 📝 `serve/web/app.js` (+646 -38) 📝 `serve/web/index.html` (+25 -6) </details> ### 📄 Description ## Multi-GPU - A GPU selector in the Model state card: All / GPU 0 / GPU 1 … (a dropdown above 6 cards). It switches the GPU load, VRAM, temperature, power and PCIe cards to one card's values and history. - NVIDIA cards the engine does not use (a vision-encoder card, for example) are listed and marked "not in use". All keeps the engine-only totals. - PCIe shows in/out rates and link gen/width per card. - A single-card machine looks as before: no selector. ## New cards and table columns - Speculation (draft acceptance), Prompt reuse, Prefill time, VRAM free (the tightest card; warns under 1 GiB, danger under 0.5 GiB), all-GPU power, session time. - Recent requests gains Prefill and Drafts columns, plus a Clear button that empties the table on this page only (nothing is sent to the server; a refresh brings the rows back). - Temperature graphs scale to their own range, so a 25-30 °C swing is visible instead of a flat line. - Missing values say "No requests yet" or "Not reported by this engine" instead of a bare dash. ## Optional sensors - **CPU temperature and power** from LibreHardwareMonitor's local web server (`127.0.0.1:8085` by default, `STRATA_LHM_URL` to change it, empty to disable). This adds a CPU temp card, the package power under the CPU load (the CPU card, renamed to match "GPU load") and a measured "GPUs + CPU" power card. It reads the first CPU's package sensors by name ("CPU Package" on Intel; "Core (Tctl/Tdie)" and "Package" on AMD), because LHM's sensor numbers differ between CPU models. On Windows without LHM running, the CPU temp card says "Needs LibreHardwareMonitor" and its tooltip explains how to turn on LHM's web server. On other systems the card is hidden. - **Forge card, off by default.** With `STRATA_FORGE_URL=http://127.0.0.1:8799` set, it shows the active chat of Forge (a VS Code coding assistant for local models): turns, tool calls and tokens, read from Forge's local, read-only `/stats`. Disclosure: Forge is my own project and I run it on top of Strata. If you'd rather not have it in Strata, say so and I'll drop it from the PR. Both are localhost-only. LHM is polled every 2 s and backs off for 30 s after a failure. Forge is never contacted unless `STRATA_FORGE_URL` is set. ## Layout - The cards sit in one 4-column grid (2 columns on narrow screens). - Drag a card to reorder it: with the mouse, with press-and-hold on touch, or with Alt+←/→ from the keyboard (the new position is announced to screen readers). Dropping outside the cards puts it back. - The × on a card hides it. - Order and hidden cards are saved in the browser (`localStorage`). A "Reset layout · 2 icons hidden" link above the cards brings everything back. It only appears when something has changed. ## /metrics Every new field is optional, and single-card and AMD output is unchanged: - `hardware.gpus[*]`: `power_limit`, `pcie_rx_mb`, `pcie_tx_mb`, `pcie_gen`, `pcie_gen_max`, `pcie_width` - `history.gpus`: per-card history - `hardware.other_gpus` and `hardware.all_gpu_power` - `hardware.cpu_temp` and `hardware.cpu_power` (LHM) - `hardware_static.os` - `forge` at the top level (`null` when the card is off) They are documented in `docs/DETAILS.md`. ## Testing - `python -m unittest serve.test_monitor serve.test_server serve.test_forge_stats serve.test_lhm` on current `main`: 238 pass. The AMD sensor names are covered by a test fixture; I have no AMD machine to try it on. - Checked in Edge at 1600 and 390 px wide, in light and dark: drag with the mouse, emulated touch and the keyboard; hide, reload, reset. - Larger machines simulated by rewriting `/metrics` in the browser: 6 cards (buttons, wrapping to two rows at 390 px), 5 + 1 not in use, and 7 + 1 (dropdown). The per-card lines switch to summaries above 3 cards, with every card in the tooltip. - Run on Windows with an i9-9900KF, two RTX 5060 Ti running the model and an RTX 3060 for the vision encoder, with LHM running. - Rebased onto current `main` as one commit. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:04:48 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3001
No description provided.