Basalt 0.6: driving several cards with gpu-mode

Card settings changed in 0.5.7: three settings, gpu, gpu-mode and gpu-share.

Basalt 0.6 handles several cards through gpu1, gpu-mode and gpu-share; 0.5.7 removed the per-model multi-GPU logic and gpu: auto. Gemma 4's three sizes and ERNIE-5.5-Flash joined, and Qwen3.8-27B reads 64K prompts2 17% faster in peer mode.

Requirements and key details
  • gpu: auto is gone; gpu, gpu-mode and gpu-share replace it.
  • In peer mode the other cards help; in split mode they take divided layers.
  • Gemma 4's three sizes and ERNIE-5.5-Flash joined.

Models that joined in 0.6

Gemma 4's three sizes (26B A4B as MoE3, plus dense 31B and 12B) and ERNIE-5.5-Flash joined the 0.4 Qwen3.8-27B.

On an RTX 5090 at 400 W the 26B A4B runs 438 conversation, 705 struct and 380 prose tok/s with prompts at 21,882; the 31B 165/263/125 and the 12B 259/485/223.

An RTX 3090 in a case, colored blocks moving along a conveyor to shelves, and cards printed with network diagrams on the work surface
The first dense 27B runs across two cards.

Speed on a single card

On an RTX 5090 at 400 W with kv fp164 from cold, prompts run 12,735 tok/s at 4k and 8,751 tok/s at 32k.

Decode5 runs 90 tok/s plain, 262 with the drafter and 776 on structured output, a gap of more than three times by task.

Single RTX 5090 measurements
AspectValue
Prompt 4k12,735 tok/s
Prompt 32k8,751 tok/s
Decode plain90 tok/s
Decode drafted262 tok/s
Structured output776 tok/s

Three settings for cards

Since 0.5.7 three settings cover multiple cards: gpu names them, gpu-mode says what they do together and gpu-share sets the proportions.

gpu takes a number (0), a list (0,1) or all, with the first listed card as the main one. gpu-mode is required once two or more cards are named and is an error with one.

The main card must be Blackwell (sm_120); a second card must be sm_120 too, except an Ada (sm_89) peer card in a build with -DPEER_ADA=ON.

peer and split do different jobs

In peer the main card runs every layer and decodes while the others help: depending on the model they hold and compute MoE experts, read the last layers of long prompts, or both.

split divides layers in order: each card holds its layers' weights and KV cache6, and windows or prompt chunks pass to the next card. tensor is reserved and no model runs it yet.

Qwen3.8-27B reads a 64K prompt at 7,410 tok/s in peer against 6,336 alone, 17% faster; both modes keep one card's tokens7. With --kv nvfp4 both refuse a second card.

A small computer running a search system beside document stacks
The longer the context, the more the second card helps.

Two ways to stretch the context

Beyond 262,144 enable YaRN with the same flags Flash-Next uses; it changes short-prompt output too, so leave it off below that length.

When the cache does not fit, --kv-resident N keeps the first N positions on the card and streams the rest from RAM8: decode slows as positions grow while output stays identical.

Running the 26B A4B on a small card

The Gemma 4 26B A4B can keep experts a card cannot hold in page-locked RAM and let the CPU9 pool compute them, with the shipped gemma4-30x128.prof profile setting the placement.

On an RTX 5060 Ti at 180 W with 24 of each layer's 128 experts in RAM: 144 conversation, 218 struct and 128 prose tok/s, with a 16K prompt at 6,061. Quality differs by 0.0235 against 0.0236 KLD, effectively nothing.

Two metal devices sit on a desk and shelf beside a laptop, with cables connected to a switch box in front
YaRN or kv-resident stretches the context.

Terminology notes

  1. GPU — A processor designed to handle many calculations in parallel. It performs model computations during AI inference.

    Back to the text
  2. Prompt — The input text sent to a model. For generative models it describes the desired result and strongly shapes the output.

    Back to the text
  3. MoE — A model architecture that selects some of several expert subnetworks for each input. Total parameters can differ from the number activated for one token.

    Back to the text
  4. FP16 — A 16-bit floating-point format. It uses the same bit width as BF16 but allocates bits differently between exponent and significand.

    Back to the text
  5. Token decoding — The stage that generates successive output tokens using the input and the response produced so far.

    Back to the text
  6. KV cache — Memory that stores attention keys and values from earlier tokens for reuse during later token generation. Its size depends on context length and batch size.

    Back to the text
  7. Token — A unit into which a model divides input or output for processing.

    Back to the text
  8. System RAM — System memory that temporarily holds data while programs run.

    Back to the text
  9. CPU — The central processor that runs the operating system and general-purpose instructions; in AI workloads it also handles tasks such as preprocessing and data movement.

    Back to the text

Frequently asked questions

What should you check first in this article?
Basalt 0.6 handles several cards through gpu, gpu-mode and gpu-share; 0.5.7 removed the per-model multi-GPU logic and gpu: auto. Gemma 4's three sizes and ERNIE-5.5-Flash joined, and Qwen3.8-27B reads 64K prompts 17% faster in peer mode.