(very WIP!) Fast LLM inference in Rust & CUDA doll.tngl.io/firecrest

config: one GPU setting per model (gpus), remove placement.devices and gpu #7

Open do.llth.ing
Open opened by do.llth.ing

Written by Claude Opus 5.5.

Problem #

Three settings name a model's GPUs, and nothing ties them together:

Setting Where What it does
gpus [[model]] (server) Only the model switcher's claim (registry.rs, make_room). Two models whose claims overlap are never hot at once. Empty means no claim, and the model is never switched out.
placement.devices [model.options.placement] (dsv41) The tensor-parallel ranks, default [0, 1]. It is the only key in placement.
gpu [model.options] (smollm3, qwen3.6) The CUDA device index, default 0.

A model can run on GPUs it doesn't claim. With gpus empty, or different from what the engine uses, the server lets another model become hot on the same device. Only SmolLM3 warns about an empty gpus. DeepSeek and Qwen3.6 don't. The DeepSeek example in docs/operations.md sets both gpus = [0, 1] and placement.devices = [0, 1] without saying they're separate.

Proposal #

The model block's gpus becomes the only device setting. Breaking changes are fine, so the old keys are removed outright, with no deprecation period.

  • Every factory already receives cfg.gpus, and engines place themselves from it:
    • dsv41: ranks in the order of gpus;
    • smollm3 and qwen3.6: gpus[0], and more than one entry is an error until they run on several GPUs.
  • Remove [model.options.placement] (dsv41) and gpu (smollm3, qwen3.6). With deny_unknown_fields they become errors that point to gpus.
  • A GPU engine (backend = "gpu", device = "gpu") with empty gpus is a config error. device = "auto" with empty gpus means the CPU. This turns the missing-claim warning into an error and makes it consistent across engines.
  • The live placement change (POST /api/models/ID/placement, {"devices": [...]}) may only choose devices within the claim. The switcher keeps reserving the whole claim.
  • firecrest config check reports the new errors.
  • Docs: docs/operations.md ("Model switching" and the DeepSeek example), the server README, each engine's README and example configs, and docs/models.md.

Not in scope #

The engine-side device/backend selection (auto, gpu, cpu) stays as it is, apart from the empty-gpus rule above.

Sign up or Sign in to add to the discussion.