Repository navigation
Measured: Qwen4-35B-A3B Q8_0 on one RDNA4 + two GCN5 cards — 36.7 t/s, and the 20B embedding table it cannot fit #33740
Replies: 2 comments
|
Correction to my own post, found after publishing it — the reason that table stays on host is not what I first said. I claimed 1. That table is iq4_nl, not Q8_0The 20B per-layer embedding table is stored at ~4.3 bits per weight inside a file named Q8_0. Most tensors in the model are Q8_0; this one is not. ggml-org quantised it harder so the whole model lands at 49 GB instead of roughly 70. So "Q8_0" describes the transformer and not the table, and anyone treating this as a uniform 8-bit model is wrong about 22% of its weight — including me, for about an hour. The Vulkan backend cannot hold 2. There is a
|
|
Second correction, and this one removes the explanation entirely. I was wrong twice; here is what is actually true. A maintainer answered this exact question on #32858, and I had not found it before publishing either version:
So the debug line I built two explanations on is not an error at all. And the placement is deliberate, not a limitation. The per-layer table is on the host because only one row per token is needed, so the lookup happens there and one row is copied to the device. Keeping 11 GB of lookup table out of VRAM is the design doing its job. That means:
What actually stands, and the only part worth keeping:
Thank you to 0cc4m for the correction in #32858. Two wrong explanations in one thread is a poor showing; the measured numbers are the part I would still stand behind, and the mechanism should have been read from the code or the maintainer rather than inferred from a debug string. |
Uh oh!
There was an error while loading. Please reload this page.
Measured on real hardware, posted in case it saves someone else a 49 GB download.
Hardware: one RDNA4 card and two GCN5 cards, no NVLink, no shared memory, three
different ISA generations,
llama.cppVulkan backend (RADV), Linux.GGML_VK_VISIBLE_DEVICES=0,1,2, modelggml-org/Qwen4-35B-A3B-GGUF:Q8_0, loaderllama.cpp b12929-7a7142b20.Result
49 t/s prompt, 36.7 t/s generation, 8-bit (Q8_0), nothing resident on the CPU.
That is 48.99 GB of model across 36.3 GB of card memory and 10.7 GiB of host memory.
★ The interesting part: this model is 55.5B parameters, not 35B
The transformer is the 35B you expect. On top of it sits a 20-billion-parameter
per-layer token embedding table,
per_layer_token_embd.weight, and it is the singlelargest tensor in the file at 10,986 MiB — 22% of the model.
llama.cpploads it withlazy read enabled: memory-mapped from disk and gatheredrow by row. That is why a 49 GB model runs on 36 GB of VRAM without spilling into RAM —
and it is also why it is not truly "all on the GPUs".
You cannot move it onto a card, and I verified that rather than assuming
--override-tensorworks on the ordinary embedding table:Applied to the per-layer table, the override is accepted and ignored — the loader
still reports
CPU_Mapped model buffer size = 10986.57 MiB. At the moment of that testthe cards still had 10,573 MiB free against the table's 10,986 MiB, so it is 413 MiB
short of fitting anyway. Two independent reasons it stays on host.
Consequence: no flag closes this. Only more VRAM does, and roughly 11 GB of it.
What runs and what it costs
Measured on this exact hardware:
keeps this usable on three cards of wildly different capability.
mmprojworks. See below.loads exhausted a 30 GB machine and the OOM killer took the desktop. One load is clean
(system RAM stayed at 6.5 GB used throughout).
Vision, measured rather than described
Two tests at
--image-min-tokens 1024,temp 0.1, both exact.1. Rendered label — a serial number, a duration, a volume, a time, a date. All five
fields returned correctly; nothing reported unreadable. Image encoding: 188 ms.
2. Terminal screenshot, small monospace text — nine lines transcribed
character-for-character, and it volunteered the colour coding unprompted (naming which
line was orange and which was red).
3. Grounding — a synthetic four-shape scene at known positions. Answer:
Four for four on colour, shape and quadrant.
Practical note: a multi-item visual answer needs
-n 700or more. My firstgrounding run at
-n 400spent the whole budget inside the thinking block and returnednothing. When it finally printed, its estimate of the image's pixel dimensions was wrong
(1000x750 for an 800x600 picture) while every relative position was right — trust
relations, not its guess at resolution.
Why this config is worth knowing about
The two Vega-class cards are from 2017. They have no ROCm support for this workload at
all — ROCm 10 ships no gfx900 kernels and aborts the process — but Vulkan works, and
llama.cppwill pool cards from three different ISA generations in one process. Thedefault layer split divides the model by each device's free VRAM, so the biggest free
card takes the biggest share and no manual tuning is required to get a working split.
The practical rule for anyone trying this: the model fits when
model_bytes - largest_unmovable_tensor <= sum(free VRAM). Compute that beforedownloading 49 GB. For this model the largest unmovable tensor is 10,986 MiB and it is
per_layer_token_embd.weight.Reproduce
Measured 2026-12-04 on a Ryzen 9 9950X3D, 30 GB RAM, CachyOS, kernel 7.3.x, Mesa 26.x
(RADV). Nothing here is a first-party claim from AMD or Alibaba; it is what the hardware
on this desk did.
All reactions