LabHerd  v5.9
=============
Built for local home labs.
Every GPU, RAM and SSD in your lab, herded into one model.
labherd.com
(New name: this app was called Shrinkray up to v5.5. Your settings come along by themselves.)
Giant AI models on everyday rigs: GPUs, RAM and SSD working as one.
(Nothing is made smaller on disk: the model is "shrunk" to fit your PC by
spreading it over your GPUs, RAM and SSD.)
A Windows front end for llama.cpp's llama-server.
Formerly "Honey, I Shrunk the LLMs". Your settings and saved setups
carry over on first start (the old settings folder stays as a backup).

HOW TO USE (the tabs at the top)
  1 Setup     Pick your llama.cpp folder (with llama-server.exe) and press
              Find GPUs. Pick your model (.gguf, any part of a split model).
              RAM, CPU and your drive are read for you.
              "Model files, speed-ups and fixes" checks every part of the model:
                - split models: each part is checked by the part number INSIDE
                  the file; missing or misnamed parts are listed
                - Strata / GSQ-RCO sets (e.g. DeepSeek V4.1 Flash with its shared
                  Engram file): "Fix part names" gives files the names llama.cpp
                  needs with a hard link (no extra space, originals kept)
                - MTP head next to the model (or built in): tick "Use MTP
                  speed-up" for 1.3-2x faster writing, same answers
                - vision file (mmproj) next to the model: tick "Use vision"
                - warns about Strata .pack files and a too-old llama.cpp
  2 Place it  Press Auto place. Then just DRAG:
                - every GPU, your RAM and your drive is a lane
                - drag a slider right = more layers there, left = fewer
                - the drive takes whatever is left
                - the bars and the speed (tokens per second) change as you drag
                - red GPU = too full, will not load.  Amber RAM = extra comes from the drive
                - drag (or click) the grey "Lookup tables" chip between RAM and Drive
              Context and Memory set how much text the model remembers.
              Context goes up to 1M on any model. Past the length the model
              was trained for (the small mark) it turns amber: LabHerd adds
              YaRN rope scaling. More context needs more GPU memory.
  3 Tune      Optional: threads, batch sizes, MTP / draft speed-up, server, API key.
  4 Run       Start. When it says Ready, press Open chat. The bottom bar shows the
              real speed after each answer.
  5 Expert    one model across many rigs - see below (HELPER free, MASTER licensed).

Dark / light mode: the button at the top right.
Simple view / All settings: LabHerd starts in Simple view, showing only what you
need to load and run a model. Press All settings (top right) to see every option.
Fine-tune each layer: on Place it, for full control of every layer.
Save setup / Load setup: keep a setup per model (.shrunk file; old .mammoth files load too).

AMD CARDS (Radeon Pro V620, W6800, RX 6000/7000/9000) - ROCm
  llama.cpp's AMD (ROCm) build needs hipBLAS and rocBLAS from a ROCm install.
  1. Download a ROCm build for your card family YOURSELF - it is not included.
     For Radeon Pro V620 / W6800 / RX 6800-6950 (gfx1030): TheRock for gfx103X.
  2. Unzip it, then on Setup set "ROCm (AMD)" (or press Find ROCm: it looks on
     your Desktop, Documents, Downloads and drives).
  The app adds that folder only for llama.cpp (and the helper server on pooled
  rigs) - nothing is copied into Windows. Setup warns when your rocBLAS has no
  gfx1030 kernels. Saved .bat files set the same folder.
  Radeon Pro V620 on Windows also needs a working AMD driver for the card.

BIGGER THAN YOUR GPUs + RAM?
  It still runs: what does not fit is read from the drive while it answers. Put the
  model on your fastest NVMe. More RAM helps the most.

NEEDS
  Windows 10/11 (.NET Framework 4.5+, built into Windows) and a recent llama.cpp
  build (ROCm, CUDA or Vulkan; option names checked against b12532).
  Radeon Pro V620: a ROCm build with gfx1030 support.

GOOD TO KNOW
  - Download llama.cpp yourself (github.com/ggml-org/llama.cpp releases) - it is
    not included. Every rig needs the same llama.cpp build, with
    ggml-rpc-server.exe in the folder for helpers.
  - The speed shown is an estimate from memory speeds, not a benchmark.
  - Nothing is downloaded or installed. Settings: %APPDATA%\LabHerd (never the API key).
  - Windows may say "Windows protected your PC" (unsigned): More info > Run anyway.
  - Use at your own risk. Not affiliated with llama.cpp / ggml.

