Skip to content

Run frontier MoE models on hardware you already own — pure C, zero deps, experts streamed from disk. Tiny engine, immense model. 🐦

C

test(vulkan): the dev2 families, every MoE engine on two devices

JustVugg48eb26fac821
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4e9023dd..9c2194e0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -308,6 +308,17 @@ jobs:
- family: partial-deepseek-sanitize
req: c/tools/requirements-deepseek-v4-tiny.txt
extra: sympy pillow
+ # the routed-expert tier on two devices (COLI_VK_DEV2): every MoE engine on
+ # Lavapipe opened twice, in decode, a warm start before big prompt steps, both
+ # devices evicting and the second one failing; the shared code under ASan and UBSan
+ - family: dev2
+ req: c/tools/requirements-glm53-tiny.txt
+ - family: dev2-deepseek-kimi-mimo
+ req: c/tools/requirements-deepseek-v4-tiny.txt
+ extra: sympy pillow
+ - family: dev2-sanitize
+ req: c/tools/requirements-deepseek-v4-tiny.txt
+ extra: sympy pillow
# big prompt chunks and expert streaming (docs/vulkan.md): every chain engine on a
# prompt past its usual block, the chunk from the budget, a forced small chunk and
# streaming threshold, staged, the feature off, and the forced runs under ASan
diff --git a/c/tests/vulkan_dev2.sh b/c/tests/vulkan_dev2.sh
index 5d923eb8..582eeb7e 100644
--- a/c/tests/vulkan_dev2.sh
+++ b/c/tests/vulkan_dev2.sh
@@ -135,8 +135,9 @@ d2_colibri() { # the primary device held at two experts by the engine's own ca
d2_done glm_tiny_i4r/.coli_usage
grep -aE '^GLM C engine|^PREFILL|^\[ORACLE\] mismatch' "$log" | sed 's/ | [0-9.]* pos\/s//' > "$tok" || true
}
-d2_glm53() {
+d2_glm53() { # its fixture routes four experts in all: the big case's budget twice, not four times
local tok=$1 log=$2; shift 2; d2_fresh d2.usage
+ local D2_X=$(( ${D2_X:-1} > 2 ? 2 : ${D2_X:-1} ))
env GLM53_BITS=32 COLI_USAGE=d2.usage USAGE_SAVE=$(d2_save) COLI_VK_TIER_GB=$(d2_gb 0.00006) "$@" \
./glm53 --model glm53_stream-i4 --ids "$D2_G53_IDS" --greedy 6 > "$log" 2>&1 || true
grep -aE '^teacher_forcing|^greedy' "$log" > "$tok" || true
@@ -179,6 +180,7 @@ d2_fixtures_main() {
$PY tools/make_olmoe_tiny.py --output olmoe_tiny
$PY tools/convert_olmoe_merged.py --model olmoe_tiny --out olmoe_tiny_c
$PY tools/make_tiny_inkling.py tiny_inkling
+ $PY -c 'import sys; from pathlib import Path; sys.path.insert(0, "."); from tests.test_inkling_prefix_serve import ensure_tokenizer; ensure_tokenizer(Path("tiny_inkling"))'
mkdir -p glm_fp8 && (cd glm_fp8 && $PY ../tools/make_glm_oracle.py --fp8 > /dev/null)
$PY tools/convert_fp8_to_int4.py --indir glm_fp8/glm_tiny --outdir glm_tiny_i4r \
--ebits 4 --io-bits 4 --n-layers 5 --min-free-gb 0 --group-size 0 > /dev/null
diff --git a/c/tests/vulkan_engines.sh b/c/tests/vulkan_engines.sh
index 015960cc..d2298690 100755
--- a/c/tests/vulkan_engines.sh
+++ b/c/tests/vulkan_engines.sh
@@ -28,6 +28,8 @@
# the first N layers on the device (COLI_VK_CHAIN_LAYERS, COLI_VK_DEVICE_CAP_MB),
# tests/vulkan_partial_<group>.sh
# bash tests/vulkan_engines.sh decide | decide-sanitize # Laya, GLiNER2.5-Decide and Clef's DECIDE
+# bash tests/vulkan_engines.sh dev2 | dev2-deepseek-kimi-mimo | dev2-sanitize # the expert tier on
+# two devices (COLI_VK_DEV2), every MoE engine, tests/vulkan_dev2.sh
#
# Needs libvulkan-dev, glslc and mesa-vulkan-drivers, plus the Python packages of
# the family's tiny fixtures (see the vulkan-engines job in .github/workflows/ci.yml).
@@ -2979,6 +2981,7 @@ ptl_check_placed() {
[ "$1" = "$2" ] || fail "$3: $1 B of matrices on the device after setup, the N layers' are $2 B"
}
for f in tests/vulkan_partial_*.sh; do [ -e "$f" ] && . "$f"; done
+. tests/vulkan_dev2.sh # the expert tier on two devices
# ---- big prompt chunks and expert streaming (docs/vulkan.md, "Big prompt chunks and
# expert streaming") ----
# Every engine with the chain, on a prompt longer than its usual block, against its CPU
@@ -4085,6 +4088,9 @@ case "${1:-}" in
staged-faults) family_staged_faults ;;
staged-faults-sanitize) SAN=1 family_staged_faults ;;
decide) family_decide ;;
+ dev2) family_dev2 ;;
+ dev2-deepseek-kimi-mimo) family_dev2_deepseek_kimi_mimo ;;
+ dev2-sanitize) family_dev2_sanitize ;;
decide-sanitize) SAN=1 family_decide ;;
dense-only-*) g=${1#dense-only-}; fn=dho_family_${g//-/_}
declare -F "$fn" >/dev/null || { echo "no dense-only group ${g}" >&2; exit 2; }