Skip to content

Capacity levels

A fellow takes what its machine has unless the machine's owner says less. The capacity level says how much: Low, Medium, High or Max, for CPU, memory and GPU. Only the machine's owner sets it, on the machine itself (fellow level, or the buttons in the Mac app). The pool's owner and the leader see it, and no route, MCP tool or swarm command sets it.

Level CPU Memory GPU memory GPU power (NVIDIA, where allowed)
Low 25 %, lowest priority 25 % 40 % 50 %
Medium 50 % 50 % 65 % 70 %
High 75 % 75 % 85 % 90 %
Max all but one core all but a 4 GB reserve all the card's default

These numbers are a first guess and will be tuned by measuring. A fellow nobody set a level on is at Max, which is what every fellow did before levels existed. A join through the Mac app starts at High. Turning a machine off is a separate thing, a checkout (fellow checkout, the app's switch), and it does not change the level.

Setting it

fellow level                 # the level in force, what it stands for, how each cap holds
fellow level medium          # set it; the running fellow takes it without a restart
fellow level --gpu-power allow   # let the level set the NVIDIA cards' power limit
curl -fsSL <leader>/api/v1/bootstrap/fellow.sh | bash -s -- ... --level high   # at the join

The level is kept in fellow.env as SWARM_FELLOW_LEVEL, so restarts and updates keep it. It is also written to the fellow's control directory (level). The running fellow reads it there on every heartbeat, so a change reaches the leader within seconds. fellow level --json and fellow status --json (capacity) give it to programs; the local CLI lists the exit codes.

What the fellow does with it

  • The leader plans with it. Every heartbeat carries the level (hardware.capacity). Each card's free memory is capped there to the level's share of the card, less what the fellow's own work already holds on it. Training and serving placement therefore keep to the level without knowing about levels. Plans that leave a card out, or find it too small, say that it is the level.
  • GPU memory. Each torch worker caps its allocator to the share (set_per_process_memory_fraction, on CUDA and on Apple's MPS). Its own free-memory checks (the serving KV budget, spreading layers over cards) count only that share.
  • CPU. Workers run with the level's thread count (OMP_NUM_THREADS, torch's own pools), and at Low with the lowest scheduling priority.
  • Memory. The serving host cache stays within a quarter of the level's memory.
  • A hard line on Linux. Where systemd-run can start a scope with MemoryMax and CPUQuota (a systemd user session, or root), each worker starts inside one, and the system enforces CPU and memory. Elsewhere the fellow keeps to them itself.
  • GPU power (NVIDIA only). This applies only when the owner allowed it (SWARM_FELLOW_GPU_POWER=allow). Each card's power limit goes to the level's share of its default. It needs root, or sudo without a password for nvidia-smi. The default comes back at Max, on fellow checkout and on fellow purge, and the level's limit returns on fellow checkin.

fellow level and the heartbeat say how each cap holds:

  • enforced: the system enforces it.
  • kept: the fellow keeps to it itself.
  • off: no cap (Max).
  • not allowed: GPU power that the owner did not allow.
  • unavailable: there is no way to set it on this machine.

When it is lowered

The leader moves work that no longer fits the new level to another machine. A training stage moves at its next snapshot without losing a step. A served model's stage fails over, or the model is unloaded where it cannot. The move does not count against the node, the same as a checkout. Raising a level needs nothing: the next plan sees the room.

Limits to know

  • On macOS, CPU and memory are only kept. The GPU share is held by torch's allocator, but CPU and memory are limits the fellow keeps to itself: macOS does not enforce them. Apple's GPU share is of Metal's recommended working set, which is itself part of the unified memory.
  • A worker that already runs keeps its memory until its stage ends. A lower level reaches it when its work is placed again.
  • Training stages count against the level with the memory the leader estimated for them (the job's memory_estimate).
  • The numbers per level have not been measured yet: neither a training step nor the served token rate per level.