CHECK YOUR DOWNLOAD
  SHA256SUMS.txt lists the SHA-256 of every file. In PowerShell:
    Get-FileHash .\LabHerd.exe -Algorithm SHA256

FREE AND LICENSED
  FREE        Everything on one PC: placing models on GPUs / RAM / SSD, auto
              place, MTP, vision, model fixes, response settings, API mode for
              your network (address + API key, OpenAI-compatible), row and
              tensor split, caching, run and chat. HELPER mode is free too:
              any PC can lend its GPUs and RAM to a licensed MASTER.
  LICENSED    A monthly LabHerd license (labherd.com) unlocks the pool
              MASTER: the rig that runs one model across many rigs, sub-agents
              and one API for all rigs (Expert tab - below).
  How: buy a license (License button, top right > Buy a license). You get a
  key like LH-XXXXX-XXXXX-XXXXX-XXXXX on the thank-you page (and by email).
  Press License, paste the key and press Register this PC.
  - The key is tied to the PC it is registered on. Register sends the key and
    an anonymous ID of the PC (a hash) to the LabHerd license server, which
    logs the IP address it came from.
  - LabHerd checks the license at start and every few hours. It must reach the
    license server at least every 30 days; offline in between is fine.
  - Unpaid, cancelled or suspended: the MASTER pauses at the next check.
    Everything else keeps working. Pay and press Check now to carry on.
  - New PC: press Remove license from this PC first, then register on the new
    one. Manage or cancel your payment: License > Manage my payment.
  - Donation unlocks from 5.6 and older no longer apply.

ONE MODEL ACROSS MANY RIGS (Expert tab; MASTER licensed, HELPER free)
  One rig is the MASTER, the others are HELPERS (slaves). Helpers lend their GPUs
  and/or their RAM to the master, so ONE giant model is split over every rig like
  a web: its layers, their KV memory, the experts and the MTP / draft head. Only
  the master runs the model and answers. You control everything from the master
  and can change it at any time.
  1. Install the app on every rig. On the first rig press "New key" and copy the
     same pool key to every rig.
  2. On each helper rig choose "This rig is: HELPER (slave)". Press "Allow in
     firewall" (pool ports open to your home / office network only, never the
     internet). Press it again after every update: Windows treats each new copy
     of the app as a new program.
  3. On the master choose "MASTER", press "Find rigs" (or "Add by IP") and set a
     role for each rig:
       Helper     lends its GPUs and/or RAM: tick "Lend GPUs" / "Lend RAM" and press
                  "Connect / apply". Every lent GPU and each helper's RAM becomes a
                  lane on Place it. Helper lanes hold WHOLE layers (core + KV memory
                  + experts together) - that is how llama.cpp sends work to another
                  rig, and it keeps the network traffic small.
       Sub-agent  runs its own model. Send it requests on "Ask a rig", or serve ONE
                  API for all sub-agents (port 8090, OpenAI-style, pick a rig with
                  "model": "rig:<name>").
  4. Choose what goes where on Place it. "Helper rigs" sets how Auto place uses
     the helpers:
       If needed  only what does not fit on the master's GPUs (fastest: the
                  network costs a little time on every word)
       Spread     whole layers on every GPU in the pool, by how much room each has
       Fill       fill the helpers' GPUs first, keep the master's GPUs free
     Or drag any lane yourself: a lane you drag up takes layers from the drive,
     then RAM, then the fullest other lane - so a helper can take layers straight
     from your own GPUs. "Where it all goes" lists every GPU, helper and drive with
     exactly what it holds (layers, KV memory, experts, output, MTP / draft,
     lookup tables), and copies it as text.
  5. Tune > "Where each part of the model runs": pick a place for each part -
     KV memory (with each layer, or this rig's RAM), the output layer, the MTP head
     / draft model and the vision projector - on this rig or any helper device.
     Helpers do NOT need the model file: the master sends each helper its part when
     the model loads ("Helpers keep a copy" keeps it for next time). Only sub-agent
     rigs need their own copy of a model.
  POOL STEPS (top of the Expert tab) always shows your next step - its button does
  it for you - on the master and on every helper. The Key ID there must be the
  same on every rig (same Key ID = same pool key, without showing the key).
  Change it any time: tick other devices and press "Connect / apply" again, set a
  role to "Not used" (that helper is released and its lanes leave Place it), or
  "Remove selected" (also Delete key or right-click) to take a rig off the list.
  If a helper lends but the master cannot reach it, the steps tell you why:
  - The master now waits until the helper's server really listens (GPU drivers
    can take 5-20 s to start), then tests the port from the master itself.
  - If the helper's chosen network card cannot be reached, it switches to the
    address the pool already reaches.
  - Port blocked: press "Allow in firewall" on that helper. It now works whether
    Windows calls your network Private or Public (private addresses only), and removes
    the BLOCK rule Windows makes when its firewall pop-up for ggml-rpc-server.exe
    is closed.
  - Port open but llama.cpp still cannot use it: use the same llama.cpp build on
    every rig. llama.cpp's own words are shown.
  Everything the pool does is also written to activity.log (in
  %APPDATA%\LabHerd) - handy to send when asking for help.
  A helper obeys only the master that claimed it, and remembers it after a restart.
  "Release from master" on the helper frees it.
  "Verify models (SHA-256)" checks that every rig has exactly the same model files.

