recipe.toml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Test Composed Model — verifies the [composed_model] mechanism (symlink
  2. # composition + bind-mount + model rewrite) without launching heavy vLLM.
  3. #
  4. # Uses alpine (like test-sleep/test-mods) with a heartbeat entrypoint that
  5. # first inspects the composed dir, then loops. Requires both model repos
  6. # cached on every node — the composed dir's symlinks point into the HF cache
  7. # (container-side /root/.cache/huggingface), so they only resolve inside the
  8. # container where the HF cache is mounted.
  9. #
  10. # What this verifies:
  11. # 1. The composed dir is built on the node (/tmp/sm121_test-composed_<rank>/)
  12. # 2. MXFP4 base files are symlinked (config.json, tokenizer, etc.)
  13. # 3. Lloyd NF4 experts overlay the MXFP4 experts (L*.safetensors)
  14. # 4. The generated nf4_layers.json file is present
  15. # 5. The bind-mount makes /root/model/ accessible inside the container
  16. # 6. model= is rewritten to /root/model (visible in the docker run command)
  17. #
  18. # Usage:
  19. # cargo run -- -d serve --recipe test-composed # dry-run: inspect cmd
  20. # cargo run serve --recipe test-composed # real: starts alpine
  21. # cargo run logs --recipe test-composed # see the composed dir listing
  22. engine = "vllm"
  23. name = "Test Composed Model"
  24. docker_image = "alpine:latest"
  25. model = "noop"
  26. [composed_model]
  27. mount = "/root/model"
  28. [[composed_model.sources]]
  29. repo = "aidendle94/GLM-5.2-MXFP4-Experts-GPTQ"
  30. [[composed_model.sources]]
  31. repo = "aidendle94/GLM-5.2-NF4-Lloyd-Experts-GPTQ"
  32. glob = "L*.safetensors"
  33. [[composed_model.sources]]
  34. repo = "aidendle94/GLM-5.2-NF4-Lloyd-Experts-GPTQ"
  35. glob = "grids/*.json"
  36. [[composed_model.files]]
  37. name = "nf4_layers.json"
  38. 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]}'
  39. 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"]
  40. args = []
  41. [env]