Run frontier MoE models on hardware you already own — pure C, zero deps, experts streamed from disk. Tiny engine, immense model. 🐦
C
qwenimage: the chain by default on the 780M, vec4 attention tiles, docs
JustVuggc445072a7451
diff --git a/c/backend_vulkan.c b/c/backend_vulkan.cindex a9d066ce..a5e1b497 100644--- a/c/backend_vulkan.c+++ b/c/backend_vulkan.c@@ -2204,6 +2204,9 @@ unsigned long long coli_vk_dense_host_dropped_bytes(void) { return __atomic_load* olmoe ON (OLMoE-1B-7B: the chain decoded 17.3 against 12.8 tok/s and prefilled 512* tokens in 5.5 against 6.4 s; the CPU alone decodes 23.1 tok/s, its trunk being f32).* inkling passes COLI_VK_CHAIN_UNMEASURED (no checkpoint of it runs on the box).+ * An engine with no expert tier passes tier_on < 0: `igpu` alone decides on an+ * integrated GPU. qwenimage passes ON (Qwen-Image-2.1 on the 780M: a 512x512 step in+ * 5.4 s against the CPU's 11.6, the per-matrix path's 11.8).* Unset, a CPU device (Lavapipe): off.* Printed as a [VK] line with an engine name (NULL: silent). */int coli_vk_chain_decide(const char *engine, int tier_on, int igpu) {@@ -2221,14 +2224,14 @@ int coli_vk_chain_decide(const char *engine, int tier_on, int igpu) {int measured = igpu != COLI_VK_CHAIN_UNMEASURED;on = tier_on && measured ? igpu : COLI_VK_CHAIN_OFF;snprintf(why, sizeof why, "an integrated GPU%s: %s; COLI_VK_CHAIN=0 off, 1 on, 2 prompts only",- tier_on ? " with the expert tier" : " without the expert tier",+ tier_on < 0 ? "" : tier_on ? " with the expert tier" : " without the expert tier",on == COLI_VK_CHAIN_ON ? "measured faster on decode and prefill": on == COLI_VK_CHAIN_PREFILL ? "measured faster on prefill, slower on decode": tier_on && measured ? "measured slower on decode" : "not measured");} else if (coli_vk_device_shares_ram()) {on = COLI_VK_CHAIN_OFF;snprintf(why, sizeof why, "a CPU device; COLI_VK_CHAIN=1 turns it on");- } else { on = COLI_VK_CHAIN_ON; snprintf(why, sizeof why, "a discrete GPU%s", tier_on ? ", beside the expert tier" : ""); }+ } else { on = COLI_VK_CHAIN_ON; snprintf(why, sizeof why, "a discrete GPU%s", tier_on > 0 ? ", beside the expert tier" : ""); }if (engine) fprintf(stderr, "[VK] %s: dense chain %s (%s)\n", engine,on == COLI_VK_CHAIN_ON ? "on" : on == COLI_VK_CHAIN_PREFILL ? "on for prompts" : "off", why);return on;diff --git a/c/qwenimage.c b/c/qwenimage.cindex e71a694d..141083e0 100644--- a/c/qwenimage.c+++ b/c/qwenimage.c@@ -1444,7 +1444,10 @@ static void usage(void){" qwenimage --model DIR --ref REFDIR\n""env: COLI_IMG_BITS=8|16|32 weight storage (default 8: int8 rows)\n"" COLI_IMG_ACT8=0 f32 activations in the DiT (default where VNNI exists: int8, about 2x per step)\n"- " COLI_IMG_TE=resident|stage keep the text encoder loaded between prompts (serve default: resident)\n");+ " COLI_IMG_TE=resident|stage keep the text encoder loaded between prompts (serve default: resident)\n"+ " COLI_IMG_LOAD_THREADS=n layers loaded at once (default 4)\n"+ " COLI_VULKAN=1 (a VK=1 build): the transformer on the GPU; COLI_VK_CHAIN=0 keeps each step's blocks\n"+ " off the device chain (the matrices one by one)\n");}int main(int argc, char **argv){diff --git a/c/qwenimage_chain.h b/c/qwenimage_chain.hindex 10ca2267..9ca23052 100644--- a/c/qwenimage_chain.h+++ b/c/qwenimage_chain.h@@ -155,7 +155,7 @@ static int qic_attn(const VkcEncAttn *at, int N, int L) {/* One denoising step on the device: out[N][in_ch]. 0: not taken (the CPU runs it). */static int qic_forward(Dit *d, const Prefix *p, DitStep *s, const float *lat, float t, float *out) {if (g_qic_on < 0) g_qic_on = g_vk_ready && vkc_init() &&- coli_vk_chain_decide("qwenimage", 0, COLI_VK_CHAIN_UNMEASURED) == COLI_VK_CHAIN_ON;+ coli_vk_chain_decide("qwenimage", -1, COLI_VK_CHAIN_ON) == COLI_VK_CHAIN_ON;if (!g_qic_on || g_qic.failed || vkc_lost()) return 0;if (!g_qic.ok && !qic_setup(d)) return 0;int N = s->N, L = p->L, D = d->dim, H = d->heads, hd = d->hd, M = d->mlp, C = d->in_ch;diff --git a/c/shaders/chain_attn_full.comp b/c/shaders/chain_attn_full.compindex 4ef96008..fbce070b 100644--- a/c/shaders/chain_attn_full.comp+++ b/c/shaders/chain_attn_full.comp@@ -6,18 +6,21 @@// o[o_off + i*o_row + h*HD + d] = sum_t softmax_t(scale * q_i,h . k_t,h) v_t,h[d]// One workgroup of 256 threads takes 64 query rows of one head through the keys in tiles// of 64. Thread (ty, tx) = (t / 16, t % 16) scores rows 4ty..4ty+3 against keys-// 4tx..4tx+3, from chunks of 32 dims of Q and K staged in shared memory, and accumulates-// the dims tx, tx+16, ... of the same rows' output from 32 keys of V at a time. The-// softmax runs online in float: each tile's row max, the running sum and the output-// rescaled by exp(old max - new max); the CPU normalizes the scores first and sums the-// row in double, so the two agree to rounding. HD (a specialization constant) is 32, 64-// or 128. Shared memory: 37.5 KB.+// 4tx..4tx+3, from chunks of 32 dims of Q and K staged transposed in shared memory (a+// dim's 64 rows side by side, so four rows or four keys are one vec4), and accumulates+// its rows' output from 32 keys of V at a time: dims 4tx..4tx+3 and 64+4tx..64+4tx+3+// (HD 128), 4tx..4tx+3 (64), 2tx, 2tx+1 (32). The softmax runs online in float: each+// tile's row max, the running sum and the output rescaled by exp(old max - new max); the+// CPU normalizes the scores first and sums the row in double, so the two agree to+// rounding. HD (a specialization constant) is 32, 64 or 128. Shared memory: 38.8 KB.layout(local_size_x = 256) in;layout(constant_id = 0) const int HD = 128;#define BR 64#define BC 64#define DC 32-#define DPT (HD / 16)+#define LD 68 // a transposed tile's row: 64 values and 4 of padding+#define DPT (HD / 16) // output dims a thread+#define NG (HD >= 64 ? HD / 64 : 1)layout(std430, binding = 0) readonly buffer QKV { float x[]; };layout(std430, binding = 1) writeonly buffer OB { float o[]; };@@ -26,34 +29,36 @@ layout(push_constant) uniform P {float scale;} p;-shared float sb[2 * BR * (DC + 1)]; // Q and K chunks, [64][33] each; later a V chunk, [32][HD]-shared float ps[BR * (BC + 1)]; // the tile's exp(score - max), [64][65]-shared float red[BR * 16]; // per-row partial maxima, then sums+shared vec4 sb4[2 * DC * LD / 4]; // Q^T and K^T chunks, [32][68] each; later a V chunk, [32][HD]+shared vec4 pt4[BC * LD / 4]; // the tile's exp(score - max), transposed: [64 keys][68]+shared float red[BR * 16]; // per-row partial maxima, then sums++float sbf(int i) { return sb4[i >> 2][i & 3]; }void main() {int t = int(gl_LocalInvocationID.x), ty = t / 16, tx = t % 16;int h = int(gl_WorkGroupID.y), r0 = int(gl_WorkGroupID.x) * BR, hb = h * HD;- float acc[4][DPT], m[4], l[4];+ vec4 acc[4][2]; // rows x (up to two vec4 groups of dims)+ vec2 acc2[4]; // HD 32+ float m[4], l[4];for (int i = 0; i < 4; i++) {- m[i] = -1e30; l[i] = 0.0;- for (int dd = 0; dd < DPT; dd++) acc[i][dd] = 0.0;+ m[i] = -1e30; l[i] = 0.0; acc[i][0] = vec4(0.0); acc[i][1] = vec4(0.0); acc2[i] = vec2(0.0);}for (int kb = 0; kb < p.T; kb += BC) {- float s[4][4];- for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) s[i][j] = 0.0;+ vec4 s[4];+ for (int i = 0; i < 4; i++) s[i] = vec4(0.0);for (int dc = 0; dc < HD; dc += DC) {barrier(); // the previous chunk (or V) is readfor (int e = t; e < BR * DC; e += 256) {int r = e / DC, c = e - r * DC, row = r0 + r, key = kb + r;- sb[r * (DC + 1) + c] = row < p.S ? x[p.q_off + row * p.q_row + hb + dc + c] : 0.0;- sb[BR * (DC + 1) + r * (DC + 1) + c] = key < p.T ? x[p.k_off + key * p.kv_row + hb + dc + c] : 0.0;+ int qi = c * LD + r, ki = DC * LD + c * LD + r;+ sb4[qi >> 2][qi & 3] = row < p.S ? x[p.q_off + row * p.q_row + hb + dc + c] : 0.0;+ sb4[ki >> 2][ki & 3] = key < p.T ? x[p.k_off + key * p.kv_row + hb + dc + c] : 0.0;}barrier();for (int c = 0; c < DC; c++) {- float a[4], b[4];- for (int i = 0; i < 4; i++) a[i] = sb[(4 * ty + i) * (DC + 1) + c];- for (int j = 0; j < 4; j++) b[j] = sb[BR * (DC + 1) + (4 * tx + j) * (DC + 1) + c];- for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) s[i][j] += a[i] * b[j];+ vec4 a = sb4[(c * LD + 4 * ty) >> 2], b = sb4[(DC * LD + c * LD + 4 * tx) >> 2];+ s[0] += a.x * b; s[1] += a.y * b; s[2] += a.z * b; s[3] += a.w * b;}}// the tile's row maxima across the 16 threads that share the rows@@ -73,37 +78,40 @@ void main() {mn[i] = mx;}barrier(); // red is read: the sums take it+ vec4 e4[4];for (int i = 0; i < 4; i++) {- float rs = 0.0;- for (int j = 0; j < 4; j++) {- float e = kb + 4 * tx + j < p.T ? exp(s[i][j] - mn[i]) : 0.0;- ps[(4 * ty + i) * (BC + 1) + 4 * tx + j] = e;- rs += e;- }- red[(4 * ty + i) * 16 + tx] = rs;+ for (int j = 0; j < 4; j++) e4[i][j] = kb + 4 * tx + j < p.T ? exp(s[i][j] - mn[i]) : 0.0;+ red[(4 * ty + i) * 16 + tx] = e4[i].x + e4[i].y + e4[i].z + e4[i].w;}+ for (int j = 0; j < 4; j++) // P^T: key 4tx+j, rows 4ty..4ty+3 as one vec4+ pt4[((4 * tx + j) * LD + 4 * ty) >> 2] = vec4(e4[0][j], e4[1][j], e4[2][j], e4[3][j]);barrier();for (int i = 0; i < 4; i++) {float sum = 0.0;for (int k = 0; k < 16; k++) sum += red[(4 * ty + i) * 16 + k];float al = exp(m[i] - mn[i]);l[i] = l[i] * al + sum; m[i] = mn[i];- for (int dd = 0; dd < DPT; dd++) acc[i][dd] *= al;+ acc[i][0] *= al; acc[i][1] *= al; acc2[i] *= al;}// P . V, 32 keys of V at a time in the chunks' spacefor (int kc = 0; kc < BC; kc += 32) {barrier(); // the chunks and the sums are read- for (int e = t; e < 32 * HD; e += 256) {- int kk = e / HD, d = e - kk * HD, key = kb + kc + kk;- sb[e] = key < p.T ? x[p.v_off + key * p.kv_row + hb + d] : 0.0;+ for (int e = t; e < 32 * HD / 4; e += 256) {+ int kk = (4 * e) / HD, d = 4 * e - kk * HD, key = kb + kc + kk;+ int base = p.v_off + key * p.kv_row + hb + d;+ sb4[e] = key < p.T ? vec4(x[base], x[base + 1], x[base + 2], x[base + 3]) : vec4(0.0);}barrier();for (int kk = 0; kk < 32; kk++) {- float pv[4];- for (int i = 0; i < 4; i++) pv[i] = ps[(4 * ty + i) * (BC + 1) + kc + kk];- for (int dd = 0; dd < DPT; dd++) {- float vv = sb[kk * HD + tx + 16 * dd];- for (int i = 0; i < 4; i++) acc[i][dd] += pv[i] * vv;+ vec4 pv = pt4[((kc + kk) * LD + 4 * ty) >> 2];+ if (HD >= 64) {+ for (int g = 0; g < NG; g++) {+ vec4 vv = sb4[(kk * HD + 64 * g + 4 * tx) >> 2];+ acc[0][g] += pv.x * vv; acc[1][g] += pv.y * vv; acc[2][g] += pv.z * vv; acc[3][g] += pv.w * vv;+ }+ } else {+ vec2 vv = vec2(sbf(kk * HD + 2 * tx), sbf(kk * HD + 2 * tx + 1));+ acc2[0] += pv.x * vv; acc2[1] += pv.y * vv; acc2[2] += pv.z * vv; acc2[3] += pv.w * vv;}}}@@ -112,6 +120,12 @@ void main() {int row = r0 + 4 * ty + i;if (row >= p.S) continue;float inv = 1.0 / l[i];- for (int dd = 0; dd < DPT; dd++) o[p.o_off + row * p.o_row + hb + tx + 16 * dd] = acc[i][dd] * inv;+ int ob = p.o_off + row * p.o_row + hb;+ if (HD >= 64) {+ for (int g = 0; g < NG; g++)+ for (int k = 0; k < 4; k++) o[ob + 64 * g + 4 * tx + k] = acc[i][g][k] * inv;+ } else {+ o[ob + 2 * tx] = acc2[i].x * inv; o[ob + 2 * tx + 1] = acc2[i].y * inv;+ }}}diff --git a/c/shaders/chain_attn_full.spv b/c/shaders/chain_attn_full.spvindex 3babcce3..c6ec4fc7 100644Binary files a/c/shaders/chain_attn_full.spv and b/c/shaders/chain_attn_full.spv differdiff --git a/c/tests/vulkan_engines.sh b/c/tests/vulkan_engines.shindex 92139bb4..793cd578 100755--- a/c/tests/vulkan_engines.sh+++ b/c/tests/vulkan_engines.sh@@ -886,6 +886,44 @@ print(f"OK qwenimage picture: {sum(t > 0 for t in d)} of {len(d)} bytes differ fPY# the serve protocol with the device onCOLI_VULKAN=1 QWENIMAGE_TINY=qwenimage_tiny $PY -m unittest tests.test_qwenimage_engine_serve+ # the DiT on the chain (qwenimage_chain.h; off by default on Lavapipe, a CPU device):+ # every oracle stage against the CPU's at 8, 16 and 32 bits, the attention in slices of+ # rows, the device lost in a step's frames (the CPU takes the step again), a picture+ qi_chain() { # <tag> <bits> <env...>+ local tag=$1 bits=$2; shift 2+ COLI_IMG_BITS=$bits COLI_IMG_ACT8=0 ./qwenimage --model qwenimage_tiny --ref qwenimage_tiny/ref > qi-cpu.log 2>&1 || true+ env "$@" COLI_VULKAN=1 COLI_VK_CHAIN=1 COLI_IMG_BITS=$bits COLI_IMG_ACT8=0 ./qwenimage --model qwenimage_tiny --ref qwenimage_tiny/ref \+ > qi-vk.log 2>&1 || true+ grep -qa 'qwenimage chain: [0-9]* blocks on the device' qi-vk.log || { cat qi-vk.log; fail "$tag: the chain never ran"; }+ TAG="$tag" $PY - <<'QIPY'+import os, re+def stages(p):+ return {k.strip(): float(r) for k, r in+ re.findall(r"\[oracle\] (.+?)\s+n=\d+\s+max\|err\| \S+\s+rel (\S+)", open(p).read())}+c, v = stages("qi-cpu.log"), stages("qi-vk.log")+assert len(c) >= 10 and c.keys() == v.keys(), (c, v)+for k in c:+ assert abs(c[k] - v[k]) <= 0.25 * c[k] + 2e-7, (k, c[k], v[k])+print(f"OK {os.environ['TAG']}: {len(c)} stages match the CPU run")+QIPY+ }+ for bits in 8 16 32; do qi_chain "qwenimage chain bits=$bits" $bits; done+ qi_chain "qwenimage chain, the attention in slices" 32 COLI_VK_ATTN_SLICE=60000+ grep -qa 'qwenimage chain: [0-9]* steps' qi-vk.log || { cat qi-vk.log; fail "qwenimage chain, slices: no step on the device"; }+ qi_chain "qwenimage chain, the device lost" 32 COLI_VK_CHAIN_FAULT=9+ grep -qa 'qwenimage chain: a frame failed' qi-vk.log || { cat qi-vk.log; fail "qwenimage chain, device lost: no loss handled"; }+ COLI_VULKAN=1 COLI_VK_CHAIN=1 COLI_IMG_BITS=8 COLI_IMG_ACT8=0 ./qwenimage --model qwenimage_tiny --prompt "a red fox in the snow" \+ --width 256 --height 256 --steps 2 --seed 1 --out qi-vk.png 2> qi-vk-gen.err+ grep -qa 'qwenimage chain: [0-9]* steps' qi-vk-gen.err || { cat qi-vk-gen.err; fail "qwenimage chain picture: the chain never ran"; }+ $PY - <<'QIPY'+import sys; sys.path.insert(0, ".")+import image_engine as e+_, _, _, a = e.decode_png(open("qi-cpu.png", "rb").read())+_, _, _, b = e.decode_png(open("qi-vk.png", "rb").read())+d = [abs(x - y) for x, y in zip(a, b)]+assert len(a) == len(b) and max(d) <= 2 and sum(t > 0 for t in d) <= len(d) // 1000, (max(d), sum(t > 0 for t in d))+print(f"OK qwenimage chain picture: {sum(t > 0 for t in d)} of {len(d)} bytes differ from the CPU's, max {max(d)}")+QIPY}family_deepseek() {@@ -1193,7 +1231,7 @@ family_kimi() {# experts on the device.family_kimi_mimo_sanitize() {make clean >/dev/null 2>&1 || true- make kimi_k3 mimo VK=1 EXTRA_CFLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer -g"+ make kimi_k3 mimo qwenimage VK=1 EXTRA_CFLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer -g"$PY tools/make_kimi_k3_tiny.py --output ./kimi_k3_tiny --force$PY tools/make_mimo_tiny.py --output ./mimo_tiny --force --visionksan() { # <engine> <tag> <env and argv...>@@ -1218,6 +1256,17 @@ family_kimi_mimo_sanitize() {ksan mimo "asan mimo eviction (MIMO_VK_EXPERTS=2)" MIMO_DENSE_BITS=32 COLI_TEMP=0 MIMO_VK_EXPERTS=2 ./mimo mimo_tiny --ids "$MIDS" --ngen 6ksan mimo "asan mimo picture, native dense on the device" MIMO_DENSE_BITS=0 COLI_TEMP=0 COLI_VK_DENSE=1 ./mimo mimo_tiny --ids "$IMG" --ngen 6 --image mimo_tiny/patches.f32 --grid $GRIDksan mimo "asan mimo prefill blocks of 3, cache 4" MIMO_DENSE_BITS=32 COLI_TEMP=0 MIMO_CHUNK=3 MIMO_CAP=4 ./mimo mimo_tiny --ids "$MIDS" --ngen 6+ # qwenimage's DiT on the chain: the oracle, then the attention in slices+ $PY tools/make_qwenimage_tiny.py qwenimage_tiny+ local qa+ for qa in COLI_VK_ATTN_SLICE=0 COLI_VK_ATTN_SLICE=60000; do+ env ASAN_OPTIONS=detect_leaks=0:detect_stack_use_after_return=0 UBSAN_OPTIONS=print_stacktrace=1 OMP_NUM_THREADS=2 \+ COLI_VULKAN=1 COLI_VK_CHAIN=1 COLI_IMG_BITS=32 COLI_IMG_ACT8=0 $qa ./qwenimage --model qwenimage_tiny --ref qwenimage_tiny/ref \+ > san.log 2>&1 || { cat san.log; fail "asan qwenimage chain $qa: the oracle"; }+ if grep -qE "ERROR: AddressSanitizer|runtime error:" san.log; then cat san.log; fail "asan qwenimage chain $qa: sanitizer diagnostic"; fi+ grep -qa 'qwenimage chain: [0-9]* steps' san.log || { cat san.log; fail "asan qwenimage chain $qa: the chain never ran"; }+ echo "OK asan qwenimage chain $qa: sanitizers clean, the oracle within tolerance"+ donemake clean >/dev/null 2>&1 || true}diff --git a/docs/qwen-image.md b/docs/qwen-image.mdindex bb3d0665..0b4800b1 100644--- a/docs/qwen-image.md+++ b/docs/qwen-image.md@@ -260,17 +260,39 @@ Measured on a server with 8 Zen 4 cores (AVX-512, 8 OpenMP threads), 768x512,scores 30.1 dB with them and 35.6 dB without, and by eye the two cannot betold apart.-On a GPU, a `make qwenimage VK=1` build with `COLI_VULKAN=1` runs every-matrix of the transformer through the shared Vulkan backend, in the storage-`COLI_IMG_BITS` gave it (int8 by default, bf16 or f32) and with every image-token of a product in one call: the blocks, the prompt's input layers, the-timestep embedding, the modulation and the output layers. The activations-stay f32 there, so `COLI_IMG_ACT8` does not apply to those matrices and the-result is the CPU's `COLI_IMG_ACT8=0` run up to summation order. The text-encoder (run once per prompt), the VAE and attention stay on the CPU. The-run ends with one line saying how many products the GPU took. No GPU timing has been measured yet: the path has-been checked on Lavapipe, a software driver, which tests the numbers and not-the speed.+On a GPU, a `make qwenimage VK=1` build with `COLI_VULKAN=1` runs the+transformer there. With the device chain (`qwenimage_chain.h`, on by default on a+discrete GPU and on a Radeon 780M, `COLI_VK_CHAIN=0` to keep it off) every block of+a step runs on the device with the image tokens resident from the input layer to+the output layer: the modulated norms, q/k/v, the per-head norms and RoPE, the+attention of the image tokens over the prompt's tokens and their own, the gated+residuals and the MLP. The prompt's keys and values go up once per prompt, the+timestep's modulation once per step, the latents up and the prediction down once+per step. Without the chain (`COLI_VK_CHAIN=0`, or a device that refuses the+chain's buffers) the matrices run there one by one and the attention on the CPU,+as before. The weights keep the storage `COLI_IMG_BITS` gave them (int8 by default,+bf16 or f32) and the activations stay f32, so `COLI_IMG_ACT8` does not apply on the+device and the result is the CPU's `COLI_IMG_ACT8=0` run up to summation order. The+text encoder and the VAE run on the CPU.++Measured on a Radeon 780M (an integrated GPU sharing the RAM of the 8-core Zen 4+above), 8 steps:++| | 512x512, a step | 1024x1024, a step | 512x512, one image |+|---|---|---|---|+| CPU | 11.6 s | 67 s | 1 min 52 s |+| GPU, the matrices one by one | 11.8 s | 63 s | |+| GPU, the chain | 5.4 s | 39 s | 62 s |++The image's time with the chain: 11 s to load and encode the prompt, 43 s of+denoising, 8 s of VAE. Loading went from 34 s to 7.5 s in this release: four+layers at once, each matrix quantized straight from its bf16 rows+(`COLI_IMG_LOAD_THREADS` sets how many; each holds one matrix's bf16 bytes, up to+about 140 MB, while it quantizes). On a 1024x1024 step the 780M spends half the+time in the attention (the image tokens over each other, 4096 of them), the other+half in the matrices. A discrete card has not been measured on this path yet; the+matrices-one-by-one path took a 512x512 step in 4.5 s on an RTX 5060 Ti 16 GB+(#1910), the attention still on the CPU.Every stage of the engine is checked against the diffusers pipeline: on thereal checkpoint in f32 the text encoder, all eight denoising steps and the VAEdiff --git a/docs/vulkan.md b/docs/vulkan.mdindex 3a883e61..f84d56ce 100644--- a/docs/vulkan.md+++ b/docs/vulkan.md@@ -122,7 +122,7 @@ the shared expert tier ([below](#the-routed-expert-tier-vk_tierc)).| deepseek_v41 | the trunk, vision included; routed experts on the expert tier | fp8 in 32x32 ue8m0 tiles, bf16; experts MXFP4 (fp4, a ue8m0 scale per 32) | the DSpark stages (their experts on the tier on a discrete GPU), the experts the tier does not hold || deepseek_v4 | resident dense layers, head, router, compressors; routed experts on the expert tier | fp8 in 128x128 blocks, bf16; experts MXFP4 (fp4, a ue8m0 scale per 32) with [an activation of its own](#deepseek-v4s-activation) | the indexer's `weights_proj`, DSpark stages, the `--oracle` path's dense layers, the experts the tier does not hold || glm53 (GLM-5.3 Flash) | the resident matrices (an f32 checkpoint's experts among them); the streaming container's routed experts on the expert tier | int8 and int4-g64 (`GLM53_BITS`); experts int4-gs64 | f32 matrices (`GLM53_BITS=32`), the streamed experts the tier does not hold, all of them when `swiglu_limit` is 0 |-| qwenimage | the DiT's matrices | int8, bf16, f32 (`COLI_IMG_BITS`) | text encoder, VAE, attention |+| qwenimage | the DiT: every block of a step on the chain (`qwenimage_chain.h`), or its matrices one by one | int8, bf16, f32 (`COLI_IMG_BITS`) | text encoder, VAE || laya (Laya) | the whole forward: encoder and decision head layers ([below](#the-decision-engines)); with `COLI_VK_CHAIN=0` their matrices | f16 (fmt 14, the release's F16 values), f32 | the scorer and the act head on the marker rows, the tokenizer || gliner_decide (GLiNER2.5-Decide) | the whole encoder ([below](#the-decision-engines)); with `COLI_VK_CHAIN=0` its matrices | f32 | the classifier on the `[L]` rows, the tokenizer |