WHEN IS IT READY?                                                       NEW in 5.5
  - Top right of every page: Starting / Loading 63% - not ready yet /
    Warming up / READY / Stopped. Click it to jump to Run.
  - When the model answers, Run shows a green READY bar with both addresses:
      chat: http://<host>:<port>
      API:  http://<host>:<port>/v1   (OpenAI-compatible base URL)
    plus "Open chat", "Copy API address" and "Copy API key" buttons.
  - The window title starts with READY, and the taskbar button flashes if
    LabHerd is behind other windows. Before READY, chat and API do not answer.

LEAVE ON THE DRIVE                                                      NEW in 5.5
  - Tune > "Leave on the drive": keep at least this many GB of the model on
    the drive, read only when needed. 0 = only what does not fit (default).
  - Experts in RAM move first, then whole layers in RAM, then experts on this
    rig's GPUs. Helpers' parts never move. Frees RAM; each word gets slower
    the more stays on the drive, so use a fast NVMe.

MASTER AND HELPERS IN STEP                                                  in 5.4
  - Every change on the master (Auto place, sliders, Tune, start / stop) is
    sent to its helpers within a few seconds.
  - A helper shows a banner on every page, and on Place it, Tune and Run it
    shows what the master gave it: the model, its part (which layers on which
    GPU, experts in its RAM), whether it has its own copy, and what the master
    is doing (loading 45%, running at 27 tokens/s, stopped). A helper's own
    settings are not used - the master sets them.
  - Rigs list on the master: new "Model copy" column. A helper with the model
    in its Model library loads only its own part from it. Without a copy its
    part goes over the network, and the master warns before the load with the
    size and the time it takes.
  - Tune > "Reset Tune to defaults" (your API key is kept).

FIXED in 5.3.1
  - Newer llama.cpp keeps only the LAST "-ot" when it is given more than once,
    so some placement rules were ignored. Every rule now goes in one -ot.
  - Options your llama.cpp does not know (it reads llama-server --help) are
    left out instead of stopping the model, and Activity says which ones.
  - When llama.cpp refuses an option, the model is not restarted again and
    again: the status line says which option and what to do.

MORE EXPERT CONTROLS                                                    NEW in 5.3
  Tune, first card:
  - Expert parts: each layer's experts have a down part (about 1/3) and gate +
    up parts (about 2/3). Move them together (as before), or keep the down part
    - or gate + up - on the core's GPU and move only the rest to RAM / the
    drive. Good when a GPU has some room left but not enough for whole experts.
    (The expert shelf only caches layers whose experts sit whole in RAM.)
  - On helper rigs: "cores on a helper GPU, experts in its RAM". A helper's
    GPU then holds several times more layers; their experts are read from that
    helper's own RAM. No data crosses the network for it.
  Place it > Fine-tune each layer: per layer, where its core goes, where its
  experts go (now also the same helper's RAM) and its expert parts.

NETWORK OPTIMIZER                                                       NEW in 5.2
  On by default (Expert > Speed and stability). It looks at the model you
  load and at the plan, and keeps off the network what does not need to cross:
  - Per word: only one word's hidden state crosses at each hop (embedding size
    x 4 bytes - about 28 KB for DeepSeek). Each helper holds one solid block of
    whole layers, so there are as few hops as possible. Place it shows the KB
    per word.
  - KV memory stays with its layer (in this rig's RAM, the helpers' layers
    would pull it over the network every word).
  - The output layer goes where it costs least: on a helper it sends every
    word's scores back (vocabulary x 4 bytes), so it moves to this rig when
    reading it here is quicker.
  - MTP / draft and vision on a helper are flagged.
  - Loading: a helper with its own copy of the model (its drive or the NAS,
    set as its Model library) reads ONLY the tensors of its own layers into
    llama.cpp's helper cache first. llama.cpp then sends a short hash for each
    big tensor instead of the data. The second time it is instant. A helper
    without a copy gets its part over the network once and keeps it.
    Needs "Helpers keep a copy" on, and every rig on 5.2.

