mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #581] [CLOSED] serve: the Monitor's per-GPU cards, each card's free VRAM, and the vi… #2705
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2705
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/581
Author: @gopinath87607
Created: 10/3/2026
Status: ❌ Closed
Base:
main← Head:monitor-gpu-cards📝 Commits (10+)
fa16567setup: an earlier config that does not parse is skipped, not a crash; configs are written atomically (#459)749d957setup (--backend hip): a system ROCm without the HIP development files falls back to the wheels (#446)5a30024calibrate: the engine's arguments come from the server's engine_args; a failed tuning says why (#447)9f60d13serve, setup: name the small split card that caps the prompt chunk; setup recommends the big card alone (#448)eb8da1d/metrics: each request's speculative draft counts, and their sums in the totals (#457)6a09387setup (--gguf-dir): GGUFs Strata cannot run are named as such, with the --family/--model to use (#444)d6a91e2docs: the Coder is weaker outside code, Chinese/CJK text included; the unpruned sizes for that (#438)d8d4ad3Merge branch 'f-135-eng' into rel-0.1.357b600d5Merge branch 'f-135-small' into rel-0.1.35d9ab843Engine 0.1.35: Windows AMD uses its bundled HIP runtime (#468 #461), the low-RAM resident mode on Windows 32 GB PCs (#467), fixes #460 #459 #446 #447 #457 #448 #444; setup requires it📊 Changes
7 files changed (+377 additions, -28 deletions)
View changed files
📝
serve/server.py(+63 -17)📝
serve/telemetry.py(+10 -3)📝
serve/test_server.py(+138 -2)📝
serve/web/app.css(+9 -0)📝
serve/web/app.js(+88 -5)📝
serve/web/index.html(+4 -0)📝
src/program/generate.cpp(+65 -1)📄 Description
What this is
The split is invisible in the UI: the metric cards show pooled totals, so a four-GPU run reads the
same as one card holding 27 GiB. Each GPU now gets its own card, built from what the engine alone
knows — its layer range, its KV and prompt buffers, its expert cache — paired with that card's VRAM
from NVML.
The engine side
The engine reports its own allocation as seven parallel CSV fields on the
INFOline:They are single comma-separated tokens because the server's
INFOparser splits on whitespace. Aremote-expert GPU runs no stage, so its layer span is
-; the MTP head is reported on the one cardengine: it knows only its own allocations, and NVML already reports used/free/total.
Every device the engine uses gets exactly one card, and the cards' expert counts and bytes sum to the
expert_slots/expert_cache_mibtotals above them — they are built from the same accessors. Ahelper device is never also a stage device:
remote_devskips the split's own cards and device 0.The server side
NVML's
mem_freewas being read and thrown away, so telemetry now keeps it, and each card's name isasked for once rather than once a second.
The vision footprint
The image encoder is a separate process that reports no memory of its own — not to stdout, not to
the log — so its footprint is measured as what that card's free VRAM lost while it started.
strata-visionruns a 2048px warm-up before printingREADY, so every buffer it will ever need isallocated by the time the reading is taken; a delta outside 64–8192 MiB is noise rather than this
process and is discarded, keeping the last good number.
The encoder is also pinned to the card the config names (
vision.cuda_device, else the engine'sfirst), which is the card the Monitor has to show it on.
Folded in: two fixes found on the way
free_vram_mibis one helper taking an index rather than two copies of the same NVML call.A third fix that rode in the same commit on the old branch — an image source that 404s, refuses the
connection or names an unknown host answering with no reply at all instead of a 400 — is not here:
that is an image-API change, not a Monitor one, so it lives on
serve-tool-result-images.Testing
serve's 127 tests pass onv0.1.38(python3 -m unittest serve.test_server). The new ones are theserver half: the seven CSV fields surviving the
INFOparser as single tokens, a"-,835,-,-"draftlist staying strings, the
visionblock on/metrics, and the vision footprint's noise rejection (animplausible delta, a bad restart, no encoder, a stopped encoder). The card rendering is
app.js,which this repo does not test.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.