# Test Composed Model — verifies the [composed_model] mechanism (symlink # composition + bind-mount + model rewrite) without launching heavy vLLM. # # Uses alpine (like test-sleep/test-mods) with a heartbeat entrypoint that # first inspects the composed dir, then loops. Requires both model repos # cached on every node — the composed dir's symlinks point into the HF cache # (container-side /root/.cache/huggingface), so they only resolve inside the # container where the HF cache is mounted. # # What this verifies: # 1. The composed dir is built on the node (/tmp/sm121_test-composed_/) # 2. MXFP4 base files are symlinked (config.json, tokenizer, etc.) # 3. Lloyd NF4 experts overlay the MXFP4 experts (L*.safetensors) # 4. The generated nf4_layers.json file is present # 5. The bind-mount makes /root/model/ accessible inside the container # 6. model= is rewritten to /root/model (visible in the docker run command) # # Usage: # cargo run -- -d serve --recipe test-composed # dry-run: inspect cmd # cargo run serve --recipe test-composed # real: starts alpine # cargo run logs --recipe test-composed # see the composed dir listing engine = "vllm" name = "Test Composed Model" docker_image = "alpine:latest" model = "noop" [composed_model] mount = "/root/model" [[composed_model.sources]] repo = "aidendle94/GLM-5.2-MXFP4-Experts-GPTQ" [[composed_model.sources]] repo = "aidendle94/GLM-5.2-NF4-Lloyd-Experts-GPTQ" glob = "L*.safetensors" [[composed_model.sources]] repo = "aidendle94/GLM-5.2-NF4-Lloyd-Experts-GPTQ" glob = "grids/*.json" [[composed_model.files]] name = "nf4_layers.json" content = '{"layers":[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77]}' entrypoint = ["sh", "-c", "echo '=== composed model test ===' && echo 'dir contents (first 15):' && ls /root/model/ | head -15 && echo '--- nf4_layers.json ---' && cat /root/model/nf4_layers.json && echo '' && echo '=== test OK ===' && i=0; while true; do echo \"$(date -u +%H:%M:%S) [$(hostname)] composed $i\"; i=$((i+1)); sleep 2; done"] args = [] [env]