BIG MoE MODELS ON A POOL OF RIGS                                        NEW in 5.1
  Built for the biggest MoE models (DeepSeek V4-Pro and friends) on a pool of
  older and newer PCs, where every rig added or upgraded makes it faster.
  - Expert shelf (Tune, first card): llama.cpp (October 2026 or newer) keeps
    the experts used most on the GPU, for experts that sit in RAM or on the
    drive. "Automatic" sizes it from the room left on this rig's GPUs. The card
    shows its size and an estimate of how many expert reads it catches; Run
    shows what llama.cpp really made.
  - Experts per word: Full / Balanced / Faster / Fastest. Fewer experts = less
    to read per word = faster, with some quality cost. "Measure quality" runs
    llama-perplexity on a short text, full vs fewer experts, and says it in
    plain words (about the same / slightly / noticeably / much worse).
  - Warm-up: after loading, a short practice answer fills the shelf before
    your first question.
  - Safety checks before Start: free RAM, the Windows page file, and a model
    that is read for every word from a network share or a slow drive.
  - Place it > Helper rigs > "Fastest": every layer goes to the fastest place
    in the whole pool - GPUs first, then the fastest RAM (this rig's or a
    helper's), the drive last.
  - Expert > rigs list > "Adds to speed / its job": what each helper adds in
    words per second and which layers it holds, worked out by planning with and
    without it. Helpers on Wi-Fi are marked: they work, but load slowly and add
    a few milliseconds per word - a cable is better.
  - Self-healing pool ("Keep the pool running", on by default): a helper that
    stops answering is taken out of the plan and the model restarts on the rigs
    that are left; when it is back it rejoins by itself. If the model itself
    stops, the helpers are checked first, then it restarts.
  Expect honest numbers: a model bigger than all the pool's GPUs + RAM still
  reads parts from a drive for every word and runs slowly. Each rig you add
  moves more of it into fast memory.
  Windows sees LabHerd.exe as a new program: press "Allow in firewall" on
  every helper once, and put 5.1 on every rig.

HELPERS LEND BUT "LLAMA.CPP HERE COULD NOT USE THEM"                    FIXED in 4.6
  llama.cpp reads its options strictly in order, and the app put "--rpc" (the
  helpers) after "--list-devices" and "--device". So llama.cpp listed only this
  rig's own GPUs and never saw the helpers. 4.6 puts "--rpc" first. It also
  names a helper's memory the way llama.cpp's -ot expects (RPC0[ip:port]), so
  "Output layer on a helper" works too.
  The rigs list now shows each rig's llama.cpp build, and warns when it differs
  from this rig's. Different builds can speak different helper (RPC) versions:
  use the same llama.cpp build on every rig. When llama.cpp still refuses a
  helper, the message says why in plain words (different version, a build
  without helper support, or the server could not be reached).

"NO ANSWER" WHEN CONNECTING                                             NEW in 4.5
  "No answer" means the master could not even open the rig's pool port (47900).
  - Fixed in 4.5: on rigs with two network cards the pool port only listened on
    the card picked under "Requests use", while finding rigs answered on every
    card - so a rig could be found on one address and then not answer there.
    It now listens on every card (the pool key still decides who gets in).
  - If a rig's address changed (DHCP), the master finds it again by name and
    keeps the new address.
  - Right-click a rig > "Test connection" (or the Test button) checks the pool
    port, the search and the app itself, and says in plain words what to fix.
  - Windows Firewall: each new copy / version of the app is a new program to
    Windows. Press "Allow in firewall" on every rig after updating. The app now
    spots the hidden BLOCK rule Windows makes when its pop-up is closed, and
    Pool steps tells you.
  Install 4.5 on EVERY rig - a helper still on 4.4 keeps the old problem.

THE MAP (Place it and Run)                                             NEW in 4.4
  One picture of how the model is spread:
  - A strip with every layer, coloured by where it runs (top: the layer core and
    its KV memory, bottom: its experts). Colours match the lanes.
  - The path every word takes: this rig -> dashed arrows over the network to each
    helper -> back to this rig, with every GPU / RAM, its layers and how full it is.
  - While loading, each helper shows how much it has received and how fast.
  - After loading it shows what llama.cpp itself says it put on each device
    (also in "Where it all goes", next to the plan).
  "Hide map" on Place it gives the lanes more room.

LIVE LINE (Run)                                                        NEW in 4.4
  Disk read speed, speed to the helpers and how much they have, and how long since
  llama.cpp last said something. Loading a big model over the network can take
  minutes: as long as these numbers move, it is working. If nothing moves for 40
  seconds the bar turns amber and says where to look.

SPEED LIMIT TO HELPERS (Expert > Speed and stability)                  NEW in 4.4
  A slider from "no limit" down to 100 Mb/s. Lower it if your network or switch
  chokes while a model loads, or other things on the network need room. Only the
  layers sent to helpers are slowed (Windows' own QoS on the helper port), never
  the answers. Windows asks for administrator permission once; the limit lasts
  until Windows restarts. "no limit" removes it.

LOAD BAR
  While the model loads, a bar on the Run page (and at the bottom of every page)
  shows the percent, the time left and the time so far - read from llama.cpp's own
  loading progress, including the layers sent to helper rigs. Finding rigs,
  connecting helpers and the SHA-256 check show a bar too.

SPEED AND STABILITY (Expert tab, each one on or off)
  - Helpers keep a copy of their part on their own drive: the next load is much
    faster (llama.cpp RPC cache).
  - Watch helpers every 10 seconds: a helper whose server stopped is reconnected;
    one that went offline is shown in red until it is back.
  - Restart the model by itself if it stops (3 tries), or after a helper reconnects
    or leaves.
  - Prompt cache in RAM (size in MiB) and reuse of the matching start of a chat:
    faster follow-up answers.

NETWORK ADVICE FOR POOLING
  - Use 10 GbE network cards or faster. 1 GbE is fine for sub-agents (only text
    travels) but slow for helpers, which pass data for every word. Rough guide:
    about 1.2 ms per network hop per word on 10 GbE, 3-4 ms on 1 GbE.
  - Fewer, bigger hops are faster: one solid block of layers per helper.
  - Best: TWO network cards per rig - one for requests and answers, one for model
    files and helper (tensor) traffic. Pick them in the Expert tab.
  - Even better for models: keep them on a NAS or Samba share (\\server\models)
    that every rig reads from over a fast link. Set it as the model library.

SECURITY
  - Every message between rigs is encrypted (AES-256) and signed (HMAC-SHA-256)
    with your pool key. Rigs without the key cannot read requests or control
    anything; old or replayed messages are refused.
  - Each rig shows its app's SHA-256 and warns when another rig runs a different
    build. Compare it with SHA256SUMS.txt from the download.
  - "Verify models" compares the SHA-256 of model files across rigs.
  - The pool key is stored encrypted for your Windows user (DPAPI).
  - Helpers use llama.cpp's RPC server (ggml-rpc-server.exe, part of llama.cpp),
    which is NOT encrypted (llama.cpp says so itself). A helper only starts it when
    the master that claimed it asks with the pool key, lends only the devices you
    ticked, binds it to the network card you chose, and stops it on Disconnect.
    Keep pooling on your own network; never forward these ports to the internet.
  - Ports: 47900 (pool, TCP), 47901 (finding rigs, UDP), 50052 (helper, TCP),
    8090 (pool API, TCP).

  The license check uses HTTPS and a token signed by the license server: it
  sends only the key, the PC's anonymous ID, its name and the LabHerd version.

(c) 2026 LabHerd - labherd.com. All rights reserved. See LICENSE.txt.
