From 68d6ff1b55f1cb264d0bcb8b2b19b75709a202e7 Mon Sep 17 00:00:00 2001 From: Ben Potter Date: Mon, 30 Nov 2026 13:50:26 +0000 Subject: [PATCH] catalogue: four-Spark recipes for DeepSeek V4.1 Flash and Inkling 2 Small Both were measured on four DGX Sparks (GB10) sharded TP=4 over one 200G switch. deepseek-v4.1-flash-4spark was launched with 'recipes launch' from this tree's dev build; inkling-2-small-4spark was measured with eugr's launch-cluster.sh using the same image, flags and env, and says so in its notes. The DeepSeek recipe follows eugr's 4x recipe but serves the newer 1017 checkpoint. recipediff called that a wrong source, so a recipe can now declare a model deviation, and recipediff checks the rest of the file when the declared move matches. Coder Agents generated. --- CHANGELOG.md | 8 ++ .../recipes/deepseek-v4.1-flash-4spark.json | 129 ++++++++++++++++++ catalogue/recipes/inkling-2-small-4spark.json | 71 ++++++++++ docs/recipes.md | 15 ++ .../golden-deepseek-v4.1-flash-4spark.txt | 4 + .../golden-inkling-2-small-4spark.txt | 4 + internal/recipe/tested.go | 6 + internal/recipe/tested_internal_test.go | 6 +- tools/recipediff/recipediff_test.go | 19 +++ tools/recipediff/upstream.go | 14 +- 10 files changed, 272 insertions(+), 4 deletions(-) create mode 100644 catalogue/recipes/deepseek-v4.1-flash-4spark.json create mode 100644 catalogue/recipes/inkling-2-small-4spark.json create mode 100644 internal/recipe/testdata/golden-deepseek-v4.1-flash-4spark.txt create mode 100644 internal/recipe/testdata/golden-inkling-2-small-4spark.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index e00a3f4..40e3fe5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,6 +77,14 @@ the fact. message. - `glm-5.3-flash-tf-ablit-2spark` recipe: the GLM-5.3 Flash TensorFold launch across two DGX Sparks with the abliterated checkpoint, thinking kept on. +- `deepseek-v4.1-flash-4spark` recipe: DeepSeek V4.1 Flash (the 1017 + checkpoint) sharded TP=4 across four DGX Sparks with DSpark speculative + decoding, at 131072 context. +- `inkling-2-small-4spark` recipe: Inkling 2 Small (NVFP4) sharded TP=4 + across four DGX Sparks, at 114688 context. +- A recipe can declare a `model` deviation when it serves a different + checkpoint than its upstream names, and `recipediff` still compares the + rest of the upstream file. - Several models at once: every running model is an instance with its own port, service and log. `llm-helper up ` starts one next to the others on the next free port from `PORT` (or `--port`), after checking it diff --git a/catalogue/recipes/deepseek-v4.1-flash-4spark.json b/catalogue/recipes/deepseek-v4.1-flash-4spark.json new file mode 100644 index 0000000..2a57230 --- /dev/null +++ b/catalogue/recipes/deepseek-v4.1-flash-4spark.json @@ -0,0 +1,129 @@ +{ + "schema_version": 1, + "id": "deepseek-v4.1-flash-4spark", + "display_name": "DeepSeek V4.1 Flash", + "model": "deepseek-ai/DeepSeek-V4.1-Flash-1017", + "topology": "shard", + "nodes": 4, + "image": "eugr/spark-vllm-b12x@sha256:19ab778dd57f019c44caf5df91a671cf688923d1ca9fa8ce92be0c9acb46d215", + "port": 8001, + "source": { + "repo": "eugr/spark-vllm-docker", + "path": "recipes/4x-spark-cluster/deepseek-v4.1-flash.yaml", + "commit": "56c1c3ab150fa0dd1baaa9d4cf278b1ab69f6704", + "license": "MIT", + "format": "eugr-recipe", + "deviations": [ + { + "kind": "model", + "setting": "model", + "upstream": "deepseek-ai/DeepSeek-V4.1-Flash", + "ours": "deepseek-ai/DeepSeek-V4.1-Flash-1017", + "why": "The 1017 checkpoint is the newer release of the same model, with the same architecture and size. It is the one measured here." + }, + { + "kind": "flag", + "setting": "revision", + "ours": "08c8657f02291e11b6f6b63e0e16014f8e748518", + "why": "Pins the checkpoint that was measured, so a later push to the repo cannot change what this recipe serves." + }, + { + "kind": "flag", + "setting": "max_num_seqs", + "upstream": "2", + "ours": "16", + "why": "Upstream's 2 is a single-user default. Total output grew at every step to 16 streams (48.7, 65.0, 92.3, 126.6, 171.9 tok/s at 1, 2, 4, 8, 16), and the agent bench still grew at 16 reviews." + }, + { + "kind": "flag", + "setting": "max_model_len", + "upstream": "auto", + "ours": "131072", + "why": "The context the agent bench needs. At 131072 the KV cache holds 64 requests of full length, so a longer context is possible but was not measured." + }, + { + "kind": "env", + "setting": "B12X_AUTOTUNE", + "ours": "0", + "why": "With autotune on, the first start tuned 72 of 2,705 kernels in 16 minutes, about 10 hours in all. Off, B12X uses its default kernel settings. Whether tuned kernels are faster was not measured." + } + ] + }, + "args": [ + "--revision", + "08c8657f02291e11b6f6b63e0e16014f8e748518", + "--dtype", + "bfloat16", + "--tensor-parallel-size", + "4", + "--load-format", + "b12x", + "--block-size", + "256", + "--enable-prefix-caching", + "--gpu-memory-utilization", + "0.87", + "--max-model-len", + "131072", + "--max-num-seqs", + "16", + "--max-num-batched-tokens", + "4096", + "--limit-mm-per-prompt", + "{\"image\":1}", + "--engram-config", + "{\"cpu_offload\":false,\"table_memory\":\"disk\"}", + "--linear-backend", + "b12x", + "--moe-backend", + "b12x", + "--attention-backend", + "b12x", + "--speculative-config", + "{\"method\":\"dspark\",\"num_speculative_tokens\":7,\"draft_tensor_parallel_size\":4,\"attention_backend\":\"B12X\",\"draft_sample_method\":\"probabilistic\",\"rejection_sample_method\":\"standard\",\"enable_adaptive_verification\":true}", + "--reasoning-parser", + "deepseek_v41", + "--tool-call-parser", + "deepseek_v41", + "--enable-auto-tool-choice" + ], + "env": { + "VLLM_ENABLE_ROCE_ALLREDUCE": "1", + "VLLM_ROCE_ALLREDUCE_MAX_SIZE": "2MB", + "B12X_COMPILE_WORKERS": "4", + "CUTE_DSL_ARCH": "sm_121a", + "VLLM_USE_V2_MODEL_RUNNER": "1", + "VLLM_USE_BREAKABLE_CUDAGRAPH": "1", + "VLLM_MXFP8_LM_HEAD": "1", + "B12X_AUTOTUNE": "0", + "HF_HUB_OFFLINE": "1", + "NCCL_IGNORE_CPU_AFFINITY": "1", + "NCCL_IB_DISABLE": "0", + "NCCL_IB_HCA": "$IB_IF", + "NCCL_SOCKET_IFNAME": "$IFACE_NAME", + "GLOO_SOCKET_IFNAME": "$IFACE_NAME", + "TP_SOCKET_IFNAME": "$IFACE_NAME", + "UCX_NET_DEVICES": "$IFACE_NAME", + "MN_IF_NAME": "$IFACE_NAME", + "OMPI_MCA_btl_tcp_if_include": "$IFACE_NAME", + "VLLM_HOST_IP": "$NODE_IP" + }, + "verified": { + "date": "2026-11-30", + "hardware": "dgx_spark_gb10 x4", + "driver": "580.178.04 on two nodes, 580.159.03 on two", + "vllm_version": "0.1.dev21830+g8244d1c44.d20261102", + "load_seconds": 296, + "context": 131072, + "kv_tokens": 8391311, + "concurrency": 64.02, + "smoke": "get_weather tool call ok; real text single stream 59-79 tok/s with DSpark; random 1024/256: 48.6 tok/s at 1 stream, 165.9 tok/s total at 16; 32,768-token prompt first token 10.4 s", + "notes": [ + "Launched with llm-helper 0.6.1-dev.a35bf19 'recipes launch' on four GB10s on one 200G switch, RoCE on both halves of QSFP port 0, with --host 127.0.0.1 as a profile override.", + "The checkpoint is 510.3 GB on disk on each node, two of its weight files 101.5 GB each. With the Engram tables on disk, the weights take 74.2 GiB of memory on each node.", + "The same flags under eugr's launch-cluster.sh gave 48.7 and 171.9 tok/s, and the agent bench (coder/solstice method, doc-check reviews) an interactive limit of 2 reviews and 1,072 turns per hour at 16 reviews, where all 16 slots were full.", + "At 16 reviews, 3 requests failed with HTTP 400 for being longer than the 131072 context.", + "DSpark accepted about 45% of draft tokens on real text." + ] + } +} diff --git a/catalogue/recipes/inkling-2-small-4spark.json b/catalogue/recipes/inkling-2-small-4spark.json new file mode 100644 index 0000000..3270b5d --- /dev/null +++ b/catalogue/recipes/inkling-2-small-4spark.json @@ -0,0 +1,71 @@ +{ + "schema_version": 1, + "id": "inkling-2-small-4spark", + "display_name": "Inkling 2 Small", + "model": "thinkingmachines/Inkling-2-Small", + "topology": "shard", + "nodes": 4, + "image": "eugr/spark-vllm@sha256:df8372b066efab7a99b92ee33b074503bb3da73a069851c9e40a042d325e4b83", + "port": 8001, + "source": { + "repo": "huggingface.co/thinkingmachines/Inkling-2-Small", + "path": "README.md", + "commit": "885d78bfca61a7e9a498e33cfa7ad35850533b8c", + "license": "Apache-2.0", + "format": "manual" + }, + "args": [ + "--revision", + "885d78bfca61a7e9a498e33cfa7ad35850533b8c", + "--tensor-parallel-size", + "4", + "--trust-remote-code", + "--gpu-memory-utilization", + "0.90", + "--max-model-len", + "114688", + "--max-num-seqs", + "16", + "--reasoning-parser", + "inkling", + "--enable-auto-tool-choice", + "--tool-call-parser", + "inkling", + "--enable-prefix-caching", + "--compilation-config", + "{\"cudagraph_mode\":\"PIECEWISE\"}" + ], + "env": { + "VLLM_USE_BREAKABLE_CUDAGRAPH": "0", + "HF_HUB_OFFLINE": "1", + "NCCL_IGNORE_CPU_AFFINITY": "1", + "NCCL_IB_DISABLE": "0", + "NCCL_IB_HCA": "$IB_IF", + "NCCL_SOCKET_IFNAME": "$IFACE_NAME", + "GLOO_SOCKET_IFNAME": "$IFACE_NAME", + "TP_SOCKET_IFNAME": "$IFACE_NAME", + "UCX_NET_DEVICES": "$IFACE_NAME", + "MN_IF_NAME": "$IFACE_NAME", + "OMPI_MCA_btl_tcp_if_include": "$IFACE_NAME", + "VLLM_HOST_IP": "$NODE_IP" + }, + "verified": { + "date": "2026-11-29", + "hardware": "dgx_spark_gb10 x4", + "driver": "580.178.04 on two nodes, 580.159.03 on two", + "vllm_version": "0.34.1rc1.dev358+g65ab36aad.d20261129", + "load_seconds": 656, + "context": 114688, + "kv_tokens": 187875, + "concurrency": 1.64, + "smoke": "tool call ok; single stream 28 tok/s (35.8 ms per token), 100.2 tok/s total at 16 streams, 32,768-token prompt read in 13.2 s", + "notes": [ + "Measured with eugr/spark-vllm-docker's launch-cluster.sh at 56c1c3ab150fa0dd1baaa9d4cf278b1ab69f6704 (vLLM multiprocessing backend, no Ray), with this image, these flags and this env, and its mods/drop-caches mod; the recipes launch path itself was not run.", + "The NVFP4 checkpoint is 393.5 GB. The weights take 91.6 GiB of each GB10, which leaves about 17.6 GiB a box for the KV cache. It does not fit on fewer than four.", + "vLLM main picks the NVFP4 quantization from hf_quant_config.json and needs no patch on SM121 since the Inkling 2 merge of 2026-11-18 (vllm-project/vllm#67325).", + "With VLLM_USE_BREAKABLE_CUDAGRAPH=0 vLLM finds no compiled submodule and resolves cudagraph_mode to NONE. Breakable CUDA graphs (=1) halved single-stream speed, 28 to 14 tok/s, for no gain in KV cache.", + "Weight loading is about 10 minutes of the start (599 s); the rest is profiling and KV setup.", + "Agent bench (coder/solstice method, doc-check reviews): interactive limit 1 review; turns per hour stop growing at 2 reviews, at 360." + ] + } +} diff --git a/docs/recipes.md b/docs/recipes.md index d5611f4..7268f6a 100644 --- a/docs/recipes.md +++ b/docs/recipes.md @@ -247,6 +247,20 @@ Upstream computes that default from `ABLIT` rather than writing it as a literal, The repository is gated, so the Hugging Face token on each node must belong to an account that accepted the terms on the model's page. The two checkpoints serve under the same model name, so swapping one for the other keeps the Coder model entry. +Two recipes shard across four DGX Sparks, TP=4, on one 200G switch with RoCE on both halves of each node's QSFP port. + +| id | source | KV tokens | concurrency | load | +| ---------------------------- | --------------------------------- | --------- | ----------- | ----- | +| `deepseek-v4.1-flash-4spark` | `eugr/spark-vllm-docker@56c1c3ab` | 8,391,311 | 64.02x | 296 s | +| `inkling-2-small-4spark` | the model card, `manual` | 187,875 | 1.64x | 656 s | + +`deepseek-v4.1-flash-4spark` serves the newer `DeepSeek-V4.1-Flash-1017` checkpoint of upstream's model and declares it as a `model` deviation. +It keeps upstream's DSpark speculative decoding and turns B12X kernel autotuning off, because the first start would tune for about 10 hours. +Each node needs about 510 GB of disk for the checkpoint. + +`inkling-2-small-4spark` serves the 393.5 GB NVFP4 checkpoint, which needs all four nodes and leaves about 17.6 GiB a node for the KV cache. +Its numbers come from eugr's `launch-cluster.sh` with the same image, flags and env, not from `recipes launch`. + On an engine other than vLLM, a profile's `MAX_MODEL_LEN` is the only local override, passed as the engine's own context flag. The other knobs are vLLM's flags. @@ -286,6 +300,7 @@ A recipe says: | `manual` | nothing machine-readable | not checked, and counted as such | A deviation's `kind` is `flag`, `env`, `mod`, or `config` for a launcher key in an `env-sh` file, named as that file names it. +A `model` deviation, with the setting `model`, says the recipe serves a different checkpoint than upstream names, and `recipediff` then still checks the rest of the file. An upstream in a new layout needs a reader in `tools/recipediff` and a copy of the upstream file as its fixture; until then, cite it as `manual`. A recipe measured on your own hardware can stay local: put its file under `~/.config/vllm-helper/recipes.d/`, in the same shape and named the same way as a file in `catalogue/recipes/`. diff --git a/internal/recipe/testdata/golden-deepseek-v4.1-flash-4spark.txt b/internal/recipe/testdata/golden-deepseek-v4.1-flash-4spark.txt new file mode 100644 index 0000000..0c9d64a --- /dev/null +++ b/internal/recipe/testdata/golden-deepseek-v4.1-flash-4spark.txt @@ -0,0 +1,4 @@ +VLLM_API_KEY='' docker run -d --name vllm-node --network host --ipc host --privileged --ulimit nofile=1048576:1048576 --gpus all -v /home/u/.cache/huggingface:/root/.cache/huggingface -v /home/u/.cache/vllm:/root/.cache/vllm -v /home/u/.cache/flashinfer:/root/.cache/flashinfer -v /home/u/.triton:/root/.triton -v /home/u/.tilelang:/root/.tilelang -e B12X_AUTOTUNE=0 -e B12X_COMPILE_WORKERS=4 -e CUTE_DSL_ARCH=sm_121a -e GLOO_SOCKET_IFNAME=enp1s0f1np1 -e HF_HUB_OFFLINE=1 -e MN_IF_NAME=enp1s0f1np1 -e NCCL_IB_DISABLE=0 -e NCCL_IB_HCA=rocep1s0f1,roceP2p1s0f1 -e NCCL_IGNORE_CPU_AFFINITY=1 -e NCCL_SOCKET_IFNAME=enp1s0f1np1 -e OMPI_MCA_btl_tcp_if_include=enp1s0f1np1 -e TP_SOCKET_IFNAME=enp1s0f1np1 -e UCX_NET_DEVICES=enp1s0f1np1 -e VLLM_ENABLE_ROCE_ALLREDUCE=1 -e VLLM_HOST_IP=10.44.0.1 -e VLLM_MXFP8_LM_HEAD=1 -e VLLM_ROCE_ALLREDUCE_MAX_SIZE=2MB -e VLLM_USE_BREAKABLE_CUDAGRAPH=1 -e VLLM_USE_V2_MODEL_RUNNER=1 -e VLLM_API_KEY --entrypoint vllm eugr/spark-vllm-b12x@sha256:19ab778dd57f019c44caf5df91a671cf688923d1ca9fa8ce92be0c9acb46d215 serve deepseek-ai/DeepSeek-V4.1-Flash-1017 --revision 08c8657f02291e11b6f6b63e0e16014f8e748518 --dtype bfloat16 --tensor-parallel-size 4 --load-format b12x --block-size 256 --enable-prefix-caching --gpu-memory-utilization 0.87 --max-model-len 131072 --max-num-seqs 16 --max-num-batched-tokens 4096 --limit-mm-per-prompt '{"image":1}' --engram-config '{"cpu_offload":false,"table_memory":"disk"}' --linear-backend b12x --moe-backend b12x --attention-backend b12x --speculative-config '{"method":"dspark","num_speculative_tokens":7,"draft_tensor_parallel_size":4,"attention_backend":"B12X","draft_sample_method":"probabilistic","rejection_sample_method":"standard","enable_adaptive_verification":true}' --reasoning-parser deepseek_v41 --tool-call-parser deepseek_v41 --enable-auto-tool-choice --host 0.0.0.0 --port 8001 --nnodes 4 --node-rank 0 --master-addr 10.44.0.1 --master-port 29501 +VLLM_API_KEY='' docker run -d --name vllm-node --network host --ipc host --privileged --ulimit nofile=1048576:1048576 --gpus all -v /home/u/.cache/huggingface:/root/.cache/huggingface -v /home/u/.cache/vllm:/root/.cache/vllm -v /home/u/.cache/flashinfer:/root/.cache/flashinfer -v /home/u/.triton:/root/.triton -v /home/u/.tilelang:/root/.tilelang -e B12X_AUTOTUNE=0 -e B12X_COMPILE_WORKERS=4 -e CUTE_DSL_ARCH=sm_121a -e GLOO_SOCKET_IFNAME=enp1s0f1np1 -e HF_HUB_OFFLINE=1 -e MN_IF_NAME=enp1s0f1np1 -e NCCL_IB_DISABLE=0 -e NCCL_IB_HCA=rocep1s0f1,roceP2p1s0f1 -e NCCL_IGNORE_CPU_AFFINITY=1 -e NCCL_SOCKET_IFNAME=enp1s0f1np1 -e OMPI_MCA_btl_tcp_if_include=enp1s0f1np1 -e TP_SOCKET_IFNAME=enp1s0f1np1 -e UCX_NET_DEVICES=enp1s0f1np1 -e VLLM_ENABLE_ROCE_ALLREDUCE=1 -e VLLM_HOST_IP=10.44.0.2 -e VLLM_MXFP8_LM_HEAD=1 -e VLLM_ROCE_ALLREDUCE_MAX_SIZE=2MB -e VLLM_USE_BREAKABLE_CUDAGRAPH=1 -e VLLM_USE_V2_MODEL_RUNNER=1 -e VLLM_API_KEY --entrypoint vllm eugr/spark-vllm-b12x@sha256:19ab778dd57f019c44caf5df91a671cf688923d1ca9fa8ce92be0c9acb46d215 serve deepseek-ai/DeepSeek-V4.1-Flash-1017 --revision 08c8657f02291e11b6f6b63e0e16014f8e748518 --dtype bfloat16 --tensor-parallel-size 4 --load-format b12x --block-size 256 --enable-prefix-caching --gpu-memory-utilization 0.87 --max-model-len 131072 --max-num-seqs 16 --max-num-batched-tokens 4096 --limit-mm-per-prompt '{"image":1}' --engram-config '{"cpu_offload":false,"table_memory":"disk"}' --linear-backend b12x --moe-backend b12x --attention-backend b12x --speculative-config '{"method":"dspark","num_speculative_tokens":7,"draft_tensor_parallel_size":4,"attention_backend":"B12X","draft_sample_method":"probabilistic","rejection_sample_method":"standard","enable_adaptive_verification":true}' --reasoning-parser deepseek_v41 --tool-call-parser deepseek_v41 --enable-auto-tool-choice --host 0.0.0.0 --port 8001 --nnodes 4 --node-rank 1 --master-addr 10.44.0.1 --master-port 29501 --headless +VLLM_API_KEY='' docker run -d --name vllm-node --network host --ipc host --privileged --ulimit nofile=1048576:1048576 --gpus all -v /home/u/.cache/huggingface:/root/.cache/huggingface -v /home/u/.cache/vllm:/root/.cache/vllm -v /home/u/.cache/flashinfer:/root/.cache/flashinfer -v /home/u/.triton:/root/.triton -v /home/u/.tilelang:/root/.tilelang -e B12X_AUTOTUNE=0 -e B12X_COMPILE_WORKERS=4 -e CUTE_DSL_ARCH=sm_121a -e GLOO_SOCKET_IFNAME=enp1s0f1np1 -e HF_HUB_OFFLINE=1 -e MN_IF_NAME=enp1s0f1np1 -e NCCL_IB_DISABLE=0 -e NCCL_IB_HCA=rocep1s0f1,roceP2p1s0f1 -e NCCL_IGNORE_CPU_AFFINITY=1 -e NCCL_SOCKET_IFNAME=enp1s0f1np1 -e OMPI_MCA_btl_tcp_if_include=enp1s0f1np1 -e TP_SOCKET_IFNAME=enp1s0f1np1 -e UCX_NET_DEVICES=enp1s0f1np1 -e VLLM_ENABLE_ROCE_ALLREDUCE=1 -e VLLM_HOST_IP=10.44.0.3 -e VLLM_MXFP8_LM_HEAD=1 -e VLLM_ROCE_ALLREDUCE_MAX_SIZE=2MB -e VLLM_USE_BREAKABLE_CUDAGRAPH=1 -e VLLM_USE_V2_MODEL_RUNNER=1 -e VLLM_API_KEY --entrypoint vllm eugr/spark-vllm-b12x@sha256:19ab778dd57f019c44caf5df91a671cf688923d1ca9fa8ce92be0c9acb46d215 serve deepseek-ai/DeepSeek-V4.1-Flash-1017 --revision 08c8657f02291e11b6f6b63e0e16014f8e748518 --dtype bfloat16 --tensor-parallel-size 4 --load-format b12x --block-size 256 --enable-prefix-caching --gpu-memory-utilization 0.87 --max-model-len 131072 --max-num-seqs 16 --max-num-batched-tokens 4096 --limit-mm-per-prompt '{"image":1}' --engram-config '{"cpu_offload":false,"table_memory":"disk"}' --linear-backend b12x --moe-backend b12x --attention-backend b12x --speculative-config '{"method":"dspark","num_speculative_tokens":7,"draft_tensor_parallel_size":4,"attention_backend":"B12X","draft_sample_method":"probabilistic","rejection_sample_method":"standard","enable_adaptive_verification":true}' --reasoning-parser deepseek_v41 --tool-call-parser deepseek_v41 --enable-auto-tool-choice --host 0.0.0.0 --port 8001 --nnodes 4 --node-rank 2 --master-addr 10.44.0.1 --master-port 29501 --headless +VLLM_API_KEY='' docker run -d --name vllm-node --network host --ipc host --privileged --ulimit nofile=1048576:1048576 --gpus all -v /home/u/.cache/huggingface:/root/.cache/huggingface -v /home/u/.cache/vllm:/root/.cache/vllm -v /home/u/.cache/flashinfer:/root/.cache/flashinfer -v /home/u/.triton:/root/.triton -v /home/u/.tilelang:/root/.tilelang -e B12X_AUTOTUNE=0 -e B12X_COMPILE_WORKERS=4 -e CUTE_DSL_ARCH=sm_121a -e GLOO_SOCKET_IFNAME=enp1s0f1np1 -e HF_HUB_OFFLINE=1 -e MN_IF_NAME=enp1s0f1np1 -e NCCL_IB_DISABLE=0 -e NCCL_IB_HCA=rocep1s0f1,roceP2p1s0f1 -e NCCL_IGNORE_CPU_AFFINITY=1 -e NCCL_SOCKET_IFNAME=enp1s0f1np1 -e OMPI_MCA_btl_tcp_if_include=enp1s0f1np1 -e TP_SOCKET_IFNAME=enp1s0f1np1 -e UCX_NET_DEVICES=enp1s0f1np1 -e VLLM_ENABLE_ROCE_ALLREDUCE=1 -e VLLM_HOST_IP=10.44.0.4 -e VLLM_MXFP8_LM_HEAD=1 -e VLLM_ROCE_ALLREDUCE_MAX_SIZE=2MB -e VLLM_USE_BREAKABLE_CUDAGRAPH=1 -e VLLM_USE_V2_MODEL_RUNNER=1 -e VLLM_API_KEY --entrypoint vllm eugr/spark-vllm-b12x@sha256:19ab778dd57f019c44caf5df91a671cf688923d1ca9fa8ce92be0c9acb46d215 serve deepseek-ai/DeepSeek-V4.1-Flash-1017 --revision 08c8657f02291e11b6f6b63e0e16014f8e748518 --dtype bfloat16 --tensor-parallel-size 4 --load-format b12x --block-size 256 --enable-prefix-caching --gpu-memory-utilization 0.87 --max-model-len 131072 --max-num-seqs 16 --max-num-batched-tokens 4096 --limit-mm-per-prompt '{"image":1}' --engram-config '{"cpu_offload":false,"table_memory":"disk"}' --linear-backend b12x --moe-backend b12x --attention-backend b12x --speculative-config '{"method":"dspark","num_speculative_tokens":7,"draft_tensor_parallel_size":4,"attention_backend":"B12X","draft_sample_method":"probabilistic","rejection_sample_method":"standard","enable_adaptive_verification":true}' --reasoning-parser deepseek_v41 --tool-call-parser deepseek_v41 --enable-auto-tool-choice --host 0.0.0.0 --port 8001 --nnodes 4 --node-rank 3 --master-addr 10.44.0.1 --master-port 29501 --headless diff --git a/internal/recipe/testdata/golden-inkling-2-small-4spark.txt b/internal/recipe/testdata/golden-inkling-2-small-4spark.txt new file mode 100644 index 0000000..56e566f --- /dev/null +++ b/internal/recipe/testdata/golden-inkling-2-small-4spark.txt @@ -0,0 +1,4 @@ +VLLM_API_KEY='' docker run -d --name vllm-node --network host --ipc host --privileged --ulimit nofile=1048576:1048576 --gpus all -v /home/u/.cache/huggingface:/root/.cache/huggingface -v /home/u/.cache/vllm:/root/.cache/vllm -v /home/u/.cache/flashinfer:/root/.cache/flashinfer -v /home/u/.triton:/root/.triton -v /home/u/.tilelang:/root/.tilelang -e GLOO_SOCKET_IFNAME=enp1s0f1np1 -e HF_HUB_OFFLINE=1 -e MN_IF_NAME=enp1s0f1np1 -e NCCL_IB_DISABLE=0 -e NCCL_IB_HCA=rocep1s0f1,roceP2p1s0f1 -e NCCL_IGNORE_CPU_AFFINITY=1 -e NCCL_SOCKET_IFNAME=enp1s0f1np1 -e OMPI_MCA_btl_tcp_if_include=enp1s0f1np1 -e TP_SOCKET_IFNAME=enp1s0f1np1 -e UCX_NET_DEVICES=enp1s0f1np1 -e VLLM_HOST_IP=10.44.0.1 -e VLLM_USE_BREAKABLE_CUDAGRAPH=0 -e VLLM_API_KEY --entrypoint vllm eugr/spark-vllm@sha256:df8372b066efab7a99b92ee33b074503bb3da73a069851c9e40a042d325e4b83 serve thinkingmachines/Inkling-2-Small --revision 885d78bfca61a7e9a498e33cfa7ad35850533b8c --tensor-parallel-size 4 --trust-remote-code --gpu-memory-utilization 0.90 --max-model-len 114688 --max-num-seqs 16 --reasoning-parser inkling --enable-auto-tool-choice --tool-call-parser inkling --enable-prefix-caching --compilation-config '{"cudagraph_mode":"PIECEWISE"}' --host 0.0.0.0 --port 8001 --nnodes 4 --node-rank 0 --master-addr 10.44.0.1 --master-port 29501 +VLLM_API_KEY='' docker run -d --name vllm-node --network host --ipc host --privileged --ulimit nofile=1048576:1048576 --gpus all -v /home/u/.cache/huggingface:/root/.cache/huggingface -v /home/u/.cache/vllm:/root/.cache/vllm -v /home/u/.cache/flashinfer:/root/.cache/flashinfer -v /home/u/.triton:/root/.triton -v /home/u/.tilelang:/root/.tilelang -e GLOO_SOCKET_IFNAME=enp1s0f1np1 -e HF_HUB_OFFLINE=1 -e MN_IF_NAME=enp1s0f1np1 -e NCCL_IB_DISABLE=0 -e NCCL_IB_HCA=rocep1s0f1,roceP2p1s0f1 -e NCCL_IGNORE_CPU_AFFINITY=1 -e NCCL_SOCKET_IFNAME=enp1s0f1np1 -e OMPI_MCA_btl_tcp_if_include=enp1s0f1np1 -e TP_SOCKET_IFNAME=enp1s0f1np1 -e UCX_NET_DEVICES=enp1s0f1np1 -e VLLM_HOST_IP=10.44.0.2 -e VLLM_USE_BREAKABLE_CUDAGRAPH=0 -e VLLM_API_KEY --entrypoint vllm eugr/spark-vllm@sha256:df8372b066efab7a99b92ee33b074503bb3da73a069851c9e40a042d325e4b83 serve thinkingmachines/Inkling-2-Small --revision 885d78bfca61a7e9a498e33cfa7ad35850533b8c --tensor-parallel-size 4 --trust-remote-code --gpu-memory-utilization 0.90 --max-model-len 114688 --max-num-seqs 16 --reasoning-parser inkling --enable-auto-tool-choice --tool-call-parser inkling --enable-prefix-caching --compilation-config '{"cudagraph_mode":"PIECEWISE"}' --host 0.0.0.0 --port 8001 --nnodes 4 --node-rank 1 --master-addr 10.44.0.1 --master-port 29501 --headless +VLLM_API_KEY='' docker run -d --name vllm-node --network host --ipc host --privileged --ulimit nofile=1048576:1048576 --gpus all -v /home/u/.cache/huggingface:/root/.cache/huggingface -v /home/u/.cache/vllm:/root/.cache/vllm -v /home/u/.cache/flashinfer:/root/.cache/flashinfer -v /home/u/.triton:/root/.triton -v /home/u/.tilelang:/root/.tilelang -e GLOO_SOCKET_IFNAME=enp1s0f1np1 -e HF_HUB_OFFLINE=1 -e MN_IF_NAME=enp1s0f1np1 -e NCCL_IB_DISABLE=0 -e NCCL_IB_HCA=rocep1s0f1,roceP2p1s0f1 -e NCCL_IGNORE_CPU_AFFINITY=1 -e NCCL_SOCKET_IFNAME=enp1s0f1np1 -e OMPI_MCA_btl_tcp_if_include=enp1s0f1np1 -e TP_SOCKET_IFNAME=enp1s0f1np1 -e UCX_NET_DEVICES=enp1s0f1np1 -e VLLM_HOST_IP=10.44.0.3 -e VLLM_USE_BREAKABLE_CUDAGRAPH=0 -e VLLM_API_KEY --entrypoint vllm eugr/spark-vllm@sha256:df8372b066efab7a99b92ee33b074503bb3da73a069851c9e40a042d325e4b83 serve thinkingmachines/Inkling-2-Small --revision 885d78bfca61a7e9a498e33cfa7ad35850533b8c --tensor-parallel-size 4 --trust-remote-code --gpu-memory-utilization 0.90 --max-model-len 114688 --max-num-seqs 16 --reasoning-parser inkling --enable-auto-tool-choice --tool-call-parser inkling --enable-prefix-caching --compilation-config '{"cudagraph_mode":"PIECEWISE"}' --host 0.0.0.0 --port 8001 --nnodes 4 --node-rank 2 --master-addr 10.44.0.1 --master-port 29501 --headless +VLLM_API_KEY='' docker run -d --name vllm-node --network host --ipc host --privileged --ulimit nofile=1048576:1048576 --gpus all -v /home/u/.cache/huggingface:/root/.cache/huggingface -v /home/u/.cache/vllm:/root/.cache/vllm -v /home/u/.cache/flashinfer:/root/.cache/flashinfer -v /home/u/.triton:/root/.triton -v /home/u/.tilelang:/root/.tilelang -e GLOO_SOCKET_IFNAME=enp1s0f1np1 -e HF_HUB_OFFLINE=1 -e MN_IF_NAME=enp1s0f1np1 -e NCCL_IB_DISABLE=0 -e NCCL_IB_HCA=rocep1s0f1,roceP2p1s0f1 -e NCCL_IGNORE_CPU_AFFINITY=1 -e NCCL_SOCKET_IFNAME=enp1s0f1np1 -e OMPI_MCA_btl_tcp_if_include=enp1s0f1np1 -e TP_SOCKET_IFNAME=enp1s0f1np1 -e UCX_NET_DEVICES=enp1s0f1np1 -e VLLM_HOST_IP=10.44.0.4 -e VLLM_USE_BREAKABLE_CUDAGRAPH=0 -e VLLM_API_KEY --entrypoint vllm eugr/spark-vllm@sha256:df8372b066efab7a99b92ee33b074503bb3da73a069851c9e40a042d325e4b83 serve thinkingmachines/Inkling-2-Small --revision 885d78bfca61a7e9a498e33cfa7ad35850533b8c --tensor-parallel-size 4 --trust-remote-code --gpu-memory-utilization 0.90 --max-model-len 114688 --max-num-seqs 16 --reasoning-parser inkling --enable-auto-tool-choice --tool-call-parser inkling --enable-prefix-caching --compilation-config '{"cudagraph_mode":"PIECEWISE"}' --host 0.0.0.0 --port 8001 --nnodes 4 --node-rank 3 --master-addr 10.44.0.1 --master-port 29501 --headless diff --git a/internal/recipe/tested.go b/internal/recipe/tested.go index 784d914..dde71cf 100644 --- a/internal/recipe/tested.go +++ b/internal/recipe/tested.go @@ -129,11 +129,17 @@ type Deviation struct { // // A config deviation is a key in an env-sh upstream's config file, named as // that file names it: such a file sets most flags through its own keys. +// +// A model deviation has the setting "model" and says the entry serves a +// different checkpoint of the same model than upstream names, such as a +// newer dated release. Without it, a recipe that keeps every other setting +// of its upstream could not cite that upstream at all. const ( DeviationFlag = "flag" DeviationEnv = "env" DeviationMod = "mod" DeviationConfig = "config" + DeviationModel = "model" ) // Change renders the move for display. An absent side is a drop or an diff --git a/internal/recipe/tested_internal_test.go b/internal/recipe/tested_internal_test.go index ff5b6b2..34397da 100644 --- a/internal/recipe/tested_internal_test.go +++ b/internal/recipe/tested_internal_test.go @@ -248,8 +248,12 @@ func TestDeviationsMatchTheArgsTheyDescribe(t *testing.T) { if d.Setting != strings.ToUpper(d.Setting) { t.Errorf("%s: %q is declared as a config key but is not named like one", r.ID, d.Setting) } + case DeviationModel: + if d.Setting != "model" || d.Upstream == "" || d.Ours != r.Model { + t.Errorf("%s: a model deviation names setting \"model\", upstream's model, and ours as the entry's model %q, got %+v", r.ID, r.Model, d) + } default: - t.Errorf("%s: %s has kind %q, want flag, env, mod or config", r.ID, d.Setting, d.Kind) + t.Errorf("%s: %s has kind %q, want flag, env, mod, config or model", r.ID, d.Setting, d.Kind) } } } diff --git a/tools/recipediff/recipediff_test.go b/tools/recipediff/recipediff_test.go index c341c67..877db93 100644 --- a/tools/recipediff/recipediff_test.go +++ b/tools/recipediff/recipediff_test.go @@ -226,6 +226,25 @@ func TestDeclarationFits(t *testing.T) { } } +// A different checkpoint is the right source only when the entry declares +// that exact move: a declaration naming some other model must not hide it. +func TestADeclaredModelMoveKeepsTheSource(t *testing.T) { + up := eugrRecipe{Model: "org/m"} + var e entry + e.Model = "org/m-1017" + if up.mismatch(e) == "" { + t.Error("an undeclared model change must be a wrong source") + } + e.Source.Deviations = []deviation{{Kind: "model", Setting: "model", Upstream: "org/other", Ours: "org/m-1017", Why: "newer"}} + if up.mismatch(e) == "" { + t.Error("a declaration for another upstream model must not match") + } + e.Source.Deviations[0].Upstream = "org/m" + if why := up.mismatch(e); why != "" { + t.Errorf("a declared model move is the right source, got %q", why) + } +} + // An entry we cannot parse is an entry whose differences nobody has seen, so // it has to show up in the exit code rather than in a line people skim past. func TestAnUncheckableSourceIsCounted(t *testing.T) { diff --git a/tools/recipediff/upstream.go b/tools/recipediff/upstream.go index d707ef6..a79ed0f 100644 --- a/tools/recipediff/upstream.go +++ b/tools/recipediff/upstream.go @@ -29,11 +29,19 @@ var readers = map[string]reader{ "env-sh": func(b []byte) (upstream, error) { return parseEnvSh(b), nil }, } +// mismatch accepts a different model only when the entry declares exactly +// that move, so a recipe can serve a newer checkpoint of upstream's model +// and still have every other setting checked against upstream. func (r eugrRecipe) mismatch(e entry) string { - if r.Model != e.Model { - return "that file serves " + r.Model + if r.Model == e.Model { + return "" } - return "" + for _, d := range e.Source.Deviations { + if d.Kind == "model" && d.Setting == "model" && d.Upstream == r.Model && d.Ours == e.Model { + return "" + } + } + return "that file serves " + r.Model } func (r eugrRecipe) findings(e entry) []finding { return compare(e, r) }