A HydraBrain node serves exactly one workload kind today: a llama.cpp chat
completions server on the alias qwen3.8-27b. A 16 GB card turned out to be a
poor host for a 27B model and an excellent GPU, so #1177 took zappy-cactus-6
back from the brain pool by hand to be the Unreal and Blender creator
workstation. That was the right call and it is also the problem: a role change
is currently a one way conversion done by an operator, with no drain, no proof
that the card came back, and no way for the fleet to say which of several jobs a
card is doing right now.
This issue carries a design for that. The full design is in the plan field,
verbatim. Read it there. It was produced by a 13 agent ultracode run: three
surveys of the real code in hydrabrain, hydracluster and hydrabrainserver, three
independent designs with different biases, six adversarial critiques across two
lenses, and one synthesis that had to fix or accept every fatal flaw raised.
A node declares several profiles and selects one with a single active
field, so both profiles' launch inputs and artifacts survive a switch instead of
being deleted. Four roles: chat (R1, what we run today), judge (R2, a small
high fidelity model on its own alias), embedding (R3, embeddings and rerank),
and speech (R4). Vision is not a new kind: a VLM is chat completions with
image parts. R5, giving the card back to a body or a creator workstation, is the
empty selection plus a named grant.
The agent gets an explicit, persisted state machine whose every start and stop is
gated by guards that are measured, not assumed: free VRAM against a persisted
baseline, a refused dial on the loopback port, a verified process kill, and
SHA-256 over every artifact. Only one state is discoverable, and the five legacy
state values on the wire never change, which is what keeps the #1170 class of
silent half-upgrade from happening again.
Removing the hydrabrain role does not stop the workload. store.SetRoles
never touches n.HydraBrain, GET /api/v1/hydrabrain/config then returns 403,
and the agent turns that into fail(), which sets state = "error" and
returns without shutting anything down (controller.go:331-334). So a node
whose brain role is pulled can keep a 12 GiB model resident for ever while
being absent from discovery, which makes it look free. Keeping fail()
non-destructive is correct, because a cluster outage must not take live
inference down. Therefore yield has to be a document change, never a role
change. Checked on zappy today: it is clean, 555 MiB of 16303 used, no
llama-server and no HydraBrain task, so #1177 was done properly. The hazard is
real but it did not bite.
handleEligibleBodies never reads the brain state at all. It filters on
district, online status, the hydrabody role, venue, owner, experience and XR.
So a head can be handed a node whose card holds 15 GiB of weights. The design
puts one shared predicate, brainHoldsGPU, in a single new file and calls it
from both the body eligibility filter and the brain discovery filter, with
absence of a status report meaning held, not free.
One non-chat record would take fleet chat down. hydrabrainserver
internal/brain/client.go:267-270 returns an error on the first record
whose protocol is not openai-chat-completions, which surfaces as a 502. So
the consumer fix has to ship before any non-chat profile exists anywhere in
the fleet. That ordering is step 4 of 10 in the migration table.
nvidia-smi --query-compute-apps on zappy enumerates processes but reports[N/A] for used_memory. So the per-process memory guard cannot work on these833-local-experiences and itsmain is 30 commits behind origin/main (d225ba7, tag v2.4.1). Anyorigin/main in a private worktree,Ten yes or no questions at the end of the plan. The ones that change the shape of
the work: whether a drain may cancel in flight requests when the grace expires,
whether 3 to 6 minutes is an acceptable role switch, whether about 25 to 30 GB of
extra disk per node to keep two profiles resident is acceptable, and whether a 13
state machine is acceptable in a supervisor that today has four string literals.
Nothing has been built. No code changed in any repo.
The design was complete but the one thing that matters most on this hardware was
spread over six lines in five sections, so it could be derived and not read. It
is now section 2, "What a 16 GB card can and cannot do", immediately after
the summary, with every later section renumbered and all cross references
re-checked.
It states the envelope once: 16303 MiB total, about 15.9 GiB usable, and the
budget that predicts it to within 20 MiB, which is model bytes plus about 2.3
GiB of KV per 32K slot plus about 0.6 GiB of compute buffers.
Can hold, one at a time: the Gemma 4 12B Q6_K front door with its projector,
with real headroom. The Qwen3 8B Q8_0 judge at 32K with thinking on, near 14
GiB, tight. Qwen3.8-27B at Q3_K_XL, 15121 MiB measured, about 1.1 GiB spare.
Embeddings or a reranker, which fit trivially and do not justify the card.
Cannot do: two 32K slots, because the card holds one and two requests
serialise at 9.3 s and about 53.7 tok/s aggregate. Qwen3.8-27B above Q3_K_XL,
because Q4_K_M is 15.33 GiB of weights alone with no KV budget left.
Qwen3-Omni-30B-A3B, at about 17.5 GiB. Qwen3 14B Q6_K with 32K, which fits only
at 16K. Both roles at once, which is the entire reason a selector exists.
64K context on anything. A brain and a body sharing the card.
It also records the two consequences that already bit us: a 16 GB card is
capacity and not quality, because Q3_K_XL at a labelled 56 tok/s sorted above
chunky's Q4_K_M at 33 and gave every consumer 3-bit, code work included, which
is why discovery gains a role filter rather than a shaded number. And thinking
is a front door setting, not a card setting: the fleet wide
--reasoning-budget 0 exists so an open-ended request cannot spend its budget
thinking and return an empty message, while a judge must run with thinking on.
Separately, hydrabrain README and runbook are corrected and pushed (7181bd6):
the pool is two providers, cosmic and chunky, and the #1172 section is retitled
as retired with its measurements and quant ladder kept.
Plan replaced: two roles, not thirteen states
Owner review on 2026-11-17 rejected the shape of the 13 state machine filed here
on 2026-11-15, on the rule that a role must justify the machine it occupies.
The plan field now holds the replacement. The old design is superseded in full,
not amended.
What the review removed
image_urlparts and an audio model is chat completions with audio parts.Same route, same protocol, same consumer code. They merge into one workload
with general chat, which the owner named the front door.
1.2 GiB each belong in the headroom of a card that is already working.
Measured 2026-11-17: cosmic 4.5 GiB free, chunky 4.3 GiB free.
llama-server-impl.dllin the pinned build alreadycarries
image_url,audioandaudio/transcriptions, andmtmd.dllcarries the audio path. The whisper.cpp build for sm120, the hardest item in
the old plan, is not needed.
The two states need no new states
A node mid switch is
starting, so it is already invisible to everyconsumer with no new code. A switch is
ready(front-door)tostartingtoready(judge), and both transitions fire today. Nodraining, noreleasing,no
blocked, norecovering. The two states are the two roles, and a role is afield on a profile, not a position in a lifecycle.
One piece of genuinely new mechanics survives: prove the card came back
between stop and start. On Windows a forced tree kill returns before the driver
frees VRAM. The guard must read total free VRAM against a persisted
baseline, because
nvidia-smi --query-compute-appsreports[N/A]forused_memoryon these nodes, verified twice.The model
Front door: Gemma 4 12B instruction tuned at Q6_K, plus its F16 mmproj. It
is the largest Gemma 4 that hears: Google's llama.cpp documentation puts audio
on E2B, E4B and 12B, while the 26B-A4B and 31B have no audio encoder. Q6_K is
about 9.1 to 10.2 GB and the projector about 120 to 175 MB, so it fits a 16 GB
card with real headroom. It is two artifacts, both pinned by URL, exact byte
size and SHA-256.
The risk is the runtime, not the model. Gemma 4 multimodal loading landed in
llama.cpp PR #24118 on 2026-06-04, after an
unknown projector type: gemma4uvfailure on older builds. Our pinned runtime is
0.6.0-dev (build 11624, commit af0579c78)CUDA 13.4, the only sm120 build wehave tested, and I could not establish whether it postdates that merge. The
exec channel times out on a binary scan of
llama.dll, and published buildnumbers are not mapped to dates. Settle it by trying to load the projector on
crispy before committing, which costs a download and nothing else.
Rejected: Qwen3-Omni-30B-A3B (officially supported and a fast 3B active MoE,
but it lands near 17.5 GiB at 32K and guidance says 20 GB or more, so it is the
right candidate for cosmic's 32 GB card, not for a 16 GB one);
LFM3-Omni-2B (needs b11960 / v0.8.0, ours is b11624); Qwen2.5-Omni 7B
(fits, older, keep as the fallback); MiniCPM-o 4.5 (fork only).
Judge: Qwen3 8B at Q8_0, 32K, thinking ON. About 14 GiB of 15.9. A judge
needs to hold what it is judging more than it needs parameters, and Q8 removes
the quantisation argument in a model whose only job is fidelity. Qwen3 14B at
Q6_K fits only at 16K, which is the wrong trade. Check against TypeSafe System
One before committing a card, since a judgment plane already exists in this org.
Owner rulings, all yes
Three bugs that survive, independent of the design
hydrabrainrole does not stop the workload.store.SetRolesnever touchesn.HydraBrain, the config endpoint thenreturns 403, and the agent's
fail()setserrorand returns withoutshutting anything down (
controller.go:331-334). The node leaves discoverywhile still holding the card. Yield must be
active: "", never a role change.handleEligibleBodiesnever reads brain state, so a head can be sent toa node whose card holds 15 GiB. One shared
brainHoldsGPUpredicate, where amissing status report means held.
hydrabrainservererrors on the first record it cannot serve(
internal/brain/client.go:267-270), surfacing as a 502 for all fleet chat.Not a blocker here, because both roles speak
openai-chat-completions. Itbecomes one the moment an embeddings record exists.
Still open
(RTX 4080 SUPER, body plus voice) are the 16 GB candidates.
hydravoice, already running on cosmic and boom-pickle, has atranscription path we should plug into rather than opening a second one.
PATCH it, since PATCH replaces fields.