Repository navigation
Releases
v0.4.1
Added
[service.control] kind = "http": for servers that unload their model through their own
API and keep running. Releasing the lease POSTs tounload_url, the next lease POSTs to
load_url, each with an optional JSON body. Requests outsidegpu_pathskeep passing while
the model is unloaded.- Examples for the AUTOMATIC1111, Forge and SD.Next web UIs (
/sdapi/v1/unload-checkpoint),
LM Studio (/api/v1/models/unload), text-generation-webui (/v1/internal/model/unload) and
KoboldCpp (systemd stop and start). examples/compose/: Ollama, Open WebUI and ComfyUI in Docker Compose, with gpuq on the
host gating Ollama and starting and stopping the ComfyUI container.install.sh: downloads the release binary for x86_64 or aarch64, checks it against
SHA256SUMSand installs it to~/.local/binor, with--system,/usr/local/bin.- README: the out-of-memory errors gpuq prevents and who it is for.
Changed
- README and docs: diagrams in
docs/diagrams/, each in a light and a dark variant, show the
problem, what happens to a request, two GPUs and the HTTP gate. They replace
docs/demo.gif,docs/overview.svganddocs/architecture.svg; the demo recording
scripts indocs/demo/are removed. - Examples use current model names (
qwen3.8).
v0.4.0
Added
[desktop]: free the VRAM the graphical desktop holds on a card.policy = "stop"stops the
configured user units and display manager while an LLM model frommodelsis loaded, less
thanmin_free_mibis free, or a job does not fit, and starts the display manager again
restore_delay_safter the last reason.policy = "offload"restarts the desktop pointed at
another card instead ([desktop.offload]), checks that it left the card, and uses
fallbackwhen it cannot. Off by default. Never acts while a user is logged in at the seat.- The processes holding a card are found through
/proc/*/fdand DRM fdinfo by PCI address,
with their resident VRAM; processes inignore, such as a headless compositor, never count
as the desktop. Nothing is killed: only the configured units are stopped and started. - Each change is checked: units down or up, the desktop's processes gone, VRAM before and
after; a release that does not complete is rolled back. After each change the system and
user journals are read for new errors, failed units and core dumps. - After a stop,
session_envis set in the user manager and the D-Bus activation environment,
so D-Bus activated services do not start against the display that is gone. gpuq desktop [status|release|restore],GET /desktop,POST /desktop/releaseand
POST /desktop/restore;gpuq statusandGET /statusshow the desktop state.- Optional
wake_on_input: a key press at the seat restores the desktop. [llm.class_tuning.<class>] hold_other_models_s: while that class uses the LLM, and that
long after its last request, requests of less important classes for another model wait, so a
server with one model at a time does not swap back and forth. Same-model and more important
requests pass.gpuq statusshows aholdingline andGET /statusamodel_holdobject;
the log has one line when a hold starts and one when it ends.
Fixed
- A lease on one AMD or Intel card now also gets
DRI_PRIME=pci-<address>!, so Vulkan and
OpenGL programs see that card and no other.HIP_VISIBLE_DEVICESandROCR_VISIBLE_DEVICES
only steer ROCm: a Vulkan build of whisper.cpp took Vulkan device 0, the integrated GPU,
while gpuq had unloaded the LLM from the card it leased. Leases on several cards get no pin,
since Mesa takes a single device. ADRI_PRIMEset in the card's own env is kept. - An unreachable Immich is logged once, and again when it is back, instead of on every poll.
gpuq check-configno longer shows a gate address whenbackend = "none", where no gate
runs.- A
gpuq runorgpuq holdwhose connection to gpuq breaks says so instead of printing the
bare HTTP error.
Changed
- CI runs on pushes to every branch, not only
main.
v0.3.1
README only, no code changes from 0.3.0.
- A short statement of the problem gpuq solves and an overview diagram at the top of the README.
- systemd setup moved to
packaging/systemd/README.md. - Install with
cargo install gpuq.
See 0.3.0 for the multi-card changes.
v0.3.0
Several cards can now work as one: a job, a service or the LLM server can hold more than one GPU at a time, and gpuq finds every GPU on the machine by itself.
Added
- Leases on several cards at once:
gpuq run --card gpu0,gpu1,--card all, or--cards 2for any two cards with room.--vramapplies to each card. In the lease API:"cards": ["gpu0", "gpu1"],"card": "all"or"card_count": 2.- A multi-card lease is granted all at once or not at all. It holds nothing while it waits, so two leases can never block each other.
- Later leases of its class or below do not overtake it on its cards.
- When something more important needs one of its cards, a yieldable multi-card lease is asked to yield.
- The job gets the env of all its cards in one list, for example
CUDA_VISIBLE_DEVICES=GPU-a,GPU-b, andGPUQ_CARD=gpu0,gpu1. Cards of different vendors can share a lease only when they use different variables. - The LLM server can span several cards.
llm.cardtakes a list, and[llm.models.<id>]gives a model its owncardsor itsvram.- A model too big for the LLM's card gets the fewest extra cards that fit it. For llama-swap models, the size is estimated from their GGUF files.
- A job that needs any of the LLM's cards unloads it from all of them, and the LLM reloads on all of them.
- llama-server started by gpuq gets the cards' env and, with several cards,
LLAMA_ARG_SPLIT_MODEandLLAMA_ARG_TENSOR_SPLIT. - A
[[service]]can name several cards. gpuq statusandGET /statusshow multi-card leases and the LLM's cards.docs/architecture.svg, a diagram of how the parts fit together.
Changed
- With no
[[gpu.card]]and no single device set in[gpu], gpuq detects every AMD and NVIDIA GPU and manages all of them, named gpu0, gpu1, and so on, largest first.- Each card is matched by its PCI address. Jobs are pointed at it by UUID (
CUDA_VISIBLE_DEVICESon NVIDIA,ROCR_VISIBLE_DEVICESon AMD), so device order does not matter. - To leave a card out, add
gpu.exclude = ["0000:15:00.0"]orgpu.skip_integrated = true.gpuq check-configlists every card it found. - If you have a single card, jobs now also get its device id in their environment.
- Each card is matched by its PCI address. Jobs are pointed at it by UUID (
- A job that names no card now goes to any card with room. Use
--card primaryor"card": "primary"to keep the old behaviour. gpu.nvidia_indexhas no default any more: setting it means a single NVIDIA card.allis now a reserved card name.
Docs: how it works, two-card llama.cpp and llama-swap example, configuration.
Full list of changes: CHANGELOG.md
v0.2.0
gpud is now gpuq. Another project is already called gpud, so the binary, crate, repository and paths are renamed. The GitHub repository moved to https://github.com/elektricM/gpuq; the old URL redirects.
Upgrading from gpud 0.1.x
- The binary is
gpuqinstead ofgpud. - Configuration:
/etc/gpuq/config.tomland~/.config/gpuq/config.toml. - systemd:
gpuq.service(system and user units), running as thegpuquser. - Environment:
GPUQ_API,GPUQ_LOG,GPUQ_LEASE_ID,GPUQ_YIELD_FILE,GPUQ_CARD. - Immich: the state file is
gpuq/immich.jsonand the status field ispaused_by_gpuq. Resume any Immich queues paused by gpud before upgrading.
Steps: stop and disable gpud.service, move /etc/gpud to /etc/gpuq, install gpuq, then enable gpuq.service.
Added
- Man pages for
gpuqand each subcommand, and bash, zsh and fish completions. They are in the tarballs,.deband.rpm. gpuq-0.2.0-vendor.tar.xz: the vendored dependencies, for builds without network access.gpuq-0.2.0-vendor-config.tomlis the Cargo configuration that uses them.- Packaging recipes for the AUR, Fedora COPR and openSUSE OBS, Ubuntu PPA and Nix, in
packaging/.
Fixed
- Tests no longer fail at random when a forked child inherits a port-check socket.
- The crate builds with Rust 1.80, as declared in
rust-version.
Full list of changes: CHANGELOG.md
v0.1.1
- Several GPUs in one queue:
--card NAMEpins a job to a card,--card anytakes the first card with room - Immich ML adapter that follows Immich's job queues
- ComfyUI: prompts held while ComfyUI starts now get a UUID and are accepted
gpud run: the child is stopped if thegpud runprocess dies, so it cannot keep the GPU without a leasegpud statusshows local times- Tests no longer race for listener ports
Check the files against SHA256SUMS.
v0.1.0
First release of gpud in Rust.
- Priority queue and arbiter for one GPU: the LLM stays loaded, other jobs wait for a quiet moment, the LLM comes back with its KV slot
- LLM servers: llama-swap, Ollama, llama-server, vLLM, SGLang
- Managed services (ComfyUI, Immich ML, any CUDA/ROCm daemon) through systemd, docker, podman or commands
gpud run,gpud hold,gpud status,gpud check-config- VRAM probes for AMD (sysfs), NVIDIA (nvidia-smi) and any custom command
- Static binaries for x86_64 and aarch64, .deb and .rpm packages
Check the files against SHA256SUMS.