From 7636662b7596f4399e9171f540526067fea25792 Mon Sep 17 00:00:00 2001 From: FujitsuPolycom <87842395+FujitsuPolycom@users.noreply.github.com> Date: Thu, 19 Nov 2026 18:35:05 -0600 Subject: [PATCH 1/7] Add opt-in 6k DeepSeek V4.1 prefill with 8K chunks --- THIRD_PARTY_NOTICES.md | 9 + docs/operations/install-reference.md | 1 + integrations/vllm/ds41_row_shard/README.md | 117 ++++ .../ds41_row_shard-0.1.0.dist-info/METADATA | 5 + .../entry_points.txt | 2 + .../top_level.txt | 1 + .../ds41_row_shard/ds41_row_shard/__init__.py | 659 ++++++++++++++++++ .../ds41_row_shard/ds41_row_shard/core.py | 534 ++++++++++++++ .../ds41_row_shard/local_query.py | 359 ++++++++++ .../ds41_row_shard/source_edit.py | 152 ++++ .../vllm/ds41_row_shard/tests/conftest.py | 14 + .../vllm/ds41_row_shard/tests/fakes.py | 216 ++++++ .../tests/fixtures/decoder_layer_forward.py | 75 ++ .../tests/fixtures/engram_forward.py | 31 + .../vllm/ds41_row_shard/tests/test_core.py | 394 +++++++++++ .../tests/test_image_sources.py | 217 ++++++ .../ds41_row_shard/tests/test_source_edit.py | 232 ++++++ .../vllm/ds41_row_shard/tests/tp_world.py | 100 +++ performance/enhancements.json | 54 +- performance/enhancements.md | 23 +- .../row-owned-full-head-ring-20261119.jsonl | 45 ++ .../row-owned-full-head-ring-20261119.md | 59 ++ .../row-owned-indexer-ring-20261119.jsonl | 116 +++ .../row-owned-indexer-ring-20261119.md | 85 +++ .../row-owned-prefill-ring-20261119.jsonl | 11 + .../row-owned-prefill-ring-20261119.md | 63 ++ .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- runtime/common/compose.py | 2 + runtime/common/installer.py | 20 +- runtime/common/serving.py | 91 ++- runtime/host/checkpoint_plan.py | 7 +- runtime/host/install_workflow.py | 9 +- runtime/host/test_install_help.py | 3 +- runtime/host/test_install_sircl.py | 86 ++- 76 files changed, 3800 insertions(+), 78 deletions(-) create mode 100644 integrations/vllm/ds41_row_shard/README.md create mode 100644 integrations/vllm/ds41_row_shard/ds41_row_shard-0.1.0.dist-info/METADATA create mode 100644 integrations/vllm/ds41_row_shard/ds41_row_shard-0.1.0.dist-info/entry_points.txt create mode 100644 integrations/vllm/ds41_row_shard/ds41_row_shard-0.1.0.dist-info/top_level.txt create mode 100644 integrations/vllm/ds41_row_shard/ds41_row_shard/__init__.py create mode 100644 integrations/vllm/ds41_row_shard/ds41_row_shard/core.py create mode 100644 integrations/vllm/ds41_row_shard/ds41_row_shard/local_query.py create mode 100644 integrations/vllm/ds41_row_shard/ds41_row_shard/source_edit.py create mode 100644 integrations/vllm/ds41_row_shard/tests/conftest.py create mode 100644 integrations/vllm/ds41_row_shard/tests/fakes.py create mode 100644 integrations/vllm/ds41_row_shard/tests/fixtures/decoder_layer_forward.py create mode 100644 integrations/vllm/ds41_row_shard/tests/fixtures/engram_forward.py create mode 100644 integrations/vllm/ds41_row_shard/tests/test_core.py create mode 100644 integrations/vllm/ds41_row_shard/tests/test_image_sources.py create mode 100644 integrations/vllm/ds41_row_shard/tests/test_source_edit.py create mode 100644 integrations/vllm/ds41_row_shard/tests/tp_world.py create mode 100644 performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.jsonl create mode 100644 performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md create mode 100644 performance/records/deepseek-v41-flash/row-owned-indexer-ring-20261119.jsonl create mode 100644 performance/records/deepseek-v41-flash/row-owned-indexer-ring-20261119.md create mode 100644 performance/records/deepseek-v41-flash/row-owned-prefill-ring-20261119.jsonl create mode 100644 performance/records/deepseek-v41-flash/row-owned-prefill-ring-20261119.md diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 9defd02f..aabef2cf 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -459,6 +459,15 @@ with its pinned CUTLASS, CCCL and spdlog submodules. No FlashInfer source is inc model files are included; operators fetch the checkpoint themselves. +### 15e. vLLM DeepSeek-V4.1 decoder and Engram reference code + +`integrations/vllm/ds41_row_shard/` adapts the DeepSeek-V4.1 decoder layer +and Engram forward paths from the installer image's pinned vLLM tree +(Apache-2.0, copyright contributors to the vLLM project). Two test fixtures +retain the reference methods from vLLM commit +`d51b4181acc06622357c81dc8e0be46ad96a0779` with their SPDX notices. The +plugin records source file hashes and verifies them before installing hooks. + ## 16. Mia DeepSeek V4.1 SGLang adapter (external build input) `runtime/deepseek-v41-sglang/build-image.sh` clones diff --git a/docs/operations/install-reference.md b/docs/operations/install-reference.md index 403b6ab6..05ba6fe8 100644 --- a/docs/operations/install-reference.md +++ b/docs/operations/install-reference.md @@ -822,6 +822,7 @@ flag, the profile's value applies. | `--max-concurrency N` | `--max-num-seqs` | requests served at the same time | | `--kv-cache-gib N` | `--kv-cache-memory-bytes` | GiB of KV cache on each Spark, at most a tenth above the profile's value | | `--save-cpu` | vLLM's shared-memory reader window (container variable `SPARKRING_SHM_BUSY_LOOP_S`) | a switch: readers poll 2 ms after a read instead of one second | +| `--row-owned-prefill` | Eager prefill with replicated Engram projection | experimental [DeepSeek V4.1-Flash-1017 on a four-Spark NCCL cycle](../../integrations/vllm/ds41_row_shard/README.md#install-on-a-four-spark-cycle), via `sparkring install` | | `--reasoning-effort LEVEL` | the model's default effort level, in `--default-chat-template-kwargs` on Node A | one of the model's [levels](#thinking) | | `--thinking off` | the model's default thinking, in `--default-chat-template-kwargs` on Node A | thinking stays off unless a request turns it on | | `--api-port N` | `--port` | the TCP port of the model's API, 1024 to 65535 ([API endpoint](#api-endpoint)) | diff --git a/integrations/vllm/ds41_row_shard/README.md b/integrations/vllm/ds41_row_shard/README.md new file mode 100644 index 00000000..85d1073f --- /dev/null +++ b/integrations/vllm/ds41_row_shard/README.md @@ -0,0 +1,117 @@ +# DeepSeek V4.1 row-owned prefill + +**Research-only.** The plugin targets the B12X engine in installer image +`dev-20261013-dcp2prefill-status038-sircl-tp6`. Its CPU tests compare +row-owned tensors with the image's full-row forward and check the source +pins. See [the model profile](../../../profiles/deepseek-v41-flash-tp4/profile.json) +for the serving configuration. + +Each tensor-parallel rank keeps the residual and mixing coefficients for +its own prefill rows. The plugin gathers normalized attention and feed-forward +inputs, then reduce-scatters their partial outputs. At the compressed encoder +boundary, it prepares global KV from full inputs and gathers the residual state +for the replay rows. + +Before that boundary, the installed experiment scores each attention indexer's +tiles on their row owners when the tile boundaries align. It gathers the selected +top-k indices in token order before tensor-parallel attention. The candidate +source layer scores the full batch so later layers can reuse its candidate table. + +Engram tables contribute each lookup element from one vocabulary shard. With +a replicated Engram projection, reduce-scatter assembles the lookup rows +directly on their token owners. Each owner projects and mixes just its rows. +With a column-parallel projection, the input rows still need to match on all +ranks for the output gather. The plugin preserves the full-row Engram +reduction and projection for that configuration. + +## Install on a four-Spark cycle + +On a directly cabled four-Spark cycle that SparkRing has set up, review the +deployment with: + +```sh +sudo sparkring install --profile deepseek-v41-flash-tp4 --checkpoint 1017 \ + --image dev-20261013-dcp2prefill-status038-sircl-tp6 --transport nccl \ + --row-owned-prefill --plan +``` + +Run the command with `--yes` in place of `--plan` to apply the plan. The +installer stages its retained source on each rank and mounts the plugin +read-only. The setting selects eager execution, disk-resident Engram tables +with replicated projection, 8,192-token prefill chunks, DSpark5 with adaptive +verification off, and a 262,144-token context limit. Use `--context-length` +for a smaller limit. + +The installer enables compact routing, full-head local-query attention, +narrow KV gathers, and packed compressor projections. At 8K chunks, these +settings cleared 6,000 prompt tokens/s at all three tested prompt lengths. +Full-head prefill holds additional weights per rank. [Four-Spark cycle record](../../../performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md) +The install planner has offline coverage. Hardware validation of the install +path and sustained decode is pending. + +### Configure a development container + +Mount this directory, including its plugin metadata, at `/opt/ds41_row_shard` +in every serving container. Prepend that path to `PYTHONPATH` and append +`ds41_row_shard` to the existing `VLLM_PLUGINS` list. Set +`DS41_ROW_SHARD_PREFILL=1` on every rank. +Set `DS41_ROW_SHARD_INDEXER=1` on every rank to distribute indexer scoring. +Set `DS41_ROW_SHARD_COMPACT_ROUTES=1` to run the gate and modular router +on local rows and gather the selected expert IDs and FP32 weights. +Set `DS41_ROW_SHARD_LOCAL_QUERIES=1` to assemble the full-head Q and output +weights once at load and prepare separate prefill plans. Each query owner +uses complete local KV caches. Set `DS41_ROW_SHARD_KV_LATENTS=1` to gather +only KV latents on eligible layers. With both flags set, +`DS41_ROW_SHARD_COMPRESSOR_LATENTS=1` also packs and gathers the +index-source layers' projections without changing their dtype bits. +Set `DS41_ROW_SHARD_ENGRAM_BANDS=1` to test feature-banded Engram lookups. +The unbanded build had the highest medians on the measured NCCL cycle. + +The TP4 profile normally uses a column-parallel Engram projection. To test +the reduce-scatter path, set `"projection_tp": false` in the profile's +`--engram-config` while keeping its disk-table settings. Replicating the +projection changes device memory use. Record KV capacity and prefill +throughput for that exact configuration. + +The plugin verifies the source hashes before installing its hooks. Every TP +rank agrees on the flags and eligibility before changing collectives. The +default minimum is 512 owned rows per rank +(`DS41_ROW_SHARD_MIN_OWNED_ROWS`). Eligible forwards use eager execution, +have an unpadded token count divisible by the TP size, and include a prefill +request. Pure decode, captured graphs, and smaller or padded tails use the +image's full-row path. + +The first eight eligible forwards log `DS41_ROW_SHARD` with the rank, owned +rows and collective counts. With replicated Engram projection, `engram_rs=2` +reports that both Engram layers delivered lookup rows to their owners. +The `indexer_gathers` counter reports how many indexers distributed scoring. + +## Verify the source pins and tensor layout + +From the repository root, point `SPARKRING_DS41_IMAGE_SOURCES` at a directory +containing the extracted `vllm/` source tree and run: + +```bash +python -m pytest integrations/vllm/ds41_row_shard/tests -q +``` + +The CPU suite checks full-row equivalence on simulated TP2, TP4 and TP8 ranks, +masked rows, collective counts, and pinned image source files. Live tests +must establish output and cache correctness, actual branch admission, +time to first token, decode behavior and usable KV capacity. + +## Reference implementation + +The signed Ring 47 Hyperflare export `1431adf0` reports an 8,192-token +prefill chunk and RoCEnante proxy ABI 14. Its decoder, attention, and Engram +source files match Hyperflare #330. Its variable-length gather takes the +rank-local view before the opaque call, while #330 takes the view inside +that call. Both pass the selected rows to RoCEnante. + +| Change | SparkRing port | +|---|---| +| [Hyperflare #282](https://github.com/NVIDIA/hyperflare-inference/pull/282) | The existing plugin reduce-scatters attention and MoE outputs and retains row-local mHC state. | +| [Hyperflare #283](https://github.com/NVIDIA/hyperflare-inference/pull/283) | Separate B12X prefill plans run full-head attention on owned query rows. Narrow gathers provide complete KV and owned-row builders write the attention metadata. | +| [Hyperflare #284](https://github.com/NVIDIA/hyperflare-inference/pull/284) | Compact routing runs the gate and native selector on each owner's rows and gathers selected expert IDs and FP32 route weights. | +| [Hyperflare #330](https://github.com/NVIDIA/hyperflare-inference/pull/330) | The installer image stages vocabulary-sharded lookup values. SparkRing reduce-scatters these before the replicated Engram projection and mixes the result into the owned residual. Hyperflare's banded reduction operates on projected partials in its own layout. | +| [FlashInfer #106](https://github.com/local-inference-lab/flashinfer/pull/106) and [#107](https://github.com/local-inference-lab/flashinfer/pull/107) | Both heads diverge from the export's FlashInfer revision `4fd836dc`. The NCCL cycle uses a different transport. On open chains, SparkRing's SIRCL subset gather has its own forwarding schedule and publishes the flag after the payload on the lane's queue pair. | diff --git a/integrations/vllm/ds41_row_shard/ds41_row_shard-0.1.0.dist-info/METADATA b/integrations/vllm/ds41_row_shard/ds41_row_shard-0.1.0.dist-info/METADATA new file mode 100644 index 00000000..90d06b41 --- /dev/null +++ b/integrations/vllm/ds41_row_shard/ds41_row_shard-0.1.0.dist-info/METADATA @@ -0,0 +1,5 @@ +Metadata-Version: 2.1 +Name: ds41_row_shard +Version: 0.1.0 +Summary: Row-owned prefill for DeepSeek-V4.1-Flash on SparkRing vLLM (research) +License: Apache-2.0 diff --git a/integrations/vllm/ds41_row_shard/ds41_row_shard-0.1.0.dist-info/entry_points.txt b/integrations/vllm/ds41_row_shard/ds41_row_shard-0.1.0.dist-info/entry_points.txt new file mode 100644 index 00000000..798397f3 --- /dev/null +++ b/integrations/vllm/ds41_row_shard/ds41_row_shard-0.1.0.dist-info/entry_points.txt @@ -0,0 +1,2 @@ +[vllm.general_plugins] +ds41_row_shard = ds41_row_shard:register diff --git a/integrations/vllm/ds41_row_shard/ds41_row_shard-0.1.0.dist-info/top_level.txt b/integrations/vllm/ds41_row_shard/ds41_row_shard-0.1.0.dist-info/top_level.txt new file mode 100644 index 00000000..c58e0408 --- /dev/null +++ b/integrations/vllm/ds41_row_shard/ds41_row_shard-0.1.0.dist-info/top_level.txt @@ -0,0 +1 @@ +ds41_row_shard diff --git a/integrations/vllm/ds41_row_shard/ds41_row_shard/__init__.py b/integrations/vllm/ds41_row_shard/ds41_row_shard/__init__.py new file mode 100644 index 00000000..c8eee48b --- /dev/null +++ b/integrations/vllm/ds41_row_shard/ds41_row_shard/__init__.py @@ -0,0 +1,659 @@ +"""vLLM general plugin for row-owned DeepSeek-V4.1-Flash prefill. + +Status: research-only. The CPU suite in ``tests/`` checks the owned-row +forward against the image's own layer code on simulated ranks. It also checks +the source pins and attention edit against an extracted serving image. + +The source pins target SparkRing installer image +``dev-20261013-dcp2prefill-status038-sircl-tp6`` with B12X attention and experts. + +Flag: ``DS41_ROW_SHARD_PREFILL=1`` selects row ownership; unset or ``0`` +leaves the image untouched (the plugin then installs nothing). Optional +``DS41_ROW_SHARD_MIN_OWNED_ROWS`` (default 512) is the smallest per-rank row +count admitted. Every rank must set the same values; startup votes on them. + +What changes when a forward is admitted (``core`` explains the math): + +* ``DeepseekV4Model.forward`` decides admission and holds the forward's + ``Ownership``; ``DeepseekV4DecoderLayer.forward`` runs layers ``0`` through + the CED boundary (layer ``ced_decoder_start``) on owned rows. +* ``DeepseekV4Attention._o_proj`` gets one line edited: its TP all-reduce + goes through ``_ds41_row_shard_attention_reduce``, which skips the reduction + only while an owned layer asks for the unreduced partial. +* The MoE runner is called with ``defer_tp_reduction=True``. The runner + validates that request with GLM's ``validate_moe_deferral``, which admits + TP2 and TP4 only; for the duration of a deferred call this plugin + substitutes the same checks with TP8 admitted as well. + +Admission (all ranks vote; one ineligible rank keeps every rank on the image +path): eager forward (no CUDA-graph replay, capture or compilation), no +micro-batches, first pipeline stage of a single-stage pipeline, CED indices +present, rows divisible by the TP size with at least the minimum per rank, +attention metadata for every row with no padding (``num_actual_tokens`` +equal to the row count) and not a pure decode step. Mixed batches of prefill +and decode rows are admitted: owned rows only change which rank computes +row-local work, and attention still reads every row. + +Mechanism: before any edit or wrapper is installed the SHA-256 of each file +in ``PINS`` must equal the recorded value; otherwise startup fails with +``PatchRefused``. No file is written. Modules not imported yet are patched +right after their first import (a ``sys.meta_path`` finder). +""" + +from __future__ import annotations + +import functools +import importlib.abc +import importlib.machinery +import importlib.util +import logging +import os +import sys +import threading +from typing import Any + +from .core import ( + MIN_OWNED_ROWS, + STATE, + SUPPORTED_WORLDS, + Ownership, + RowShardRefused, + attention_reduce, + gate_owned_routes, + indexer_score_offsets, + owned_layer_forward, + owned_layers, + publish_index_rows, + row_geometry, + select_owned_routes, +) +from .source_edit import PatchRefused, edit_function, file_sha256 + +PLUGIN_NAME = "ds41_row_shard" +PLUGIN_VERSION = "0.1.0" +FLAG = "DS41_ROW_SHARD_PREFILL" +MIN_ROWS_FLAG = "DS41_ROW_SHARD_MIN_OWNED_ROWS" +INDEXER_FLAG = "DS41_ROW_SHARD_INDEXER" +ROUTES_FLAG = "DS41_ROW_SHARD_COMPACT_ROUTES" +LOCAL_QUERIES_FLAG = "DS41_ROW_SHARD_LOCAL_QUERIES" +KV_LATENTS_FLAG = "DS41_ROW_SHARD_KV_LATENTS" +COMPRESSOR_LATENTS_FLAG = "DS41_ROW_SHARD_COMPRESSOR_LATENTS" +ENGRAM_BANDS_FLAG = "DS41_ROW_SHARD_ENGRAM_BANDS" +MARKER = "__ds41_row_shard__" +IMAGE = "dev-20261013-dcp2prefill-status038-sircl-tp6" + +MOE_RUNNER_MODULE = "vllm.model_executor.layers.fused_moe.runner.moe_runner" +ATTENTION_MODULE = "vllm.models.deepseek_v4_1.attention" +COMPRESSOR_MODULE = "vllm.models.deepseek_v4_1.compressor" +MODEL_MODULE = "vllm.models.deepseek_v4_1.nvidia.model" +GLM_SHARDING_MODULE = "vllm.models.glm5next.nvidia.mhc_prefill_sharding" + +PINS: dict[str, tuple[str, str]] = { + COMPRESSOR_MODULE: ( + "45a881e593f3704e3cc6254a28d15bfc88ddb2d3d7c2494e4b145a4a45605c51", + "compressor projection buffers and full-batch cache state contracts", + ), + # module: (SHA-256 in the image, why the plugin depends on it) + MODEL_MODULE: ( + "dafb69b36e68c36ba8878c6033e1bc94439526c3d1d9c83edd7c153ad2ba88c8", + "decoder layer and model loop that core.owned_layer_forward mirrors", + ), + ATTENTION_MODULE: ( + "ad71ccd505a368a88cfe366e26ae0d66e1ba83a94d860f7a2e0a29b7e984dc2d", + "edited _o_proj; prepare_global_kv and forward call contracts", + ), + "vllm.models.deepseek_v4_1.common.engram": ( + "efda07bdd54d947852cdf75095905033038cf2a4425d7b234d092a9253c7c811", + "Engram.forward, which core.owned_engram mirrors on owned rows", + ), + "vllm.models.deepseek_v4_1.ced": ( + "fe956af8afeb3c708b0d677d437d985974b556f4edf7f90b54a2dfa344568781", + "gather_rows zeroes negative indices, which compaction relies on", + ), + "vllm.models.deepseek_v4_1.b12x_layers": ( + "d6e3352070bc69329ef0c09a20639c7f1165b02fd1f75e8a07133ef2fdd04503", + "B12xMHC plans fall back to the capacity plan for fewer rows", + ), + MOE_RUNNER_MODULE: ( + "86aa7228e44c8dc6e5d3602bcfede3f4d009c935d97237d6a5ac42b2bcb3d3bc", + "defer_tp_reduction skips only the final all-reduce", + ), + "vllm.models.deepseek_v4.nvidia.model": ( + "109236e3b5868f74922f9d270a2d82776f498855b284666279613002b65016ea", + "DeepseekV4MoE forward, which core.moe_unreduced mirrors", + ), + GLM_SHARDING_MODULE: ( + "61d02201f0288bd58ef76687b8698900e45b45446f37a045c1703f8726c288e3", + "validate_moe_deferral, substituted for TP8 during deferred calls", + ), +} + +_O_PROJ_EDIT = ( + " local = get_tp_group().all_reduce(local)\n", + " local = _ds41_row_shard_attention_reduce(local)\n", +) +_INDEXER_SCORE_EDITS = ( + ( + " for offset in range(0, rows, chunk_rows):\n", + " for offset in _ds41_indexer_score_offsets(self, rows, chunk_rows):\n", + ), + ( + " dsa_indexer.select(binding)\n\n", + " dsa_indexer.select(binding)\n" + " _ds41_publish_index_rows(self, rows, chunk_rows)\n", + ), +) + +_LOG = logging.getLogger("vllm." + PLUGIN_NAME) +_LOCK = threading.Lock() +_REPORTS = 0 + + +def _enabled_flag(flag: str) -> bool: + value = os.environ.get(flag, "0").strip() + if value not in ("0", "1", ""): + raise PatchRefused(f"{flag} must be 0 or 1, not {value!r}") + return value == "1" + + +def enabled() -> bool: + return _enabled_flag(FLAG) + + +def min_owned_rows() -> int: + value = os.environ.get(MIN_ROWS_FLAG, str(MIN_OWNED_ROWS)) + try: + rows = int(value) + except ValueError as exc: + raise PatchRefused(f"{MIN_ROWS_FLAG} must be an integer") from exc + if rows < 1: + raise PatchRefused(f"{MIN_ROWS_FLAG} must be positive") + return rows + + +# -- pins -------------------------------------------------------------------- +def check_pins() -> None: + """Refuse unless every pinned file has the recorded SHA-256.""" + for module, (sha256, reason) in PINS.items(): + spec = importlib.util.find_spec(module) + if spec is None or spec.origin is None: + raise PatchRefused(f"{module} not found ({reason})") + actual = file_sha256(spec.origin) + if actual != sha256: + raise PatchRefused( + f"{module} ({spec.origin}) has SHA-256 {actual}, expected " + f"{sha256} ({reason}); this plugin targets image {IMAGE}" + ) + + +# -- attention edit ------------------------------------------------------------ +def _ds41_row_shard_attention_reduce(local): + from vllm.distributed import get_tp_group + + return attention_reduce(local, get_tp_group().all_reduce) + + +def patch_attention(module) -> None: + edit_function( + module, + "DeepseekV4Attention._o_proj", + PINS[ATTENTION_MODULE][0], + (_O_PROJ_EDIT,), + {"_ds41_row_shard_attention_reduce": _ds41_row_shard_attention_reduce}, + MARKER, + ) + edits = () + helpers = {} + if _enabled_flag(INDEXER_FLAG): + edits = _INDEXER_SCORE_EDITS + helpers = { + "_ds41_indexer_score_offsets": indexer_score_offsets, + "_ds41_publish_index_rows": publish_index_rows, + } + if _enabled_flag(LOCAL_QUERIES_FLAG): + from . import local_query + + local_query.install(module, PINS[ATTENTION_MODULE][0], MARKER) + if _enabled_flag(COMPRESSOR_LATENTS_FLAG): + local_query.install_compressor( + module, sys.modules[COMPRESSOR_MODULE], PINS[ATTENTION_MODULE][0], + PINS[COMPRESSOR_MODULE][0], MARKER, + ) + edits += local_query.MQA_EDITS + helpers.update(local_query.MQA_HELPERS) + if edits: + edit_function( + module, + "DeepseekV4Attention.forward_mqa", + PINS[ATTENTION_MODULE][0], + edits, + helpers, + MARKER, + decorator="eager_break_during_capture", + ) + + +# -- MoE deferral at TP8 ----------------------------------------------------- +def _validate_moe_deferral(runner: Any) -> None: + """GLM's ``validate_moe_deferral`` with TP8 admitted beside TP2 and TP4.""" + config = runner.moe_config + parallel = config.moe_parallel_config + if ( + config.tp_size not in SUPPORTED_WORLDS + or config.dp_size != 1 + or config.ep_size != 1 + or config.pcp_size != 1 + or config.is_sequence_parallel + or config.skip_final_all_reduce + or parallel.use_all2all_kernels + or runner._fused_output_is_reduced + or runner.routed_output_transform is not None + or runner.routed_input_transform is not None + or type(runner.router).__name__ == "ZeroExpertRouter" + ): + raise RuntimeError( + "row-owned prefill requires one unreduced conventional TP MoE output" + ) + + +class _DeferralValidator: + """Swap the runner's deferral validator while an owned forward runs.""" + + def __enter__(self): + module = importlib.import_module(GLM_SHARDING_MODULE) + self._module = module + self._saved = module.validate_moe_deferral + module.validate_moe_deferral = _validate_moe_deferral + return self + + def __exit__(self, *exc): + self._module.validate_moe_deferral = self._saved + return False + + +# -- admission ----------------------------------------------------------------- +def _static_error(model, world: int) -> str | None: + """Why this model cannot own rows, or None.""" + from vllm.distributed import get_pp_group + + try: + decoder_layer = sys.modules[MODEL_MODULE].DeepseekV4DecoderLayer + parallel = model.parallel_config + if world not in SUPPORTED_WORLDS: + raise RowShardRefused(f"TP size {world} is not one of {SUPPORTED_WORLDS}") + if ( + get_pp_group().world_size != 1 + or parallel.data_parallel_size != 1 + or parallel.enable_expert_parallel + or getattr(parallel, "enable_eplb", False) + or model.use_sequence_parallel + or model.use_mega_moe + ): + raise RowShardRefused( + "row ownership requires PP1, DP1, no expert parallelism, " + "no sequence parallelism and no mega-MoE" + ) + layers = owned_layers( + model.ced_decoder_start, + len(model.layers), + getattr(model, "aux_hidden_state_layers", ()), + ) + if model.start_layer != 0 or model.end_layer <= layers[-1]: + raise RowShardRefused("owned layers must be local to this stage") + attention = sys.modules[ATTENTION_MODULE].DeepseekV4Attention + if not getattr(attention._o_proj, MARKER, False): + raise RowShardRefused("the WO projection edit is not installed") + if _enabled_flag(ROUTES_FLAG): + runner = sys.modules[MOE_RUNNER_MODULE].MoERunner + if not all(getattr(method, MARKER, False) for method in ( + runner._forward_impl, runner._apply_quant_method, + )): + raise RowShardRefused("the compact MoE routing edits are not installed") + for index in layers: + layer = model.layers[index] + if not isinstance(layer, decoder_layer): + raise RowShardRefused(f"layer {index} is not a V4.1 decoder layer") + ffn = layer.ffn + if ffn.use_mega_moe: + raise RowShardRefused(f"layer {index} uses mega-MoE") + _validate_moe_deferral(ffn.experts) + if ffn.experts.moe_config.tp_size != world: + raise RowShardRefused(f"layer {index} MoE TP size differs") + engram = getattr(layer, "engram", None) + if engram is not None: + kind = type(engram.wkv).__name__ + # Replicated: projected on owned rows. Column-parallel with a + # gathered output (projection_tp): projected on all rows, then + # narrowed. Anything else is unknown here. + if kind == "ColumnParallelLinear": + if not getattr(engram.wkv, "gather_output", False): + raise RowShardRefused(f"layer {index} Engram wkv does not gather") + elif kind != "ReplicatedLinear": + raise RowShardRefused(f"layer {index} Engram wkv is {kind}") + except Exception as exc: # any refusal becomes a vote, never a one-rank raise + return f"{type(exc).__name__}: {exc}" + return None + + +def _vote(group, item): + import torch + + votes: list[Any] = [None] * group.world_size + torch.distributed.all_gather_object(votes, item, group=group.cpu_group) + return votes + + +def configure(model) -> None: + """Agree on feature flags, the threshold and the static checks on all ranks.""" + from vllm.distributed import get_tp_group + + group = get_tp_group() + error = _static_error(model, group.world_size) + settings = ( + enabled(), min_owned_rows(), _enabled_flag(INDEXER_FLAG), + _enabled_flag(ROUTES_FLAG), _enabled_flag(LOCAL_QUERIES_FLAG), + _enabled_flag(KV_LATENTS_FLAG), + _enabled_flag(COMPRESSOR_LATENTS_FLAG), + _enabled_flag(ENGRAM_BANDS_FLAG), + ) + item = (settings, error) + votes = _vote(group, item) + if any(vote[0] != settings for vote in votes): + raise PatchRefused(f"TP ranks disagree on row-owned prefill settings: {votes}") + errors = [vote[1] for vote in votes if vote[1] is not None] + if errors: + raise PatchRefused("row-owned prefill admission failed: " + repr(errors)) + model._ds41_row_shard_layers = { + id(layer): index for index, layer in enumerate(model.layers) + } + model._ds41_row_shard_min_rows = settings[1] + model._ds41_row_shard_compact_routes = settings[3] + model._ds41_row_shard_local_queries = settings[4] + model._ds41_row_shard_kv_latents = settings[5] + model._ds41_row_shard_compressor_latents = settings[6] + model._ds41_row_shard_engram_bands = settings[7] + _LOG.info( + "ds41_row_shard %s enabled: TP%d, owned layers 0..%d, min %d rows per rank", + PLUGIN_VERSION, + group.world_size, + model.ced_decoder_start, + settings[1], + ) + + +def _local_eligible(model, positions, intermediate_tensors, ced_indices): + """Return (geometry, eligible) without any collective.""" + import torch + from vllm.distributed import get_tp_group + from vllm.forward_context import get_forward_context, is_forward_context_available + + if torch.compiler.is_compiling() or torch.cuda.is_current_stream_capturing(): + return None, False + if not is_forward_context_available(): + return None, False + context = get_forward_context() + if context.cudagraph_runtime_mode.name != "NONE" or context.ubatch_slices: + return None, False + group = get_tp_group() + rows = positions.shape[0] + geometry = row_geometry( + rows, group.world_size, group.rank_in_group, model._ds41_row_shard_min_rows + ) + if geometry is None: + return None, False + metadata = context.attn_metadata + eligible = ( + ced_indices is not None + and intermediate_tensors is None + and isinstance(metadata, dict) + ) + if eligible: + first = model.layers[0].attn.swa_cache_layer.prefix + swa = metadata.get(first) + eligible = ( + swa is not None + and type(swa.num_actual_tokens) is int + and swa.num_actual_tokens == rows + and not swa.is_decode + ) + return geometry, eligible + + +def _model_forward(original): + @functools.wraps(original) + def forward( + self, + input_ids, + positions, + intermediate_tensors=None, + inputs_embeds=None, + lookback_token_ids=None, + ced_indices=None, + ): + global _REPORTS + call = functools.partial( + original, + self, + input_ids, + positions, + intermediate_tensors, + inputs_embeds, + lookback_token_ids=lookback_token_ids, + ced_indices=ced_indices, + ) + if STATE.ownership is not None: + raise RuntimeError("nested row-owned forward") + import torch + + if torch.compiler.is_compiling() or torch.cuda.is_current_stream_capturing(): + return call() + if not hasattr(self, "_ds41_row_shard_layers"): + with _LOCK: + if not hasattr(self, "_ds41_row_shard_layers"): + configure(self) + try: + geometry, eligible = _local_eligible( + self, positions, intermediate_tensors, ced_indices + ) + except Exception: # never leave the other ranks waiting in the vote + _LOG.exception("ds41_row_shard: eligibility check failed; voting no") + from vllm.distributed import get_tp_group + + tp = get_tp_group() + # Geometry depends only on the shared row count, so every rank + # still reaches (or skips) the vote together. + geometry = row_geometry( + positions.shape[0], + tp.world_size, + tp.rank_in_group, + self._ds41_row_shard_min_rows, + ) + eligible = False + if geometry is None: + return call() + from vllm.distributed import get_tp_group + + group = get_tp_group() + # Geometry follows from host values every rank shares; the vote keeps + # one rank's metadata difference from splitting the reduction paths. + if not all(_vote(group, eligible)): + return call() + ownership = Ownership( + geometry=geometry, + group=group, + gather_rows=sys.modules["vllm.models.deepseek_v4_1.ced"].gather_rows, + layer_index=self._ds41_row_shard_layers, + boundary=self.ced_decoder_start, + compact_routes=self._ds41_row_shard_compact_routes, + local_queries=self._ds41_row_shard_local_queries, + gather_kv_latents=self._ds41_row_shard_kv_latents, + gather_compressor_latents=self._ds41_row_shard_compressor_latents, + band_engram=self._ds41_row_shard_engram_bands, + ) + STATE.ownership = ownership + try: + with _DeferralValidator(): + result = call() + ownership.finish() + finally: + STATE.ownership = None + if _REPORTS < 8: + _REPORTS += 1 + _LOG.info( + "DS41_ROW_SHARD rank=%d rows=%d owned=%d rs=%d ag=%d compact=%d " + "engram=%d engram_rs=%d indexer_gathers=%d route_gathers=%d local_attention=%d " + "kv_latent_gathers=%d compressor_latent_gathers=%d", + geometry.rank, + geometry.rows, + geometry.owned, + ownership.reduce_scatters, + ownership.all_gathers, + ownership.compactions, + ownership.engram_layers, + ownership.engram_reduce_scatters, + ownership.indexer_gathers, + ownership.route_gathers, + ownership.local_attention_layers, + ownership.kv_latent_gathers, + ownership.compressor_latent_gathers, + ) + return result + + setattr(forward, MARKER, True) + return forward + + +def _layer_forward(original): + @functools.wraps(original) + def forward( + self, + x, + positions, + input_ids, + pre_mix=None, + post_mix=None, + res_mix=None, + residual=None, + engram_hashes=None, + engram_mask=None, + ced_indices=None, + ): + ownership = STATE.ownership + index = None if ownership is None else ownership.layer_index.get(id(self)) + if index is None or index > ownership.boundary: + return original( + self, + x, + positions, + input_ids, + pre_mix, + post_mix, + res_mix, + residual, + engram_hashes, + engram_mask, + ced_indices=ced_indices, + ) + return owned_layer_forward( + self, + ownership, + index, + x, + positions, + input_ids, + pre_mix, + post_mix, + res_mix, + residual, + engram_hashes, + engram_mask, + ced_indices, + ) + + setattr(forward, MARKER, True) + return forward + + +def patch_model(module) -> None: + for cls, wrap in ( + (module.DeepseekV4Model, _model_forward), + (module.DeepseekV4DecoderLayer, _layer_forward), + ): + current = cls.__dict__["forward"] + if not getattr(current, MARKER, False): + cls.forward = wrap(current) + + +# -- installation ---------------------------------------------------------------- +def patch_moe_runner(module) -> None: + if not _enabled_flag(ROUTES_FLAG): + return + pin = PINS[MOE_RUNNER_MODULE][0] + edit_function( + module, "MoERunner._forward_impl", pin, + ((" router_logits, _ = self.gate(hidden_states)\n", + " router_logits = _ds41_gate_owned_routes(self, hidden_states)\n"),), + {"_ds41_gate_owned_routes": gate_owned_routes}, MARKER, + ) + edit_function( + module, "MoERunner._apply_quant_method", pin, + ((" topk_weights, topk_ids = self.router.select_experts(\n", + " topk_weights, topk_ids = _ds41_select_owned_routes(self,\n"),), + {"_ds41_select_owned_routes": select_owned_routes}, MARKER, + ) + + +_PATCHES = { + MOE_RUNNER_MODULE: patch_moe_runner, + ATTENTION_MODULE: patch_attention, + MODEL_MODULE: patch_model, +} + + +class _PatchLoader(importlib.abc.Loader): + def __init__(self, loader, patch): + self._loader = loader + self._patch = patch + + def create_module(self, spec): + return self._loader.create_module(spec) + + def exec_module(self, module): + self._loader.exec_module(module) + self._patch(module) + + +class _PatchFinder(importlib.abc.MetaPathFinder): + def find_spec(self, name, path, target=None): + patch = _PATCHES.get(name) + if patch is None: + return None + spec = importlib.machinery.PathFinder.find_spec(name, path) + if spec is None or spec.loader is None: + return None + spec.loader = _PatchLoader(spec.loader, patch) + return spec + + +def install() -> None: + check_pins() + with _LOCK: + if not any(isinstance(f, _PatchFinder) for f in sys.meta_path): + sys.meta_path.insert(0, _PatchFinder()) + # The attention module must be edited before the model module runs. + for name in _PATCHES: + module = sys.modules.get(name) + if module is not None: + _PATCHES[name](module) + + +def register() -> None: + """vLLM general-plugin entry point; installs nothing unless the flag is 1.""" + if not enabled(): + return + min_owned_rows() + if _enabled_flag(COMPRESSOR_LATENTS_FLAG) and not ( + _enabled_flag(LOCAL_QUERIES_FLAG) and _enabled_flag(KV_LATENTS_FLAG) + ): + raise PatchRefused(f"{COMPRESSOR_LATENTS_FLAG} requires local queries and narrow KV gathers") + install() diff --git a/integrations/vllm/ds41_row_shard/ds41_row_shard/core.py b/integrations/vllm/ds41_row_shard/ds41_row_shard/core.py new file mode 100644 index 00000000..6afd3260 --- /dev/null +++ b/integrations/vllm/ds41_row_shard/ds41_row_shard/core.py @@ -0,0 +1,534 @@ +"""Row ownership for DeepSeek-V4.1 prefill: the model math, free of vLLM imports. + +A tensor-parallel (TP) rank normally holds every token row of a forward and +repeats the four-stream hyperconnection (mHC) arithmetic on all of them; the +attention and MoE branches each end in an all-reduce of a ``(rows, hidden)`` +partial sum. With row ownership, rank ``r`` of ``W`` keeps only rows +``[r * q, (r + 1) * q)`` (``q = rows / W``) of the residual stream and its +mixes, for every layer before the compressed-encoder/decoder (CED) boundary: + +* the attention mHC runs on the owned rows, and one all-gather rebuilds the + full-row attention input, which attention consumes unchanged; +* attention returns its TP partial unreduced, and a reduce-scatter leaves each + rank the summed rows it owns; +* the FFN mHC runs on the owned rows, one all-gather rebuilds the MoE input, + the MoE returns its partial unreduced and a reduce-scatter sums it. + +The all-reduce of a partial equals its reduce-scatter followed by an +all-gather, so each layer moves the same bytes as before, while the per-row +mHC work falls by a factor of ``W``. Engram layers stay owned: their staged +table rows are all-reduced exactly as the image does, then each rank mixes its +own rows. At the CED boundary layer the attention input is gathered in full +(the global KV write needs every encoder row) and the residual stream is +compacted to the decoder's replay rows by a masked sum, so no full-row residual +is ever rebuilt. Layers after the boundary run the image's code unchanged. + +Everything here takes its collectives and kernels from arguments, so the CPU +tests drive it with simulated ranks; ``__init__`` binds the image's objects. +""" + +from __future__ import annotations + +import sys +import threading +from collections.abc import Callable +from contextlib import contextmanager +from dataclasses import dataclass, field +from typing import Any + +MIN_OWNED_ROWS = 512 +"""Smallest owned row count admitted: below it the collectives' fixed cost dominates.""" + +SUPPORTED_WORLDS = (2, 4, 8) + + +class RowShardRefused(RuntimeError): + """A static precondition of row ownership does not hold for this model.""" + + +@dataclass(frozen=True) +class Geometry: + """The rows one rank owns in one forward.""" + + rows: int + world: int + rank: int + + @property + def owned(self) -> int: + return self.rows // self.world + + @property + def start(self) -> int: + return self.rank * self.owned + + +def row_geometry(rows: int, world: int, rank: int, min_owned: int = MIN_OWNED_ROWS): + """Return this rank's ``Geometry`` or ``None`` when ``rows`` cannot be owned. + + Rows must divide evenly: padding rows would write cache slots they do not + own, so a non-dividing forward keeps the image's full-row path. + """ + if world not in SUPPORTED_WORLDS or not 0 <= rank < world: + return None + if rows <= 0 or rows % world or rows // world < min_owned: + return None + return Geometry(rows, world, rank) + + +def owned_layers(decoder_start: int | None, num_layers: int, aux_layers) -> range: + """Layer indices that run on owned rows; the last one is the CED boundary. + + Raises ``RowShardRefused`` when the model has no CED boundary, or when a + draft model reads an auxiliary hidden state from an owned layer. The image + reconstructs that state after layer ``idx`` when ``idx + 1`` is listed; + for ``idx < decoder_start`` the tensors hold owned rows. After the boundary + layer (``idx + 1 == decoder_start + 1``) they are already the compacted + decoder rows, identical on every rank, so that entry is allowed. + """ + if decoder_start is None or not 0 < decoder_start < num_layers: + raise RowShardRefused("row ownership requires a CED decoder boundary") + clash = sorted(a for a in aux_layers if 1 <= a <= decoder_start) + if clash: + raise RowShardRefused( + f"auxiliary hidden states {clash} would read owned rows of layers " + f"0..{decoder_start - 1}" + ) + return range(decoder_start + 1) + + +class _State(threading.local): + def __init__(self) -> None: + self.ownership: Ownership | None = None + self.defer_attention = 0 + self.route_owner: Ownership | None = None + self.compressor_inputs = None + + +STATE = _State() +"""Per-thread forward state; vLLM runs one model forward per worker thread.""" + + +@dataclass +class Ownership: + """One forward's row ownership: collectives, accounting and helpers. + + ``group`` provides ``all_reduce(t)``, ``reduce_scatter(t, dim=0)`` and + ``all_gather(t, dim=0)`` over the TP ranks in rank order (vLLM's + ``GroupCoordinator``). ``gather_rows(source, indices)`` gathers first-axis + rows and zeroes rows whose index is negative or out of range (the image's + ``vllm::dsv41_gather_rows``). + """ + + geometry: Geometry + group: Any + gather_rows: Callable[[Any, Any], Any] + layer_index: dict[int, int] + boundary: int + reduce_scatters: int = 0 + all_gathers: int = 0 + compactions: int = 0 + deferred_attention: int = 0 + engram_layers: int = 0 + engram_reduce_scatters: int = 0 + indexer_gathers: int = 0 + compact_routes: bool = False + route_gathers: int = 0 + local_queries: bool = False + local_attention_layers: int = 0 + gather_kv_latents: bool = False + kv_latent_gathers: int = 0 + gather_compressor_latents: bool = False + compressor_latent_gathers: int = 0 + band_engram: bool = False + layers_seen: list[int] = field(default_factory=list) + + # -- row views --------------------------------------------------------- + def local(self, tensor: Any) -> Any: + """This rank's rows of a full-row tensor (a view).""" + if tensor.shape[0] != self.geometry.rows: + raise RuntimeError( + f"row ownership expected {self.geometry.rows} rows, got " + f"{tensor.shape[0]}" + ) + return tensor.narrow(0, self.geometry.start, self.geometry.owned) + + # -- collectives ------------------------------------------------------- + def reduce_scatter(self, partial: Any) -> Any: + """Sum a full-row TP partial and keep this rank's rows.""" + rows = self.geometry.rows + if partial.shape[0] != rows: + raise RuntimeError("row-ownership reduce-scatter needs a full-row partial") + flat = partial.reshape(rows, -1) + if not flat.is_contiguous(): + flat = flat.contiguous() + out = self.group.reduce_scatter(flat, dim=0) + self.reduce_scatters += 1 + return out.view(self.geometry.owned, *partial.shape[1:]) + + def all_gather(self, owned: Any) -> Any: + """Concatenate every rank's owned rows in rank order.""" + if owned.shape[0] != self.geometry.owned: + raise RuntimeError("row-ownership all-gather needs owned rows") + source = owned if owned.is_contiguous() else owned.contiguous() + out = self.group.all_gather(source, dim=0) + self.all_gathers += 1 + return out + + def compact(self, owned: Any, indices: Any) -> Any: + """Gather global rows ``indices`` of an owned tensor onto every rank. + + Each rank contributes the indexed rows it owns and zeros elsewhere; + a sum over the ranks then holds every row exactly once. Adding zeros + is exact for finite values, so the result equals a gather from the + full-row tensor; invalid (negative) indices yield zero rows, as the + image's gather does. + """ + start, count = self.geometry.start, self.geometry.owned + local = indices - start + mine = (indices >= start) & (local < count) + local = local.masked_fill(~mine, -1) + rows = self.gather_rows(owned, local) + if not rows.is_contiguous(): + rows = rows.contiguous() + self.compactions += 1 + return self.group.all_reduce(rows) + + @contextmanager + def unreduced_attention(self): + """Have the image's WO projection return its TP partial unreduced.""" + STATE.defer_attention += 1 + try: + yield + finally: + STATE.compressor_inputs = None + STATE.defer_attention -= 1 + + # -- accounting -------------------------------------------------------- + def finish(self) -> None: + """Check that every owned layer ran its collectives exactly once.""" + expected_layers = list(range(self.boundary + 1)) + if self.layers_seen != expected_layers: + raise RuntimeError( + f"row ownership saw layers {self.layers_seen}, expected " + f"{expected_layers}" + ) + full = self.boundary # layers 0 .. boundary-1 run both branches owned + if ( + self.reduce_scatters != 2 * full - self.local_attention_layers + self.engram_reduce_scatters + or self.all_gathers != 2 * full + 1 + or self.compactions != 4 + or self.deferred_attention != full + ): + raise RuntimeError( + "row-ownership collective accounting mismatch: " + f"RS={self.reduce_scatters} AG={self.all_gathers} " + f"compact={self.compactions} deferred={self.deferred_attention} " + f"Engram RS={self.engram_reduce_scatters} " + f"for {full} owned layers and one boundary" + ) + + +def attention_reduce(local: Any, all_reduce: Callable[[Any], Any]) -> Any: + """The WO projection's TP reduction, skipped while ownership defers it.""" + if STATE.defer_attention: + own = STATE.ownership + if own is not None: + own.deferred_attention += 1 + return local + return all_reduce(local) + + +def indexer_score_offsets(attention: Any, rows: int, chunk_rows: int) -> range: + """Keep native scoring tiles intact while assigning them to row owners.""" + own = STATE.ownership + if ( + own is None + or rows != own.geometry.rows + or own.geometry.owned % chunk_rows != 0 + or attention.is_draft + or not 0 <= attention.layer_id < own.boundary + or attention.layer_id == attention.candidate_source_layer + ): + return range(0, rows, chunk_rows) + first = own.geometry.start + return range(first, first + own.geometry.owned, chunk_rows) + + +def publish_index_rows(attention: Any, rows: int, chunk_rows: int) -> None: + """Assemble the full-row top-k table before tensor-parallel attention reads it.""" + offsets = indexer_score_offsets(attention, rows, chunk_rows) + count = offsets.stop - offsets.start + if count == rows: + return + own = STATE.ownership + indices = attention.topk_indices_buffer[:rows] + selected = indices.narrow(0, offsets.start, count).contiguous() + indices.copy_(own.group.all_gather(selected, dim=0)) + own.indexer_gathers += 1 + + +def gate_owned_routes(runner: Any, hidden_states: Any) -> Any: + """Run the original gate on the rows that will select experts.""" + own = STATE.route_owner + if ( + own is not None + and hidden_states.shape[0] == own.geometry.rows + and not runner.is_monolithic + and not runner.do_naive_dispatch_combine + and runner.moe_config.pcp_size == 1 + ): + hidden_states = own.local(hidden_states) + logits, _ = runner.gate(hidden_states) + return logits + + +def select_owned_routes( + runner: Any, *, hidden_states: Any, router_logits: Any, + topk_indices_dtype: Any, input_ids: Any, +) -> tuple[Any, Any]: + """Publish each owner's selected IDs and FP32 weight bits to the TP group.""" + own = STATE.route_owner + if own is None or router_logits.shape[0] == hidden_states.shape[0]: + return runner.router.select_experts( + hidden_states=hidden_states, router_logits=router_logits, + topk_indices_dtype=topk_indices_dtype, input_ids=input_ids, + ) + if router_logits.shape[0] != own.geometry.owned: + raise RuntimeError("owned MoE gate did not return its rank's rows") + import torch + + weights, ids = runner.router.select_experts( + hidden_states=own.local(hidden_states), router_logits=router_logits, + topk_indices_dtype=topk_indices_dtype, + input_ids=None if input_ids is None else own.local(input_ids), + ) + if weights.dtype != torch.float32: + raise RuntimeError("compact MoE routing requires FP32 weights") + # Expert IDs fit in int32. Preserve the weight bits, including signed zero. + record = torch.cat((weights.contiguous().view(torch.int32), ids.to(torch.int32)), dim=-1) + gathered = own.group.all_gather(record, dim=0) + own.route_gathers += 1 + width = weights.shape[-1] + weights = gathered[:, :width].contiguous().view(torch.float32) + ids = gathered[:, width:].to(ids.dtype).contiguous() + return weights, ids + + +def moe_unreduced(ffn: Any, hidden_states: Any, input_ids: Any) -> Any: + """``DeepseekV4MoE.forward`` without its final TP all-reduce or dtype cast. + + Mirrors the image's non-mega path (``_forward_fused_moe``) and asks the + MoE runner to defer the reduction it would otherwise apply; the caller + sums the partial and then casts, in the image's order. + """ + if getattr(ffn, "use_mega_moe", False): + raise RowShardRefused("row ownership does not support the mega-MoE path") + gate = ffn.gate + if getattr(gate, "tid2eid", None) is not None and input_ids is None: + raise ValueError("DeepSeek V4 hash MoE routing requires input_ids.") + if getattr(gate, "bias_vl", None) is not None and input_ids is None: + raise ValueError("DeepSeek V4 vision MoE routing requires input_ids.") + shape = hidden_states.shape + partial = ffn.experts( + hidden_states=hidden_states, + router_logits=hidden_states, + input_ids=input_ids, + defer_tp_reduction=True, + ) + return partial.view(shape) + + +def reduce_engram_lookup(own: Ownership, partial: Any, max_band_bytes: int) -> Any: + """Reduce each feature band to its row owner in original column order.""" + import torch + + row_bytes_per_column = partial.shape[0] * partial.element_size() + columns = partial.shape[-1] + step = max(8, max_band_bytes // (8 * row_bytes_per_column) * 8) + if not own.band_engram or step >= columns: + own.engram_reduce_scatters += 1 + return own.reduce_scatter(partial) + bands = [] + for start in range(0, columns, step): + bands.append(own.reduce_scatter(partial[:, start:start + step])) + own.engram_reduce_scatters += len(bands) + return torch.cat(bands, dim=-1) + + +def owned_engram( + engram: Any, residual: Any, hash_ids: Any, token_mask: Any, own: Ownership +) -> Any: + """``Engram.forward`` for owned residual rows. + + Each staged lookup element has one table owner. With a replicated projection, + reduce-scatter assembles the embedding rows directly on their token owners. + A column-parallel projection gathers its output columns across ranks, so + every rank supplies the same full rows and keeps its slice after projection. + """ + module = sys.modules[type(engram).__module__] + if ( + engram.embed_tokens.table_memory == "disk" + and ( + not engram._disk_prepared + or engram._disk_prepared_tokens < hash_ids.shape[0] + ) + ): + raise RuntimeError("Disk Engram output is not prepared") + partial = engram.staged_rows[: hash_ids.shape[0]] + if type(engram.wkv).__name__ == "ReplicatedLinear": + rows = reduce_engram_lookup(own, partial, 80 * 1024**2) + kv = engram.wkv(rows) + else: + rows = module.tensor_model_parallel_all_reduce(partial) + kv = own.local(engram.wkv(rows)) + state = residual.flatten(1) + out = state.new_empty(state.shape) + mask = None if token_mask is None else own.local(token_mask) + module.hyperconnection.run_engram_mix( + state, + kv, + engram.norm_weights, + eps=engram.eps, + plan=engram.mix_plans[mask is not None], + out=out, + token_mask=mask, + ) + own.engram_layers += 1 + return out.view_as(residual) + + +def owned_layer_forward( + layer: Any, + own: Ownership, + index: int, + x: Any, + positions: Any, + input_ids: Any, + pre_mix: Any = None, + post_mix: Any = None, + res_mix: Any = None, + residual: Any = None, + engram_hashes: Any = None, + engram_mask: Any = None, + ced_indices: Any = None, +): + """``DeepseekV4DecoderLayer.forward`` for a layer at or before the boundary. + + Inputs and outputs follow the image's layer: before the boundary the + returned ``x``, ``residual``, mixes and ``ffn_pre`` hold owned rows; the + boundary layer returns decoder (compacted) rows on every rank, which is + what the image's next layer expects. + """ + if index != len(own.layers_seen): + raise RuntimeError(f"row ownership reached layer {index} out of order") + own.layers_seen.append(index) + boundary = index == own.boundary + if boundary != (ced_indices is not None): + raise RuntimeError("CED indices must arrive exactly at the boundary layer") + + if residual is None: + # First layer: the embedding output holds every row on every rank. + x = own.local(x) + if pre_mix is not None: + pre_mix = own.local(pre_mix) + previous_output = x if residual is not None else None + apply_engram = layer.engram is not None and engram_hashes is not None + if residual is None: + residual = x + elif apply_engram: + residual = layer._b12x_mhc.post(x, residual, post_mix, res_mix) + previous_output = None + if apply_engram: + if residual.ndim == 2: + residual = residual[:, None, :].expand(-1, layer.hc_mult, -1).contiguous() + residual = owned_engram( + layer.engram, + residual, + engram_hashes[:, layer.engram.layer_hash_index], + engram_mask, + own, + ) + fn = layer.hc_attn_fn_broadcast if residual.ndim == 2 else layer.hc_attn_fn + residual, post_mix, res_mix, x, attn_pre = layer._b12x_mhc.pre( + residual, + fn, + layer.hc_attn_scale, + layer.hc_attn_base, + layer.attn_norm.weight, + pre_mix, + previous_output=previous_output, + previous_post=post_mix if previous_output is not None else None, + previous_comb=res_mix if previous_output is not None else None, + ) + local_attention = ( + not boundary and own.local_queries + and getattr(layer.attn, "_ds41_query_replica", None) is not None + ) + local_input = ( + local_attention and own.gather_kv_latents + and ( + (layer.attn.compressor is None and layer.attn.indexer is None) + or ( + own.gather_compressor_latents and layer.attn.compressor is not None + and layer.attn.indexer is not None + ) + ) + ) + if not local_input: + x = own.all_gather(x) + + if boundary: + # The global KV write reads every encoder row; the decoder keeps only + # the replay rows, so the residual stream is compacted, not gathered. + global_kv_ready = layer.attn.prepare_global_kv(positions, x) + x = own.gather_rows(x, ced_indices) + residual = own.compact(residual, ced_indices) + post_mix = own.compact(post_mix, ced_indices) + res_mix = own.compact(res_mix, ced_indices) + attn_pre = own.compact(attn_pre, ced_indices) + positions = own.gather_rows(positions, ced_indices) + if input_ids is not None: + input_ids = own.gather_rows(input_ids, ced_indices) + x = layer.attn(positions, x, None, global_kv_ready=global_kv_ready) + residual, post_mix, res_mix, x, ffn_pre = layer._b12x_mhc.post_pre( + x, + residual, + post_mix, + res_mix, + layer.hc_ffn_fn, + layer.hc_ffn_scale, + layer.hc_ffn_base, + layer.ffn_norm.weight, + attn_pre, + ) + x = layer.ffn(x, input_ids) + return x, residual, post_mix, res_mix, ffn_pre + + with own.unreduced_attention(): + partial = layer.attn(positions, x, None, global_kv_ready=None) + if local_attention: + x = partial + own.local_attention_layers += 1 + else: + x = own.reduce_scatter(partial) + residual, post_mix, res_mix, x, ffn_pre = layer._b12x_mhc.post_pre( + x, + residual, + post_mix, + res_mix, + layer.hc_ffn_fn, + layer.hc_ffn_scale, + layer.hc_ffn_base, + layer.ffn_norm.weight, + attn_pre, + ) + x = own.all_gather(x) + # The image casts the reduced MoE output to the input dtype; sum first. + STATE.route_owner = own if own.compact_routes else None + try: + partial = moe_unreduced(layer.ffn, x, input_ids) + finally: + STATE.route_owner = None + x = own.reduce_scatter(partial).to(x.dtype) + return x, residual, post_mix, res_mix, ffn_pre diff --git a/integrations/vllm/ds41_row_shard/ds41_row_shard/local_query.py b/integrations/vllm/ds41_row_shard/ds41_row_shard/local_query.py new file mode 100644 index 00000000..9ec6d966 --- /dev/null +++ b/integrations/vllm/ds41_row_shard/ds41_row_shard/local_query.py @@ -0,0 +1,359 @@ +"""Full-head, row-owned prefill on the pinned V4.1 B12X engine.""" + +from __future__ import annotations + +import copy +import functools +import sys +from dataclasses import replace +from types import SimpleNamespace + +from .core import STATE +from .source_edit import edit_function + + +def _full_weight(group, tensor, axis=0): + """Assemble checkpoint FP8 values or scales without changing their bits.""" + import torch + + source = tensor.detach().movedim(axis, 0).contiguous() + bits = group.all_gather(source.view(torch.uint8), dim=0) + return bits.view(tensor.dtype).movedim(0, axis).contiguous() + + +def _build_replica(attention, module): + from vllm.distributed import get_tp_group + + group = get_tp_group() + if attention.capacity % group.world_size: + raise RuntimeError("full-head prefill requires equal per-rank capacity") + shadow = copy.copy(attention) + # Keep the original layer's parameters, submodules and buffers separate. + shadow._parameters = attention._parameters.copy() + shadow._modules = attention._modules.copy() + shadow._buffers = attention._buffers.copy() + shadow.prefix = attention.prefix + ".owned_prefill" + shadow._owner = attention._owner + shadow.n_local_heads *= group.world_size + shadow.n_local_groups *= group.world_size + shadow.capacity //= group.world_size + shadow.indexer = None + shadow.compressor = None + shadow._wo_resolver = module.B12xPlanResolver("V4.1 row-owned WO projection") + + q = module.torch.nn.Module() + q.weight = _full_weight(group, attention.wq_b.weight) + q.weight_scale_inv = _full_weight(group, attention.wq_b.weight_scale_inv) + q.quant_method = attention.wq_b.quant_method + q.quant_method.process_weights_after_loading(q) + from b12x.gemm import block_fp8_linear + + q.b12x_capacities = (shadow.capacity,) + q.b12x_plans = (block_fp8_linear.plan(block_fp8_linear.Caps( + device=q.weight.device, max_tokens=shadow.capacity, + in_features=q.weight.shape[1], out_features=q.weight.shape[0], + block_size=(32, 32), + )),) + shadow.wq_b = q + shadow.attn_sink = module.torch.nn.Parameter( + group.all_gather(attention.attn_sink.detach(), dim=0), requires_grad=False + ) + + def projection(linear, axis): + return SimpleNamespace( + weight=_full_weight(group, linear.weight, axis), + weight_scale_inv=_full_weight(group, linear.weight_scale_inv, axis), + ) + + # The raw checkpoint WO weights are available during the model's post-load + # hook. Pack the full matrices once, then release the gathered checkpoint views. + shadow._modules.pop("wo_a") + shadow._modules.pop("wo_b") + shadow.wo_a = projection(attention.wo_a, 0) + shadow.wo_b = projection(attention.wo_b, 1) + module.DeepseekV4Attention._ds41_original_wo_setup(shadow) + del shadow.wo_a, shadow.wo_b + shadow._helpers = module._AttentionHelpers(shadow) + return shadow + + +def _replica(attention): + own = STATE.ownership + if own is not None and own.local_queries and STATE.defer_attention: + return getattr(attention, "_ds41_query_replica", None) + return None + + +def _project(attention, qr, rows): + shadow = _replica(attention) + if shadow is None: + return attention.wq_b(qr).view(rows, attention.n_local_heads, 512) + own = STATE.ownership + owned_qr = qr if rows == own.geometry.owned else own.local(qr) + q = shadow.wq_b.quant_method.apply(shadow.wq_b, owned_qr) + return q.view(own.geometry.owned, shadow.n_local_heads, 512) + + +def _query_positions(attention, positions): + if _replica(attention) is None: + return positions + return STATE.ownership.local(positions) + + +def _query_rotary_plan(attention): + owner = _replica(attention) + return (owner if owner is not None else attention)._helper_plan("q") + + +def _index_rows(attention, q): + if _replica(attention) is not None: + return STATE.ownership.geometry.rows + return q.shape[0] + + +def _gather_kv(attention, kv): + if _replica(attention) is None: + return kv + own = STATE.ownership + if own.gather_kv_latents and kv.shape[0] == own.geometry.owned: + own.kv_latent_gathers += 1 + return own.all_gather(kv) + return kv + + +def _gather_projection_records(own, tensors): + """Gather mixed-precision projections in row order without dtype conversion.""" + import torch + + records = [tensor.contiguous().view(torch.uint8) for tensor in tensors] + joined = own.all_gather(torch.cat(records, dim=-1)) + return tuple( + record.contiguous().view(tensor.dtype) + for record, tensor in zip( + joined.split([record.shape[-1] for record in records], dim=-1), + tensors, strict=True, + ) + ) + + +def _project_inputs(attention, hidden_states): + qr_kv, _ = attention.fused_wqa_wkv(hidden_states) + if _replica(attention) is None: + return qr_kv + own = STATE.ownership + compressor = attention.compressor + if ( + own.gather_compressor_latents and compressor is not None + and attention.indexer is not None and hidden_states.shape[0] == own.geometry.owned + ): + compressor._project(hidden_states) + buffers = (compressor._values, compressor._gates)[:compressor.compress_ratio] + weights = attention.indexer.weights_proj(hidden_states) + qr_kv, weights, *compressor_rows = _gather_projection_records( + own, (qr_kv, weights, *(buffer[:own.geometry.owned] for buffer in buffers)) + ) + for buffer, values in zip(buffers, compressor_rows, strict=True): + buffer[:own.geometry.rows].copy_(values) + STATE.compressor_inputs = (compressor, weights, own.geometry.rows) + own.compressor_latent_gathers += 1 + return qr_kv + + +def _index_weights(attention, hidden_states): + inputs = STATE.compressor_inputs + if inputs is not None and inputs[0] is attention.compressor: + return inputs[1] + return attention.indexer.weights_proj(hidden_states) + + +def _compress_rows(compressor, hidden_states): + inputs = STATE.compressor_inputs + if inputs is not None and inputs[0] is compressor: + return inputs[2] + compressor._project(hidden_states) + return hidden_states.shape[0] + + +def _global_rows(attention, hidden_states): + inputs = STATE.compressor_inputs + if inputs is not None and inputs[0] is attention.compressor: + return inputs[2] + return hidden_states.shape[0] + + +def _attend(attention, q, output, swa, main, owner): + shadow = _replica(attention) + if shadow is None: + return False + from b12x.preparation import require_prepared + + module = sys.modules["vllm.models.deepseek_v4_1.attention"] + geom = STATE.ownership.geometry + rows = slice(geom.start, geom.start + geom.owned) + plan = shadow._attention_plan("extend") + state = require_prepared(plan, "attention.compressed_sparse_mla") + specs = shadow._attention_workspace_specs["extend"] + arena = module.current_workspace_manager().get_simultaneous( + *specs, + *((spec.shape, spec.dtype) for spec in state.scratch_plan.scratch_specs()), + ) + metadata = arena[:len(specs)] + attention._write_decode_metadata(metadata, swa, main, geom.owned, geom.start) + swa_indices, swa_lengths, top_lengths = metadata[:3] + indexed = {} + if main is not None: + indexed = dict( + indexed_indices=owner.topk_indices_buffer[rows], + indexed_lengths=top_lengths[:geom.owned], + indexed_page_table=metadata[3][:geom.owned], + ) + binding = module.mla.bind( + plan, scratch=arena[len(specs):], q=q, swa_indices=swa_indices[:geom.owned], + swa_lengths=swa_lengths[:geom.owned], **indexed, + ) + module.mla.run( + binding=binding, swa_k_cache=attention.swa_cache_layer.kv_cache, + indexed_k_cache=attention._owner().kv_cache if main is not None else None, + swa_page_size=attention.swa_cache_layer.block_size, + indexed_page_size=attention._main_page, sm_scale=512**-0.5, + attn_sink=shadow.attn_sink, out=output, cache_format="deepseek_v41", + ) + return True + + +def _output(attention, output, positions, is_prefill): + shadow = _replica(attention) + if shadow is None: + return attention._o_proj(output, positions, is_prefill=is_prefill) + return shadow._o_proj(output, STATE.ownership.local(positions), is_prefill=True) + + +# Both paths write KV and select indices over the complete batch. The full-head +# plan then reads only the query rows owned by this rank. +MQA_EDITS = ( + (" rows = q.shape[0]\n", " rows = _ds41_index_rows(self, q)\n"), + ( + " # Reuse the shared arena only after indexing completes. Keep full-batch\n" + " # metadata beside, not overlapping, the native attention scratch.\n", + " if _ds41_attend_owned(self, q, output, swa, main, owner):\n" + " return\n", + ), +) +MQA_HELPERS = {"_ds41_index_rows": _index_rows, "_ds41_attend_owned": _attend} + +_FORWARD_EDITS = ( + ( + " rows = hidden_states.shape[0]\n" + " qr_kv, _ = self.fused_wqa_wkv(hidden_states)\n", + " qr_kv = _ds41_project_inputs(self, hidden_states)\n" + " rows = qr_kv.shape[0]\n", + ), + ( + " weights = self.indexer.weights_proj(hidden_states)\n", + " weights = _ds41_index_weights(self, hidden_states)\n", + ), + ( + " qr, kv = self.q_norm(qr), self.kv_norm(kv)\n", + " qr, kv = self.q_norm(qr), self.kv_norm(_ds41_gather_kv(self, kv))\n", + ), + ( + " q = self.wq_b(qr).view(rows, self.n_local_heads, 512)\n" + " l2_prefetch.issue(self._l2pf_wo, rows)\n" + " q = _rotated(\n" + " q,\n" + " positions,\n" + " self.rotary_emb.cos_sin_cache,\n" + " plan=self._helper_plan(\"q\"),\n" + " )\n", + " q = _ds41_project_query(self, qr, rows)\n" + " l2_prefetch.issue(self._l2pf_wo, rows)\n" + " q = _rotated(\n" + " q,\n" + " _ds41_query_positions(self, positions),\n" + " self.rotary_emb.cos_sin_cache,\n" + " plan=_ds41_query_rotary_plan(self),\n" + " )\n", + ), + ( + " return self._o_proj(output, positions, is_prefill=is_prefill)\n", + " return _ds41_project_output(self, output, positions, is_prefill)\n", + ), +) + +_METADATA_EDITS = ( + ( + " def _write_decode_metadata(self, buffers, swa, main, rows):\n", + " def _write_decode_metadata(self, buffers, swa, main, rows, row_offset=0):\n", + ), + ( + " 0,\n swa.block_table.stride(0),\n", + " row_offset,\n swa.block_table.stride(0),\n", + ), + ( + " 0,\n main.block_table.stride(0),\n", + " row_offset,\n main.block_table.stride(0),\n", + ), +) + + +def install(module, digest, marker): + cls = module.DeepseekV4Attention + if "_ds41_original_wo_setup" in cls.__dict__: + return + edit_function( + module, "DeepseekV4Attention._forward", digest, _FORWARD_EDITS, + {"_ds41_project_query": _project, "_ds41_project_output": _output, + "_ds41_gather_kv": _gather_kv, "_ds41_query_positions": _query_positions, + "_ds41_query_rotary_plan": _query_rotary_plan, "_ds41_project_inputs": _project_inputs, + "_ds41_index_weights": _index_weights}, marker, + ) + edit_function(module, "DeepseekV4Attention._write_decode_metadata", digest, + _METADATA_EDITS, {}, marker) + cls._write_decode_metadata.__defaults__ = (0,) + setup = cls.setup_wo_projection + provider = cls.get_b12x_preparation_units + cls._ds41_original_wo_setup = setup + + @functools.wraps(setup) + def setup_with_replica(self): + setup(self) + if not self.is_ced_decoder and not self.is_draft: + object.__setattr__(self, "_ds41_query_replica", _build_replica(self, module)) + + @functools.wraps(provider) + def units_with_replica(self, layer, workload): + units = provider(self, layer, workload) + shadow = getattr(self, "_ds41_query_replica", None) + if shadow is None: + return units + local_workload = replace( + workload, max_tokens=shadow.capacity, token_counts=(shadow.capacity,), + fixed_token_counts=(), + ) + if workload.stage == "weights": + q = shadow.wq_b + return ( + *units, + *q.quant_method.get_b12x_preparation_units(q, local_workload), + *shadow._helpers.get_b12x_preparation_units(shadow, local_workload), + ) + if workload.stage == "state": + return (*units, *provider(shadow, shadow, local_workload)) + return units + + cls.setup_wo_projection = setup_with_replica + cls.get_b12x_preparation_units = units_with_replica + + +def install_compressor(attention_module, compressor_module, attention_pin, compressor_pin, marker): + edit_function( + attention_module, "DeepseekV4Attention._prepare_global_kv", attention_pin, + ((" rows = hidden_states.shape[0]\n", " rows = _ds41_global_rows(self, hidden_states)\n"),), + {"_ds41_global_rows": _global_rows}, marker, decorator="eager_break_during_capture", + ) + edit_function( + compressor_module, "DeepseekCompressor.forward", compressor_pin, + ((" rows = hidden_states.shape[0]\n self._project(hidden_states)\n", + " rows = _ds41_compress_rows(self, hidden_states)\n\n"),), + {"_ds41_compress_rows": _compress_rows}, marker, + ) diff --git a/integrations/vllm/ds41_row_shard/ds41_row_shard/source_edit.py b/integrations/vllm/ds41_row_shard/ds41_row_shard/source_edit.py new file mode 100644 index 00000000..9d4ac187 --- /dev/null +++ b/integrations/vllm/ds41_row_shard/ds41_row_shard/source_edit.py @@ -0,0 +1,152 @@ +"""Replace one function's code with an exact, line-preserving edit of its source. + +The edit is applied to the source text of the loaded module file, after that +file's SHA-256 has been checked against a pin. Compiling the unedited module +must reproduce the loaded function code, so the edit applies to the analysed +implementation in its original class and module context. +Tracebacks keep pointing at the image file's real line numbers. +""" + +from __future__ import annotations + +import ast +import hashlib +from collections.abc import Mapping +from inspect import unwrap +from types import CodeType, FunctionType, ModuleType + + +class PatchRefused(RuntimeError): + """The loaded source differs from the source this plugin was written against.""" + + +def file_sha256(path: str) -> str: + with open(path, "rb") as handle: + return hashlib.sha256(handle.read()).hexdigest() + + +def _find(tree: ast.Module, qualname: str, decorator: str | None) -> ast.FunctionDef: + parts = qualname.split(".") + body = tree.body + node = None + for part in parts: + node = next( + ( + item + for item in body + if isinstance(item, (ast.FunctionDef, ast.ClassDef)) + and item.name == part + ), + None, + ) + if node is None: + raise PatchRefused(f"{qualname}: {part} not found") + body = node.body + if not isinstance(node, ast.FunctionDef): + raise PatchRefused(f"{qualname} is not a function") + if decorator is None and node.decorator_list: + raise PatchRefused(f"{qualname} is decorated; edit refused") + if decorator is not None and ( + len(node.decorator_list) != 1 + or not isinstance(node.decorator_list[0], ast.Name) + or node.decorator_list[0].id != decorator + ): + raise PatchRefused(f"{qualname}: expected the {decorator} decorator") + return node + + +def _compile_function(source: str, qualname: str, filename: str) -> CodeType: + # Class scopes and future imports affect compilation even when we never + # execute the surrounding module. + code = compile(source, filename, "exec", dont_inherit=True) + for name in qualname.split("."): + candidates = [ + value for value in code.co_consts + if isinstance(value, CodeType) and value.co_name == name + ] + if len(candidates) != 1: + raise PatchRefused(f"{qualname}: expected one code object for {name}") + code = candidates[0] + return code + + +def _same_code(a: CodeType, b: CodeType) -> bool: + if ( + a.co_code != b.co_code + or a.co_names != b.co_names + or a.co_varnames != b.co_varnames + or a.co_freevars != b.co_freevars + or a.co_firstlineno != b.co_firstlineno + or len(a.co_consts) != len(b.co_consts) + ): + return False + for x, y in zip(a.co_consts, b.co_consts): + if isinstance(x, CodeType) and isinstance(y, CodeType): + if not _same_code(x, y): + return False + elif type(x) is not type(y) or x != y: + return False + return True + + +def edit_function( + module: ModuleType, + qualname: str, + sha256: str, + replacements: tuple[tuple[str, str], ...], + helpers: Mapping[str, object], + marker: str, + *, + decorator: str | None = None, +) -> bool: + """Install the edited code on ``module.``; return False if already done. + + Each ``(old, new)`` must occur exactly once in the function source and + keep its line count. ``helpers`` are placed in the module namespace; their + names must not already exist there with a different value. + """ + path = module.__file__ + if path is None: + raise PatchRefused(f"{module.__name__} has no source file") + actual = file_sha256(path) + if actual != sha256: + raise PatchRefused( + f"{module.__name__} ({path}) has SHA-256 {actual}, expected {sha256}" + ) + owner: object = module + *outer, name = qualname.split(".") + for part in outer: + owner = getattr(owner, part) + function = owner.__dict__[name] + if decorator is not None: + function = unwrap(function) + if not isinstance(function, FunctionType): + raise PatchRefused(f"{qualname} is not a plain function") + if getattr(function, marker, False): + return False + with open(path, encoding="utf-8") as handle: + text = handle.read() + node = _find(ast.parse(text), qualname, decorator) + lines = text.splitlines(keepends=True) + start, end = node.lineno - 1, node.end_lineno + source = "".join(lines[start:end]) + original = _compile_function(text, qualname, path) + if not _same_code(original, function.__code__): + raise PatchRefused(f"{qualname}: loaded code differs from its source file") + edited = source + for old, new in replacements: + if edited.count(old) != 1: + raise PatchRefused(f"{qualname}: edit anchor found {edited.count(old)} times") + if old.count("\n") != new.count("\n"): + raise PatchRefused(f"{qualname}: edit changes the line count") + edited = edited.replace(old, new) + for helper, value in helpers.items(): + existing = module.__dict__.get(helper, value) + if existing is not value: + raise PatchRefused(f"{module.__name__}.{helper} already exists") + code = _compile_function("".join(lines[:start]) + edited + "".join(lines[end:]), qualname, path) + for helper, value in helpers.items(): + setattr(module, helper, value) + function.__code__ = code + setattr(function, marker, True) + return True diff --git a/integrations/vllm/ds41_row_shard/tests/conftest.py b/integrations/vllm/ds41_row_shard/tests/conftest.py new file mode 100644 index 00000000..71cb819c --- /dev/null +++ b/integrations/vllm/ds41_row_shard/tests/conftest.py @@ -0,0 +1,14 @@ +"""Session setup: the plugin package on the path and float64 by default. + +float64 makes any arithmetic difference between the owned-row and full-row +paths visible; summation order is fixed by ``tp_world``. +""" + +import sys +from pathlib import Path + +import torch + +sys.path.insert(0, str(Path(__file__).resolve().parents[1])) +sys.path.insert(0, str(Path(__file__).resolve().parent)) +torch.set_default_dtype(torch.float64) diff --git a/integrations/vllm/ds41_row_shard/tests/fakes.py b/integrations/vllm/ds41_row_shard/tests/fakes.py new file mode 100644 index 00000000..00c6b3ed --- /dev/null +++ b/integrations/vllm/ds41_row_shard/tests/fakes.py @@ -0,0 +1,216 @@ +"""Row-local and full-row stand-ins for the V4.1 decoder layer's components. + +The reference path executes the image's own ``DeepseekV4DecoderLayer.forward`` +and ``Engram.forward`` (``fixtures/``) on these components; the owned path runs +``core.owned_layer_forward`` on the same components. The stand-ins keep the +properties the real kernels have and the plugin relies on: + +* mHC ``pre``/``post_pre``/``post`` are row-local (each output row depends + only on the same input row), with ``post_pre`` equal to ``pre`` with the + lagged ``previous_output`` fusion, as ``B12xMHC.post_pre`` is; +* attention mixes rows (a causal running sum), so it needs every row, and + each rank holds a different head share whose partial is summed over ranks; +* the MoE is row-local per rank but returns a TP partial; +* Engram all-reduces rank-specific staged table rows, then mixes row-locally. +""" + +from __future__ import annotations + +import sys +import types +from pathlib import Path +from types import SimpleNamespace + +import torch + +import tp_world + +FIXTURES = Path(__file__).resolve().parent / "fixtures" +HC = 4 + + +def gather_rows(source, indices): + """``vllm::dsv41_gather_rows``: gather rows, zero negative or out-of-range ones.""" + valid = (indices >= 0) & (indices < source.shape[0]) + safe = indices.clamp(0, max(source.shape[0] - 1, 0)).long() + out = source[safe].clone() + out[~valid] = 0 + return out + + +def _load(name: str, namespace: dict): + code = (FIXTURES / name).read_text() + exec(compile(code, str(FIXTURES / name), "exec"), namespace) + return namespace["forward"] + + +# -- Engram: a module of its own, as the plugin looks names up on it ----------- +engram_module = types.ModuleType("fake_engram_module") +engram_module.torch = torch +engram_module.tensor_model_parallel_all_reduce = lambda t: tp_world.group().all_reduce(t) + + +def _run_engram_mix(state, kv, norm_weights, *, eps, plan, out, token_mask=None): + mixed = state + torch.tanh(kv) * norm_weights + eps + if token_mask is not None: + mixed = torch.where(token_mask[:, None], mixed, state) + out.copy_(mixed) + + +engram_module.hyperconnection = SimpleNamespace(run_engram_mix=_run_engram_mix) +sys.modules[engram_module.__name__] = engram_module + + +class ReplicatedLinear: + """Every rank holds the whole projection.""" + + def __init__(self, weight): + self.weight = weight + + def __call__(self, rows): + return rows @ self.weight + + +class ColumnParallelLinear: + """``gather_output=True``: each rank projects its column shard of the same + rows, then the shards are all-gathered along the last dimension.""" + + gather_output = True + + def __init__(self, weight, world: int, rank: int): + width = weight.shape[1] // world + self.shard = weight[:, rank * width : (rank + 1) * width] + + def __call__(self, rows): + shards = tp_world.group()._exchange(rows @ self.shard) + return torch.cat(shards, dim=-1) + + +class FakeEngram: + def __init__(self, rows: int, hidden: int, hash_index: int, generator, rank: int, + shared=None): + """``generator`` draws this rank's staged table share; ``shared`` draws the + replicated ``wkv`` and norm weights (every rank holds the same ones).""" + width = 6 + shared = generator if shared is None else shared + self.layer_hash_index = hash_index + self.embed_tokens = SimpleNamespace(table_memory="disk") + self._disk_prepared = True + self._disk_prepared_tokens = rows + # Each rank holds a different share of the table rows (column shards). + self.staged_rows = torch.randn(rows + 3, width, generator=generator) * (rank + 1) + weight = torch.randn(width, HC * hidden, generator=shared) + self.wkv = ReplicatedLinear(weight) + self.norm_weights = torch.rand(HC * hidden, generator=shared) + self.eps = 1e-3 + self.mix_plans = {False: "plan-unmasked", True: "plan-masked"} + + +FakeEngram.__module__ = engram_module.__name__ +FakeEngram.forward = _load("engram_forward.py", dict(engram_module.__dict__)) +FakeEngram.__call__ = lambda self, *a, **k: self.forward(*a, **k) + + +# -- mHC ----------------------------------------------------------------------- +class FakeMHC: + """Row-local hyperconnection arithmetic with the B12xMHC call shapes.""" + + def __init__(self, generator): + self.mix = torch.randn(HC, HC, generator=generator) * 0.3 + + def post(self, x, residual, post_mix, res_mix): + x = x.reshape(x.shape[0], -1) + return torch.einsum("rij,rjh->rih", res_mix, residual) + post_mix[:, :, None] * x[:, None, :] + + def pre(self, residual, fn, scale, base, norm_weight, pre_mix, + previous_output=None, previous_post=None, previous_comb=None): + if previous_output is not None: + residual = self.post(previous_output, residual, previous_post, previous_comb) + elif residual.ndim == 2: + residual = residual[:, None, :].expand(-1, HC, -1).contiguous() + means = residual.mean(-1) # (rows, HC) + lag = 0 if pre_mix is None else pre_mix.sum(-1, keepdim=True) + post_mix = torch.sigmoid(means * scale[0] + base[:HC] + lag) + res_mix = torch.tanh(means[:, :, None] * self.mix[None] * scale[1]) + attn_pre = torch.softmax(means * scale[2] + fn.sum(), dim=-1) + x = (attn_pre[:, :, None] * residual).sum(1) * norm_weight + return residual, post_mix, res_mix, x, attn_pre + + def post_pre(self, x, residual, post_mix, res_mix, fn, scale, base, norm_weight, pre_mix): + return self.pre(residual, fn, scale, base, norm_weight, pre_mix, + previous_output=x, previous_post=post_mix, previous_comb=res_mix) + + +# -- attention and MoE ----------------------------------------------------------- +class FakeAttention: + def __init__(self, hidden: int, generator, rank: int, reduce): + self.weight = torch.randn(hidden, hidden, generator=generator) * (0.1 * (rank + 1)) + self.reduce = reduce # the edited _o_proj's reduction helper + self.global_kv = [] + self.calls = [] + + def prepare_global_kv(self, positions, hidden_states): + self.global_kv.append(hidden_states.clone()) + return torch.empty(1) + + def __call__(self, positions, x, llama_4_scaling=None, *, global_kv_ready=None): + self.calls.append((x.shape[0], global_kv_ready is not None)) + mixed = torch.cumsum(x, dim=0) / (1 + torch.arange(x.shape[0], dtype=x.dtype))[:, None] + local = (mixed + positions[:, None].to(x.dtype) * 1e-2) @ self.weight + # The image's WO projection returns (rows, hidden, 1). + return self.reduce(local[:, :, None]) + + +class FakeExperts: + def __init__(self, hidden: int, generator, rank: int): + self.weight = torch.randn(hidden, hidden, generator=generator) * (0.2 * (rank + 1)) + self.deferred = 0 + + def __call__(self, hidden_states, router_logits, input_ids=None, *, defer_tp_reduction=False): + partial = torch.tanh(hidden_states @ self.weight) + if input_ids is not None: + partial = partial * (1 + input_ids[:, None].to(partial.dtype) * 1e-3) + if defer_tp_reduction: + self.deferred += 1 + return partial + return tp_world.group().all_reduce(partial) + + +class FakeMoE: + use_mega_moe = False + + def __init__(self, hidden: int, generator, rank: int): + self.gate = SimpleNamespace(tid2eid=None, bias_vl=None) + self.experts = FakeExperts(hidden, generator, rank) + + def __call__(self, x, input_ids=None): + shape = x.shape + out = self.experts(hidden_states=x, router_logits=x, input_ids=input_ids) + return out.to(x.dtype).view(shape) + + +# -- the decoder layer --------------------------------------------------------------- +class FakeLayer: + hc_mult = HC + + def __init__(self, hidden, rows, generator, rank, reduce, engram_hash_index=None): + g = generator + self._b12x_mhc = FakeMHC(g) + self.engram = ( + None if engram_hash_index is None + else FakeEngram(rows, hidden, engram_hash_index, g, rank) + ) + self.hc_attn_fn = torch.randn(3, generator=g) + self.hc_attn_fn_broadcast = torch.randn(3, generator=g) + self.hc_ffn_fn = torch.randn(3, generator=g) + self.hc_attn_scale = torch.rand(3, generator=g) + 0.5 + self.hc_ffn_scale = torch.rand(3, generator=g) + 0.5 + self.hc_attn_base = torch.randn(3 * HC, generator=g) + self.hc_ffn_base = torch.randn(3 * HC, generator=g) + self.attn_norm = SimpleNamespace(weight=torch.rand(hidden, generator=g) + 0.5) + self.ffn_norm = SimpleNamespace(weight=torch.rand(hidden, generator=g) + 0.5) + self.attn = FakeAttention(hidden, g, rank, reduce) + self.ffn = FakeMoE(hidden, g, rank) + + +FakeLayer.forward = _load("decoder_layer_forward.py", {"torch": torch, "gather_rows": gather_rows}) diff --git a/integrations/vllm/ds41_row_shard/tests/fixtures/decoder_layer_forward.py b/integrations/vllm/ds41_row_shard/tests/fixtures/decoder_layer_forward.py new file mode 100644 index 00000000..1509f6ec --- /dev/null +++ b/integrations/vllm/ds41_row_shard/tests/fixtures/decoder_layer_forward.py @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright contributors to the vLLM project +# Verbatim DeepseekV4DecoderLayer.forward from vllm/models/deepseek_v4_1/nvidia/model.py, lines 263-330, +# vLLM d51b4181acc06622357c81dc8e0be46ad96a0779 (file SHA-256 dafb69b36e68c36ba8878c6033e1bc94439526c3d1d9c83edd7c153ad2ba88c8). +# The tests execute it as the reference; test_image_sources.py checks it +# against an extracted image tree when SPARKRING_DS41_IMAGE_SOURCES is set. +# ruff: noqa: F821 +def forward( + self, + x: torch.Tensor, + positions: torch.Tensor, + input_ids: torch.Tensor | None, + pre_mix: torch.Tensor | None = None, + post_mix: torch.Tensor | None = None, + res_mix: torch.Tensor | None = None, + residual: torch.Tensor | None = None, + engram_hashes: torch.Tensor | None = None, + engram_mask: torch.Tensor | None = None, + ced_indices: torch.Tensor | None = None, +) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]: + previous_output = x if residual is not None else None + apply_engram = self.engram is not None and engram_hashes is not None + if residual is None: + residual = x + elif apply_engram: + # Engram mutates the reconstructed residual; do not fuse across it. + residual = self._b12x_mhc.post(x, residual, post_mix, res_mix) + previous_output = None + if apply_engram: + if residual.ndim == 2: + residual = ( + residual[:, None, :].expand(-1, self.hc_mult, -1).contiguous() + ) + residual = self.engram( + residual, engram_hashes[:, self.engram.layer_hash_index], engram_mask + ) + fn = self.hc_attn_fn_broadcast if residual.ndim == 2 else self.hc_attn_fn + residual, post_mix, res_mix, x, attn_pre = self._b12x_mhc.pre( + residual, + fn, + self.hc_attn_scale, + self.hc_attn_base, + self.attn_norm.weight, + pre_mix, + previous_output=previous_output, + previous_post=post_mix if previous_output is not None else None, + previous_comb=res_mix if previous_output is not None else None, + ) + global_kv_ready = None + if ced_indices is not None: + # Decoder global KV needs every encoder row, but decoder queries, + # residual updates and experts only need the selected replay rows. + global_kv_ready = self.attn.prepare_global_kv(positions, x) + x = gather_rows(x, ced_indices) + residual = gather_rows(residual, ced_indices) + post_mix = gather_rows(post_mix, ced_indices) + res_mix = gather_rows(res_mix, ced_indices) + attn_pre = gather_rows(attn_pre, ced_indices) + positions = gather_rows(positions, ced_indices) + if input_ids is not None: + input_ids = gather_rows(input_ids, ced_indices) + x = self.attn(positions, x, None, global_kv_ready=global_kv_ready) + residual, post_mix, res_mix, x, ffn_pre = self._b12x_mhc.post_pre( + x, + residual, + post_mix, + res_mix, + self.hc_ffn_fn, + self.hc_ffn_scale, + self.hc_ffn_base, + self.ffn_norm.weight, + attn_pre, + ) + x = self.ffn(x, input_ids) + return x, residual, post_mix, res_mix, ffn_pre diff --git a/integrations/vllm/ds41_row_shard/tests/fixtures/engram_forward.py b/integrations/vllm/ds41_row_shard/tests/fixtures/engram_forward.py new file mode 100644 index 00000000..468df4ae --- /dev/null +++ b/integrations/vllm/ds41_row_shard/tests/fixtures/engram_forward.py @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright contributors to the vLLM project +# Verbatim Engram.forward from vllm/models/deepseek_v4_1/common/engram.py, lines 868-891, +# vLLM d51b4181acc06622357c81dc8e0be46ad96a0779 (file SHA-256 efda07bdd54d947852cdf75095905033038cf2a4425d7b234d092a9253c7c811). +# The tests execute it as the reference; test_image_sources.py checks it +# against an extracted image tree when SPARKRING_DS41_IMAGE_SOURCES is set. +# ruff: noqa: F821 +def forward(self, hidden_states, hash_ids, token_mask=None): + if ( + self.embed_tokens.table_memory == "disk" + and not torch.compiler.is_compiling() + and ( + not self._disk_prepared + or self._disk_prepared_tokens < hash_ids.shape[0] + ) + ): + raise RuntimeError("Disk Engram output is not prepared") + rows = tensor_model_parallel_all_reduce(self.staged_rows[: hash_ids.shape[0]]) + kv = self.wkv(rows) + state = hidden_states.flatten(1) + out = torch.empty_like(state) + hyperconnection.run_engram_mix( + state, + kv, + self.norm_weights, + eps=self.eps, + plan=self.mix_plans[token_mask is not None], + out=out, + token_mask=token_mask, + ) + return out.view_as(hidden_states) diff --git a/integrations/vllm/ds41_row_shard/tests/test_core.py b/integrations/vllm/ds41_row_shard/tests/test_core.py new file mode 100644 index 00000000..0200cdeb --- /dev/null +++ b/integrations/vllm/ds41_row_shard/tests/test_core.py @@ -0,0 +1,394 @@ +"""The owned-row forward equals the image's full-row forward on simulated ranks.""" + +from __future__ import annotations + +from types import SimpleNamespace + +import pytest +import torch + +import fakes +import tp_world +from ds41_row_shard import core +from ds41_row_shard.local_query import _full_weight, _gather_kv, _gather_projection_records + +HIDDEN = 8 +LAYERS = 7 +BOUNDARY = 4 # the CED decoder start +ENGRAM = {1: 0, 3: 1} # layer -> hash column, as V4.1's Engram layers 1 and 14 + + +@pytest.mark.parametrize("axis", [0, 1]) +def test_full_query_weights_reassemble_rank_shards_bit_for_bit(axis): + original = torch.arange(64, dtype=torch.uint8).view(8, 8).view(torch.float8_e4m3fn) + + def run_rank(rank): + shard = original.chunk(4, dim=axis)[rank] + return _full_weight(tp_world.group(), shard, axis).view(torch.uint8) + + outputs, _ = tp_world.run(4, run_rank) + assert all(torch.equal(output, original.view(torch.uint8)) for output in outputs) + + +def test_local_query_kv_gather_writes_every_rows_latent(): + rows, world = 16, 4 + expected = torch.arange(rows * 2).reshape(rows, 2) + attention = SimpleNamespace(_ds41_query_replica=object()) + + def run_rank(rank): + geometry = core.row_geometry(rows, world, rank, min_owned=1) + own = core.Ownership( + geometry, tp_world.group(), None, {}, BOUNDARY, + local_queries=True, gather_kv_latents=True, + ) + core.STATE.ownership = own + try: + with own.unreduced_attention(): + result = _gather_kv(attention, own.local(expected)) + assert own.kv_latent_gathers == own.all_gathers == 1 + return result + finally: + core.STATE.ownership = None + + outputs, group = tp_world.run(world, run_rank) + assert all(torch.equal(output, expected) for output in outputs) + assert group.calls == [("all_gather", (4, 2))] + + +def test_compressor_record_gather_preserves_mixed_precision_bits(): + rows, world = 16, 4 + bf16 = torch.arange(rows * 2, dtype=torch.int16).reshape(rows, 2).view(torch.bfloat16) + fp32 = torch.arange(rows * 3, dtype=torch.int32).reshape(rows, 3).view(torch.float32) + inputs = (bf16, fp32) + + def run_rank(rank): + geometry = core.row_geometry(rows, world, rank, min_owned=1) + own = core.Ownership(geometry, tp_world.group(), None, {}, BOUNDARY) + output = _gather_projection_records(own, tuple(own.local(tensor) for tensor in inputs)) + return all(torch.equal(got.view(torch.uint8), want.view(torch.uint8)) + for got, want in zip(output, inputs, strict=True)) + + outputs, group = tp_world.run(world, run_rank) + assert all(outputs) + assert group.calls == [("all_gather", (4, 16))] + + +def test_engram_feature_bands_preserve_reduce_scattered_rows(): + rows, world = 16, 4 + full = torch.arange(rows * 24, dtype=torch.float32).reshape(rows, 24) + + def run_rank(rank): + geometry = core.row_geometry(rows, world, rank, min_owned=1) + own = core.Ownership(geometry, tp_world.group(), None, {}, BOUNDARY, band_engram=True) + partial = full * (rank + 1) + output = core.reduce_engram_lookup(own, partial, rows * 4 * 8) + assert own.engram_reduce_scatters == own.reduce_scatters == 3 + return output + + outputs, group = tp_world.run(world, run_rank) + assert torch.equal(torch.cat(outputs), full * 10) + assert group.calls == [("reduce_scatter", (16, 8))] * 3 + + +def test_compact_routes_matches_full_selection_with_token_ids(): + rows, world = 32, 4 + hidden = torch.arange(rows * 3, dtype=torch.float32).reshape(rows, 3) + tokens = torch.arange(rows) + + def select_experts(*, hidden_states, router_logits, topk_indices_dtype, input_ids): + assert hidden_states.shape == router_logits.shape + weights = router_logits[:, :2].clone() + weights[:, 0] = -0.0 + ids = torch.stack((input_ids % 7, input_ids % 5), dim=-1).to(topk_indices_dtype) + return weights, ids + + def gate(states): + return states + 1, None + + runner = SimpleNamespace( + gate=gate, is_monolithic=False, do_naive_dispatch_combine=False, + moe_config=SimpleNamespace(pcp_size=1), + router=SimpleNamespace(select_experts=select_experts), + ) + kwargs = {"hidden_states": hidden, "topk_indices_dtype": torch.int64, "input_ids": tokens} + weights, ids = core.select_owned_routes(runner, router_logits=gate(hidden)[0], **kwargs) + + def run_rank(rank): + geometry = core.row_geometry(rows, world, rank, min_owned=1) + core.STATE.route_owner = core.Ownership(geometry, tp_world.group(), None, {}, BOUNDARY) + try: + logits = core.gate_owned_routes(runner, hidden) + assert logits.shape[0] == rows // world + got_weights, got_ids = core.select_owned_routes(runner, router_logits=logits, **kwargs) + assert core.STATE.route_owner.route_gathers == 1 + assert torch.equal(got_weights.view(torch.int32), weights.view(torch.int32)) + assert got_ids.dtype == ids.dtype and torch.equal(got_ids, ids) + finally: + core.STATE.route_owner = None + + _, group = tp_world.run(world, run_rank) + assert group.calls == [("all_gather", (8, 4))] + + +def test_indexer_scores_same_tiles_and_gathers_full_table(): + rows, tile, world = 32, 4, 4 + expected = torch.arange(rows * 3, dtype=torch.int32).reshape(rows, 3) + + def run_rank(rank): + geometry = core.row_geometry(rows, world, rank, min_owned=1) + ownership = core.Ownership(geometry, tp_world.group(), None, {}, BOUNDARY) + attention = SimpleNamespace( + layer_id=2, + candidate_source_layer=BOUNDARY, + is_draft=False, + topk_indices_buffer=torch.full_like(expected, -1), + ) + core.STATE.ownership = ownership + try: + offsets = core.indexer_score_offsets(attention, rows, tile) + assert list(offsets) == [rank * 8, rank * 8 + 4] + for first in offsets: + attention.topk_indices_buffer[first:first + tile] = expected[first:first + tile] + core.publish_index_rows(attention, rows, tile) + assert ownership.indexer_gathers == 1 + assert torch.equal(attention.topk_indices_buffer, expected) + assert core.indexer_score_offsets(attention, rows, 3) == range(0, rows, 3) + attention.candidate_source_layer = attention.layer_id + assert core.indexer_score_offsets(attention, rows, tile) == range(0, rows, tile) + core.publish_index_rows(attention, rows, tile) + assert ownership.indexer_gathers == 1 + finally: + core.STATE.ownership = None + + _, group = tp_world.run(world, run_rank) + assert group.calls == [("all_gather", (8, 3))] + + +def _model(rows: int, rank: int, seed: int, world: int | None = None): + """Layers whose weights are shared, except the per-rank TP shares.""" + shared = torch.Generator().manual_seed(seed) + def reduce(local): + return core.attention_reduce(local, tp_world.group().all_reduce) + + layers = [] + for index in range(LAYERS): + g = torch.Generator().manual_seed(seed * 1000 + index) + layer = fakes.FakeLayer(HIDDEN, rows, g, rank=0, reduce=reduce, + engram_hash_index=ENGRAM.get(index)) + # Re-draw the rank-specific shares with a rank-dependent seed. + rg = torch.Generator().manual_seed(seed * 1000 + index * 37 + rank + 1) + layer.attn = fakes.FakeAttention(HIDDEN, rg, rank, reduce) + layer.ffn = fakes.FakeMoE(HIDDEN, rg, rank) + if layer.engram is not None: + eg = torch.Generator().manual_seed(seed * 1000 + index + 500) + layer.engram = fakes.FakeEngram(rows, HIDDEN, ENGRAM[index], rg, rank, shared=eg) + if world is not None: # projection_tp: column-parallel, gathered wkv + layer.engram.wkv = fakes.ColumnParallelLinear( + layer.engram.wkv.weight, world, rank + ) + layers.append(layer) + embed = torch.randn(rows, HIDDEN, generator=shared, dtype=torch.float64) + return layers, embed + + +def _inputs(rows: int, seed: int, masked: bool): + g = torch.Generator().manual_seed(seed + 7) + positions = torch.arange(rows) + 100 + input_ids = torch.randint(0, 1000, (rows,), generator=g) + hashes = torch.randint(0, 50, (rows, 2), generator=g) + mask = (torch.rand(rows, generator=g) > 0.25) if masked else None + # Decoder replay rows: the last rows of two requests plus graph padding. + half = rows // 2 + ced = torch.tensor( + list(range(half - 3, half)) + list(range(rows - 5, rows)) + [-1, -1] + ) + return positions, input_ids, hashes, mask, ced + + +def _loop(layers, embed, positions, input_ids, hashes, mask, ced, layer_call): + """The image's ``DeepseekV4Model.forward`` loop, reduced to what layers see.""" + hidden, residual, post_mix, res_mix, pre_mix = embed, None, None, None, None + for index, layer in enumerate(layers): + boundary = ced if index == BOUNDARY else None + hidden, residual, post_mix, res_mix, pre_mix = layer_call( + index, layer, hidden, positions, input_ids, pre_mix, post_mix, + res_mix, residual, hashes, mask, boundary, + ) + if boundary is not None: + positions = fakes.gather_rows(positions, ced) + input_ids = fakes.gather_rows(input_ids, ced) + last = layers[-1]._b12x_mhc.post(hidden, residual, post_mix, res_mix) + return (pre_mix[:, :, None] * last).sum(1) + + +def _run(world: int, rows: int, owned: bool, seed: int = 3, masked: bool = True, + projection_tp: bool = False): + def body(rank: int): + layers, embed = _model(rows, rank, seed, world if projection_tp else None) + positions, input_ids, hashes, mask, ced = _inputs(rows, seed, masked) + own = None + if owned: + own = core.Ownership( + geometry=core.row_geometry(rows, world, rank, min_owned=1), + group=tp_world.group(), + gather_rows=fakes.gather_rows, + layer_index={id(layer): i for i, layer in enumerate(layers)}, + boundary=BOUNDARY, + ) + core.STATE.ownership = own + + def call(index, layer, *args): + if own is not None and index <= BOUNDARY: + return core.owned_layer_forward(layer, own, index, *args) + *head, boundary = args + return layer.forward(*head, ced_indices=boundary) + + try: + out = _loop(layers, embed, positions, input_ids, hashes, mask, ced, call) + if own is not None: + own.finish() + finally: + core.STATE.ownership = None + return out, layers, own + + return tp_world.run(world, body) + + +@pytest.mark.parametrize("world", [2, 4, 8]) +@pytest.mark.parametrize("masked", [True, False]) +@pytest.mark.parametrize("projection_tp", [False, True]) +def test_owned_forward_equals_full_row_forward(world, masked, projection_tp): + rows = 8 * world + reference, ref_group = _run(world, rows, owned=False, masked=masked, + projection_tp=projection_tp) + owned, own_group = _run(world, rows, owned=True, masked=masked, + projection_tp=projection_tp) + for rank in range(world): + assert torch.equal(owned[rank][0], reference[rank][0]), f"rank {rank}" + # The reference itself is replicated: the fakes model a valid TP layout. + assert torch.equal(reference[rank][0], reference[0][0]) + # Every rank's output is identical, as in the image. + assert torch.equal(owned[rank][0], owned[0][0]) + # The global KV write at the boundary saw the same full rows. + ref_kv = reference[rank][1][BOUNDARY].attn.global_kv + own_kv = owned[rank][1][BOUNDARY].attn.global_kv + assert len(ref_kv) == len(own_kv) == 1 + assert torch.equal(ref_kv[0], own_kv[0]) + kinds = [kind for kind, _ in own_group.calls] + engram_scattered = 0 if projection_tp else len(ENGRAM) + assert kinds.count("reduce_scatter") == 2 * BOUNDARY + engram_scattered + assert kinds.count("all_gather") == 2 * BOUNDARY + 1 + engram_reduced = len(ENGRAM) if projection_tp else 0 + assert kinds.count("all_reduce") == engram_reduced + 4 + 2 * (LAYERS - BOUNDARY) + own = owned[0][2] + assert own.engram_layers == len(ENGRAM) + assert own.engram_reduce_scatters == engram_scattered + assert own.deferred_attention == BOUNDARY + + +def test_owned_layers_carry_owned_rows_only(): + world, rows = 4, 32 + shapes = [] + + def body(rank): + layers, embed = _model(rows, rank, 5) + positions, input_ids, hashes, mask, ced = _inputs(rows, 5, True) + own = core.Ownership(core.row_geometry(rows, world, rank, 1), tp_world.group(), + fakes.gather_rows, {}, BOUNDARY) + x, residual, post_mix, res_mix, pre_mix = core.owned_layer_forward( + layers[0], own, 0, embed, positions, input_ids, None, None, None, None, + hashes, mask, None) + if rank == 0: + shapes.extend([x.shape, residual.shape, post_mix.shape, res_mix.shape]) + return None + + tp_world.run(world, body) + owned = rows // world + assert shapes == [(owned, HIDDEN), (owned, 4, HIDDEN), (owned, 4), (owned, 4, 4)] + + +def test_compact_matches_full_gather(): + world, rows = 4, 16 + full = torch.randn(rows, 3, 2, dtype=torch.float64) + indices = torch.tensor([15, 0, 7, -1, 8, 3]) + + def body(rank): + own = core.Ownership(core.row_geometry(rows, world, rank, 1), tp_world.group(), + fakes.gather_rows, {}, 1) + return own.compact(own.local(full), indices) + + results, _ = tp_world.run(world, body) + expected = fakes.gather_rows(full, indices) + for result in results: + assert torch.equal(result, expected) + + +def test_attention_reduce_defers_only_inside_owned_scope(): + calls = [] + def reduce(value): + calls.append(value) + return value + 1 + + t = torch.zeros(2) + own = core.Ownership(core.Geometry(8, 2, 0), None, fakes.gather_rows, {}, 1) + core.STATE.ownership = own + try: + assert torch.equal(core.attention_reduce(t, reduce), t + 1) + with own.unreduced_attention(): + assert core.attention_reduce(t, reduce) is t + assert torch.equal(core.attention_reduce(t, reduce), t + 1) + finally: + core.STATE.ownership = None + assert len(calls) == 2 and own.deferred_attention == 1 + + +@pytest.mark.parametrize( + "rows,world,rank,minimum,expected", + [ + (8192, 4, 3, 512, (2048, 6144)), + (8192, 8, 7, 512, (1024, 7168)), + (8192, 2, 1, 512, (4096, 4096)), + (8190, 4, 0, 1, None), # does not divide + (1024, 4, 0, 512, None), # 256 rows per rank, below the minimum + (8192, 3, 0, 1, None), # unsupported TP size + (8192, 4, 4, 1, None), # rank out of range + ], +) +def test_row_geometry(rows, world, rank, minimum, expected): + geometry = core.row_geometry(rows, world, rank, minimum) + if expected is None: + assert geometry is None + else: + assert (geometry.owned, geometry.start) == expected + + +def test_owned_layers_for_the_v41_flash_config(): + # DeepSeek-V4.1-Flash: 40 layers, CED decoder start 20, DSpark reads 37-39. + assert core.owned_layers(20, 40, (37, 38, 39)) == range(21) + with pytest.raises(core.RowShardRefused): + core.owned_layers(None, 40, ()) + with pytest.raises(core.RowShardRefused): + core.owned_layers(20, 40, (20,)) # read after layer 19: owned rows + # Read after the boundary layer 20: compacted rows, identical on all ranks. + assert core.owned_layers(20, 40, (21,)) == range(21) + + +def test_finish_rejects_missing_collectives(): + own = core.Ownership(core.Geometry(8, 2, 0), None, fakes.gather_rows, {}, 2) + own.layers_seen = [0, 1, 2] + with pytest.raises(RuntimeError, match="accounting"): + own.finish() + + +def test_layer_order_and_boundary_are_enforced(): + own = core.Ownership(core.Geometry(8, 2, 0), None, fakes.gather_rows, {}, 2) + with pytest.raises(RuntimeError, match="out of order"): + core.owned_layer_forward(object(), own, 1, None, None, None) + with pytest.raises(RuntimeError, match="boundary"): + core.owned_layer_forward(object(), own, 0, None, None, None, ced_indices=torch.zeros(1)) + + +def test_mega_moe_is_refused(): + ffn = type("F", (), {"use_mega_moe": True})() + with pytest.raises(core.RowShardRefused): + core.moe_unreduced(ffn, torch.zeros(2, 2), None) diff --git a/integrations/vllm/ds41_row_shard/tests/test_image_sources.py b/integrations/vllm/ds41_row_shard/tests/test_image_sources.py new file mode 100644 index 00000000..64b16052 --- /dev/null +++ b/integrations/vllm/ds41_row_shard/tests/test_image_sources.py @@ -0,0 +1,217 @@ +"""Pins, fixture copies and the ``_o_proj`` edit against an extracted image tree. + +Run with ``SPARKRING_DS41_IMAGE_SOURCES`` pointing at an extracted image (a +directory containing ``vllm/models/deepseek_v4_1``). Only files are read; vLLM +is not imported. +""" + +from __future__ import annotations + +import ast +import functools +import os +import re +import textwrap +from pathlib import Path +from types import CodeType, FunctionType, ModuleType + +import pytest + +import ds41_row_shard +from ds41_row_shard import source_edit + +IMAGE_ROOT = os.environ.get("SPARKRING_DS41_IMAGE_SOURCES") +TREE = Path(IMAGE_ROOT) if IMAGE_ROOT else None + +pytestmark = pytest.mark.skipif( + TREE is None or not (TREE / "vllm" / "models" / "deepseek_v4_1").is_dir(), + reason="SPARKRING_DS41_IMAGE_SOURCES is not an extracted vLLM tree", +) + +FIXTURES = Path(__file__).resolve().parent / "fixtures" + + +def _image(relative: str) -> Path: + return TREE / relative + + +def _class_method(path: Path, class_name: str, method_name: str): + """Return the method's source at its file indentation and its AST node.""" + text = path.read_text(encoding="utf-8") + lines = text.splitlines(keepends=True) + tree = ast.parse(text) + cls = next( + node + for node in tree.body + if isinstance(node, ast.ClassDef) and node.name == class_name + ) + node = next( + item + for item in cls.body + if isinstance(item, ast.FunctionDef) and item.name == method_name + ) + return "".join(lines[node.lineno - 1 : node.end_lineno]), node + + +def _fixture_forward(path: Path): + """Return the fixture header and its forward, dedented, to end of file.""" + text = path.read_text(encoding="utf-8") + lines = text.splitlines(keepends=True) + start = next( + index for index, line in enumerate(lines) if line.startswith("def forward") + ) + return "".join(lines[:start]), textwrap.dedent("".join(lines[start:])) + + +@pytest.mark.parametrize( + "module,sha256", + [(name, pin[0]) for name, pin in ds41_row_shard.PINS.items()], + ids=list(ds41_row_shard.PINS), +) +def test_pin_matches_image_file(module, sha256): + path = _image(module.replace(".", "/") + ".py") + assert path.is_file(), f"{module}: {path} not found" + assert source_edit.file_sha256(str(path)) == sha256 + + +@pytest.mark.parametrize( + "fixture,relative,class_name", + [ + ( + "decoder_layer_forward.py", + "vllm/models/deepseek_v4_1/nvidia/model.py", + "DeepseekV4DecoderLayer", + ), + ( + "engram_forward.py", + "vllm/models/deepseek_v4_1/common/engram.py", + "Engram", + ), + ], +) +def test_fixture_matches_image_forward(fixture, relative, class_name): + image_source, node = _class_method(_image(relative), class_name, "forward") + header, fixture_source = _fixture_forward(FIXTURES / fixture) + assert fixture_source == textwrap.dedent(image_source) + match = re.search(r"lines (\d+)-(\d+)", header) + assert match is not None, header + assert (int(match.group(1)), int(match.group(2))) == ( + node.lineno, + node.end_lineno, + ) + + +def test_o_proj_edit_applies_and_compiles(): + path = _image("vllm/models/deepseek_v4_1/attention.py") + compiled = compile(path.read_bytes(), str(path), "exec", dont_inherit=True) + cls_code = next( + code for code in compiled.co_consts + if isinstance(code, CodeType) and code.co_name == "DeepseekV4Attention" + ) + original = next( + code for code in cls_code.co_consts + if isinstance(code, CodeType) and code.co_name == "_o_proj" + ) + module = ModuleType("test_pinned_attention") + module.__file__ = str(path) + method = FunctionType(original, module.__dict__) + module.DeepseekV4Attention = type("DeepseekV4Attention", (), {"_o_proj": method}) + + ds41_row_shard.patch_attention(module) + + assert getattr(method, ds41_row_shard.MARKER) + assert method.__code__.co_firstlineno == original.co_firstlineno + assert "_ds41_row_shard_attention_reduce" in method.__code__.co_names + + +def test_indexer_edit_keeps_capture_wrapper(monkeypatch): + monkeypatch.setenv(ds41_row_shard.INDEXER_FLAG, "1") + path = _image("vllm/models/deepseek_v4_1/attention.py") + class_name = "DeepseekV4Attention" + module = ModuleType("test_pinned_indexer") + module.__file__ = str(path) + source = path.read_text(encoding="utf-8") + o_proj_code = source_edit._compile_function(source, f"{class_name}._o_proj", str(path)) + mqa_code = source_edit._compile_function(source, f"{class_name}.forward_mqa", str(path)) + o_proj = FunctionType(o_proj_code, module.__dict__) + mqa = FunctionType(mqa_code, module.__dict__) + + @functools.wraps(mqa) + def capture_wrapper(*args, **kwargs): + return mqa(*args, **kwargs) + + module.DeepseekV4Attention = type( + class_name, (), {"_o_proj": o_proj, "forward_mqa": capture_wrapper} + ) + ds41_row_shard.patch_attention(module) + assert module.DeepseekV4Attention.forward_mqa is capture_wrapper + assert mqa.__code__.co_firstlineno == mqa_code.co_firstlineno + assert "_ds41_indexer_score_offsets" in mqa.__code__.co_names + assert "_ds41_publish_index_rows" in mqa.__code__.co_names + + +def test_compact_route_edits_apply_to_pinned_runner(monkeypatch): + monkeypatch.setenv(ds41_row_shard.ROUTES_FLAG, "1") + path = _image(ds41_row_shard.MOE_RUNNER_MODULE.replace(".", "/") + ".py") + source = path.read_text(encoding="utf-8") + module = ModuleType("test_pinned_moe_runner") + module.__file__ = str(path) + methods = { + name: FunctionType( + source_edit._compile_function(source, f"MoERunner.{name}", str(path)), + module.__dict__, + ) + for name in ("_forward_impl", "_apply_quant_method") + } + module.MoERunner = type("MoERunner", (), methods) + ds41_row_shard.patch_moe_runner(module) + assert "_ds41_gate_owned_routes" in methods["_forward_impl"].__code__.co_names + assert "_ds41_select_owned_routes" in methods["_apply_quant_method"].__code__.co_names + + +def test_local_queries_compose_with_sharded_indexer_on_pinned_source(monkeypatch): + monkeypatch.setenv(ds41_row_shard.LOCAL_QUERIES_FLAG, "1") + monkeypatch.setenv(ds41_row_shard.INDEXER_FLAG, "1") + path = _image("vllm/models/deepseek_v4_1/attention.py") + source = path.read_text(encoding="utf-8") + module = ModuleType("test_pinned_local_queries") + module.__file__ = str(path) + methods = { + name: FunctionType( + source_edit._compile_function(source, f"DeepseekV4Attention.{name}", str(path)), + module.__dict__, + ) + for name in ("_o_proj", "_forward", "forward_mqa", "_write_decode_metadata", "setup_wo_projection", + "get_b12x_preparation_units") + } + module.DeepseekV4Attention = type("DeepseekV4Attention", (), methods) + ds41_row_shard.patch_attention(module) + assert "_ds41_project_query" in methods["_forward"].__code__.co_names + assert "_ds41_attend_owned" in methods["forward_mqa"].__code__.co_names + assert "_ds41_indexer_score_offsets" in methods["forward_mqa"].__code__.co_names + assert methods["_write_decode_metadata"].__defaults__[-1] == 0 + + +def test_compressor_hooks_match_pinned_cache_write_methods(): + from ds41_row_shard import local_query + + modules = [] + for name, cls, method in ( + (ds41_row_shard.ATTENTION_MODULE, "DeepseekV4Attention", "_prepare_global_kv"), + (ds41_row_shard.COMPRESSOR_MODULE, "DeepseekCompressor", "forward"), + ): + path = _image(name.replace(".", "/") + ".py") + module = ModuleType(name) + module.__file__ = str(path) + raw = source_edit._compile_function(path.read_text(encoding="utf-8"), f"{cls}.{method}", str(path)) + fn = FunctionType(raw, module.__dict__) + setattr(module, cls, type(cls, (), {method: fn})) + modules.append(module) + + attention, compressor = modules + local_query.install_compressor( + attention, compressor, ds41_row_shard.PINS[attention.__name__][0], + ds41_row_shard.PINS[compressor.__name__][0], ds41_row_shard.MARKER, + ) + assert "_ds41_global_rows" in attention.DeepseekV4Attention._prepare_global_kv.__code__.co_names + assert "_ds41_compress_rows" in compressor.DeepseekCompressor.forward.__code__.co_names diff --git a/integrations/vllm/ds41_row_shard/tests/test_source_edit.py b/integrations/vllm/ds41_row_shard/tests/test_source_edit.py new file mode 100644 index 00000000..6ad05112 --- /dev/null +++ b/integrations/vllm/ds41_row_shard/tests/test_source_edit.py @@ -0,0 +1,232 @@ +"""The function edit lands on the pinned source, or it is refused.""" + +from __future__ import annotations + +import importlib.util +import sys + +import pytest + +from ds41_row_shard import source_edit + +MARKER = "__ds41_test_edit__" + +MODULE_SOURCE = '''\ +def reduce(v): + return v * 10 + + +class C: + def f(self, x): + y = x + 1 + return reduce(y) +''' + +TWICE_SOURCE = '''\ +def reduce(v): + return v * 10 + + +class C: + def f(self, x): + y = x + 1 + if x: + return reduce(y) + return reduce(y) +''' + +DIVERGED_SOURCE = '''\ +def reduce(v): + return v * 10 + + +class C: + def f(self, x): + y = x + 2 + return reduce(y) +''' + +HELPER_SOURCE = '''\ +def reduce(v): + return v * 10 + + +_helper = 0 + + +class C: + def f(self, x): + y = x + 1 + return reduce(y) +''' + +DECORATED_SOURCE = '''\ +def identity(fn): + return fn + + +def reduce(v): + return v * 10 + + +class C: + @identity + def f(self, x): + y = x + 1 + return reduce(y) +''' + + +@pytest.fixture +def loaded(tmp_path): + """Write a module to tmp_path, import it and remove it again afterwards.""" + names: list[str] = [] + + def load(source: str = MODULE_SOURCE): + path = tmp_path / "sample_module.py" + path.write_text(source, encoding="utf-8") + name = f"_ds41_source_edit_{len(names)}" + spec = importlib.util.spec_from_file_location(name, path) + assert spec is not None and spec.loader is not None + module = importlib.util.module_from_spec(spec) + sys.modules[name] = module + names.append(name) + spec.loader.exec_module(module) + return module, path + + yield load + for name in names: + sys.modules.pop(name, None) + + +def _edit(module, path, replacements, helpers, sha256=None): + return source_edit.edit_function( + module, + "C.f", + source_edit.file_sha256(str(path)) if sha256 is None else sha256, + replacements, + helpers, + MARKER, + ) + + +def test_edit_installs_helper_call_once(loaded): + module, path = loaded() + assert module.C().f(1) == 20 + edit = (("return reduce(y)", "return _helper(y)"),) + helpers = {"_helper": lambda v: v - 1} + assert _edit(module, path, edit, helpers) is True + assert module.C().f(1) == 1 + assert getattr(module.C.f, MARKER, False) is True + code = module.C.f.__code__ + # A second call sees the marker and does not edit again. + assert _edit(module, path, edit, helpers) is False + assert module.C.f.__code__ is code + assert module.C().f(1) == 1 + + +def test_wrong_sha_is_refused(loaded): + module, path = loaded() + good = source_edit.file_sha256(str(path)) + wrong = "0" * 64 if good != "0" * 64 else "1" * 64 + with pytest.raises(source_edit.PatchRefused, match="SHA-256"): + _edit( + module, + path, + (("return reduce(y)", "return _helper(y)"),), + {"_helper": lambda v: v - 1}, + sha256=wrong, + ) + assert not getattr(module.C.f, MARKER, False) + assert module.C().f(1) == 20 + + +@pytest.mark.parametrize( + "source,old,message", + [ + (MODULE_SOURCE, "return reduce(y + 1)", "found 0 times"), + (TWICE_SOURCE, "return reduce(y)", "found 2 times"), + ], +) +def test_anchor_must_occur_exactly_once(loaded, source, old, message): + module, path = loaded(source) + with pytest.raises(source_edit.PatchRefused, match=message): + _edit(module, path, ((old, "return _helper(y)"),), {"_helper": lambda v: v - 1}) + assert not getattr(module.C.f, MARKER, False) + + +def test_line_count_changing_edit_is_refused(loaded): + module, path = loaded() + edit = ((" return reduce(y)", " return reduce(\n y)"),) + with pytest.raises(source_edit.PatchRefused, match="line count"): + _edit(module, path, edit, {"_helper": lambda v: v - 1}) + assert module.C().f(1) == 20 + + +def test_loaded_code_must_match_the_file(loaded): + module, path = loaded() + # The module was imported from MODULE_SOURCE; the file now says something + # else, and the new file's own hash is passed. + path.write_text(DIVERGED_SOURCE, encoding="utf-8") + with pytest.raises(source_edit.PatchRefused, match="differs"): + _edit( + module, + path, + (("return reduce(y)", "return _helper(y)"),), + {"_helper": lambda v: v - 1}, + ) + assert module.C().f(1) == 20 + assert not getattr(module.C.f, MARKER, False) + + +def test_helper_collision_is_refused(loaded): + module, path = loaded(HELPER_SOURCE) + with pytest.raises(source_edit.PatchRefused, match="already exists"): + _edit(module, path, (("return reduce(y)", "return _helper(y)"),), + {"_helper": lambda v: v - 1}) + assert module.C().f(1) == 20 + assert not getattr(module.C.f, MARKER, False) + + +def test_decorated_function_is_refused(loaded): + module, path = loaded(DECORATED_SOURCE) + with pytest.raises(source_edit.PatchRefused, match="decorated"): + _edit( + module, + path, + (("return reduce(y)", "return _helper(y)"),), + {"_helper": lambda v: v - 1}, + ) + assert module.C().f(1) == 20 + + +def test_edit_preserves_traceback_line_numbers(loaded): + module, path = loaded() + + def boom(value): + raise ValueError(f"boom {value}") + + return_line = next( + number + for number, line in enumerate(MODULE_SOURCE.splitlines(), 1) + if line.lstrip().startswith("return reduce(y)") + ) + assert _edit( + module, + path, + (("return reduce(y)", "return _boom(y)"),), + {"_boom": boom}, + ) is True + with pytest.raises(ValueError) as info: + module.C().f(1) + frames = [] + tb = info.tb + while tb is not None: + frames.append(tb) + tb = tb.tb_next + inside = [frame for frame in frames if frame.tb_frame.f_code.co_name == "f"] + assert len(inside) == 1 + assert inside[0].tb_frame.f_code.co_filename == str(path) + assert inside[0].tb_lineno == return_line + # The file is not rewritten; the line number points at the original return. + assert "return reduce(y)" in path.read_text(encoding="utf-8").splitlines()[return_line - 1] diff --git a/integrations/vllm/ds41_row_shard/tests/tp_world.py b/integrations/vllm/ds41_row_shard/tests/tp_world.py new file mode 100644 index 00000000..297e194e --- /dev/null +++ b/integrations/vllm/ds41_row_shard/tests/tp_world.py @@ -0,0 +1,100 @@ +"""Simulated tensor-parallel ranks: one thread per rank, collectives in rank order. + +Every sum adds the ranks' contributions in rank order, as a ring or two-shot +reduction over a fixed order would, so an all-reduce equals the +concatenation of the matching reduce-scatter's shards bit for bit. That is +the property the owned-row path relies on; the tests use float64 so any +difference in arithmetic, not only in summation order, is visible. +""" + +from __future__ import annotations + +import threading + +import torch + +_CONTEXT = threading.local() + + +def rank() -> int: + return _CONTEXT.rank + + +def group() -> "Group": + return _CONTEXT.group + + +class Group: + """The subset of vLLM's ``GroupCoordinator`` the plugin calls.""" + + def __init__(self, world: int): + self.world_size = world + self._barrier = threading.Barrier(world, timeout=60.0) + self._slots: list = [None] * world + self.calls: list[tuple[str, tuple[int, ...]]] = [] + + @property + def rank_in_group(self) -> int: + return rank() + + def _exchange(self, tensor): + self._barrier.wait() + self._slots[rank()] = tensor.clone() + self._barrier.wait() + items = list(self._slots) + self._barrier.wait() + return items + + def all_reduce(self, tensor): + items = self._exchange(tensor) + total = items[0].clone() + for item in items[1:]: + total = total + item + if rank() == 0: + self.calls.append(("all_reduce", tuple(tensor.shape))) + return total + + def reduce_scatter(self, tensor, dim=-1): + assert dim == 0 + items = self._exchange(tensor) + chunk = tensor.shape[0] // self.world_size + start = rank() * chunk + total = items[0][start : start + chunk].clone() + for item in items[1:]: + total = total + item[start : start + chunk] + if rank() == 0: + self.calls.append(("reduce_scatter", tuple(tensor.shape))) + return total + + def all_gather(self, tensor, dim=-1): + assert dim == 0 + items = self._exchange(tensor) + if rank() == 0: + self.calls.append(("all_gather", tuple(tensor.shape))) + return torch.cat(items, dim=0) + + +def run(world: int, body): + """Run ``body(rank)`` on ``world`` threads sharing one ``Group``; return results.""" + shared = Group(world) + results: list = [None] * world + errors: list = [] + + def target(index: int) -> None: + _CONTEXT.rank = index + _CONTEXT.group = shared + try: + results[index] = body(index) + except BaseException as exc: # surfaced below + errors.append(exc) + shared._barrier.abort() + + threads = [threading.Thread(target=target, args=(i,)) for i in range(world)] + for thread in threads: + thread.start() + for thread in threads: + thread.join() + if errors: + primary = [e for e in errors if not isinstance(e, threading.BrokenBarrierError)] + raise (primary or errors)[0] + return results, shared diff --git a/performance/enhancements.json b/performance/enhancements.json index c19d6111..8a507c45 100644 --- a/performance/enhancements.json +++ b/performance/enhancements.json @@ -137,6 +137,16 @@ "description": "Release 2026.10.2's image with the derived layer sparkcache-gab86b70, which adds one file, SparkCache's connector-job lease contract vllm-connector-jobs-gab86b70.json for that image's vLLM, and restates three SparkCache files unchanged. Built on one Spark as sparkring:sparkcache-gab86b70 and present on all eight Sparks of the ring of eight, not published; its lock, the only one that lists glm53-flash-nvfp4-sparkcache-tp2 and glm53-flash-nvfp4-sparkcache-tp4, is not in the repository. Every entry that 2026.10.2 carries, it carries too", "evidence": ["runtime/releases/dev-20261010-sparkcache-gab86b70-plugins-status036/README.md", "runtime/images/compositions/installer-sparkcache-gab86b70/descriptor.json", "performance/records/images/dev-20261010-sparkcache-gab86b70-plugins-status036-glm53-flash-nvfp4-sparkcache-tp4-path4-20261011.md"] }, + "dev-20261013-dcp2prefill-status038-sircl-tp6": { + "label": "2026.10.4", + "release": "runtime/releases/dev-20261013-dcp2prefill-status038-sircl-tp6/release.json", + "image_id": "sha256:3cc9a81fd344fe52fe9cc261b46dc051e3c3f494e51b8142846a5f854835c502", + "short_id": "3cc9a81fd344", + "parent": "dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036", + "transports": ["prepared", "sircl", "libsircl"], + "description": "Installer image of release 2026.10.4 with CUDA 13.4.2, NCCL 2.32.3, and runtime-status 0.3.8. The DeepSeek V4.1 row-owned prefill experiment pins this image and selects NCCL over RoCE.", + "evidence": ["runtime/releases/dev-20261013-dcp2prefill-status038-sircl-tp6/README.md", "docs/operations/images.md#2026104-installer-image"] + }, "shared-2026.09.3": { "label": "shared 2026.09.3", "release": "runtime/releases/shared-2026.09.3/release.json", @@ -238,7 +248,7 @@ {"image": "dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036", "tp": 4, "dcp": 1, "streams": "1-16", "context": "8K, 16K, 32K, 64K, 128K", "checkpoint": "deepseek-ai/DeepSeek-V4.1-Flash@dba1be0a", "result": "transport comparison, research-only: sparkring install of deepseek-v41-flash-tp4 on one ring of four set up with sparkring setup --re-form, release 2026.10.3's candidate package (git 48e4ffb1), GPU clocks locked at 2,418 MHz, one start per arm, llm-inference-bench 0.7.6 at temperature 1, at most 2,048 output tokens. Arms: SIRCL ring sessions (the installer's default); --transport nccl, stock NVIDIA NCCL 2.32.3 on its IB transport; and the same NCCL with the net-sircl NCCL network plugin (NCCL_NET=sircl, given as research options; research-only and not in this repository). The run receipts differ only in transport settings, among them the sircl vLLM plugin; the NCCL arms' KV pool is 12.5-12.6M tokens against 11.3M with SIRCL. Against the first SIRCL start, decode tok/s of both NCCL arms is 0.83-0.95 of SIRCL's in 42 of 50 cells (median 0.90, range 0.70-0.97); engine steps/s is lower in 49 of 50 cells, by a median 10 % and by 12-25 % at eight streams; prefill is equal (0.98-1.00 at 8K-128K); coding-peak median 87.7 tok/s for both NCCL arms against 102.4. A second SIRCL start after the NCCL arms measured a median 0.97 of the first (0.85-1.02), coding peak 97.6; both NCCL arms are below it in 47 of 50 decode cells (median 0.93)", "evidence": "private record 2026-10-12: DeepSeek-V4.1-Flash TP4 transports on a ring of four"} ], "evidence": ["spark_transport/sircl/STATUS.md", "spark_transport/sircl/sparkring_sircl/vllm/RUNBOOK.md", "spark_transport/sircl/PROVENANCE.md", "private record 2026-10-08: serving A/B runner results", "performance/records/images/dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036-release-2026.10.3-plain-ring4-20261012.md", "private record 2026-10-12: DeepSeek-V4.1-Flash TP4 transports on a ring of four"], - "profiles": ["deepseek-v41-flash-tp8", "glm53-flash-csf-tp8", "glm53-nvfp4-csf-tp6", "glm53-nvfp4-csf-tp8", "glm53-nvfp4-tp8", "glm53-nvfp4-tp8-dcp1", "qwen38-flash-next-qad-tp8"] + "profiles": ["deepseek-v41-flash-sparkcache-tp4", "deepseek-v41-flash-tp8", "glm53-flash-csf-tp8", "glm53-flash-nvfp4-sparkcache-crc32-tp2", "glm53-flash-nvfp4-sparkcache-crc32-tp4", "glm53-nvfp4-csf-tp6", "glm53-nvfp4-csf-tp8", "glm53-nvfp4-tp8", "glm53-nvfp4-tp8-dcp1", "qwen38-flash-next-csf-sparkcache-tp2", "qwen38-flash-next-qad-tp8", "qwen38-flash-next-step5500-sparkcache-tp4"] }, { "id": "sircl-ring-schedules-path4", @@ -345,7 +355,7 @@ {"image": "dev-20261004-kraken-cuda1342-nccl2323-status034 with workspace plugins and SIRCL from a staged tree", "tp": 8, "dcp": 4, "streams": "1-8", "context": "16K", "checkpoint": "local-inference-lab/GLM-5.3-NVFP4@b472e4ee", "result": "posting to the farthest peers first and a 28 KiB one-shot limit: steps/s +1-4 %", "evidence": "private record 2026-10-07..08: SIRCL ring results, sections 6 and 12"} ], "evidence": ["runtime/common/sircl-tuning-defaults.json", "spark_transport/sircl/sparkring_sircl/vllm/RUNBOOK.md", "profiles/glm53-nvfp4-tp8/README.md", "private record 2026-10-08: SIRCL qualification logs"], - "profiles": ["deepseek-v41-flash-tp8", "glm53-flash-csf-tp8", "glm53-nvfp4-csf-tp6", "glm53-nvfp4-csf-tp8", "glm53-nvfp4-tp8", "glm53-nvfp4-tp8-dcp1", "qwen38-flash-next-qad-tp8"] + "profiles": ["deepseek-v41-flash-sparkcache-tp4", "deepseek-v41-flash-tp8", "glm53-flash-csf-tp8", "glm53-flash-nvfp4-sparkcache-crc32-tp2", "glm53-flash-nvfp4-sparkcache-crc32-tp4", "glm53-nvfp4-csf-tp6", "glm53-nvfp4-csf-tp8", "glm53-nvfp4-tp8", "glm53-nvfp4-tp8-dcp1", "qwen38-flash-next-csf-sparkcache-tp2", "qwen38-flash-next-qad-tp8", "qwen38-flash-next-step5500-sparkcache-tp4"] }, { "id": "sircl-cycle4-tuning-row", @@ -409,7 +419,7 @@ {"image": "dev-20261004-kraken-cuda1342-nccl2323-status034 with workspace plugins and SIRCL from a staged tree", "tp": 8, "dcp": 4, "streams": null, "context": "16K", "checkpoint": "local-inference-lab/GLM-5.3-NVFP4@b472e4ee", "result": "prefill 1,378 -> 1,423 tok/s", "evidence": "private record 2026-10-08: eight-Spark evening results"} ], "evidence": ["spark_transport/sircl/STATUS.md", "profiles/glm53-nvfp4-tp8/README.md", "private record 2026-10-08: eight-Spark evening results"], - "profiles": ["deepseek-v41-flash-tp8", "glm53-flash-csf-tp8", "glm53-nvfp4-csf-tp8", "glm53-nvfp4-tp8", "glm53-nvfp4-tp8-dcp1", "qwen38-flash-next-qad-tp8"] + "profiles": ["deepseek-v41-flash-sparkcache-tp4", "deepseek-v41-flash-tp8", "glm53-flash-csf-tp8", "glm53-flash-nvfp4-sparkcache-crc32-tp2", "glm53-flash-nvfp4-sparkcache-crc32-tp4", "glm53-nvfp4-csf-tp8", "glm53-nvfp4-tp8", "glm53-nvfp4-tp8-dcp1", "qwen38-flash-next-csf-sparkcache-tp2", "qwen38-flash-next-qad-tp8", "qwen38-flash-next-step5500-sparkcache-tp4"] }, { "id": "sircl-fused-allreduce-rmsnorm", @@ -547,7 +557,7 @@ {"image": "dev-20260927-h2dstaging-cuda1342-nccl2323-status031", "tp": 4, "dcp": 1, "streams": null, "context": "16K-128K", "checkpoint": "deepseek-ai/DeepSeek-V4.1-Flash@dba1be0a", "result": "prefill 4-9 % faster than with it off", "evidence": "performance/records/images/dev-20260927-h2dstaging-deepseek-v41-tp4-20260927.md"} ], "evidence": ["performance/records/images/dev-20260927-h2dstaging-deepseek-v41-tp4-20260927.md"], - "profiles": ["deepseek-v41-flash-sparkcache-tp4", "deepseek-v41-flash-tp4", "glm53-flash-nvfp4-spark-tp4", "glm53-flash-nvfp4-sparkcache-crc32-tp4", "glm53-flash-nvfp4-sparkcache-tp4", "glm53-flash-spark-tp4-switched", "mimo-v26-flash-mopd-tp4", "qwen38-flash-next-qad-tp4", "qwen38-flash-next-step5500-sparkcache-tp4", "swift15-qwen38-flash-next-tp4"] + "profiles": ["deepseek-v41-flash-tp4", "glm53-flash-nvfp4-spark-tp4", "glm53-flash-nvfp4-sparkcache-tp4", "glm53-flash-spark-tp4-switched", "mimo-v26-flash-mopd-tp4", "qwen38-flash-next-qad-tp4", "swift15-qwen38-flash-next-tp4"] }, { "id": "host-sm-clock-lock", @@ -1675,7 +1685,7 @@ "gain": {"percent": null, "summary": "not recorded in the repository"}, "measurements": [], "evidence": ["integrations/vllm/qwen38_collectives/README.md", "runtime/images/feature_bootstrap.py"], - "profiles": ["qwen38-flash-next-csf-sparkcache-tp2", "qwen38-flash-next-qad-tp4", "qwen38-flash-next-qad-tp4-sparkcache", "qwen38-flash-next-step5500-sparkcache-tp4", "qwen38-flash-next-tp2", "swift15-qwen38-flash-next-tp2", "swift15-qwen38-flash-next-tp4"] + "profiles": ["qwen38-flash-next-qad-tp4", "qwen38-flash-next-qad-tp4-sparkcache", "qwen38-flash-next-tp2", "swift15-qwen38-flash-next-tp2", "swift15-qwen38-flash-next-tp4"] }, { "id": "qwen38-mxfp8-hc-projections", @@ -1787,6 +1797,40 @@ "evidence": ["private record 2026-10-11: DeepSeek-V4.1-Flash TP4 with sharded Engram projections on a path of four", "private record 2026-10-05: eight-Spark session notes", "performance/records/images/dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036-release-2026.10.3-plain-ring8-20261012.md"], "profiles": ["deepseek-v41-flash-sparkcache-tp4", "deepseek-v41-flash-tp4"] }, + { + "id": "ds41-row-owned-prefill", + "title": "DeepSeek V4.1 row-owned prefill and distributed indexer scoring", + "description": "On a directly cabled four-Spark NCCL cycle, each rank keeps its encoder residual rows and receives their Engram lookup rows by reduce-scatter. The vLLM plugin distributes native indexer score and select tiles for eligible encoder layers and gathers the selected top-k rows in token order. Full-head prefill plans compute attention on owned query rows, gather narrow KV and compressor projections, and exchange compact expert routes. The pinned installer uses 8,192-token prefill chunks.", + "category": "vllm-plugin", + "sides": ["prefill"], + "models": [ + {"name": "DeepSeek-V4.1-Flash", "checkpoints": ["deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e1088993b9b82de08f59de5be5a34e42170"]} + ], + "parallelism": {"supported": [{"tp": [4], "dcp": [1]}]}, + "enable": {"launcher": "sudo sparkring install --profile deepseek-v41-flash-tp4 --checkpoint 1017 --image dev-20261013-dcp2prefill-status038-sircl-tp6 --transport nccl --row-owned-prefill"}, + "detect": [ + {"image": ["dev-20261013-dcp2prefill-status038-sircl-tp6"]}, + {"env": "VLLM_PLUGINS", "has_item": "ds41_row_shard"}, + {"env": "DS41_ROW_SHARD_PREFILL", "equals": "1"}, + {"env": "DS41_ROW_SHARD_INDEXER", "equals": "1"}, + {"env": "DS41_ROW_SHARD_COMPACT_ROUTES", "equals": "1"}, + {"env": "DS41_ROW_SHARD_LOCAL_QUERIES", "equals": "1"}, + {"env": "DS41_ROW_SHARD_KV_LATENTS", "equals": "1"}, + {"env": "DS41_ROW_SHARD_COMPRESSOR_LATENTS", "equals": "1"}, + {"env": "VLLM_ENABLE_ROCE_ALLREDUCE", "equals": "0"}, + {"arg": "--enforce-eager", "present": true}, + {"arg": "--engram-config", "json": "projection_tp", "equals": false}, + {"arg": "--max-num-batched-tokens", "equals": 8192} + ], + "provided_by": {"images": ["dev-20261013-dcp2prefill-status038-sircl-tp6"]}, + "status": "research-only", + "gain": {"percent": 17.0, "summary": "Median 128K cold prefill rose from 5,234 to 6,124 tok/s with full-head attention, compact routes and packed projections, both at 8K chunks on one NCCL cycle"}, + "measurements": [ + {"image": "dev-20261013-dcp2prefill-status038-sircl-tp6", "tp": 4, "dcp": 1, "streams": "1", "context": "16K, 64K, 128K", "checkpoint": "deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10", "result": "Three cold requests per length on one four-Spark NCCL cycle. Median prompt tok/s at 16K / 64K / 128K were 5,445 / 5,361 / 5,234 with distributed scoring and 6,334 / 6,250 / 6,124 with full-head local-query attention, compact routes and packed projections. All requests used 8K prefill chunks.", "evidence": "performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md"} + ], + "evidence": ["performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md", "integrations/vllm/ds41_row_shard/README.md"], + "profiles": [] + }, { "id": "ds41-split-fused-attention", "title": "Split fused attention at TP8", diff --git a/performance/enhancements.md b/performance/enhancements.md index 9200e061..da2cee9b 100644 --- a/performance/enhancements.md +++ b/performance/enhancements.md @@ -31,6 +31,7 @@ An entry carried by an image is carried by the images built on it. | SIRCL 0.3.2, libsircl and GLM-5.3 plugin image (1a8c1035)
`dev-20261009-kraken-csf-sircl032-libsircl-plugins` | `1a8c10354eb0` | Kraken CSF sources | sircl, prepared, libsircl | The Kraken CSF sources (the composition of image 816c6d6a) with a SIRCL 0.3.2 layer (native ABI 9), libsircl 0.6.0 built from spark_transport/libsircl tree dbf36074 (fail-stop, NCCL API 22705) and the GLM-5.3 plugin layer with the vLLM general plugins glm_dsa_indexer_split and glm53full_speedups 1.1.0 and glm_dcp_decode_comm 2.0.1; SIRCL's pinned vLLM build sparkring-kraken-beta-20261007-bc9ea774; its v3 lock lists 13 profiles. Built on one Spark and loaded on the others, not published; release 2026.10.2's installer measurements ran on it. Every entry that image 27e9f75c carries, it carries too, and its SIRCL 0.3.2 sessions take the measured cycle-4 row of the installing package's default tuning table | | 2026.10.2
[`dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036`](../runtime/releases/dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036/release.json) | `d52737a109e0` | Kraken CSF sources | sircl, prepared, libsircl | Installer image of release 2026.10.2: the SIRCL 0.3.2 layer of image 1a8c10354eb0, libsircl 0.6.0 built from spark_transport/libsircl tree 030419b8 (fail-stop, NCCL API 22705, communicators created on the current device when no context is current), the GLM-5.3 plugin layer of the same sources as image 1a8c10354eb0's and runtime-status 0.3.6; its v3 lock lists 13 profiles. Every entry that image 1a8c10354eb0 carries, it carries too | | SparkCache layer image (e1607979)
`dev-20261010-sparkcache-gab86b70-plugins-status036` | `e1607979b7f0` | 2026.10.2 | sircl, prepared, libsircl | Release 2026.10.2's image with the derived layer sparkcache-gab86b70, which adds one file, SparkCache's connector-job lease contract vllm-connector-jobs-gab86b70.json for that image's vLLM, and restates three SparkCache files unchanged. Built on one Spark as sparkring:sparkcache-gab86b70 and present on all eight Sparks of the ring of eight, not published; its lock, the only one that lists glm53-flash-nvfp4-sparkcache-tp2 and glm53-flash-nvfp4-sparkcache-tp4, is not in the repository. Every entry that 2026.10.2 carries, it carries too | +| 2026.10.4
[`dev-20261013-dcp2prefill-status038-sircl-tp6`](../runtime/releases/dev-20261013-dcp2prefill-status038-sircl-tp6/release.json) | `3cc9a81fd344` | 2026.10.2 | prepared, sircl, libsircl | Installer image of release 2026.10.4 with CUDA 13.4.2, NCCL 2.32.3, and runtime-status 0.3.8. The DeepSeek V4.1 row-owned prefill experiment pins this image and selects NCCL over RoCE. | | shared 2026.09.3
[`shared-2026.09.3`](../runtime/releases/shared-2026.09.3/release.json) | `bc16a9819d85` | — | prepared | Shared serving image of the manual-setup and SparkCache profiles; carries SparkCache and its native cache libraries | ## GLM-5.3-Flash @@ -135,6 +136,7 @@ Measured without a gain, not adopted: | Enhancement | Side | TP | How to enable | Gain | Status | |---|---|---|---|---|---| | [DSpark adaptive verification](#ds41-dspark-adaptive-verification) | decode | 4/8 (DCP 1) | `--speculative-config` keys `{"method":"dspark","num_speculative_tokens":5,"rejection_sample_method":"block","enable_adaptive_verification":true}` | TP4, temperature 1.0: 130.5 / 184.6 / 252.9 against 108.6 / 142.5 / 207.8 tok/s at 4 / 8 / 16 streams with greedy drafting (+20-30 %); with probabilistic drafting +26-37 % | implemented; from 2026.10.0, 2026.10.1 | +| [DeepSeek V4.1 row-owned prefill and distributed indexer scoring](#ds41-row-owned-prefill) (DeepSeek-V4.1-Flash-1017@1bae0e1088993b9b82de08f59de5be5a34e42170) | prefill | 4 (DCP 1) | sudo sparkring install --profile deepseek-v41-flash-tp4 --checkpoint 1017 --image dev-20261013-dcp2prefill-status038-sircl-tp6 --transport nccl --row-owned-prefill | Median 128K cold prefill rose from 5,234 to 6,124 tok/s with full-head attention, compact routes and packed projections, both at 8K chunks on one NCCL cycle | research-only; from 2026.10.4 | | [SIRCL ring sessions with NCCL off](#sircl-transport) | decode | 2/4/8 | sudo sparkring install --profile PROFILE --image-lock LOCK, with an image lock (v3) whose image carries the SIRCL layer and a fabric document that lists sircl; NCCL stays off unless --nccl auto | TP4 on a ring of four, one start per transport: decode tok/s with stock NCCL 2.32.3, or with NCCL and the net-sircl network plugin, a median 0.90 of the first SIRCL start's and 0.93 of a second's (SIRCL +8 % against the second); engine steps/s a median 10 % lower; prefill equal | research-only; from SIRCL 0.2.0 image (54af97d9), SIRCL 0.3.0 and libsircl image (816c6d6a), SIRCL 0.3.1, libsircl and GLM-5.3 plugin image (27e9f75c), SIRCL 0.3.2, libsircl and GLM-5.3 plugin image (1a8c1035), 2026.10.2 | | [NCCL on all four RoCE functions](#nccl-extended-ipv4-gids) | prefill | 2/4 | `NCCL_IB_EXTENDED_IPV4_GIDS=1` | TP4: prefill 4-9 % faster from 16K to 128K than with it off | implemented; from 2026.10.0, 2026.10.1 | | [Engram projection tensor parallelism](#ds41-engram-projection-tp) | decode, memory | 4 (DCP 1) | `--engram-config {"table_memory":"disk","disk_resident_scales":true,"projection_tp":true}` | TP4, llm-inference-bench defaults (the server's default temperature): engine steps/s +5.5 % at one stream and +12 % at eight; output tok/s +4-7 % at 1-8 streams and -2 to +2 % at 16; prefill -1 to -2 % | implemented; from 2026.10.0, 2026.10.1, 2026.10.2 | @@ -258,7 +260,7 @@ Measured without a gain, not adopted: - Category: Collective transport setting: SIRCL ring sessions, NCCL or the prepared RoCEnante transport. - Models: GLM-5.3, GLM-5.3-Flash, Qwen3.8-Flash-Next, Swift-1.5-Qwen3.8-Flash-Next, MiMo-V2.6-Flash-MOPD, DeepSeek-V4.1-Flash. Sizes: 2/4/8. - Availability: from SIRCL 0.2.0 image (54af97d9), SIRCL 0.3.0 and libsircl image (816c6d6a), SIRCL 0.3.1, libsircl and GLM-5.3 plugin image (27e9f75c), SIRCL 0.3.2, libsircl and GLM-5.3 plugin image (1a8c1035), 2026.10.2. -- Profiles that turn it on: `deepseek-v41-flash-tp8`, `glm53-flash-csf-tp8`, `glm53-nvfp4-csf-tp6`, `glm53-nvfp4-csf-tp8`, `glm53-nvfp4-tp8`, `glm53-nvfp4-tp8-dcp1`, `qwen38-flash-next-qad-tp8`. +- Profiles that turn it on: `deepseek-v41-flash-sparkcache-tp4`, `deepseek-v41-flash-tp8`, `glm53-flash-csf-tp8`, `glm53-flash-nvfp4-sparkcache-crc32-tp2`, `glm53-flash-nvfp4-sparkcache-crc32-tp4`, `glm53-nvfp4-csf-tp6`, `glm53-nvfp4-csf-tp8`, `glm53-nvfp4-tp8`, `glm53-nvfp4-tp8-dcp1`, `qwen38-flash-next-csf-sparkcache-tp2`, `qwen38-flash-next-qad-tp8`, `qwen38-flash-next-step5500-sparkcache-tp4`. - Measured (TP2/DCP1, 1-16 streams, local-inference-lab/GLM-5.3-Flash-NVFP4-Spark@a6082410, image SIRCL 0.2.0 image (54af97d9)): verification steps/s +1.5-5.3 % in every cell against vLLM's communicator on NCCL; TTFT equal. Evidence: private record 2026-10-08: serving A/B runner results. - Measured (TP4/DCP1, 1-16 streams, context 8K, 16K, 32K, 64K, 128K, deepseek-ai/DeepSeek-V4.1-Flash@dba1be0a, image 2026.10.2): transport comparison, research-only: sparkring install of deepseek-v41-flash-tp4 on one ring of four set up with sparkring setup --re-form, release 2026.10.3's candidate package (git 48e4ffb1), GPU clocks locked at 2,418 MHz, one start per arm, llm-inference-bench 0.7.6 at temperature 1, at most 2,048 output tokens. Arms: SIRCL ring sessions (the installer's default); --transport nccl, stock NVIDIA NCCL 2.32.3 on its IB transport; and the same NCCL with the net-sircl NCCL network plugin (NCCL_NET=sircl, given as research options; research-only and not in this repository). The run receipts differ only in transport settings, among them the sircl vLLM plugin; the NCCL arms' KV pool is 12.5-12.6M tokens against 11.3M with SIRCL. Against the first SIRCL start, decode tok/s of both NCCL arms is 0.83-0.95 of SIRCL's in 42 of 50 cells (median 0.90, range 0.70-0.97); engine steps/s is lower in 49 of 50 cells, by a median 10 % and by 12-25 % at eight streams; prefill is equal (0.98-1.00 at 8K-128K); coding-peak median 87.7 tok/s for both NCCL arms against 102.4. A second SIRCL start after the NCCL arms measured a median 0.97 of the first (0.85-1.02), coding peak 97.6; both NCCL arms are below it in 47 of 50 decode cells (median 0.93). Evidence: private record 2026-10-12: DeepSeek-V4.1-Flash TP4 transports on a ring of four. - Evidence: [spark_transport/sircl/STATUS.md](../spark_transport/sircl/STATUS.md); [spark_transport/sircl/sparkring_sircl/vllm/RUNBOOK.md](../spark_transport/sircl/sparkring_sircl/vllm/RUNBOOK.md); [spark_transport/sircl/PROVENANCE.md](../spark_transport/sircl/PROVENANCE.md); private record 2026-10-08: serving A/B runner results; [performance/records/images/dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036-release-2026.10.3-plain-ring4-20261012.md](records/images/dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036-release-2026.10.3-plain-ring4-20261012.md); private record 2026-10-12: DeepSeek-V4.1-Flash TP4 transports on a ring of four. @@ -301,7 +303,7 @@ Measured without a gain, not adopted: - Models: GLM-5.3, GLM-5.3-Flash, Qwen3.8-Flash-Next, DeepSeek-V4.1-Flash. Sizes: 8. - Availability: from SIRCL 0.2.0 image (54af97d9), SIRCL 0.3.0 and libsircl image (816c6d6a), SIRCL 0.3.1, libsircl and GLM-5.3 plugin image (27e9f75c), SIRCL 0.3.2, libsircl and GLM-5.3 plugin image (1a8c1035), 2026.10.2. - Requires: [`sircl-transport`](#sircl-transport). -- Profiles that turn it on: `deepseek-v41-flash-tp8`, `glm53-flash-csf-tp8`, `glm53-nvfp4-csf-tp6`, `glm53-nvfp4-csf-tp8`, `glm53-nvfp4-tp8`, `glm53-nvfp4-tp8-dcp1`, `qwen38-flash-next-qad-tp8`. +- Profiles that turn it on: `deepseek-v41-flash-sparkcache-tp4`, `deepseek-v41-flash-tp8`, `glm53-flash-csf-tp8`, `glm53-flash-nvfp4-sparkcache-crc32-tp2`, `glm53-flash-nvfp4-sparkcache-crc32-tp4`, `glm53-nvfp4-csf-tp6`, `glm53-nvfp4-csf-tp8`, `glm53-nvfp4-tp8`, `glm53-nvfp4-tp8-dcp1`, `qwen38-flash-next-csf-sparkcache-tp2`, `qwen38-flash-next-qad-tp8`, `qwen38-flash-next-step5500-sparkcache-tp4`. - Measured (TP8/DCP4, 8 streams, context 16K, local-inference-lab/GLM-5.3-NVFP4@b472e4ee, image dev-20261004-kraken-cuda1342-nccl2323-status034 with workspace plugins and SIRCL from a staged tree): 16 link slots of 512 KiB: 8-stream decode 119.5 -> 126.5 tok/s; prefill unchanged. Evidence: private record 2026-10-08: SIRCL qualification logs. - Measured (TP8/DCP4, 1-8 streams, context 16K, local-inference-lab/GLM-5.3-NVFP4@b472e4ee, image dev-20261004-kraken-cuda1342-nccl2323-status034 with workspace plugins and SIRCL from a staged tree): posting to the farthest peers first and a 28 KiB one-shot limit: steps/s +1-4 %. Evidence: private record 2026-10-07..08: SIRCL ring results, sections 6 and 12. - Evidence: [runtime/common/sircl-tuning-defaults.json](../runtime/common/sircl-tuning-defaults.json); [spark_transport/sircl/sparkring_sircl/vllm/RUNBOOK.md](../spark_transport/sircl/sparkring_sircl/vllm/RUNBOOK.md); [profiles/glm53-nvfp4-tp8/README.md](../profiles/glm53-nvfp4-tp8/README.md); private record 2026-10-08: SIRCL qualification logs. @@ -329,7 +331,7 @@ Measured without a gain, not adopted: - Models: GLM-5.3, GLM-5.3-Flash, Qwen3.8-Flash-Next, Swift-1.5-Qwen3.8-Flash-Next, MiMo-V2.6-Flash-MOPD, DeepSeek-V4.1-Flash. Sizes: 2/4/8. - Availability: from SIRCL 0.3.0 and libsircl image (816c6d6a), SIRCL 0.3.1, libsircl and GLM-5.3 plugin image (27e9f75c), SIRCL 0.3.2, libsircl and GLM-5.3 plugin image (1a8c1035), 2026.10.2. - Requires: [`sircl-transport`](#sircl-transport). -- Profiles that turn it on: `deepseek-v41-flash-tp8`, `glm53-flash-csf-tp8`, `glm53-nvfp4-csf-tp8`, `glm53-nvfp4-tp8`, `glm53-nvfp4-tp8-dcp1`, `qwen38-flash-next-qad-tp8`. +- Profiles that turn it on: `deepseek-v41-flash-sparkcache-tp4`, `deepseek-v41-flash-tp8`, `glm53-flash-csf-tp8`, `glm53-flash-nvfp4-sparkcache-crc32-tp2`, `glm53-flash-nvfp4-sparkcache-crc32-tp4`, `glm53-nvfp4-csf-tp8`, `glm53-nvfp4-tp8`, `glm53-nvfp4-tp8-dcp1`, `qwen38-flash-next-csf-sparkcache-tp2`, `qwen38-flash-next-qad-tp8`, `qwen38-flash-next-step5500-sparkcache-tp4`. - Measured (TP8/DCP4, context 16K, local-inference-lab/GLM-5.3-NVFP4@b472e4ee, image dev-20261004-kraken-cuda1342-nccl2323-status034 with workspace plugins and SIRCL from a staged tree): prefill 1,378 -> 1,423 tok/s. Evidence: private record 2026-10-08: eight-Spark evening results. - Evidence: [spark_transport/sircl/STATUS.md](../spark_transport/sircl/STATUS.md); [profiles/glm53-nvfp4-tp8/README.md](../profiles/glm53-nvfp4-tp8/README.md); private record 2026-10-08: eight-Spark evening results. @@ -392,7 +394,7 @@ Measured without a gain, not adopted: - Category: Collective transport setting: SIRCL ring sessions, NCCL or the prepared RoCEnante transport. - Models: DeepSeek-V4.1-Flash, GLM-5.3-Flash, Qwen3.8-Flash-Next, Swift-1.5-Qwen3.8-Flash-Next, MiMo-V2.6-Flash-MOPD. Sizes: 2/4. - Availability: from 2026.10.0, 2026.10.1. -- Profiles that turn it on: `deepseek-v41-flash-sparkcache-tp4`, `deepseek-v41-flash-tp4`, `glm53-flash-nvfp4-spark-tp4`, `glm53-flash-nvfp4-sparkcache-crc32-tp4`, `glm53-flash-nvfp4-sparkcache-tp4`, `glm53-flash-spark-tp4-switched`, `mimo-v26-flash-mopd-tp4`, `qwen38-flash-next-qad-tp4`, `qwen38-flash-next-step5500-sparkcache-tp4`, `swift15-qwen38-flash-next-tp4`. +- Profiles that turn it on: `deepseek-v41-flash-tp4`, `glm53-flash-nvfp4-spark-tp4`, `glm53-flash-nvfp4-sparkcache-tp4`, `glm53-flash-spark-tp4-switched`, `mimo-v26-flash-mopd-tp4`, `qwen38-flash-next-qad-tp4`, `swift15-qwen38-flash-next-tp4`. - Measured (TP4/DCP1, context 16K-128K, deepseek-ai/DeepSeek-V4.1-Flash@dba1be0a, image dev-20260927-h2dstaging-cuda1342-nccl2323-status031): prefill 4-9 % faster than with it off. Evidence: [performance/records/images/dev-20260927-h2dstaging-deepseek-v41-tp4-20260927.md](records/images/dev-20260927-h2dstaging-deepseek-v41-tp4-20260927.md). - Evidence: [performance/records/images/dev-20260927-h2dstaging-deepseek-v41-tp4-20260927.md](records/images/dev-20260927-h2dstaging-deepseek-v41-tp4-20260927.md). @@ -972,7 +974,7 @@ Measured without a gain, not adopted: - Category: Collective transport setting: SIRCL ring sessions, NCCL or the prepared RoCEnante transport. - Models: Qwen3.8-Flash-Next, Swift-1.5-Qwen3.8-Flash-Next. Sizes: 2/4 (DCP 1). - Availability: from 2026.10.0, 2026.10.1. -- Profiles that turn it on: `qwen38-flash-next-csf-sparkcache-tp2`, `qwen38-flash-next-qad-tp4`, `qwen38-flash-next-qad-tp4-sparkcache`, `qwen38-flash-next-step5500-sparkcache-tp4`, `qwen38-flash-next-tp2`, `swift15-qwen38-flash-next-tp2`, `swift15-qwen38-flash-next-tp4`. +- Profiles that turn it on: `qwen38-flash-next-qad-tp4`, `qwen38-flash-next-qad-tp4-sparkcache`, `qwen38-flash-next-tp2`, `swift15-qwen38-flash-next-tp2`, `swift15-qwen38-flash-next-tp4`. - Evidence: [integrations/vllm/qwen38_collectives/README.md](../integrations/vllm/qwen38_collectives/README.md); [runtime/images/feature_bootstrap.py](../runtime/images/feature_bootstrap.py). ### `qwen38-mxfp8-hc-projections` @@ -1033,6 +1035,17 @@ Measured without a gain, not adopted: - Measured (TP8/DCP1, 1-16 streams, context 8K, 16K, 32K, 64K, 128K, deepseek-ai/DeepSeek-V4.1-Flash@dba1be0a, image 2026.10.2): not adopted at TP8: sparkring install of deepseek-v41-flash-tp8 on the cycle of eight with projection_tp true in --engram-config as a research option, against the profile's start without it; release 2026.10.3's candidate package (git 48e4ffb1), GPU clocks locked at 2,418 MHz, llm-inference-bench 0.7.6 at temperature 1, one start each, run receipts differing only in engram.projection_tp. With it, engine steps/s equal at one stream (30.8-32.3 both), about 6 % lower at eight (102-110 against 110-117) and 2-5 % higher at sixteen (142-159 against 135-155); prefill 1-3 % lower; coding-peak median 124.0 against 133.8 tok/s; KV cache 33.2M against 32.7M tokens. No consistent gain. Evidence: [performance/records/images/dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036-release-2026.10.3-plain-ring8-20261012.md](records/images/dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036-release-2026.10.3-plain-ring8-20261012.md). - Evidence: private record 2026-10-11: DeepSeek-V4.1-Flash TP4 with sharded Engram projections on a path of four; private record 2026-10-05: eight-Spark session notes; [performance/records/images/dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036-release-2026.10.3-plain-ring8-20261012.md](records/images/dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036-release-2026.10.3-plain-ring8-20261012.md). +### `ds41-row-owned-prefill` + +**DeepSeek V4.1 row-owned prefill and distributed indexer scoring.** On a directly cabled four-Spark NCCL cycle, each rank keeps its encoder residual rows and receives their Engram lookup rows by reduce-scatter. The vLLM plugin distributes native indexer score and select tiles for eligible encoder layers and gathers the selected top-k rows in token order. Full-head prefill plans compute attention on owned query rows, gather narrow KV and compressor projections, and exchange compact expert routes. The pinned installer uses 8,192-token prefill chunks. + +- Category: vLLM general plugin, image feature hook or cache connector. +- Models: DeepSeek-V4.1-Flash. Sizes: 4 (DCP 1). +- Availability: from 2026.10.4. +- Profiles that turn it on: none. +- Measured (TP4/DCP1, 1 streams, context 16K, 64K, 128K, deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10, image 2026.10.4): Three cold requests per length on one four-Spark NCCL cycle. Median prompt tok/s at 16K / 64K / 128K were 5,445 / 5,361 / 5,234 with distributed scoring and 6,334 / 6,250 / 6,124 with full-head local-query attention, compact routes and packed projections. All requests used 8K prefill chunks.. Evidence: [performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md](records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md). +- Evidence: [performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md](records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md); [integrations/vllm/ds41_row_shard/README.md](../integrations/vllm/ds41_row_shard/README.md). + ### `ds41-split-fused-attention` **Split fused attention at TP8.** A change to DeepSeek-V4.1-Flash's fused attention at TP8, measured with launch code outside the repository that was not read; no SparkRing image or profile carries it. diff --git a/performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.jsonl b/performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.jsonl new file mode 100644 index 00000000..d807e0fd --- /dev/null +++ b/performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.jsonl @@ -0,0 +1,45 @@ +{"variant":"compact_routes","repeat":1,"prompt_tokens":16384,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":5571.44} +{"variant":"compact_routes","repeat":1,"prompt_tokens":65536,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":5486.51} +{"variant":"compact_routes","repeat":1,"prompt_tokens":131072,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":5395.28} +{"variant":"compact_routes","repeat":2,"prompt_tokens":16384,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":5456.43} +{"variant":"compact_routes","repeat":2,"prompt_tokens":65536,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":5465.9} +{"variant":"compact_routes","repeat":2,"prompt_tokens":131072,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":5359.85} +{"variant":"compact_routes","repeat":3,"prompt_tokens":16384,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":5550.34} +{"variant":"compact_routes","repeat":3,"prompt_tokens":65536,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":5456.8} +{"variant":"compact_routes","repeat":3,"prompt_tokens":131072,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":5326.2} +{"variant":"full_head_and_kv","repeat":1,"prompt_tokens":16384,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6234.14} +{"variant":"full_head_and_kv","repeat":1,"prompt_tokens":65536,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6121.02} +{"variant":"full_head_and_kv","repeat":1,"prompt_tokens":131072,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":5989.9} +{"variant":"full_head_and_kv","repeat":2,"prompt_tokens":16384,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6210.37} +{"variant":"full_head_and_kv","repeat":2,"prompt_tokens":65536,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6139.89} +{"variant":"full_head_and_kv","repeat":2,"prompt_tokens":131072,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6009.7} +{"variant":"full_head_and_kv","repeat":3,"prompt_tokens":16384,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6226.11} +{"variant":"full_head_and_kv","repeat":3,"prompt_tokens":65536,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6110.93} +{"variant":"full_head_and_kv","repeat":3,"prompt_tokens":131072,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":5987.7} +{"variant":"owned_row_metadata","repeat":1,"prompt_tokens":16384,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6267.39} +{"variant":"owned_row_metadata","repeat":1,"prompt_tokens":65536,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6178.61} +{"variant":"owned_row_metadata","repeat":1,"prompt_tokens":131072,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6014.84} +{"variant":"owned_row_metadata","repeat":2,"prompt_tokens":16384,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6304.89} +{"variant":"owned_row_metadata","repeat":2,"prompt_tokens":65536,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6184.49} +{"variant":"owned_row_metadata","repeat":2,"prompt_tokens":131072,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6010.52} +{"variant":"owned_row_metadata","repeat":3,"prompt_tokens":16384,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6225.06} +{"variant":"owned_row_metadata","repeat":3,"prompt_tokens":65536,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6136.28} +{"variant":"owned_row_metadata","repeat":3,"prompt_tokens":131072,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":5977.92} +{"variant":"packed_compressor","repeat":1,"prompt_tokens":16384,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6358.48} +{"variant":"packed_compressor","repeat":1,"prompt_tokens":65536,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6293.06} +{"variant":"packed_compressor","repeat":1,"prompt_tokens":131072,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6145.08} +{"variant":"packed_compressor","repeat":2,"prompt_tokens":16384,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6312.82} +{"variant":"packed_compressor","repeat":2,"prompt_tokens":65536,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6249.71} +{"variant":"packed_compressor","repeat":2,"prompt_tokens":131072,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6123.51} +{"variant":"packed_compressor","repeat":3,"prompt_tokens":16384,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6333.65} +{"variant":"packed_compressor","repeat":3,"prompt_tokens":65536,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6248.46} +{"variant":"packed_compressor","repeat":3,"prompt_tokens":131072,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6113.35} +{"variant":"engram_feature_bands","repeat":1,"prompt_tokens":16384,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6340.3} +{"variant":"engram_feature_bands","repeat":1,"prompt_tokens":65536,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6249.9} +{"variant":"engram_feature_bands","repeat":1,"prompt_tokens":131072,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6104.44} +{"variant":"engram_feature_bands","repeat":2,"prompt_tokens":16384,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6332.04} +{"variant":"engram_feature_bands","repeat":2,"prompt_tokens":65536,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6197.08} +{"variant":"engram_feature_bands","repeat":2,"prompt_tokens":131072,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6094.71} +{"variant":"engram_feature_bands","repeat":3,"prompt_tokens":16384,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6324.17} +{"variant":"engram_feature_bands","repeat":3,"prompt_tokens":65536,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6188.72} +{"variant":"engram_feature_bands","repeat":3,"prompt_tokens":131072,"cached_tokens":0,"prefill_chunk":8192,"prefill_tok_s":6064.64} diff --git a/performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md b/performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md new file mode 100644 index 00000000..afd99283 --- /dev/null +++ b/performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md @@ -0,0 +1,59 @@ +# DeepSeek V4.1 prefill on a four-Spark cycle with 8K chunks + +**Research-only.** DeepSeek-V4.1-Flash-1017 exceeded 6,000 prompt tokens/s +at 16K, 64K, and 128K with full-head local-query attention, compact expert +routes, and narrow compressor and KV gathers. The engine used 8,192-token +prefill chunks. + +## Conditions + +Four DGX Sparks on one directly cabled NCCL cycle used TP4, DCP1, the +B12X installer image +`sha256:3cc9a81fd344fe52fe9cc261b46dc051e3c3f494e51b8142846a5f854835c502`, +and checkpoint `1bae0e1088993b9b82de08f59de5be5a34e42170`. Serving +used eager execution, disk Engram with a replicated projection, DSpark5 +with adaptive verification disabled, a 262,144-token context cap, a +16-sequence scheduler limit, and patched NCCL 2.32.3 over RoCE. + +The existing [indexer-scoring experiment](row-owned-indexer-ring-20261119.md) +supplies the 8K-chunk comparison. Each later row represents three +concurrency-one cold requests per length on the same cycle. The +loopback client sent exact token IDs, used temperature zero and one +completion token, and timed from request submission to first text delta. +Every measured request reported zero cached tokens. + +## Results + +| Configuration | 16K median tok/s | 64K median tok/s | 128K median tok/s | +|---|---:|---:|---:| +| Distributed indexer scoring | 5,445 | 5,361 | 5,234 | +| Add compact expert routing | 5,550 | 5,466 | 5,360 | +| Add full-head attention and narrow KV gathers | 6,226 | 6,121 | 5,990 | +| Build metadata for owned query rows | 6,267 | 6,179 | 6,011 | +| Pack the compressor and indexer projections | 6,334 | 6,250 | 6,124 | +| Add Engram feature bands | 6,332 | 6,197 | 6,095 | + +All nine compressor-variant samples cleared 6,000 tok/s. The 128K +samples ranged from 6,113 to 6,145 tok/s. [Samples](row-owned-full-head-ring-20261119.jsonl) + +The Engram banding experiment split each replicated-projection lookup +reduction into feature bands of at most 80 MiB. The counters recorded four +Engram reductions per chunk. The unbanded compressor build had the highest +median at each length and is the selected installer configuration. + +## Serving checks + +At 8,192 rows, the compressor variant logged 20 local-attention layers, +17 narrow KV gathers and three packed compressor gathers. It gathered +compact expert routes at 20 layers and reduced 22 tensors, including +two Engram lookups. The fixed 16K and 128K prompts returned the +baseline's first token. An 8,200-token continuation reused 7,936 +cached tokens. An unaligned 16,387-token prefill and a concurrent +64-token decode both completed. + +The full-head trial held 76.96 GiB of model weights on the API rank. +The compact-routing-only launch held 74.63 GiB. These measurements +cover one direct NCCL cycle. The installer was tested through plan +generation, and the measured deployment used manual containers. +Sustained decode, multimodal behavior, open-chain throughput and +full numerical parity across arbitrary prompts remain unqualified. diff --git a/performance/records/deepseek-v41-flash/row-owned-indexer-ring-20261119.jsonl b/performance/records/deepseek-v41-flash/row-owned-indexer-ring-20261119.jsonl new file mode 100644 index 00000000..6ac93a74 --- /dev/null +++ b/performance/records/deepseek-v41-flash/row-owned-indexer-ring-20261119.jsonl @@ -0,0 +1,116 @@ +{"kind":"metadata","model":"deepseek-ai/DeepSeek-V4.1-Flash-1017","revision":"1bae0e1088993b9b82de08f59de5be5a34e42170","image_id":"sha256:3cc9a81fd344fe52fe9cc261b46dc051e3c3f494e51b8142846a5f854835c502","hardware":"four DGX Sparks on a direct cycle","tp":4,"dcp":1,"prefill_chunk":8192,"max_model_len":262144,"max_num_seqs":16,"gpu_memory_utilization":0.83,"transport":"SparkRing patched NCCL 2.32.3 over RoCE","execution":"eager","engram_projection":"replicated","speculation":"DSpark5, adaptive verification disabled","sample":"single concurrent client, stream until first nonempty text delta, temperature zero, one output token","indexer_plugin_sha256":{"ds41_row_shard/__init__.py":"70f4f88909b30af4d0818225920ee00dd7c40414a985f840f767a631118e5f7c","ds41_row_shard/core.py":"eade75f0f5ea2cff66b6434cd8c239671f7a7e080525a2c54d702151af8e1ee5","ds41_row_shard/source_edit.py":"ebaf1ff0fd7b4da3b4a9a1b566a2e9e850796cd8f1ff2d2887b65107580284ce","ds41_row_shard-0.1.0.dist-info/entry_points.txt":"d0051ea120a8bd2db493eed4ffed5bebb445f28f82010a284a6051724569f0c7","ds41_row_shard-0.1.0.dist-info/METADATA":"efd8b529972a1d3ff407ca1b502aea0ba9992f85f2f69e65df02d72fde620770","ds41_row_shard-0.1.0.dist-info/top_level.txt":"81f205a6aedcbce46f4db5321ea5cae3336f97d51db99da07de4f48b34f2738d"}} +{"variant":"row-owned-8192","model":"DeepSeek-V4.1-Flash-1017-TP4","nonce":1795121075248638500,"repeats":3,"sizes":[16384,65536,131072]} +{"repeat":1,"variant":"row-owned-8192","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":3.08679,"prefill_tok_s":5307.78,"prompt_sha256":"ec0670d7ebfa3aa5933d2721753660f1e9f4a09f448a101ce72af7d8aabbeb66"} +{"repeat":1,"variant":"row-owned-8192","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":12.82672,"prefill_tok_s":5109.34,"prompt_sha256":"da5f7d4b6825d9328da0438ceb088b2215c1013f02ff2a0f8fef5c9f81eca752"} +{"repeat":1,"variant":"row-owned-8192","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":28.02624,"prefill_tok_s":4676.76,"prompt_sha256":"5aa4a325d06c7380e2af54cd81411afadda652a2d9f28486ceae80baf9884173"} +{"repeat":2,"variant":"row-owned-8192","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":3.0475,"prefill_tok_s":5376.21,"prompt_sha256":"4c6c17f5c3ddd84a6523b00746502a3a1f4b13bceffa61733c1df592b651ff89"} +{"repeat":2,"variant":"row-owned-8192","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":13.50244,"prefill_tok_s":4853.64,"prompt_sha256":"12bd91eb6f9253f9bb698fc9b2001412814424228fa2bc1e1e470bba29b8522c"} +{"repeat":2,"variant":"row-owned-8192","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":29.35838,"prefill_tok_s":4464.55,"prompt_sha256":"2af130e491a24ec0835bb83aacd49304710e67ff02a448cda371812e87e521e8"} +{"repeat":3,"variant":"row-owned-8192","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":3.05729,"prefill_tok_s":5358.99,"prompt_sha256":"7cd24515def8d45bf7397db80f67330039a0a465e3cd86158be61043da0afae3"} +{"repeat":3,"variant":"row-owned-8192","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":12.95556,"prefill_tok_s":5058.52,"prompt_sha256":"3d21e56dacb3b301664aa133f54e7937b4f48a3d95a9ce829a89699e531a0e58"} +{"repeat":3,"variant":"row-owned-8192","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":28.96682,"prefill_tok_s":4524.9,"prompt_sha256":"1337132cc39067e0e0e967d24182423adff0d73688fd9d867d6a613a8c38e752"} +{"summary":"row-owned-8192","prompt_tokens":16384,"median_tok_s":5358.99,"min_tok_s":5307.78,"max_tok_s":5376.21} +{"summary":"row-owned-8192","prompt_tokens":65536,"median_tok_s":5058.52,"min_tok_s":4853.64,"max_tok_s":5109.34} +{"summary":"row-owned-8192","prompt_tokens":131072,"median_tok_s":4524.9,"min_tok_s":4464.55,"max_tok_s":4676.76} +{"kind":"late_prefill_trace","rank":0,"span_ms":1822.99,"categories_ms":{"MoE":435.89,"indexer":348,"NCCL":298.12,"attention":277.98,"GEMM":265.33,"other":161.56}} +{"kind":"late_prefill_trace","rank":1,"span_ms":1838.24,"categories_ms":{"MoE":434.89,"indexer":348.25,"NCCL":308.75,"attention":281.81,"GEMM":267.23,"other":159.39}} +{"kind":"late_prefill_trace","rank":2,"span_ms":1837.28,"categories_ms":{"MoE":434.81,"indexer":343.58,"NCCL":319.1,"attention":277.43,"GEMM":264,"other":159.86}} +{"kind":"late_prefill_trace","rank":3,"span_ms":1816.88,"categories_ms":{"MoE":439.97,"indexer":351.76,"attention":282.97,"NCCL":275.32,"GEMM":267.98,"other":162}} +{"variant":"profile-baseline","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":3.03832,"prefill_tok_s":5392.45,"output_sha256":"f8b424987962a75412314f0457205c8c934232f94655a2827fb6635a7dc998a7","prompt_sha256":"d52dbbfd9fade453ae06d7825d7879eb0d5b3058b4dab805bd89b58ea63ca74f"} +{"variant":"profile-baseline","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":27.61466,"prefill_tok_s":4746.46,"output_sha256":"eeca91fd439b6d5e827e8fda7fee35046f2def93508637483f6be8a2df7a4392","prompt_sha256":"3ec2decb9c6897783f42346310845acb8d915d7bbdfdf3c304829a9d51421f61"} +{"candidate":"sparkring-dsv41-prefill-6k-indexer-r0","health":200} +{"variant":"warmup","prompt_tokens":8192,"cached_tokens":0,"completion_tokens":1,"ttft_s":4.36275,"prefill_tok_s":1877.71,"output_sha256":"19581e27de7ced00ff1ce50b2047e7a567c76b1cbaebabe5ef03f7c3017bb5b7","prompt_sha256":"7cfa6d6cdcc361b59b9dc105c16e4a66f20afda7fb52d5f4ebfd1f1a39254611"} +{"variant":"indexer-8192","model":"DeepSeek-V4.1-Flash-1017-TP4","nonce":1795122084696541200,"repeats":3,"sizes":[16384,65536,131072]} +{"repeat":1,"variant":"indexer-8192","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":3.06224,"prefill_tok_s":5350.33,"output_sha256":"f8b424987962a75412314f0457205c8c934232f94655a2827fb6635a7dc998a7","prompt_sha256":"d52dbbfd9fade453ae06d7825d7879eb0d5b3058b4dab805bd89b58ea63ca74f","fixed_prompt":true} +{"repeat":1,"variant":"indexer-8192","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":12.18637,"prefill_tok_s":5377.81,"output_sha256":"86e50149658661312a9e0b35558d84f6c6d3da797f552a9657fe0558ca40cdef","prompt_sha256":"db5f6f64e6913163bf2e1bac72de95ae0254ced9912a8de44fca4cf215952f0a","fixed_prompt":false} +{"repeat":1,"variant":"indexer-8192","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":25.39185,"prefill_tok_s":5161.97,"output_sha256":"eeca91fd439b6d5e827e8fda7fee35046f2def93508637483f6be8a2df7a4392","prompt_sha256":"3ec2decb9c6897783f42346310845acb8d915d7bbdfdf3c304829a9d51421f61","fixed_prompt":true} +{"repeat":2,"variant":"indexer-8192","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":2.9956,"prefill_tok_s":5469.36,"output_sha256":"fe0663fd13cdb08743dca3d2d5d1168762556ea36f77d8ab6009306d12a6f351","prompt_sha256":"84568f31d047e539012bdd5609e645d922b92a06ea122236c403f254b9456d56","fixed_prompt":false} +{"repeat":2,"variant":"indexer-8192","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":12.28762,"prefill_tok_s":5333.5,"output_sha256":"9f14025af0065b30e47e23ebb3b491d39ae8ed17d33739e5ff3827ffb3634953","prompt_sha256":"2897b5c2bb6370edbb1757f36ee3407ccaa14afdb3c37ea6ec0233e362d9b54c","fixed_prompt":false} +{"repeat":2,"variant":"indexer-8192","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":25.04073,"prefill_tok_s":5234.35,"output_sha256":"5c836aaf86eb87443993ecb798b15ece53be3382931519c4993cfa2127230061","prompt_sha256":"483b0e3994d1a842f1e679b023309e5087787d57e38da8caa58640957db1b9fa","fixed_prompt":false} +{"repeat":3,"variant":"indexer-8192","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":3.00895,"prefill_tok_s":5445.08,"output_sha256":"fe0663fd13cdb08743dca3d2d5d1168762556ea36f77d8ab6009306d12a6f351","prompt_sha256":"c06c1cb6879a0719b6824002c3a80e38ace6176061743c75dc358d44b34a32de","fixed_prompt":false} +{"repeat":3,"variant":"indexer-8192","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":12.22478,"prefill_tok_s":5360.92,"output_sha256":"76a50887d8f1c2e9301755428990ad81479ee21c25b43215cf524541e0503269","prompt_sha256":"57849643ed3f88fd85f90d06383a839bdca591553f819851dfbc8e118beeebe9","fixed_prompt":false} +{"repeat":3,"variant":"indexer-8192","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":24.98585,"prefill_tok_s":5245.85,"output_sha256":"5c836aaf86eb87443993ecb798b15ece53be3382931519c4993cfa2127230061","prompt_sha256":"eff41f2993eebbdb4c3a396f2610a96b894849f43b063f4542e6e8198190d615","fixed_prompt":false} +{"summary":"indexer-8192","prompt_tokens":16384,"median_tok_s":5445.08,"min_tok_s":5350.33,"max_tok_s":5469.36} +{"summary":"indexer-8192","prompt_tokens":65536,"median_tok_s":5360.92,"min_tok_s":5333.5,"max_tok_s":5377.81} +{"summary":"indexer-8192","prompt_tokens":131072,"median_tok_s":5234.35,"min_tok_s":5161.97,"max_tok_s":5245.85} +{"candidate":"sparkring-dsv41-prefill-6k-indexer-16k-r0","health":200,"prefill_chunk":16384,"nccl_channels":4} +{"variant":"warmup","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":4.59794,"prefill_tok_s":3563.34,"output_sha256":"fe0663fd13cdb08743dca3d2d5d1168762556ea36f77d8ab6009306d12a6f351","prompt_sha256":"f8033d9ea845bd835256cd068bf4dac1967e01e9882b9761d569af7555b4d15d","prefill_chunk":16384,"nccl_channels":4} +{"variant":"indexer-16384","model":"DeepSeek-V4.1-Flash-1017-TP4","nonce":1795122425132589600,"repeats":3,"sizes":[16384,65536,131072],"prefill_chunk":16384,"nccl_channels":4} +{"repeat":1,"variant":"indexer-16384","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":2.90244,"prefill_tok_s":5644.91,"output_sha256":"f8b424987962a75412314f0457205c8c934232f94655a2827fb6635a7dc998a7","prompt_sha256":"d52dbbfd9fade453ae06d7825d7879eb0d5b3058b4dab805bd89b58ea63ca74f","fixed_prompt":true,"prefill_chunk":16384,"nccl_channels":4} +{"repeat":1,"variant":"indexer-16384","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":11.72455,"prefill_tok_s":5589.64,"output_sha256":"0b8efa5a3bf104413a725c6ff0459a6be12b1fd33314cbb138745baf39504ae5","prompt_sha256":"b74d260be2abe5b79fe876e65eb58c0bc1908effcd193c4c752f3b22f0d901fc","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4} +{"repeat":1,"variant":"indexer-16384","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":23.99066,"prefill_tok_s":5463.46,"output_sha256":"eeca91fd439b6d5e827e8fda7fee35046f2def93508637483f6be8a2df7a4392","prompt_sha256":"3ec2decb9c6897783f42346310845acb8d915d7bbdfdf3c304829a9d51421f61","fixed_prompt":true,"prefill_chunk":16384,"nccl_channels":4} +{"repeat":2,"variant":"indexer-16384","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":2.89913,"prefill_tok_s":5651.35,"output_sha256":"fe0663fd13cdb08743dca3d2d5d1168762556ea36f77d8ab6009306d12a6f351","prompt_sha256":"acca1e2a5ce89ea26e32bd2da03b3f441425b869fce68f2f6a1d626f07e5df20","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4} +{"repeat":2,"variant":"indexer-16384","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":11.76771,"prefill_tok_s":5569.14,"output_sha256":"6cd5b6e51936a442b973660c21553dd22bd72ddc8751132a943475288113b4c0","prompt_sha256":"15c8050be77e18a84b27403f6e64013686d42865ac99338f80e491d19c4990b8","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4} +{"repeat":2,"variant":"indexer-16384","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":23.91318,"prefill_tok_s":5481.16,"output_sha256":"5c836aaf86eb87443993ecb798b15ece53be3382931519c4993cfa2127230061","prompt_sha256":"b0e468aa75f18f29eab2803784d3c09c9d69638c7ea631c36c6d43e4d0ffd627","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4} +{"repeat":3,"variant":"indexer-16384","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":2.8811,"prefill_tok_s":5686.71,"output_sha256":"fe0663fd13cdb08743dca3d2d5d1168762556ea36f77d8ab6009306d12a6f351","prompt_sha256":"8db70f649014309ceba32425877abf507ede62642d25845c0ae1b9d286d54482","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4} +{"repeat":3,"variant":"indexer-16384","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":11.75281,"prefill_tok_s":5576.2,"output_sha256":"c97550ce8213ef5cf6ed4ba48790c137df3ef6a5da20b48961001a634b6cead2","prompt_sha256":"f2446e37cb02287aceecbb5af09f5d573f88e288526d334d0cfdf97793210ae6","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4} +{"repeat":3,"variant":"indexer-16384","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":24.05679,"prefill_tok_s":5448.44,"output_sha256":"5c836aaf86eb87443993ecb798b15ece53be3382931519c4993cfa2127230061","prompt_sha256":"f0efe393c8f749bd96ffa2e78fe4db38d34a089db83d7da4c2df16b0d5f08106","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4} +{"summary":"indexer-16384","prompt_tokens":16384,"median_tok_s":5651.35,"min_tok_s":5644.91,"max_tok_s":5686.71,"prefill_chunk":16384,"nccl_channels":4} +{"summary":"indexer-16384","prompt_tokens":65536,"median_tok_s":5576.2,"min_tok_s":5569.14,"max_tok_s":5589.64,"prefill_chunk":16384,"nccl_channels":4} +{"summary":"indexer-16384","prompt_tokens":131072,"median_tok_s":5463.46,"min_tok_s":5448.44,"max_tok_s":5481.16,"prefill_chunk":16384,"nccl_channels":4} +{"candidate":"sparkring-dsv41-prefill-6k-indexer-16k-ch8-r0","health":200,"prefill_chunk":16384,"nccl_channels":8} +{"variant":"warmup","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":4.66024,"prefill_tok_s":3515.7,"output_sha256":"fe0663fd13cdb08743dca3d2d5d1168762556ea36f77d8ab6009306d12a6f351","prompt_sha256":"567b92ae0bc2919df455285cb460ef47ed410246c6d2f625f8c6e7cd9f4bd6d4","prefill_chunk":16384,"nccl_channels":8} +{"variant":"indexer-16384-ch8","model":"DeepSeek-V4.1-Flash-1017-TP4","nonce":1795122839105801200,"repeats":1,"sizes":[16384,65536,131072],"prefill_chunk":16384,"nccl_channels":8} +{"repeat":1,"variant":"indexer-16384-ch8","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":2.91413,"prefill_tok_s":5622.27,"output_sha256":"f8b424987962a75412314f0457205c8c934232f94655a2827fb6635a7dc998a7","prompt_sha256":"d52dbbfd9fade453ae06d7825d7879eb0d5b3058b4dab805bd89b58ea63ca74f","fixed_prompt":true,"prefill_chunk":16384,"nccl_channels":8} +{"repeat":1,"variant":"indexer-16384-ch8","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":11.86892,"prefill_tok_s":5521.65,"output_sha256":"86e50149658661312a9e0b35558d84f6c6d3da797f552a9657fe0558ca40cdef","prompt_sha256":"5a3ad122e4032d923e859a8e6960d58e2a20f5344658d6a9000080671ef546f2","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":8} +{"repeat":1,"variant":"indexer-16384-ch8","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":24.4981,"prefill_tok_s":5350.29,"output_sha256":"eeca91fd439b6d5e827e8fda7fee35046f2def93508637483f6be8a2df7a4392","prompt_sha256":"3ec2decb9c6897783f42346310845acb8d915d7bbdfdf3c304829a9d51421f61","fixed_prompt":true,"prefill_chunk":16384,"nccl_channels":8} +{"summary":"indexer-16384-ch8","prompt_tokens":16384,"median_tok_s":5622.27,"min_tok_s":5622.27,"max_tok_s":5622.27,"prefill_chunk":16384,"nccl_channels":8} +{"summary":"indexer-16384-ch8","prompt_tokens":65536,"median_tok_s":5521.65,"min_tok_s":5521.65,"max_tok_s":5521.65,"prefill_chunk":16384,"nccl_channels":8} +{"summary":"indexer-16384-ch8","prompt_tokens":131072,"median_tok_s":5350.29,"min_tok_s":5350.29,"max_tok_s":5350.29,"prefill_chunk":16384,"nccl_channels":8} +{"kind":"attention_projection_screen","layers":17,"input_width":5120,"gathered_width":1792,"sha256":{"ds41_row_shard/__init__.py":"05bb4cde07ae66d17587224b66d57378f06f3a239b4984c6448097cea001b3a4","ds41_row_shard/core.py":"9ffea65c2817f70afeb1b8c94c74f13ec4e9ee7ba697a3b5206f83514b9799ab","ds41_row_shard/source_edit.py":"ebaf1ff0fd7b4da3b4a9a1b566a2e9e850796cd8f1ff2d2887b65107580284ce","ds41_row_shard-0.1.0.dist-info/entry_points.txt":"d0051ea120a8bd2db493eed4ffed5bebb445f28f82010a284a6051724569f0c7","ds41_row_shard-0.1.0.dist-info/METADATA":"efd8b529972a1d3ff407ca1b502aea0ba9992f85f2f69e65df02d72fde620770","ds41_row_shard-0.1.0.dist-info/top_level.txt":"81f205a6aedcbce46f4db5321ea5cae3336f97d51db99da07de4f48b34f2738d"}} +{"candidate":"sparkring-dsv41-prefill-6k-frontend-16k-r0","health":200,"prefill_chunk":16384,"nccl_channels":4} +{"variant":"warmup","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":3.62133,"prefill_tok_s":4524.3,"output_sha256":"fe0663fd13cdb08743dca3d2d5d1168762556ea36f77d8ab6009306d12a6f351","prompt_sha256":"7f9bb044579946e4e5d17014846462cd8214c481c6b9cb04e0c64a5fac163d10","prefill_chunk":16384,"nccl_channels":4} +{"variant":"projection-16384","model":"DeepSeek-V4.1-Flash-1017-TP4","nonce":1795123145709463300,"repeats":3,"sizes":[16384,65536,131072],"prefill_chunk":16384,"nccl_channels":4} +{"repeat":1,"variant":"projection-16384","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":2.90509,"prefill_tok_s":5639.75,"output_sha256":"f8b424987962a75412314f0457205c8c934232f94655a2827fb6635a7dc998a7","prompt_sha256":"d52dbbfd9fade453ae06d7825d7879eb0d5b3058b4dab805bd89b58ea63ca74f","fixed_prompt":true,"prefill_chunk":16384,"nccl_channels":4} +{"repeat":1,"variant":"projection-16384","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":11.86273,"prefill_tok_s":5524.53,"output_sha256":"31489056e0916d59fe3add79e63f095af3ffb81604691f21cad442a85c7be617","prompt_sha256":"747a784466e48c998013ba7283733006d0dbe0d3871414a0b3ce93478f133911","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4} +{"repeat":1,"variant":"projection-16384","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":24.19827,"prefill_tok_s":5416.59,"output_sha256":"eeca91fd439b6d5e827e8fda7fee35046f2def93508637483f6be8a2df7a4392","prompt_sha256":"3ec2decb9c6897783f42346310845acb8d915d7bbdfdf3c304829a9d51421f61","fixed_prompt":true,"prefill_chunk":16384,"nccl_channels":4} +{"repeat":2,"variant":"projection-16384","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":2.93379,"prefill_tok_s":5584.58,"output_sha256":"fe0663fd13cdb08743dca3d2d5d1168762556ea36f77d8ab6009306d12a6f351","prompt_sha256":"3521f295d0baedbe450d2cb2015c6a24b9ff22a0680ebc7f6ecc3fc3c6c244d9","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4} +{"repeat":2,"variant":"projection-16384","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":11.94869,"prefill_tok_s":5484.78,"output_sha256":"98010bd9270f9b100b6214a21754fd33bdc8d41b2bc9f9dd16ff54d3c34ffd71","prompt_sha256":"68a1682b994a40d395cf747cce9326c50ada3e8f90f50b5b3899ce8a3194ab15","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4} +{"repeat":2,"variant":"projection-16384","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":24.37283,"prefill_tok_s":5377.79,"output_sha256":"5c836aaf86eb87443993ecb798b15ece53be3382931519c4993cfa2127230061","prompt_sha256":"87d1ab96db6af3112297bd4ad5d3441f0c84c922e94e6516d6b20f4ef84dd245","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4} +{"repeat":3,"variant":"projection-16384","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":2.93961,"prefill_tok_s":5573.53,"output_sha256":"fe0663fd13cdb08743dca3d2d5d1168762556ea36f77d8ab6009306d12a6f351","prompt_sha256":"18488326d80852051c1de5aea2151426047bec81b4ab2575fac0e1cdfd0b4680","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4} +{"repeat":3,"variant":"projection-16384","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":11.9889,"prefill_tok_s":5466.39,"output_sha256":"0e17daca5f3e175f448bacace3bc0da47d0655a74c8dd0dc497a3afbdad95f1f","prompt_sha256":"08ff51277de09b6adde3da9340a40afb38e2052b3672b068bd38ec801508f68f","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4} +{"repeat":3,"variant":"projection-16384","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":24.3252,"prefill_tok_s":5388.32,"output_sha256":"5c836aaf86eb87443993ecb798b15ece53be3382931519c4993cfa2127230061","prompt_sha256":"f40b8735645ee40115e5f2e345a83e2503b185556548e2b9de3d46f0413d7f4a","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4} +{"summary":"projection-16384","prompt_tokens":16384,"median_tok_s":5584.58,"min_tok_s":5573.53,"max_tok_s":5639.75,"prefill_chunk":16384,"nccl_channels":4} +{"summary":"projection-16384","prompt_tokens":65536,"median_tok_s":5484.78,"min_tok_s":5466.39,"max_tok_s":5524.53,"prefill_chunk":16384,"nccl_channels":4} +{"summary":"projection-16384","prompt_tokens":131072,"median_tok_s":5388.32,"min_tok_s":5377.79,"max_tok_s":5416.59,"prefill_chunk":16384,"nccl_channels":4} +{"kind":"prefill_capacity_screen","prefill_chunk":32768,"nccl_channels":4,"kv_cache_tokens":967186,"compared_16k_kv_cache_tokens":3544968,"peak_activation_gib_rank0":5.77,"kv_cache_gib_rank0":6.84} +{"candidate":"sparkring-dsv41-prefill-6k-indexer-32k-r0","health":200,"prefill_chunk":32768,"nccl_channels":4} +{"variant":"warmup","prompt_tokens":32768,"cached_tokens":0,"completion_tokens":1,"ttft_s":7.41328,"prefill_tok_s":4420.18,"output_sha256":"6f90a5a0d3234433d03c7a06fc4bd5c3ac1f21f33978292fee61323e22238a92","prompt_sha256":"3f0b64c1394bd095cf8c1417a392f8a8bc197eea96c62d5ba9480db223cfde98","prefill_chunk":32768,"nccl_channels":4} +{"variant":"indexer-32768","model":"DeepSeek-V4.1-Flash-1017-TP4","nonce":1795123627477670100,"repeats":3,"sizes":[16384,65536,131072],"prefill_chunk":32768,"nccl_channels":4} +{"repeat":1,"variant":"indexer-32768","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":2.87838,"prefill_tok_s":5692.09,"output_sha256":"f8b424987962a75412314f0457205c8c934232f94655a2827fb6635a7dc998a7","prompt_sha256":"d52dbbfd9fade453ae06d7825d7879eb0d5b3058b4dab805bd89b58ea63ca74f","fixed_prompt":true,"prefill_chunk":32768,"nccl_channels":4} +{"repeat":1,"variant":"indexer-32768","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":12.58718,"prefill_tok_s":5206.57,"output_sha256":"94f8607915dff25f013e45fc0642fb9830b0fb25ab0ab46d477eaf1061def379","prompt_sha256":"99610960af421344e9628508f6fde473369b643b785ba4ebe0f860c61f0f0422","fixed_prompt":false,"prefill_chunk":32768,"nccl_channels":4} +{"repeat":1,"variant":"indexer-32768","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":25.5925,"prefill_tok_s":5121.5,"output_sha256":"eeca91fd439b6d5e827e8fda7fee35046f2def93508637483f6be8a2df7a4392","prompt_sha256":"3ec2decb9c6897783f42346310845acb8d915d7bbdfdf3c304829a9d51421f61","fixed_prompt":true,"prefill_chunk":32768,"nccl_channels":4} +{"repeat":2,"variant":"indexer-32768","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":2.89409,"prefill_tok_s":5661.19,"output_sha256":"80fff15c8b90caf684a611ded749f2132b7fb2c477c4fd421eddd617ea474d44","prompt_sha256":"a6ff5dcf40351b7464954b04a4c31f53847d2051c494ce487cce528e4828573a","fixed_prompt":false,"prefill_chunk":32768,"nccl_channels":4} +{"repeat":2,"variant":"indexer-32768","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":12.60019,"prefill_tok_s":5201.19,"output_sha256":"94f8607915dff25f013e45fc0642fb9830b0fb25ab0ab46d477eaf1061def379","prompt_sha256":"2226193416d037827897e7004a18107167d10bfe530f1d823dee64a064dad594","fixed_prompt":false,"prefill_chunk":32768,"nccl_channels":4} +{"repeat":2,"variant":"indexer-32768","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":25.70972,"prefill_tok_s":5098.15,"output_sha256":"7de598b3ff8a99638e1f9bf49260baa0d98e069dde32d1f2e153adb5ce478242","prompt_sha256":"4b676c421e7a37ad27c39c86810aed9f7cd4381f35ac28f88209cf17a38a2116","fixed_prompt":false,"prefill_chunk":32768,"nccl_channels":4} +{"repeat":3,"variant":"indexer-32768","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":2.87724,"prefill_tok_s":5694.35,"output_sha256":"80fff15c8b90caf684a611ded749f2132b7fb2c477c4fd421eddd617ea474d44","prompt_sha256":"f247bba90d52ac2613b9504533c59a6b5ff63559607a3ed3989e7e42ec8e91cd","fixed_prompt":false,"prefill_chunk":32768,"nccl_channels":4} +{"repeat":3,"variant":"indexer-32768","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":12.67909,"prefill_tok_s":5168.82,"output_sha256":"94f8607915dff25f013e45fc0642fb9830b0fb25ab0ab46d477eaf1061def379","prompt_sha256":"b70a20b24f052963d47cc84aa71cca401a2bbcf44a5637f3d24e036e3a8f574b","fixed_prompt":false,"prefill_chunk":32768,"nccl_channels":4} +{"repeat":3,"variant":"indexer-32768","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":25.79881,"prefill_tok_s":5080.54,"output_sha256":"7de598b3ff8a99638e1f9bf49260baa0d98e069dde32d1f2e153adb5ce478242","prompt_sha256":"9d90903cb081391e0d824bb2754dc38ac79584a0361da57092665576caa125a8","fixed_prompt":false,"prefill_chunk":32768,"nccl_channels":4} +{"summary":"indexer-32768","prompt_tokens":16384,"median_tok_s":5692.09,"min_tok_s":5661.19,"max_tok_s":5694.35,"prefill_chunk":32768,"nccl_channels":4} +{"summary":"indexer-32768","prompt_tokens":65536,"median_tok_s":5201.19,"min_tok_s":5168.82,"max_tok_s":5206.57,"prefill_chunk":32768,"nccl_channels":4} +{"summary":"indexer-32768","prompt_tokens":131072,"median_tok_s":5098.15,"min_tok_s":5080.54,"max_tok_s":5121.5,"prefill_chunk":32768,"nccl_channels":4} +{"kind":"nccl_buffer_screen","prefill_chunk":16384,"nccl_channels":4,"nccl_buffer_bytes":8388608} +{"candidate":"sparkring-dsv41-prefill-6k-indexer-16k-buf8-r0","health":200,"prefill_chunk":16384,"nccl_channels":4,"nccl_buffer_bytes":8388608} +{"variant":"warmup","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":4.07398,"prefill_tok_s":4021.62,"output_sha256":"fe0663fd13cdb08743dca3d2d5d1168762556ea36f77d8ab6009306d12a6f351","prompt_sha256":"ffc88aa3f8f11f9b98e20d6c75e325d5119b69b20cbc7ab439ab6b87a362de3a","prefill_chunk":16384,"nccl_channels":4,"nccl_buffer_bytes":8388608} +{"variant":"indexer-16384-buf8","model":"DeepSeek-V4.1-Flash-1017-TP4","nonce":1795123961275683600,"repeats":3,"sizes":[16384,65536,131072],"prefill_chunk":16384,"nccl_channels":4,"nccl_buffer_bytes":8388608} +{"repeat":1,"variant":"indexer-16384-buf8","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":2.95894,"prefill_tok_s":5537.12,"output_sha256":"f8b424987962a75412314f0457205c8c934232f94655a2827fb6635a7dc998a7","prompt_sha256":"d52dbbfd9fade453ae06d7825d7879eb0d5b3058b4dab805bd89b58ea63ca74f","fixed_prompt":true,"prefill_chunk":16384,"nccl_channels":4,"nccl_buffer_bytes":8388608} +{"repeat":1,"variant":"indexer-16384-buf8","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":12.04899,"prefill_tok_s":5439.13,"output_sha256":"6f4b6612125fb3a0daecd2799dfd6c9c299424fd920f9b308110a2c1fbd8f443","prompt_sha256":"749f5d277413c4b7386ef34aebb9c7bcca9e92b19964b5c4e6761ab89a100da3","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4,"nccl_buffer_bytes":8388608} +{"repeat":1,"variant":"indexer-16384-buf8","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":25.0369,"prefill_tok_s":5235.15,"output_sha256":"eeca91fd439b6d5e827e8fda7fee35046f2def93508637483f6be8a2df7a4392","prompt_sha256":"3ec2decb9c6897783f42346310845acb8d915d7bbdfdf3c304829a9d51421f61","fixed_prompt":true,"prefill_chunk":16384,"nccl_channels":4,"nccl_buffer_bytes":8388608} +{"repeat":2,"variant":"indexer-16384-buf8","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":2.9983,"prefill_tok_s":5464.42,"output_sha256":"fe0663fd13cdb08743dca3d2d5d1168762556ea36f77d8ab6009306d12a6f351","prompt_sha256":"2c2daa469c971d045460a89687deff724c65bd81b3d5c8d52d3c6ec09937db0a","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4,"nccl_buffer_bytes":8388608} +{"repeat":2,"variant":"indexer-16384-buf8","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":12.10681,"prefill_tok_s":5413.15,"output_sha256":"785f3ec7eb32f30b90cd0fcf3657d388b5ff4297f2f9716ff66e9b69c05ddd09","prompt_sha256":"8136879b19a87a402bf021f1070901a028131eed7fbd7ca12f4536309a026402","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4,"nccl_buffer_bytes":8388608} +{"repeat":2,"variant":"indexer-16384-buf8","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":24.78305,"prefill_tok_s":5288.78,"output_sha256":"5c836aaf86eb87443993ecb798b15ece53be3382931519c4993cfa2127230061","prompt_sha256":"402558b444c4c06c1e76e55512f21989b1245f48b1a63c206e20d1b71b2fb893","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4,"nccl_buffer_bytes":8388608} +{"repeat":3,"variant":"indexer-16384-buf8","prompt_tokens":16384,"cached_tokens":0,"completion_tokens":1,"ttft_s":2.98081,"prefill_tok_s":5496.5,"output_sha256":"fe0663fd13cdb08743dca3d2d5d1168762556ea36f77d8ab6009306d12a6f351","prompt_sha256":"41ca82cb5e9860de0d6b28744cdc552197e222956e6b362070678f1e2f8d6097","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4,"nccl_buffer_bytes":8388608} +{"repeat":3,"variant":"indexer-16384-buf8","prompt_tokens":65536,"cached_tokens":0,"completion_tokens":1,"ttft_s":12.16879,"prefill_tok_s":5385.58,"output_sha256":"535fa30d7e25dd8a49f1536779734ec8286108d115da5045d77f3b4185d8f790","prompt_sha256":"0d9eb4db1a503603aa085277339a88756b89e9a060cdec09884b03c76278b06c","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4,"nccl_buffer_bytes":8388608} +{"repeat":3,"variant":"indexer-16384-buf8","prompt_tokens":131072,"cached_tokens":0,"completion_tokens":1,"ttft_s":24.64947,"prefill_tok_s":5317.44,"output_sha256":"5c836aaf86eb87443993ecb798b15ece53be3382931519c4993cfa2127230061","prompt_sha256":"b66ab8cbfc5e36b250284c3b0ccbc4a6b5a003cbe5d7f17f84c55435e732ce60","fixed_prompt":false,"prefill_chunk":16384,"nccl_channels":4,"nccl_buffer_bytes":8388608} +{"summary":"indexer-16384-buf8","prompt_tokens":16384,"median_tok_s":5496.5,"min_tok_s":5464.42,"max_tok_s":5537.12,"prefill_chunk":16384,"nccl_channels":4,"nccl_buffer_bytes":8388608} +{"summary":"indexer-16384-buf8","prompt_tokens":65536,"median_tok_s":5413.15,"min_tok_s":5385.58,"max_tok_s":5439.13,"prefill_chunk":16384,"nccl_channels":4,"nccl_buffer_bytes":8388608} +{"summary":"indexer-16384-buf8","prompt_tokens":131072,"median_tok_s":5288.78,"min_tok_s":5235.15,"max_tok_s":5317.44,"prefill_chunk":16384,"nccl_channels":4,"nccl_buffer_bytes":8388608} +{"kind":"serving_smoke","variant":"indexer-16384","candidate":"sparkring-dsv41-prefill-6k-indexer-16k-r0","health":200} +{"kind":"serving_smoke","variant":"indexer-16384","case":"cold_prefix","prompt_tokens":8192,"cached_tokens":0,"output_tokens":1,"finish_reason":"length","nonempty":true} +{"kind":"serving_smoke","variant":"indexer-16384","case":"prefix_continuation","prompt_tokens":8200,"cached_tokens":7936,"output_tokens":8,"finish_reason":"length","nonempty":true} +{"kind":"serving_smoke","variant":"indexer-16384","case":"unaligned_prefill","prompt_tokens":16387,"cached_tokens":0,"output_tokens":1,"finish_reason":"length","nonempty":true} +{"kind":"serving_smoke","variant":"indexer-16384","case":"concurrent_decode","prompt_tokens":37,"cached_tokens":0,"output_tokens":64,"finish_reason":"length","nonempty":true} +{"kind":"scorer_prefill_trace","variant":"indexer-16384","rank":0,"rows":16384,"span_ms":2876.02,"categories_ms":{"MoE":785.54,"GEMM":600.49,"NCCL":589.02,"attention":542.94,"other":268.35,"indexer":18.08},"bf16_reduce_scatter_ms":274.63,"bf16_reduce_scatter_calls":42} +{"kind":"scorer_prefill_trace","variant":"indexer-16384","rank":1,"rows":16384,"span_ms":2873.04,"categories_ms":{"MoE":786.4,"GEMM":604.27,"NCCL":571.56,"attention":546.29,"other":267.94,"indexer":25.6},"bf16_reduce_scatter_ms":267.55,"bf16_reduce_scatter_calls":42} +{"kind":"scorer_prefill_trace","variant":"indexer-16384","rank":2,"rows":16384,"span_ms":2875.41,"categories_ms":{"MoE":783.57,"GEMM":599.49,"NCCL":576.61,"attention":544,"other":269.34,"indexer":31.03},"bf16_reduce_scatter_ms":276.45,"bf16_reduce_scatter_calls":42} +{"kind":"scorer_prefill_trace","variant":"indexer-16384","rank":3,"rows":16384,"span_ms":2860.46,"categories_ms":{"MoE":795.17,"GEMM":611.61,"attention":552.81,"NCCL":508.03,"other":279.4,"indexer":40.76},"bf16_reduce_scatter_ms":242.44,"bf16_reduce_scatter_calls":42} diff --git a/performance/records/deepseek-v41-flash/row-owned-indexer-ring-20261119.md b/performance/records/deepseek-v41-flash/row-owned-indexer-ring-20261119.md new file mode 100644 index 00000000..70628482 --- /dev/null +++ b/performance/records/deepseek-v41-flash/row-owned-indexer-ring-20261119.md @@ -0,0 +1,85 @@ +# Distributed indexer scoring for DeepSeek V4.1 prefill + +**Research-only.** Splitting the encoder's indexer scoring across four DGX Sparks +raised median cold prefill from 4,525 to 5,234 tokens/s at 128K. Increasing +the chunk size to 16,384 tokens raised the median to 5,463 tokens/s. + +## Conditions + +The four Sparks used a directly cabled cycle and SparkRing's patched NCCL 2.32.3 +over RoCE. The B12X installer image `sha256:3cc9a81fd344fe52fe9cc261b46dc051e3c3f494e51b8142846a5f854835c502` +served DeepSeek-V4.1-Flash-1017 at revision `1bae0e1088993b9b82de08f59de5be5a34e42170`. +Each launch used TP4, DCP1, eager execution, 16 sequences, +a 262,144-token context limit, 0.83 GPU memory utilization, and DSpark5 with +adaptive verification off. Both retained owned residual rows and the replicated +Engram projection from the [original experiment](row-owned-prefill-ring-20261119.md). +The baseline and first scorer variant used 8,192-token batches. The second +scorer variant used 16,384-token batches. The scorer variants exposed the +PyTorch profiler while their timed requests ran with profiling idle. + +## Measurement + +A local loopback client sent exact token IDs for synthetic prompts to the +streaming completion endpoint. Each variant ran three requests at each length, +at concurrency one and temperature zero, with one output token. The engine +reported zero cached tokens for every timed request. Rates divide the server's +prompt token count by client time to the first nonempty text delta. +See the [raw observations](row-owned-indexer-ring-20261119.jsonl) for the +sample times, token counts, and plugin digests. + +A PyTorch trace on each rank captured one late 8,192-token chunk during a +separate baseline request at 128K. Name-based kernel attribution placed +344–352 ms in indexer kernels per rank. The scorer assigns whole native +scoring tiles to the owning ranks, then gathers the selected top-k rows. +All four ranks logged three indexer gathers for each observed owned chunk. + +## Result + +| Prompt | Row-owned baseline, 8K chunks | Distributed scoring, 8K chunks | Distributed scoring, 16K chunks | +|---|---:|---:|---:| +| 16K | 5,359 (5,308–5,376) | 5,445 (5,350–5,469) | 5,651 (5,645–5,687) | +| 64K | 5,059 (4,854–5,109) | 5,361 (5,334–5,378) | 5,576 (5,569–5,590) | +| 128K | 4,525 (4,465–4,677) | 5,234 (5,162–5,246) | 5,463 (5,448–5,481) | + +Values are median prompt tokens/s with the observed range in parentheses. + +The fixed 16K and 128K prompts produced the same first text token in the +profile-enabled baseline and both scorer launches. Offline checks reproduced the +full top-k table on all four simulated ranks and validated the edited method +against the pinned image source. + +A single 16K-chunk screen with eight NCCL channels returned 5,622, 5,522, +and 5,350 tokens/s at the three prompt lengths. The three-repeat comparisons +use four channels. + +An experimental variant projected attention inputs before gathering on +17 encoder layers, reducing the gathered width from 5,120 to 1,792 values +per row. Its 16K-chunk medians were 5,585, 5,485, and 5,388 tokens/s. +Both fixed-prompt first tokens matched the baseline. + +With distributed scoring and 32K chunks, the medians were 5,692, 5,201, and +5,098 tokens/s. The engine reported a KV pool of 967,186 tokens, compared +with 3,544,968 for 16K chunks at the same 262,144-token context limit. + +With 16K chunks and an 8 MiB NCCL buffer, the medians were 5,497, 5,413, +and 5,289 tokens/s. The faster 16K configuration uses the default NCCL +buffer size. [NCCL buffer setting](https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/env.html#nccl-buffsize) + +After restarting the 16K-chunk scorer, an 8,200-token continuation reused +7,936 cached tokens. An unaligned 16,387-token prefill and a 64-token decode +both completed while submitted concurrently. + +A separate PyTorch capture recorded one 16K forward with distributed +scoring. Per-rank GPU kernel time attributed by name ranged from 784 to +795 ms for MoE, 599 to 612 ms for other GEMM kernels, 508 to 589 ms for +NCCL, and 543 to 553 ms for attention. These are kernel-time sums for +one captured forward. The pinned attention path still prepares the +query and output projection plans for tensor-parallel heads and groups. +Attention on each rank's own query rows requires a separate full-head +prefill plan and complete local KV writes. + +## Limits + +This experiment covers one cycle and one serving image. The 16K ranges +overlap. The 6,000 tokens/s goal, sustained decode, and end-to-end installer +validation remain open. diff --git a/performance/records/deepseek-v41-flash/row-owned-prefill-ring-20261119.jsonl b/performance/records/deepseek-v41-flash/row-owned-prefill-ring-20261119.jsonl new file mode 100644 index 00000000..dc5a946a --- /dev/null +++ b/performance/records/deepseek-v41-flash/row-owned-prefill-ring-20261119.jsonl @@ -0,0 +1,11 @@ +{"kind":"conditions","date":"2026-11-19","status":"research-only","image_id":"sha256:3cc9a81fd344fe52fe9cc261b46dc051e3c3f494e51b8142846a5f854835c502","checkpoint":"1bae0e1088993b9b82de08f59de5be5a34e42170","hardware":"4 DGX Spark GB10","topology":"direct-cycle-4","tp":4,"dcp":1,"transport":"SparkRing patched NCCL over RoCE","moe_backend":"b12x","attention_backend":"B12X","context_limit":262144,"max_num_batched_tokens":8192,"max_num_seqs":16,"gpu_memory_utilization":0.83,"enforce_eager":true,"engram_table_memory":"disk","engram_projection_tp":false,"dspark_tokens":5,"adaptive_verification":false,"temperature":0,"concurrency":1,"timing":"loopback submission to first non-empty text delta, monotonic client clock","cold_repetitions":1} +{"kind":"request","case":"short","prompt_tokens":12,"completion_tokens":2,"finish_reason":"length","cached_tokens":0,"ttft_s":0.3094,"has_output":true} +{"kind":"request","case":"cold_prefill","prompt_tokens":8192,"completion_tokens":2,"finish_reason":"length","cached_tokens":0,"ttft_s":3.9518,"has_output":true} +{"kind":"request","case":"prefix_continuation","prompt_tokens":8200,"completion_tokens":2,"finish_reason":"length","cached_tokens":7936,"ttft_s":0.2785,"has_output":true} +{"kind":"request","case":"cold_16384","prompt_tokens":16384,"completion_tokens":1,"finish_reason":"length","cached_tokens":0,"ttft_s":3.0794,"has_output":true} +{"kind":"request","case":"cold_65536","prompt_tokens":65536,"completion_tokens":1,"finish_reason":"length","cached_tokens":0,"ttft_s":12.8977,"has_output":true} +{"kind":"request","case":"cold_131072","prompt_tokens":131072,"completion_tokens":1,"finish_reason":"length","cached_tokens":0,"ttft_s":28.1192,"has_output":true} +{"kind":"owned_forward","rank":0,"rows":8192,"owned_rows":2048,"reduce_scatters":42,"all_gathers":41,"compactions":4,"engram_layers":2,"engram_reduce_scatters":2} +{"kind":"owned_forward","rank":1,"rows":8192,"owned_rows":2048,"reduce_scatters":42,"all_gathers":41,"compactions":4,"engram_layers":2,"engram_reduce_scatters":2} +{"kind":"owned_forward","rank":2,"rows":8192,"owned_rows":2048,"reduce_scatters":42,"all_gathers":41,"compactions":4,"engram_layers":2,"engram_reduce_scatters":2} +{"kind":"owned_forward","rank":3,"rows":8192,"owned_rows":2048,"reduce_scatters":42,"all_gathers":41,"compactions":4,"engram_layers":2,"engram_reduce_scatters":2} diff --git a/performance/records/deepseek-v41-flash/row-owned-prefill-ring-20261119.md b/performance/records/deepseek-v41-flash/row-owned-prefill-ring-20261119.md new file mode 100644 index 00000000..e1b68aa4 --- /dev/null +++ b/performance/records/deepseek-v41-flash/row-owned-prefill-ring-20261119.md @@ -0,0 +1,63 @@ +# DeepSeek V4.1 row-owned prefill on four DGX Sparks + +**Research-only.** The opt-in prefill path served DeepSeek-V4.1-Flash-1017 +on one four-Spark cycle. One cold request at each length measured 5,321, +5,081 and 4,661 prompt tokens/s at 16K, 64K and 128K. + +## Conditions + +| Setting | Value | +|---|---| +| Hardware and topology | Four GB10 GPUs on a direct cycle, one rank per Spark | +| Runtime | SparkRing installer image `sha256:3cc9a81fd344fe52fe9cc261b46dc051e3c3f494e51b8142846a5f854835c502`, B12X loader, attention and MoE | +| Checkpoint | `deepseek-ai/DeepSeek-V4.1-Flash-1017` at `1bae0e1088993b9b82de08f59de5be5a34e42170` | +| Parallelism and transport | TP4, DCP1, SparkRing patched NCCL over RoCE | +| Serving | Eager execution, 262,144-token context limit, 8,192-token batches, 16 sequences, 0.83 GPU memory utilization, DSpark5 with adaptive verification off | +| Prefill plugin | [Row-owned prefill](../../../integrations/vllm/ds41_row_shard/README.md), minimum 512 rows per rank, Engram on disk with a replicated projection | + +The mounted plugin files were identified by SHA-256. + +| File | SHA-256 | +|---|---| +| `__init__.py` | `7a1be35f46e0bd55cf8d7e745d1f5d645ba5c016414948488d175c37cf4fe447` | +| `core.py` | `e804059c1b77d7dbd4412bdb4e3c0873fda4428b5ec743735de3b60b3998ee01` | +| `source_edit.py` | `51f0ec4c9389a80c96a538e219c52bd620199723ed582ee29e98be9f65c3ffe3` | + +## Measurement + +A loopback HTTP client tokenized distinct synthetic inventory prompts, then +sent exactly 16,384, 65,536 or 131,072 token IDs to the streaming completions +endpoint. Each timed request used temperature zero, concurrency one and one +output token. The server reported zero cached tokens for all three requests. +The client measured elapsed monotonic time from submission to the first +nonempty text delta. Throughput divides server-reported prompt tokens by +that time. + +Engine warmup and the short, 8,192-token and continuation checks completed +before the timed requests. The [raw observations](row-owned-prefill-ring-20261119.jsonl) +retain per-request timing, cache use and per-rank collective counts. + +## Result + +| Prompt tokens | Client TTFT | Prompt tokens/s | +|---:|---:|---:| +| 16,384 | 3.0794 s | 5,321 | +| 65,536 | 12.8977 s | 5,081 | +| 131,072 | 28.1192 s | 4,661 | + +All four ranks logged 2,048 owned rows per 8,192-token chunk, with two +Engram reduce-scatters per forward. The 8,192-token cold request returned +output and its 8,200-token continuation reused 7,936 cached tokens. + +## Conclusion + +The installed model exercised the row-owned attention output, feed-forward +output and Engram lookup reductions on the four-Spark cycle. One cold +sample completed at each of the three prompt lengths. + +## Limitations + +Each length has one observation, so run-to-run variability is unknown. +The run used one configuration and covers eager text serving on this +cycle. Matched baseline runs, graph-mode serving, sustained decode, +numerical quality, and chain topology are outside this evidence. diff --git a/profiles/deepseek-v41-flash-tp4/compose/compose.rank0.yaml b/profiles/deepseek-v41-flash-tp4/compose/compose.rank0.yaml index 0484e2ba..a7c0ef08 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/compose.rank0.yaml +++ b/profiles/deepseek-v41-flash-tp4/compose/compose.rank0.yaml @@ -149,7 +149,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/deepseek-v41-flash-f625053225d4-dba1be0a40aa labels: - io.sparkring.deployment: daf9d8e9b8433083c7b3fadf221b7210e8280f0a9a390c9b880df3123808ceb7 + io.sparkring.deployment: a44b79689c6e8b12da473add95e6a18947929e2d79068d894abeb1003ac1c680 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/deepseek-v41-flash-tp4/compose/compose.rank1.yaml b/profiles/deepseek-v41-flash-tp4/compose/compose.rank1.yaml index a4d1b734..9729a615 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/compose.rank1.yaml +++ b/profiles/deepseek-v41-flash-tp4/compose/compose.rank1.yaml @@ -150,7 +150,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/deepseek-v41-flash-f625053225d4-dba1be0a40aa labels: - io.sparkring.deployment: daf9d8e9b8433083c7b3fadf221b7210e8280f0a9a390c9b880df3123808ceb7 + io.sparkring.deployment: a44b79689c6e8b12da473add95e6a18947929e2d79068d894abeb1003ac1c680 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/deepseek-v41-flash-tp4/compose/compose.rank2.yaml b/profiles/deepseek-v41-flash-tp4/compose/compose.rank2.yaml index 2b09d9f0..3a8b5b79 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/compose.rank2.yaml +++ b/profiles/deepseek-v41-flash-tp4/compose/compose.rank2.yaml @@ -150,7 +150,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/deepseek-v41-flash-f625053225d4-dba1be0a40aa labels: - io.sparkring.deployment: daf9d8e9b8433083c7b3fadf221b7210e8280f0a9a390c9b880df3123808ceb7 + io.sparkring.deployment: a44b79689c6e8b12da473add95e6a18947929e2d79068d894abeb1003ac1c680 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/deepseek-v41-flash-tp4/compose/compose.rank3.yaml b/profiles/deepseek-v41-flash-tp4/compose/compose.rank3.yaml index 3135964d..e6b7ef04 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/compose.rank3.yaml +++ b/profiles/deepseek-v41-flash-tp4/compose/compose.rank3.yaml @@ -150,7 +150,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/deepseek-v41-flash-f625053225d4-dba1be0a40aa labels: - io.sparkring.deployment: daf9d8e9b8433083c7b3fadf221b7210e8280f0a9a390c9b880df3123808ceb7 + io.sparkring.deployment: a44b79689c6e8b12da473add95e6a18947929e2d79068d894abeb1003ac1c680 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/deepseek-v41-flash-tp4/compose/selection.json b/profiles/deepseek-v41-flash-tp4/compose/selection.json index f7678d44..e84ce095 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/selection.json +++ b/profiles/deepseek-v41-flash-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "deepseek-v41-flash-tp4", "checkpoint": "original", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "daf9d8e9b8433083c7b3fadf221b7210e8280f0a9a390c9b880df3123808ceb7" + "deployment": "a44b79689c6e8b12da473add95e6a18947929e2d79068d894abeb1003ac1c680" } diff --git a/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank0.yaml b/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank0.yaml index 8b99e9e0..b2e528ce 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank0.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank0.yaml @@ -181,7 +181,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: 1dd2dc69f33a09ae2ef686a08573a36f3402077e25bebcd81aa979ae73a7878b + io.sparkring.deployment: 760b24c65b7f89fe131ddc788dc9303dff6b4e6e49e0d5ffa2a70a5f684835bf io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank1.yaml b/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank1.yaml index 65a785f2..fbba5369 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank1.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank1.yaml @@ -180,7 +180,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: 1dd2dc69f33a09ae2ef686a08573a36f3402077e25bebcd81aa979ae73a7878b + io.sparkring.deployment: 760b24c65b7f89fe131ddc788dc9303dff6b4e6e49e0d5ffa2a70a5f684835bf io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp2/compose/selection.json b/profiles/glm53-flash-nvfp4-spark-tp2/compose/selection.json index 52ac1d67..fab05bea 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp2/compose/selection.json +++ b/profiles/glm53-flash-nvfp4-spark-tp2/compose/selection.json @@ -3,5 +3,5 @@ "profile": "glm53-flash-nvfp4-spark-tp2", "checkpoint": "csf", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "1dd2dc69f33a09ae2ef686a08573a36f3402077e25bebcd81aa979ae73a7878b" + "deployment": "760b24c65b7f89fe131ddc788dc9303dff6b4e6e49e0d5ffa2a70a5f684835bf" } diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank0.yaml b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank0.yaml index e1ed794f..422a0931 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank0.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank0.yaml @@ -195,7 +195,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: a222706213b62424526ffca519867ee2d1ee5274d749e3b1fc6fc11bcb6590e9 + io.sparkring.deployment: 16ef9cc52dc436a9ff6c0c56852034565d03bfede81cd7e81005aa676a425b9f io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank1.yaml b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank1.yaml index 662c4e34..7ba03f44 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank1.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank1.yaml @@ -194,7 +194,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: a222706213b62424526ffca519867ee2d1ee5274d749e3b1fc6fc11bcb6590e9 + io.sparkring.deployment: 16ef9cc52dc436a9ff6c0c56852034565d03bfede81cd7e81005aa676a425b9f io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank2.yaml b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank2.yaml index 3072a4c8..8017d923 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank2.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank2.yaml @@ -194,7 +194,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: a222706213b62424526ffca519867ee2d1ee5274d749e3b1fc6fc11bcb6590e9 + io.sparkring.deployment: 16ef9cc52dc436a9ff6c0c56852034565d03bfede81cd7e81005aa676a425b9f io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank3.yaml b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank3.yaml index ff68bf98..939c0c1c 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank3.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank3.yaml @@ -194,7 +194,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: a222706213b62424526ffca519867ee2d1ee5274d749e3b1fc6fc11bcb6590e9 + io.sparkring.deployment: 16ef9cc52dc436a9ff6c0c56852034565d03bfede81cd7e81005aa676a425b9f io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/selection.json b/profiles/glm53-flash-nvfp4-spark-tp4/compose/selection.json index 15044746..97970bb0 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/selection.json +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "glm53-flash-nvfp4-spark-tp4", "checkpoint": "csf", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "a222706213b62424526ffca519867ee2d1ee5274d749e3b1fc6fc11bcb6590e9" + "deployment": "16ef9cc52dc436a9ff6c0c56852034565d03bfede81cd7e81005aa676a425b9f" } diff --git a/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank0.yaml b/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank0.yaml index 6578d909..44c047dc 100644 --- a/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank0.yaml +++ b/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank0.yaml @@ -149,7 +149,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 16943af014110b3e0e6da867d39630e8d3f85763348e0d136e84331230bb4416 + io.sparkring.deployment: 400266f0047838cc16af17091aad42f852cfcf8a41adee4a4bb23702d1e9cc8c io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank1.yaml b/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank1.yaml index 5a605d79..68207c19 100644 --- a/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank1.yaml +++ b/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank1.yaml @@ -150,7 +150,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 16943af014110b3e0e6da867d39630e8d3f85763348e0d136e84331230bb4416 + io.sparkring.deployment: 400266f0047838cc16af17091aad42f852cfcf8a41adee4a4bb23702d1e9cc8c io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp2/compose/selection.json b/profiles/mimo-v26-flash-mopd-tp2/compose/selection.json index aee3bf4d..0232e699 100644 --- a/profiles/mimo-v26-flash-mopd-tp2/compose/selection.json +++ b/profiles/mimo-v26-flash-mopd-tp2/compose/selection.json @@ -3,5 +3,5 @@ "profile": "mimo-v26-flash-mopd-tp2", "checkpoint": null, "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "16943af014110b3e0e6da867d39630e8d3f85763348e0d136e84331230bb4416" + "deployment": "400266f0047838cc16af17091aad42f852cfcf8a41adee4a4bb23702d1e9cc8c" } diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank0.yaml b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank0.yaml index bdc55ae0..e698d33c 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank0.yaml +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank0.yaml @@ -163,7 +163,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: be2063c78f0c06a55642202830eb3ffa0a27505398ec6a4be16a1a46304ae88e + io.sparkring.deployment: 3257c458bf27fc7e44f87b605a55e60cfeaa80d718e0be2449285636613c4b53 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank1.yaml b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank1.yaml index 4839edc2..8a5c2443 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank1.yaml +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank1.yaml @@ -164,7 +164,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: be2063c78f0c06a55642202830eb3ffa0a27505398ec6a4be16a1a46304ae88e + io.sparkring.deployment: 3257c458bf27fc7e44f87b605a55e60cfeaa80d718e0be2449285636613c4b53 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank2.yaml b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank2.yaml index 86ac4728..3166a380 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank2.yaml +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank2.yaml @@ -164,7 +164,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: be2063c78f0c06a55642202830eb3ffa0a27505398ec6a4be16a1a46304ae88e + io.sparkring.deployment: 3257c458bf27fc7e44f87b605a55e60cfeaa80d718e0be2449285636613c4b53 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank3.yaml b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank3.yaml index 7e2bebd6..fe750c9c 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank3.yaml +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank3.yaml @@ -164,7 +164,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: be2063c78f0c06a55642202830eb3ffa0a27505398ec6a4be16a1a46304ae88e + io.sparkring.deployment: 3257c458bf27fc7e44f87b605a55e60cfeaa80d718e0be2449285636613c4b53 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/selection.json b/profiles/mimo-v26-flash-mopd-tp4/compose/selection.json index 85a17725..d86c0b91 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/selection.json +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "mimo-v26-flash-mopd-tp4", "checkpoint": null, "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "be2063c78f0c06a55642202830eb3ffa0a27505398ec6a4be16a1a46304ae88e" + "deployment": "3257c458bf27fc7e44f87b605a55e60cfeaa80d718e0be2449285636613c4b53" } diff --git a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank0.yaml b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank0.yaml index de7e9d3f..b5fe0fc5 100644 --- a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank0.yaml +++ b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank0.yaml @@ -170,7 +170,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 7c929e300531e89875764c3ad43288f0616e46f11206553f02b91686c24ce473 + io.sparkring.deployment: 3040de86e3db994dd9deeeacdfd3f5b1e7dff803d50b0ada74f14e1c92698ca9 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank1.yaml b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank1.yaml index 2d3c7d96..7fff1383 100644 --- a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank1.yaml +++ b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank1.yaml @@ -171,7 +171,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 7c929e300531e89875764c3ad43288f0616e46f11206553f02b91686c24ce473 + io.sparkring.deployment: 3040de86e3db994dd9deeeacdfd3f5b1e7dff803d50b0ada74f14e1c92698ca9 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank2.yaml b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank2.yaml index e21bd7ce..5df238c1 100644 --- a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank2.yaml +++ b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank2.yaml @@ -171,7 +171,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 7c929e300531e89875764c3ad43288f0616e46f11206553f02b91686c24ce473 + io.sparkring.deployment: 3040de86e3db994dd9deeeacdfd3f5b1e7dff803d50b0ada74f14e1c92698ca9 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank3.yaml b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank3.yaml index 1807780a..bc133062 100644 --- a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank3.yaml +++ b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank3.yaml @@ -171,7 +171,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 7c929e300531e89875764c3ad43288f0616e46f11206553f02b91686c24ce473 + io.sparkring.deployment: 3040de86e3db994dd9deeeacdfd3f5b1e7dff803d50b0ada74f14e1c92698ca9 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank0.yaml b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank0.yaml index eff27476..a7028154 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank0.yaml +++ b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank0.yaml @@ -176,7 +176,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-60215d26cf5e labels: - io.sparkring.deployment: f56128c7bde501b785a5160c1f4f2095f0916ca6582eae78d7d17d18fc5a0f79 + io.sparkring.deployment: 688190b223398a246e3d8921792673b6357286c3cfd9001c365ca8f65a9b0e67 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank1.yaml b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank1.yaml index 974bcaa8..61e013ee 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank1.yaml +++ b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank1.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-60215d26cf5e labels: - io.sparkring.deployment: f56128c7bde501b785a5160c1f4f2095f0916ca6582eae78d7d17d18fc5a0f79 + io.sparkring.deployment: 688190b223398a246e3d8921792673b6357286c3cfd9001c365ca8f65a9b0e67 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank2.yaml b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank2.yaml index c22c3619..d7dd2204 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank2.yaml +++ b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank2.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-60215d26cf5e labels: - io.sparkring.deployment: f56128c7bde501b785a5160c1f4f2095f0916ca6582eae78d7d17d18fc5a0f79 + io.sparkring.deployment: 688190b223398a246e3d8921792673b6357286c3cfd9001c365ca8f65a9b0e67 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank3.yaml b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank3.yaml index ff03e01a..b45ca70f 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank3.yaml +++ b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank3.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-60215d26cf5e labels: - io.sparkring.deployment: f56128c7bde501b785a5160c1f4f2095f0916ca6582eae78d7d17d18fc5a0f79 + io.sparkring.deployment: 688190b223398a246e3d8921792673b6357286c3cfd9001c365ca8f65a9b0e67 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/selection.json b/profiles/qwen38-flash-next-qad-tp4/compose/selection.json index 1ff25148..e24e583c 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/selection.json +++ b/profiles/qwen38-flash-next-qad-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "qwen38-flash-next-qad-tp4", "checkpoint": "qad-step5500-ple1000", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "f56128c7bde501b785a5160c1f4f2095f0916ca6582eae78d7d17d18fc5a0f79" + "deployment": "688190b223398a246e3d8921792673b6357286c3cfd9001c365ca8f65a9b0e67" } diff --git a/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank0.yaml b/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank0.yaml index fac5fb3f..92907869 100644 --- a/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank0.yaml +++ b/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank0.yaml @@ -147,7 +147,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 9458463464b85d801d0002f6085a613d91583ef9cedadb3a78ff32f462920853 + io.sparkring.deployment: c28c01b7b71bbda018667a57c09720587e9dde47249f0f20427397110b18d1b7 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank1.yaml b/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank1.yaml index 95ae9629..bcf3f2ee 100644 --- a/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank1.yaml +++ b/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank1.yaml @@ -148,7 +148,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 9458463464b85d801d0002f6085a613d91583ef9cedadb3a78ff32f462920853 + io.sparkring.deployment: c28c01b7b71bbda018667a57c09720587e9dde47249f0f20427397110b18d1b7 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-tp2/compose/compose.rank0.yaml b/profiles/qwen38-flash-next-tp2/compose/compose.rank0.yaml index 38bea3f4..2eb14ca9 100644 --- a/profiles/qwen38-flash-next-tp2/compose/compose.rank0.yaml +++ b/profiles/qwen38-flash-next-tp2/compose/compose.rank0.yaml @@ -160,7 +160,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-dc5b8ab2fa14 labels: - io.sparkring.deployment: 19f0c64c0d7149ce76dd90a130138fc5955463395dc9d641eaf333e5b1419a49 + io.sparkring.deployment: df9372e42db1f4190fcc33f07fc8e072ee4a81cfca4e74e76eca4e39bfb7d28c io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-tp2/compose/compose.rank1.yaml b/profiles/qwen38-flash-next-tp2/compose/compose.rank1.yaml index 748d3ab9..ab662d8d 100644 --- a/profiles/qwen38-flash-next-tp2/compose/compose.rank1.yaml +++ b/profiles/qwen38-flash-next-tp2/compose/compose.rank1.yaml @@ -161,7 +161,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-dc5b8ab2fa14 labels: - io.sparkring.deployment: 19f0c64c0d7149ce76dd90a130138fc5955463395dc9d641eaf333e5b1419a49 + io.sparkring.deployment: df9372e42db1f4190fcc33f07fc8e072ee4a81cfca4e74e76eca4e39bfb7d28c io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-tp2/compose/selection.json b/profiles/qwen38-flash-next-tp2/compose/selection.json index 64fc61d9..9a386ac2 100644 --- a/profiles/qwen38-flash-next-tp2/compose/selection.json +++ b/profiles/qwen38-flash-next-tp2/compose/selection.json @@ -3,5 +3,5 @@ "profile": "qwen38-flash-next-tp2", "checkpoint": "csf", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "19f0c64c0d7149ce76dd90a130138fc5955463395dc9d641eaf333e5b1419a49" + "deployment": "df9372e42db1f4190fcc33f07fc8e072ee4a81cfca4e74e76eca4e39bfb7d28c" } diff --git a/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank0.yaml b/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank0.yaml index 971e87ce..b18cf2c1 100644 --- a/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank0.yaml +++ b/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank0.yaml @@ -160,7 +160,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: 7b776489e35558256e24ceef0d074977259d1cbd7391887b67420610acd9e72a + io.sparkring.deployment: a3c9683aa38eb18f6b490a7b1290698977a9a13793fee0437773f8c5c88a46b3 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank1.yaml b/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank1.yaml index b9b170dc..b9a64fbf 100644 --- a/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank1.yaml +++ b/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank1.yaml @@ -161,7 +161,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: 7b776489e35558256e24ceef0d074977259d1cbd7391887b67420610acd9e72a + io.sparkring.deployment: a3c9683aa38eb18f6b490a7b1290698977a9a13793fee0437773f8c5c88a46b3 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp2/compose/selection.json b/profiles/swift15-qwen38-flash-next-tp2/compose/selection.json index a2de32e1..b546ab92 100644 --- a/profiles/swift15-qwen38-flash-next-tp2/compose/selection.json +++ b/profiles/swift15-qwen38-flash-next-tp2/compose/selection.json @@ -3,5 +3,5 @@ "profile": "swift15-qwen38-flash-next-tp2", "checkpoint": null, "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "7b776489e35558256e24ceef0d074977259d1cbd7391887b67420610acd9e72a" + "deployment": "a3c9683aa38eb18f6b490a7b1290698977a9a13793fee0437773f8c5c88a46b3" } diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank0.yaml b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank0.yaml index 9332bcab..628cb90f 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank0.yaml +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank0.yaml @@ -176,7 +176,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: a7293a8874a06de80ad0405cf226ce3891513af61f2a230a0278064b70051ef1 + io.sparkring.deployment: 79f13ad2bb62d48fbe91d7c812922ec70727789d40d13b131224c1fc2381a53e io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank1.yaml b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank1.yaml index 76374706..3112a374 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank1.yaml +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank1.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: a7293a8874a06de80ad0405cf226ce3891513af61f2a230a0278064b70051ef1 + io.sparkring.deployment: 79f13ad2bb62d48fbe91d7c812922ec70727789d40d13b131224c1fc2381a53e io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank2.yaml b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank2.yaml index 7fc35c59..42e29a26 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank2.yaml +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank2.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: a7293a8874a06de80ad0405cf226ce3891513af61f2a230a0278064b70051ef1 + io.sparkring.deployment: 79f13ad2bb62d48fbe91d7c812922ec70727789d40d13b131224c1fc2381a53e io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank3.yaml b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank3.yaml index e298e2d7..4fd62f41 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank3.yaml +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank3.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: a7293a8874a06de80ad0405cf226ce3891513af61f2a230a0278064b70051ef1 + io.sparkring.deployment: 79f13ad2bb62d48fbe91d7c812922ec70727789d40d13b131224c1fc2381a53e io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/selection.json b/profiles/swift15-qwen38-flash-next-tp4/compose/selection.json index 3b4df5a2..f7c2c37a 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/selection.json +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "swift15-qwen38-flash-next-tp4", "checkpoint": null, "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "a7293a8874a06de80ad0405cf226ce3891513af61f2a230a0278064b70051ef1" + "deployment": "79f13ad2bb62d48fbe91d7c812922ec70727789d40d13b131224c1fc2381a53e" } diff --git a/runtime/common/compose.py b/runtime/common/compose.py index 62528751..cac874d3 100644 --- a/runtime/common/compose.py +++ b/runtime/common/compose.py @@ -438,6 +438,8 @@ def specifications(profile_id, site, *, local_image_id=None, local_source_extens source_root=rank["repository"]) specs.append(replace(spec, name=f"sr-{site['name']}-r{rank['rank']}")) settings = serving_settings.effective(profile_id, serving, checkpoint) + if settings.get(serving_settings.ROW_OWNED_PREFILL): + raise ValueError(f"{serving_settings.option(serving_settings.ROW_OWNED_PREFILL)} requires sparkring install") if settings: if local_source_extension is not None: raise ValueError("Serving settings apply to published images; a local source-extension trial " diff --git a/runtime/common/installer.py b/runtime/common/installer.py index fd7d28ac..f6cb4a50 100644 --- a/runtime/common/installer.py +++ b/runtime/common/installer.py @@ -374,6 +374,7 @@ def make_lock(profile, raw_site, revision, bundle_sha256, variant=None, *, image elif card["profile"] in compose.FABRIC_PROFILES: raise ValueError(f"{card['profile']} runs only on SIRCL ring sessions; its deployment needs a transport " "section") + serving.check_row_owned_prefill(settings, (profile, card["target_variant"]), image_runtime, value.get("transport")) value["id"] = compose.digest(compose.encoded(value)) return value @@ -816,11 +817,20 @@ def export(directory, output, *, share=False): flags = "".join(" " + serving.label(name, value) for name, value in sorted(settings.items())) files["site.example.json"] = compose.encoded(example) files["profile.json"] = compose.encoded(lock["selection"]) - files["README.txt"] = ("Portable profile template, not a configured deployment. Fill site.example.json, then run " - "sparkring init --profile " + lock["selection"]["profile"] + " --site site.example.json" - + (" --image-lock image-lock.json" if runtime else "") + flags + ".\n" - "Compose files below contain example hosts/paths. Re-render for your site. A separate " - "Compose project runs on each rank; Compose alone does not configure RDMA or coordinate hosts.\n") + if settings.get(serving.ROW_OWNED_PREFILL): + files["README.txt"] = ( + "Configure a four-Spark cycle with sparkring setup. Then run sudo sparkring install --profile " + + lock["selection"]["profile"] + " --checkpoint " + lock["selection"]["target_variant"] + + " --image " + runtime["name"] + " --transport nccl" + flags + ".\n" + "The installer stages the plugin from its retained source checkout on every rank. " + "The Compose files show the resulting rank settings with example paths.\n" + ) + else: + files["README.txt"] = ("Portable profile template, not a configured deployment. Fill site.example.json, then run " + "sparkring init --profile " + lock["selection"]["profile"] + " --site site.example.json" + + (" --image-lock image-lock.json" if runtime else "") + flags + ".\n" + "Compose files below contain example hosts/paths. Re-render for your site. A separate " + "Compose project runs on each rank; Compose alone does not configure RDMA or coordinate hosts.\n") if settings: files["README.txt"] += "Serving settings, applied in the Compose files in place of the profile's values:" + flags + ".\n" if runtime: diff --git a/runtime/common/serving.py b/runtime/common/serving.py index ebc6e7c7..0912c5e8 100644 --- a/runtime/common/serving.py +++ b/runtime/common/serving.py @@ -32,6 +32,7 @@ import re from runtime.common import sparkcache +from runtime.common.container_spec import Bind # name: (vLLM flag, key in the flag's JSON value or None, value multiplier, minimum, help) SETTINGS = { @@ -72,6 +73,13 @@ # value up to a tenth above the profile's, and at least one unit above it, is # accepted with a warning, and a larger one is refused. ABOVE_PROFILE = frozenset({"kv_cache_gib"}) +# The experiment uses the pinned installer image and the deployment's retained source. +ROW_OWNED_PREFILL = "row_owned_prefill" +ROW_OWNED_PREFILL_IMAGE = "dev-20261013-dcp2prefill-status038-sircl-tp6" +ROW_OWNED_PREFILL_IMAGE_ID = "sha256:3cc9a81fd344fe52fe9cc261b46dc051e3c3f494e51b8142846a5f854835c502" +ROW_OWNED_PREFILL_CONTEXT = 262144 +ROW_OWNED_PREFILL_SOURCE = "integrations/vllm/ds41_row_shard" +ROW_OWNED_PREFILL_TARGET = "/opt/ds41_row_shard" # name: (container environment variable, value, help). save_cpu shortens the # time vLLM's shared-memory readers poll after a read from one second to 2 ms, # so between decode steps they sleep until notified instead of keeping CPU @@ -84,6 +92,11 @@ "save_cpu": ("SPARKRING_SHM_BUSY_LOOP_S", "0.002", "let vLLM's waiting processes sleep between decode steps: less CPU use, about 1 to 2 percent slower decode"), } +INSTALL_SWITCHES = { + **SWITCHES, + ROW_OWNED_PREFILL: ("DS41_ROW_SHARD_PREFILL", "1", + "experimental DeepSeek V4.1-Flash-1017 prefill with token rows split across four Sparks"), +} # The installer image capability (installer_image.capabilities) that each # switch needs: on an image without it, the switch's variable would change nothing. NEEDS = {"save_cpu": "shm_reader_window"} @@ -106,7 +119,7 @@ def option(name): return "--" + name.replace("_", "-") -def add_arguments(parser): +def add_arguments(parser, *, install=False): group = parser.add_argument_group("serving settings", "replace the profile's value; without a flag the profile's value applies") for name, (_, _, _, _, text) in SETTINGS.items(): if name in ADDRESSES: @@ -117,7 +130,8 @@ def add_arguments(parser): group.add_argument(option(name), dest="serving_" + name, type=sparkcache.parse_size, metavar="SIZE", help=text) for name, (values, text) in CONNECTOR_CHOICES.items(): group.add_argument(option(name), dest="serving_" + name, choices=values, help=text) - for name, (_, _, text) in SWITCHES.items(): + switches = INSTALL_SWITCHES if install else SWITCHES + for name, (_, _, text) in switches.items(): group.add_argument(option(name), dest="serving_" + name, action="store_true", default=None, help=text) for name, (_, values, metavar, text) in CHOICES.items(): group.add_argument(option(name), dest="serving_" + name, choices=values, metavar=metavar, help=text) @@ -125,7 +139,7 @@ def add_arguments(parser): def from_arguments(args): return normalized({name: getattr(args, "serving_" + name, None) - for name in (*SETTINGS, *SIZES, *SWITCHES, *CHOICES, *CONNECTOR_CHOICES)}) + for name in (*SETTINGS, *SIZES, *INSTALL_SWITCHES, *CHOICES, *CONNECTOR_CHOICES)}) def profile_defaults(configuration, *, root=None): @@ -203,7 +217,7 @@ def normalized(values): raise ValueError(f"{option(name)} takes " + " or ".join(CONNECTOR_CHOICES[name][0])) result[name] = value continue - if name in SWITCHES: + if name in INSTALL_SWITCHES: if value is not True: raise ValueError(f"{option(name)} is a switch without a value") result[name] = True @@ -235,6 +249,22 @@ def check_image(settings, image, capabilities): f"{image} does not. Leave out {option(name)} or choose another image.") +def check_row_owned_prefill(settings, model, image, transport): + """Admit the row-owned prefill experiment for the measured image, model and transport.""" + if not settings.get(ROW_OWNED_PREFILL): + return + flag = option(ROW_OWNED_PREFILL) + if model != ("deepseek-v41-flash-tp4", "1017"): + raise ValueError(f"{flag} requires --profile deepseek-v41-flash-tp4 --checkpoint 1017") + if not image or image["image_id"] != ROW_OWNED_PREFILL_IMAGE_ID: + raise ValueError(f"{flag} requires --image {ROW_OWNED_PREFILL_IMAGE}") + if (not transport or transport.get("backend") != "nccl" + or transport["group"]["shape"] != "cycle" or transport["group"]["dcp"] != 1): + raise ValueError(f"{flag} requires --transport nccl on a directly cabled four-Spark cycle") + if settings.get("context_length", ROW_OWNED_PREFILL_CONTEXT) > ROW_OWNED_PREFILL_CONTEXT: + raise ValueError(f"{flag} supports --context-length up to {ROW_OWNED_PREFILL_CONTEXT} tokens") + + def choice(name, value): """A CHOICES value as the deployment records it: a lowercase word, or a whole number of at least 1. @@ -299,7 +329,7 @@ def apply(command, settings, *, model=None, api=True): for name in sorted(set(settings) & sparkcache.SETTINGS): if sparkcache.connector(command) is None: raise ValueError(f"{option(name)} requires a SparkCache profile") - for name in sorted(set(settings) - set(SWITCHES) - set(CHOICES)): + for name in sorted(set(settings) - set(INSTALL_SWITCHES) - set(CHOICES)): if name == "sparkcache_size": command = sparkcache.apply(command, settings[name]) continue @@ -391,8 +421,8 @@ def container(spec, settings, *, rank, model=None, source_root=None): ``api_bind`` it asks at the bound address and the deployment's port, where the API then listens. ``model`` is ``(profile, checkpoint)``, which CHOICES settings require. Without settings ``spec`` is returned unchanged. - SparkCache debug logging mounts its configuration from the retained - deployment checkout at ``source_root`` on each host. + SparkCache debug logging and DeepSeek row-owned prefill mount their assets + from the retained deployment checkout at ``source_root`` on each host. """ if not settings: return spec @@ -407,26 +437,62 @@ def container(spec, settings, *, rank, model=None, source_root=None): health = tuple(part.replace(before, after) for part in health) command = apply(spec.command, settings, model=model, api=rank == 0) mounts = spec.mounts + env = {**spec.environment, **environment(settings)} if settings.get("sparkcache_debug"): - from runtime.common.container_spec import Bind if source_root is None: raise ValueError("SparkCache debug logging requires the deployment source directory") mounts = (*mounts, Bind(str(PurePosixPath(source_root) / sparkcache.DEBUG_SOURCE), sparkcache.DEBUG_TARGET, True)) + if settings.get(ROW_OWNED_PREFILL): + if source_root is None: + raise ValueError(f"{option(ROW_OWNED_PREFILL)} requires the deployment source directory") + command = _row_owned_prefill_arguments(command) + plugins = env.get("VLLM_PLUGINS") + python_path = env.get("PYTHONPATH", "/opt/sparkring/toolchain/python:/opt/sparkring/addons/python") + env["VLLM_PLUGINS"] = ",".join(filter(None, (plugins, "ds41_row_shard"))) + env["PYTHONPATH"] = f"{ROW_OWNED_PREFILL_TARGET}:{python_path}" + mounts = (*mounts, Bind(str(PurePosixPath(source_root) / ROW_OWNED_PREFILL_SOURCE), ROW_OWNED_PREFILL_TARGET, True)) return dataclasses.replace(spec, command=command, mounts=mounts, - environment={**spec.environment, **environment(settings)}, health_command=health) + environment=env, health_command=health) + + +def _row_owned_prefill_arguments(command): + """Select eager prefill and the replicated Engram projection on the pinned profile.""" + command = list(command) + for flag in ("--compilation-config", "--max-cudagraph-capture-size"): + index = command.index(flag) + del command[index:index + 2] + for flag, key in (("--engram-config", "projection_tp"), + ("--speculative-config", "enable_adaptive_verification")): + index = command.index(flag) + 1 + config = json.loads(command[index]) + config[key] = False + command[index] = json.dumps(config, separators=(",", ":")) + context = command.index("--max-model-len") + 1 + command[context] = str(min(int(command[context]), ROW_OWNED_PREFILL_CONTEXT)) + command += ["--enforce-eager", "--disable-custom-all-reduce"] + return tuple(command) def environment(settings): """Container environment variables that the named switches set.""" - result = {SWITCHES[name][0]: SWITCHES[name][1] for name in sorted(set(settings) & set(SWITCHES))} + result = {INSTALL_SWITCHES[name][0]: INSTALL_SWITCHES[name][1] + for name in sorted(set(settings) & set(INSTALL_SWITCHES))} if settings.get("sparkcache_debug"): result["VLLM_LOGGING_CONFIG_PATH"] = sparkcache.DEBUG_TARGET + if settings.get(ROW_OWNED_PREFILL): + result.update( + DS41_ROW_SHARD_INDEXER="1", + DS41_ROW_SHARD_COMPACT_ROUTES="1", + DS41_ROW_SHARD_LOCAL_QUERIES="1", + DS41_ROW_SHARD_KV_LATENTS="1", + DS41_ROW_SHARD_COMPRESSOR_LATENTS="1", + ) return result def label(name, value): """A setting as its command-line form: ``--max-images 8``, or ``--save-cpu`` for a switch.""" - return option(name) if name in SWITCHES else f"{option(name)} {value}" + return option(name) if name in INSTALL_SWITCHES else f"{option(name)} {value}" def describe(settings, command, *, model=None): @@ -438,7 +504,8 @@ def describe(settings, command, *, model=None): if name in CHOICES: lines.append(label(name, value)) continue - lines.append(label(name, value) + (" (profile: off)" if name in SWITCHES else f" (profile: {profile_value(command, name)})")) + before = "off" if name in INSTALL_SWITCHES else profile_value(command, name) + lines.append(f"{label(name, value)} (profile: {before})") return lines diff --git a/runtime/host/checkpoint_plan.py b/runtime/host/checkpoint_plan.py index 11928f03..048c5716 100644 --- a/runtime/host/checkpoint_plan.py +++ b/runtime/host/checkpoint_plan.py @@ -230,10 +230,11 @@ def install_command(request=None, named=(), *, ignore_local=False): if request.get("image_lock"): argv += ["--image-lock", str(request["image_lock"])] settings = request.get("serving") or {} - for name in (*serving.SETTINGS, *serving.SIZES, *serving.SWITCHES, *serving.CHOICES, *serving.CONNECTOR_CHOICES): - if settings.get(name) is True and name in serving.SWITCHES: + switches = serving.INSTALL_SWITCHES + for name in (*serving.SETTINGS, *serving.SIZES, *switches, *serving.CHOICES, *serving.CONNECTOR_CHOICES): + if settings.get(name) is True and name in switches: argv.append(serving.option(name)) - elif settings.get(name) is not None and name not in serving.SWITCHES: + elif settings.get(name) is not None and name not in switches: text = (request.get("serving_text") or {}).get(name) # Display spelling cannot change the effective deployment setting. value = (text if name in serving.SIZES and text is not None diff --git a/runtime/host/install_workflow.py b/runtime/host/install_workflow.py index 4f53b0e1..46ba4e2f 100644 --- a/runtime/host/install_workflow.py +++ b/runtime/host/install_workflow.py @@ -688,6 +688,11 @@ def select_deployment(args, cluster, state_root, *, mesh_hint="", placement=None unreadable = image_lock.checkpoint_problem(image, card) if unreadable: raise NeedsInput(f"{unreadable}. Nothing has been changed.", field="checkpoint_name") + try: + serving_settings.check_row_owned_prefill(serving_settings.from_arguments(args), (profile, card["target_variant"]), + view, choice["section"]) + except ValueError as error: + raise NeedsInput(str(error), field="serving") from None notice = image_lock.checkpoint_notice(image, profile, card, preferred=args.checkpoint is None and requested_checkpoint is not None) if notice: @@ -1850,7 +1855,7 @@ def main(argv=None): parser.add_argument("--libsircl-library", metavar="PATH", help="with --image REF --transport libsircl: the host build of libsircl every Spark holds " "(runtime/images/libsircl_layer.py host-library)") - serving_settings.add_arguments(parser) + serving_settings.add_arguments(parser, install=True) # A stock image's vLLM arguments follow --. argv = list(sys.argv[1:] if argv is None else argv) vllm_arguments = argv[argv.index("--") + 1:] if "--" in argv else [] @@ -1883,6 +1888,8 @@ def main(argv=None): args.profile = models.canonical(args.profile) from runtime.common import stock_image stock = args.image is not None and stock_image.is_reference(args.image) + if stock and args.serving_row_owned_prefill: + parser.error("--row-owned-prefill requires a SparkRing installer image name") if vllm_arguments and not stock: parser.error("arguments after -- are a stock image's vLLM arguments: use them with --image REF") if args.nccl is not None: diff --git a/runtime/host/test_install_help.py b/runtime/host/test_install_help.py index 5677e2c1..097e919b 100644 --- a/runtime/host/test_install_help.py +++ b/runtime/host/test_install_help.py @@ -29,7 +29,8 @@ def printed_help(capsys, command, argv): def test_help_prints_each_serving_setting_as_written(capsys, command, argv): text = printed_help(capsys, command, argv) assert "'container':" not in text and "'prog':" not in text - for name, row in (*serving.SETTINGS.items(), *serving.SWITCHES.items()): + switches = serving.INSTALL_SWITCHES if command is install_workflow.main else serving.SWITCHES + for name, row in (*serving.SETTINGS.items(), *switches.items()): assert serving.option(name) in text assert compact(row[-1]) in compact(text), name diff --git a/runtime/host/test_install_sircl.py b/runtime/host/test_install_sircl.py index 0464a4bd..a5b07740 100644 --- a/runtime/host/test_install_sircl.py +++ b/runtime/host/test_install_sircl.py @@ -7,13 +7,14 @@ """ import json from pathlib import Path +import zipfile import pytest -from runtime.common import fabric_document, installer +from runtime.common import fabric_document, installer, serving from runtime.common.test_image_lock import sircl_lock -from runtime.host import colour, controller, fabric, install_workflow as flow, relays -from runtime.host.test_install_workflow import PROFILE, machine, sparks # noqa: F401 (pytest fixtures) +from runtime.host import colour, controller, fabric, install_workflow as flow, node, relays +from runtime.host.test_install_workflow import PROFILE, cluster, machine, sparks # noqa: F401 (pytest fixtures) from scripts import sparkring MARKER = {"binary": relays.MARKER_BINARY, "sha256": "ab" * 32} @@ -138,6 +139,85 @@ def test_the_nccl_transport_installs_on_a_pair_without_sircl(machine, capsys): assert json.loads(capsys.readouterr().out)["field"] == "transport" +def test_row_owned_prefill_is_a_locked_deepseek_nccl_experiment(machine, sparks, monkeypatch, capsys, tmp_path): # noqa: F811 + value = cluster(4) + node.save(controller.STATE, "cluster.json", value) + monkeypatch.setattr(controller, "collect", lambda _: value["plan"]["nodes"]) + topology, _ = fabric.prepare(value["plan"], cluster="test", marker=MARKER) + (controller.STATE / "fabric.json").write_text(fabric_document.encoded(topology)) + sparks.mesh = lambda rank: {"reference": {"site_path": "/etc/sparkring/managed-mesh/site.json", + "site_sha256": "c" * 64, "plan_sha256": "d" * 64}, + "host_ip": f"192.0.2.{110 + rank}", "interface": "eth0", "unit": "sparkring-mesh.service"} + request = ["install", "--profile", "deepseek-v41-flash-tp4", "--checkpoint", "1017", + "--image", serving.ROW_OWNED_PREFILL_IMAGE, "--transport", "nccl", "--plan", "--json"] + + assert sparkring.main(request) == 0 + plain = json.loads(capsys.readouterr().out) + assert sparkring.main([*request, "--row-owned-prefill"]) == 0 + plan = json.loads(capsys.readouterr().out) + assert plan["deployment"] != plain["deployment"] + assert plan["serving"] == {"row_owned_prefill": True} + assert "--row-owned-prefill" in plan["checkpoint"]["command"] + saved = deployment(plan) + assert saved["transport"]["backend"] == "nccl" + assert saved["image_runtime"]["image_id"] == serving.ROW_OWNED_PREFILL_IMAGE_ID + + for rank, (plain_spec, spec) in enumerate(zip(installer.specifications(deployment(plain)), + installer.specifications(saved), strict=True)): + assert spec.entrypoint == plain_spec.entrypoint + assert "DS41_ROW_SHARD_PREFILL" not in plain_spec.environment + assert spec.environment["DS41_ROW_SHARD_PREFILL"] == "1" + assert "DS41_ROW_SHARD_INDEXER" not in plain_spec.environment + assert spec.environment["DS41_ROW_SHARD_INDEXER"] == "1" + for flag in ( + "DS41_ROW_SHARD_COMPACT_ROUTES", + "DS41_ROW_SHARD_LOCAL_QUERIES", + "DS41_ROW_SHARD_KV_LATENTS", + "DS41_ROW_SHARD_COMPRESSOR_LATENTS", + ): + assert flag not in plain_spec.environment + assert spec.environment[flag] == "1" + assert spec.environment["VLLM_PLUGINS"].split(",") == [ + *plain_spec.environment["VLLM_PLUGINS"].split(","), "ds41_row_shard"] + assert spec.environment["PYTHONPATH"].split(":") == [ + "/opt/ds41_row_shard", "/opt/sparkring/toolchain/python", "/opt/sparkring/addons/python"] + assert spec.environment["VLLM_ENABLE_ROCE_ALLREDUCE"] == "0" + assert spec.mounts[:2] == plain_spec.mounts[:2] + assert [mount.target for mount in spec.mounts[:-1]] == [mount.target for mount in plain_spec.mounts] + plugin = spec.mounts[-1] + assert (plugin.source, plugin.target, plugin.read_only) == ( + saved["site"]["ranks"][rank]["repository"] + "/integrations/vllm/ds41_row_shard", + "/opt/ds41_row_shard", True) + assert "--enforce-eager" in spec.command and "--disable-custom-all-reduce" in spec.command + assert "--compilation-config" not in spec.command and "--max-cudagraph-capture-size" not in spec.command + assert ("--headless" in spec.command) == bool(rank) + assert serving.profile_value(spec.command, "context_length") == 262144 + batch_tokens = spec.command.index("--max-num-batched-tokens") + 1 + assert spec.command[batch_tokens] == plain_spec.command[batch_tokens] == "8192" + engram = json.loads(spec.command[spec.command.index("--engram-config") + 1]) + assert engram == {"table_memory": "disk", "disk_resident_scales": True, "projection_tp": False} + draft = json.loads(spec.command[spec.command.index("--speculative-config") + 1]) + assert draft["num_speculative_tokens"] == 5 and draft["enable_adaptive_verification"] is False + + # A shareable template repeats the install command that stages the plugin. + output = tmp_path / "template.zip" + installer.export(plan["deployment"], output, share=True) + with zipfile.ZipFile(output) as template: + text = template.read("README.txt").decode() + assert "sparkring install --profile deepseek-v41-flash-tp4 --checkpoint 1017" in text + assert "--transport nccl --row-owned-prefill" in text + + surveyed = len(sparks.surveys) + for extra, complaint in ((["--checkpoint", "original"], "requires --profile"), + (["--image", "plainstatus"], "requires --image"), + (["--transport", "prepared"], "requires --transport nccl"), + (["--context-length", "262145"], "up to 262144 tokens")): + assert sparkring.main([*request, "--row-owned-prefill", *extra]) == 3 + refused = json.loads(capsys.readouterr().out) + assert refused["field"] == "serving" and complaint in refused["message"] + assert len(sparks.surveys) == surveyed + + def test_a_failed_receipt_check_is_reported_and_the_model_keeps_serving(sircl, monkeypatch, capsys): events, lock, _ = sircl failing = dict(VERDICT, verdict="differs", problems=["rank 1 group tp:0: 14 calls reached NCCL (['all_gather'])"]) From 848c8b65f3f3191d3c9e5bca338705bb0c043222 Mon Sep 17 00:00:00 2001 From: FujitsuPolycom <87842395+FujitsuPolycom@users.noreply.github.com> Date: Thu, 19 Nov 2026 21:00:02 -0600 Subject: [PATCH 2/7] Use tested DeepSeek decode graphs in the row-owned prefill preset --- docs/operations/install-reference.md | 2 +- integrations/vllm/ds41_row_shard/README.md | 10 ++++--- performance/enhancements.json | 5 ++-- performance/enhancements.md | 3 +- .../row-owned-full-head-ring-20261119.md | 29 ++++++++++++++++++- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- runtime/common/serving.py | 16 +++++----- runtime/host/test_install_sircl.py | 10 +++++-- 50 files changed, 98 insertions(+), 63 deletions(-) diff --git a/docs/operations/install-reference.md b/docs/operations/install-reference.md index 05ba6fe8..c2194f07 100644 --- a/docs/operations/install-reference.md +++ b/docs/operations/install-reference.md @@ -822,7 +822,7 @@ flag, the profile's value applies. | `--max-concurrency N` | `--max-num-seqs` | requests served at the same time | | `--kv-cache-gib N` | `--kv-cache-memory-bytes` | GiB of KV cache on each Spark, at most a tenth above the profile's value | | `--save-cpu` | vLLM's shared-memory reader window (container variable `SPARKRING_SHM_BUSY_LOOP_S`) | a switch: readers poll 2 ms after a read instead of one second | -| `--row-owned-prefill` | Eager prefill with replicated Engram projection | experimental [DeepSeek V4.1-Flash-1017 on a four-Spark NCCL cycle](../../integrations/vllm/ds41_row_shard/README.md#install-on-a-four-spark-cycle), via `sparkring install` | +| `--row-owned-prefill` | Eager prefill with replicated Engram projection and decode-only CUDA graphs | experimental [DeepSeek V4.1-Flash-1017 on a four-Spark NCCL cycle](../../integrations/vllm/ds41_row_shard/README.md#install-on-a-four-spark-cycle), via `sparkring install` | | `--reasoning-effort LEVEL` | the model's default effort level, in `--default-chat-template-kwargs` on Node A | one of the model's [levels](#thinking) | | `--thinking off` | the model's default thinking, in `--default-chat-template-kwargs` on Node A | thinking stays off unless a request turns it on | | `--api-port N` | `--port` | the TCP port of the model's API, 1024 to 65535 ([API endpoint](#api-endpoint)) | diff --git a/integrations/vllm/ds41_row_shard/README.md b/integrations/vllm/ds41_row_shard/README.md index 85d1073f..84eb89ea 100644 --- a/integrations/vllm/ds41_row_shard/README.md +++ b/integrations/vllm/ds41_row_shard/README.md @@ -37,14 +37,16 @@ sudo sparkring install --profile deepseek-v41-flash-tp4 --checkpoint 1017 \ Run the command with `--yes` in place of `--plan` to apply the plan. The installer stages its retained source on each rank and mounts the plugin -read-only. The setting selects eager execution, disk-resident Engram tables -with replicated projection, 8,192-token prefill chunks, DSpark5 with adaptive -verification off, and a 262,144-token context limit. Use `--context-length` +read-only. The setting selects eager prefill, full CUDA graphs for uniform +decode, disk-resident Engram tables with replicated projection, 8,192-token +prefill chunks, DSpark5 with adaptive verification, and a 262,144-token +context limit. Use `--context-length` for a smaller limit. The installer enables compact routing, full-head local-query attention, narrow KV gathers, and packed compressor projections. At 8K chunks, these -settings cleared 6,000 prompt tokens/s at all three tested prompt lengths. +settings cleared 6,000 prompt tokens/s on median at all three tested +prompt lengths with decode-only graphs enabled. Full-head prefill holds additional weights per rank. [Four-Spark cycle record](../../../performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md) The install planner has offline coverage. Hardware validation of the install path and sustained decode is pending. diff --git a/performance/enhancements.json b/performance/enhancements.json index 8a507c45..e43e3485 100644 --- a/performance/enhancements.json +++ b/performance/enhancements.json @@ -1818,7 +1818,7 @@ {"env": "DS41_ROW_SHARD_KV_LATENTS", "equals": "1"}, {"env": "DS41_ROW_SHARD_COMPRESSOR_LATENTS", "equals": "1"}, {"env": "VLLM_ENABLE_ROCE_ALLREDUCE", "equals": "0"}, - {"arg": "--enforce-eager", "present": true}, + {"arg": "--compilation-config", "json": "cudagraph_mode", "equals": "FULL_DECODE_ONLY"}, {"arg": "--engram-config", "json": "projection_tp", "equals": false}, {"arg": "--max-num-batched-tokens", "equals": 8192} ], @@ -1826,7 +1826,8 @@ "status": "research-only", "gain": {"percent": 17.0, "summary": "Median 128K cold prefill rose from 5,234 to 6,124 tok/s with full-head attention, compact routes and packed projections, both at 8K chunks on one NCCL cycle"}, "measurements": [ - {"image": "dev-20261013-dcp2prefill-status038-sircl-tp6", "tp": 4, "dcp": 1, "streams": "1", "context": "16K, 64K, 128K", "checkpoint": "deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10", "result": "Three cold requests per length on one four-Spark NCCL cycle. Median prompt tok/s at 16K / 64K / 128K were 5,445 / 5,361 / 5,234 with distributed scoring and 6,334 / 6,250 / 6,124 with full-head local-query attention, compact routes and packed projections. All requests used 8K prefill chunks.", "evidence": "performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md"} + {"image": "dev-20261013-dcp2prefill-status038-sircl-tp6", "tp": 4, "dcp": 1, "streams": "1", "context": "16K, 64K, 128K", "checkpoint": "deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10", "result": "Three cold requests per length on one four-Spark NCCL cycle with eager execution. Median prompt tok/s at 16K / 64K / 128K were 5,445 / 5,361 / 5,234 with distributed scoring and 6,334 / 6,250 / 6,124 with full-head local-query attention, compact routes and packed projections. All requests used 8K prefill chunks.", "evidence": "performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md"}, + {"image": "dev-20261013-dcp2prefill-status038-sircl-tp6", "tp": 4, "dcp": 1, "streams": "1", "context": "16K, 64K, 128K", "checkpoint": "deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10", "result": "With decode-only graphs and adaptive verification, three cold samples per length gave medians of 6,290 / 6,149 / 6,027 prompt tok/s at 16K / 64K / 128K. Three single-request runs of one short prompt at temperature zero gave median 71.50 output tok/s after the first token against 18.16 in the eager baseline.", "evidence": "performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md#decode-only-graph-trial"} ], "evidence": ["performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md", "integrations/vllm/ds41_row_shard/README.md"], "profiles": [] diff --git a/performance/enhancements.md b/performance/enhancements.md index da2cee9b..b138e1b7 100644 --- a/performance/enhancements.md +++ b/performance/enhancements.md @@ -1043,7 +1043,8 @@ Measured without a gain, not adopted: - Models: DeepSeek-V4.1-Flash. Sizes: 4 (DCP 1). - Availability: from 2026.10.4. - Profiles that turn it on: none. -- Measured (TP4/DCP1, 1 streams, context 16K, 64K, 128K, deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10, image 2026.10.4): Three cold requests per length on one four-Spark NCCL cycle. Median prompt tok/s at 16K / 64K / 128K were 5,445 / 5,361 / 5,234 with distributed scoring and 6,334 / 6,250 / 6,124 with full-head local-query attention, compact routes and packed projections. All requests used 8K prefill chunks.. Evidence: [performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md](records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md). +- Measured (TP4/DCP1, 1 streams, context 16K, 64K, 128K, deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10, image 2026.10.4): Three cold requests per length on one four-Spark NCCL cycle with eager execution. Median prompt tok/s at 16K / 64K / 128K were 5,445 / 5,361 / 5,234 with distributed scoring and 6,334 / 6,250 / 6,124 with full-head local-query attention, compact routes and packed projections. All requests used 8K prefill chunks.. Evidence: [performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md](records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md). +- Measured (TP4/DCP1, 1 streams, context 16K, 64K, 128K, deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10, image 2026.10.4): With decode-only graphs and adaptive verification, three cold samples per length gave medians of 6,290 / 6,149 / 6,027 prompt tok/s at 16K / 64K / 128K. Three single-request runs of one short prompt at temperature zero gave median 71.50 output tok/s after the first token against 18.16 in the eager baseline.. Evidence: [performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md](records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md). - Evidence: [performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md](records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md); [integrations/vllm/ds41_row_shard/README.md](../integrations/vllm/ds41_row_shard/README.md). ### `ds41-split-fused-attention` diff --git a/performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md b/performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md index afd99283..d447e68b 100644 --- a/performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md +++ b/performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md @@ -39,7 +39,7 @@ samples ranged from 6,113 to 6,145 tok/s. [Samples](row-owned-full-head-ring-202 The Engram banding experiment split each replicated-projection lookup reduction into feature bands of at most 80 MiB. The counters recorded four Engram reductions per chunk. The unbanded compressor build had the highest -median at each length and is the selected installer configuration. +median at each length and supplied the plugin settings for the decode-graph trial. ## Serving checks @@ -57,3 +57,30 @@ cover one direct NCCL cycle. The installer was tested through plan generation, and the measured deployment used manual containers. Sustained decode, multimodal behavior, open-chain throughput and full numerical parity across arbitrary prompts remain unqualified. + +## Decode-only graph trial + +On the same four-Spark cycle and pinned image, the candidate used +`FULL_DECODE_ONLY` with compilation mode `NONE`, the TP4 profile's capture +sizes through 96, and DSpark5 with adaptive verification enabled. The +8,192-token chunk size and the unbanded compressor plugin settings carried +over from the eager baseline. + +| Measurement | Eager baseline | Decode graphs and adaptive verification | +|---|---:|---:| +| 16K cold prefill, median tok/s | 6,344.01 | 6,289.94 | +| 64K cold prefill, median tok/s | 6,228.71 | 6,148.72 | +| 128K cold prefill, median tok/s | 6,081.04 | 6,027.25 | +| Single-request decode, median tok/s | 18.16 | 71.50 | + +Medians are from three runs per cell. The prefill requests were cold with +one output token. Decode used one short prompt, temperature zero, and 384 +output tokens, with timing after the first token. The candidate's 16K +prefill samples included one at 5,936 tok/s. A later probe found 56.88 +tok/s median decode for the same short prompt at temperature one across +two runs, with sampling seeds set. Decode rates vary with workload and +draft acceptance. + +The candidate recorded row-owned prefill, captured decode graphs, reused +7,936 tokens on prefix continuation, and completed an unaligned prefill +and a concurrent 64-token decode. The trial used manual containers. diff --git a/profiles/deepseek-v41-flash-tp4/compose/compose.rank0.yaml b/profiles/deepseek-v41-flash-tp4/compose/compose.rank0.yaml index a7c0ef08..e3fb6ec6 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/compose.rank0.yaml +++ b/profiles/deepseek-v41-flash-tp4/compose/compose.rank0.yaml @@ -149,7 +149,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/deepseek-v41-flash-f625053225d4-dba1be0a40aa labels: - io.sparkring.deployment: a44b79689c6e8b12da473add95e6a18947929e2d79068d894abeb1003ac1c680 + io.sparkring.deployment: 4fc9c714941981aff98a407cde150cbeea8a1e414fade0ad7bbc0b23d2772281 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/deepseek-v41-flash-tp4/compose/compose.rank1.yaml b/profiles/deepseek-v41-flash-tp4/compose/compose.rank1.yaml index 9729a615..6d0f8cd0 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/compose.rank1.yaml +++ b/profiles/deepseek-v41-flash-tp4/compose/compose.rank1.yaml @@ -150,7 +150,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/deepseek-v41-flash-f625053225d4-dba1be0a40aa labels: - io.sparkring.deployment: a44b79689c6e8b12da473add95e6a18947929e2d79068d894abeb1003ac1c680 + io.sparkring.deployment: 4fc9c714941981aff98a407cde150cbeea8a1e414fade0ad7bbc0b23d2772281 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/deepseek-v41-flash-tp4/compose/compose.rank2.yaml b/profiles/deepseek-v41-flash-tp4/compose/compose.rank2.yaml index 3a8b5b79..42bd973f 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/compose.rank2.yaml +++ b/profiles/deepseek-v41-flash-tp4/compose/compose.rank2.yaml @@ -150,7 +150,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/deepseek-v41-flash-f625053225d4-dba1be0a40aa labels: - io.sparkring.deployment: a44b79689c6e8b12da473add95e6a18947929e2d79068d894abeb1003ac1c680 + io.sparkring.deployment: 4fc9c714941981aff98a407cde150cbeea8a1e414fade0ad7bbc0b23d2772281 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/deepseek-v41-flash-tp4/compose/compose.rank3.yaml b/profiles/deepseek-v41-flash-tp4/compose/compose.rank3.yaml index e6b7ef04..77ddbeb7 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/compose.rank3.yaml +++ b/profiles/deepseek-v41-flash-tp4/compose/compose.rank3.yaml @@ -150,7 +150,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/deepseek-v41-flash-f625053225d4-dba1be0a40aa labels: - io.sparkring.deployment: a44b79689c6e8b12da473add95e6a18947929e2d79068d894abeb1003ac1c680 + io.sparkring.deployment: 4fc9c714941981aff98a407cde150cbeea8a1e414fade0ad7bbc0b23d2772281 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/deepseek-v41-flash-tp4/compose/selection.json b/profiles/deepseek-v41-flash-tp4/compose/selection.json index e84ce095..975a74d6 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/selection.json +++ b/profiles/deepseek-v41-flash-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "deepseek-v41-flash-tp4", "checkpoint": "original", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "a44b79689c6e8b12da473add95e6a18947929e2d79068d894abeb1003ac1c680" + "deployment": "4fc9c714941981aff98a407cde150cbeea8a1e414fade0ad7bbc0b23d2772281" } diff --git a/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank0.yaml b/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank0.yaml index b2e528ce..84b9b083 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank0.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank0.yaml @@ -181,7 +181,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: 760b24c65b7f89fe131ddc788dc9303dff6b4e6e49e0d5ffa2a70a5f684835bf + io.sparkring.deployment: b5f8e9efad9972ed04d452aa4ac9d98a3313dd4e7f8ac00ad748961f9cd0af3c io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank1.yaml b/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank1.yaml index fbba5369..c91a12a7 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank1.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank1.yaml @@ -180,7 +180,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: 760b24c65b7f89fe131ddc788dc9303dff6b4e6e49e0d5ffa2a70a5f684835bf + io.sparkring.deployment: b5f8e9efad9972ed04d452aa4ac9d98a3313dd4e7f8ac00ad748961f9cd0af3c io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp2/compose/selection.json b/profiles/glm53-flash-nvfp4-spark-tp2/compose/selection.json index fab05bea..30b9f83a 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp2/compose/selection.json +++ b/profiles/glm53-flash-nvfp4-spark-tp2/compose/selection.json @@ -3,5 +3,5 @@ "profile": "glm53-flash-nvfp4-spark-tp2", "checkpoint": "csf", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "760b24c65b7f89fe131ddc788dc9303dff6b4e6e49e0d5ffa2a70a5f684835bf" + "deployment": "b5f8e9efad9972ed04d452aa4ac9d98a3313dd4e7f8ac00ad748961f9cd0af3c" } diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank0.yaml b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank0.yaml index 422a0931..e58912cd 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank0.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank0.yaml @@ -195,7 +195,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: 16ef9cc52dc436a9ff6c0c56852034565d03bfede81cd7e81005aa676a425b9f + io.sparkring.deployment: e907b3cc481ea82de11406a220b236fce152693a8ee3f9e0e2814908032ec5e5 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank1.yaml b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank1.yaml index 7ba03f44..f6bdf8cc 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank1.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank1.yaml @@ -194,7 +194,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: 16ef9cc52dc436a9ff6c0c56852034565d03bfede81cd7e81005aa676a425b9f + io.sparkring.deployment: e907b3cc481ea82de11406a220b236fce152693a8ee3f9e0e2814908032ec5e5 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank2.yaml b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank2.yaml index 8017d923..8854d749 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank2.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank2.yaml @@ -194,7 +194,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: 16ef9cc52dc436a9ff6c0c56852034565d03bfede81cd7e81005aa676a425b9f + io.sparkring.deployment: e907b3cc481ea82de11406a220b236fce152693a8ee3f9e0e2814908032ec5e5 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank3.yaml b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank3.yaml index 939c0c1c..15a0e157 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank3.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank3.yaml @@ -194,7 +194,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: 16ef9cc52dc436a9ff6c0c56852034565d03bfede81cd7e81005aa676a425b9f + io.sparkring.deployment: e907b3cc481ea82de11406a220b236fce152693a8ee3f9e0e2814908032ec5e5 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/selection.json b/profiles/glm53-flash-nvfp4-spark-tp4/compose/selection.json index 97970bb0..8fb842f2 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/selection.json +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "glm53-flash-nvfp4-spark-tp4", "checkpoint": "csf", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "16ef9cc52dc436a9ff6c0c56852034565d03bfede81cd7e81005aa676a425b9f" + "deployment": "e907b3cc481ea82de11406a220b236fce152693a8ee3f9e0e2814908032ec5e5" } diff --git a/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank0.yaml b/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank0.yaml index 44c047dc..0264e22d 100644 --- a/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank0.yaml +++ b/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank0.yaml @@ -149,7 +149,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 400266f0047838cc16af17091aad42f852cfcf8a41adee4a4bb23702d1e9cc8c + io.sparkring.deployment: bf112dabbc79aa277bf471a49ede954118676bb92e6ddcb05fa83c71b6028c72 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank1.yaml b/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank1.yaml index 68207c19..5cc856ae 100644 --- a/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank1.yaml +++ b/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank1.yaml @@ -150,7 +150,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 400266f0047838cc16af17091aad42f852cfcf8a41adee4a4bb23702d1e9cc8c + io.sparkring.deployment: bf112dabbc79aa277bf471a49ede954118676bb92e6ddcb05fa83c71b6028c72 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp2/compose/selection.json b/profiles/mimo-v26-flash-mopd-tp2/compose/selection.json index 0232e699..71e6f3c1 100644 --- a/profiles/mimo-v26-flash-mopd-tp2/compose/selection.json +++ b/profiles/mimo-v26-flash-mopd-tp2/compose/selection.json @@ -3,5 +3,5 @@ "profile": "mimo-v26-flash-mopd-tp2", "checkpoint": null, "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "400266f0047838cc16af17091aad42f852cfcf8a41adee4a4bb23702d1e9cc8c" + "deployment": "bf112dabbc79aa277bf471a49ede954118676bb92e6ddcb05fa83c71b6028c72" } diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank0.yaml b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank0.yaml index e698d33c..71112e38 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank0.yaml +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank0.yaml @@ -163,7 +163,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 3257c458bf27fc7e44f87b605a55e60cfeaa80d718e0be2449285636613c4b53 + io.sparkring.deployment: 4a5515d5ed4a3a34a5c4935130bbf1a2f89c7c6cc8aa6a75c07b77023caa36a5 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank1.yaml b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank1.yaml index 8a5c2443..df3a9e2e 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank1.yaml +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank1.yaml @@ -164,7 +164,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 3257c458bf27fc7e44f87b605a55e60cfeaa80d718e0be2449285636613c4b53 + io.sparkring.deployment: 4a5515d5ed4a3a34a5c4935130bbf1a2f89c7c6cc8aa6a75c07b77023caa36a5 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank2.yaml b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank2.yaml index 3166a380..83be33e5 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank2.yaml +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank2.yaml @@ -164,7 +164,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 3257c458bf27fc7e44f87b605a55e60cfeaa80d718e0be2449285636613c4b53 + io.sparkring.deployment: 4a5515d5ed4a3a34a5c4935130bbf1a2f89c7c6cc8aa6a75c07b77023caa36a5 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank3.yaml b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank3.yaml index fe750c9c..fb095466 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank3.yaml +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank3.yaml @@ -164,7 +164,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 3257c458bf27fc7e44f87b605a55e60cfeaa80d718e0be2449285636613c4b53 + io.sparkring.deployment: 4a5515d5ed4a3a34a5c4935130bbf1a2f89c7c6cc8aa6a75c07b77023caa36a5 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/selection.json b/profiles/mimo-v26-flash-mopd-tp4/compose/selection.json index d86c0b91..1b5deb77 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/selection.json +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "mimo-v26-flash-mopd-tp4", "checkpoint": null, "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "3257c458bf27fc7e44f87b605a55e60cfeaa80d718e0be2449285636613c4b53" + "deployment": "4a5515d5ed4a3a34a5c4935130bbf1a2f89c7c6cc8aa6a75c07b77023caa36a5" } diff --git a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank0.yaml b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank0.yaml index b5fe0fc5..13c8be1c 100644 --- a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank0.yaml +++ b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank0.yaml @@ -170,7 +170,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 3040de86e3db994dd9deeeacdfd3f5b1e7dff803d50b0ada74f14e1c92698ca9 + io.sparkring.deployment: 6e46642c75cdf84b8fa7d99de505c930d9c6a7f161e41daa7d2bb896a9bc1996 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank1.yaml b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank1.yaml index 7fff1383..75fd3c27 100644 --- a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank1.yaml +++ b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank1.yaml @@ -171,7 +171,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 3040de86e3db994dd9deeeacdfd3f5b1e7dff803d50b0ada74f14e1c92698ca9 + io.sparkring.deployment: 6e46642c75cdf84b8fa7d99de505c930d9c6a7f161e41daa7d2bb896a9bc1996 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank2.yaml b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank2.yaml index 5df238c1..31515b41 100644 --- a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank2.yaml +++ b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank2.yaml @@ -171,7 +171,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 3040de86e3db994dd9deeeacdfd3f5b1e7dff803d50b0ada74f14e1c92698ca9 + io.sparkring.deployment: 6e46642c75cdf84b8fa7d99de505c930d9c6a7f161e41daa7d2bb896a9bc1996 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank3.yaml b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank3.yaml index bc133062..8f4f2ef5 100644 --- a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank3.yaml +++ b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank3.yaml @@ -171,7 +171,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 3040de86e3db994dd9deeeacdfd3f5b1e7dff803d50b0ada74f14e1c92698ca9 + io.sparkring.deployment: 6e46642c75cdf84b8fa7d99de505c930d9c6a7f161e41daa7d2bb896a9bc1996 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank0.yaml b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank0.yaml index a7028154..a23b5da5 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank0.yaml +++ b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank0.yaml @@ -176,7 +176,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-60215d26cf5e labels: - io.sparkring.deployment: 688190b223398a246e3d8921792673b6357286c3cfd9001c365ca8f65a9b0e67 + io.sparkring.deployment: f2eae8def378d9ba1102d463086e3f3f5f9a39a43141d2f9aef35bfcfa31e981 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank1.yaml b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank1.yaml index 61e013ee..5e550dda 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank1.yaml +++ b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank1.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-60215d26cf5e labels: - io.sparkring.deployment: 688190b223398a246e3d8921792673b6357286c3cfd9001c365ca8f65a9b0e67 + io.sparkring.deployment: f2eae8def378d9ba1102d463086e3f3f5f9a39a43141d2f9aef35bfcfa31e981 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank2.yaml b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank2.yaml index d7dd2204..3befc9d4 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank2.yaml +++ b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank2.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-60215d26cf5e labels: - io.sparkring.deployment: 688190b223398a246e3d8921792673b6357286c3cfd9001c365ca8f65a9b0e67 + io.sparkring.deployment: f2eae8def378d9ba1102d463086e3f3f5f9a39a43141d2f9aef35bfcfa31e981 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank3.yaml b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank3.yaml index b45ca70f..6c28c3a0 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank3.yaml +++ b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank3.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-60215d26cf5e labels: - io.sparkring.deployment: 688190b223398a246e3d8921792673b6357286c3cfd9001c365ca8f65a9b0e67 + io.sparkring.deployment: f2eae8def378d9ba1102d463086e3f3f5f9a39a43141d2f9aef35bfcfa31e981 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/selection.json b/profiles/qwen38-flash-next-qad-tp4/compose/selection.json index e24e583c..0e325c65 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/selection.json +++ b/profiles/qwen38-flash-next-qad-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "qwen38-flash-next-qad-tp4", "checkpoint": "qad-step5500-ple1000", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "688190b223398a246e3d8921792673b6357286c3cfd9001c365ca8f65a9b0e67" + "deployment": "f2eae8def378d9ba1102d463086e3f3f5f9a39a43141d2f9aef35bfcfa31e981" } diff --git a/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank0.yaml b/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank0.yaml index 92907869..9fc5e77d 100644 --- a/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank0.yaml +++ b/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank0.yaml @@ -147,7 +147,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: c28c01b7b71bbda018667a57c09720587e9dde47249f0f20427397110b18d1b7 + io.sparkring.deployment: 0f36f4718a1f6a42cb528b53f45d6f89e11b27b786339f050544e053d85da5be io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank1.yaml b/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank1.yaml index bcf3f2ee..2c1eb663 100644 --- a/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank1.yaml +++ b/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank1.yaml @@ -148,7 +148,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: c28c01b7b71bbda018667a57c09720587e9dde47249f0f20427397110b18d1b7 + io.sparkring.deployment: 0f36f4718a1f6a42cb528b53f45d6f89e11b27b786339f050544e053d85da5be io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-tp2/compose/compose.rank0.yaml b/profiles/qwen38-flash-next-tp2/compose/compose.rank0.yaml index 2eb14ca9..78b53a52 100644 --- a/profiles/qwen38-flash-next-tp2/compose/compose.rank0.yaml +++ b/profiles/qwen38-flash-next-tp2/compose/compose.rank0.yaml @@ -160,7 +160,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-dc5b8ab2fa14 labels: - io.sparkring.deployment: df9372e42db1f4190fcc33f07fc8e072ee4a81cfca4e74e76eca4e39bfb7d28c + io.sparkring.deployment: 8d899daffc1f22567eca16a342a047efcd9bdc83915048f9a4c1a626b99c479d io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-tp2/compose/compose.rank1.yaml b/profiles/qwen38-flash-next-tp2/compose/compose.rank1.yaml index ab662d8d..2a9e7e2a 100644 --- a/profiles/qwen38-flash-next-tp2/compose/compose.rank1.yaml +++ b/profiles/qwen38-flash-next-tp2/compose/compose.rank1.yaml @@ -161,7 +161,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-dc5b8ab2fa14 labels: - io.sparkring.deployment: df9372e42db1f4190fcc33f07fc8e072ee4a81cfca4e74e76eca4e39bfb7d28c + io.sparkring.deployment: 8d899daffc1f22567eca16a342a047efcd9bdc83915048f9a4c1a626b99c479d io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-tp2/compose/selection.json b/profiles/qwen38-flash-next-tp2/compose/selection.json index 9a386ac2..b9656766 100644 --- a/profiles/qwen38-flash-next-tp2/compose/selection.json +++ b/profiles/qwen38-flash-next-tp2/compose/selection.json @@ -3,5 +3,5 @@ "profile": "qwen38-flash-next-tp2", "checkpoint": "csf", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "df9372e42db1f4190fcc33f07fc8e072ee4a81cfca4e74e76eca4e39bfb7d28c" + "deployment": "8d899daffc1f22567eca16a342a047efcd9bdc83915048f9a4c1a626b99c479d" } diff --git a/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank0.yaml b/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank0.yaml index b18cf2c1..19911b59 100644 --- a/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank0.yaml +++ b/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank0.yaml @@ -160,7 +160,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: a3c9683aa38eb18f6b490a7b1290698977a9a13793fee0437773f8c5c88a46b3 + io.sparkring.deployment: 79e431a8a6ff395efbaf059ba6a198db3e912b21550a60ee9f1b91df24bc3d2c io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank1.yaml b/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank1.yaml index b9a64fbf..7c9ef6d6 100644 --- a/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank1.yaml +++ b/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank1.yaml @@ -161,7 +161,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: a3c9683aa38eb18f6b490a7b1290698977a9a13793fee0437773f8c5c88a46b3 + io.sparkring.deployment: 79e431a8a6ff395efbaf059ba6a198db3e912b21550a60ee9f1b91df24bc3d2c io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp2/compose/selection.json b/profiles/swift15-qwen38-flash-next-tp2/compose/selection.json index b546ab92..c97bc846 100644 --- a/profiles/swift15-qwen38-flash-next-tp2/compose/selection.json +++ b/profiles/swift15-qwen38-flash-next-tp2/compose/selection.json @@ -3,5 +3,5 @@ "profile": "swift15-qwen38-flash-next-tp2", "checkpoint": null, "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "a3c9683aa38eb18f6b490a7b1290698977a9a13793fee0437773f8c5c88a46b3" + "deployment": "79e431a8a6ff395efbaf059ba6a198db3e912b21550a60ee9f1b91df24bc3d2c" } diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank0.yaml b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank0.yaml index 628cb90f..f687c151 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank0.yaml +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank0.yaml @@ -176,7 +176,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: 79f13ad2bb62d48fbe91d7c812922ec70727789d40d13b131224c1fc2381a53e + io.sparkring.deployment: d1f1bafaacca9142d2b07eed9d695051eb214f397ba6255e5247a325dcb569f7 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank1.yaml b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank1.yaml index 3112a374..b17c2859 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank1.yaml +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank1.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: 79f13ad2bb62d48fbe91d7c812922ec70727789d40d13b131224c1fc2381a53e + io.sparkring.deployment: d1f1bafaacca9142d2b07eed9d695051eb214f397ba6255e5247a325dcb569f7 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank2.yaml b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank2.yaml index 42e29a26..5749de80 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank2.yaml +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank2.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: 79f13ad2bb62d48fbe91d7c812922ec70727789d40d13b131224c1fc2381a53e + io.sparkring.deployment: d1f1bafaacca9142d2b07eed9d695051eb214f397ba6255e5247a325dcb569f7 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank3.yaml b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank3.yaml index 4fd62f41..ac611b41 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank3.yaml +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank3.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: 79f13ad2bb62d48fbe91d7c812922ec70727789d40d13b131224c1fc2381a53e + io.sparkring.deployment: d1f1bafaacca9142d2b07eed9d695051eb214f397ba6255e5247a325dcb569f7 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/selection.json b/profiles/swift15-qwen38-flash-next-tp4/compose/selection.json index f7c2c37a..2b12bf70 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/selection.json +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "swift15-qwen38-flash-next-tp4", "checkpoint": null, "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "79f13ad2bb62d48fbe91d7c812922ec70727789d40d13b131224c1fc2381a53e" + "deployment": "d1f1bafaacca9142d2b07eed9d695051eb214f397ba6255e5247a325dcb569f7" } diff --git a/runtime/common/serving.py b/runtime/common/serving.py index 0912c5e8..5b481ed1 100644 --- a/runtime/common/serving.py +++ b/runtime/common/serving.py @@ -456,20 +456,20 @@ def container(spec, settings, *, rank, model=None, source_root=None): def _row_owned_prefill_arguments(command): - """Select eager prefill and the replicated Engram projection on the pinned profile.""" + """Keep prefill eager and capture uniform decode on the pinned profile.""" command = list(command) - for flag in ("--compilation-config", "--max-cudagraph-capture-size"): - index = command.index(flag) - del command[index:index + 2] - for flag, key in (("--engram-config", "projection_tp"), - ("--speculative-config", "enable_adaptive_verification")): + for flag, overrides in ( + ("--compilation-config", {"mode": 0, "cudagraph_mode": "FULL_DECODE_ONLY"}), + ("--engram-config", {"projection_tp": False}), + ("--speculative-config", {"enable_adaptive_verification": True}), + ): index = command.index(flag) + 1 config = json.loads(command[index]) - config[key] = False + config.update(overrides) command[index] = json.dumps(config, separators=(",", ":")) context = command.index("--max-model-len") + 1 command[context] = str(min(int(command[context]), ROW_OWNED_PREFILL_CONTEXT)) - command += ["--enforce-eager", "--disable-custom-all-reduce"] + command.append("--disable-custom-all-reduce") return tuple(command) diff --git a/runtime/host/test_install_sircl.py b/runtime/host/test_install_sircl.py index a5b07740..fa8592cd 100644 --- a/runtime/host/test_install_sircl.py +++ b/runtime/host/test_install_sircl.py @@ -188,8 +188,12 @@ def test_row_owned_prefill_is_a_locked_deepseek_nccl_experiment(machine, sparks, assert (plugin.source, plugin.target, plugin.read_only) == ( saved["site"]["ranks"][rank]["repository"] + "/integrations/vllm/ds41_row_shard", "/opt/ds41_row_shard", True) - assert "--enforce-eager" in spec.command and "--disable-custom-all-reduce" in spec.command - assert "--compilation-config" not in spec.command and "--max-cudagraph-capture-size" not in spec.command + assert "--enforce-eager" not in spec.command and "--disable-custom-all-reduce" in spec.command + plain_graphs = json.loads(plain_spec.command[plain_spec.command.index("--compilation-config") + 1]) + graphs = json.loads(spec.command[spec.command.index("--compilation-config") + 1]) + assert plain_graphs["cudagraph_mode"] == "FULL_AND_PIECEWISE" + assert graphs == {**plain_graphs, "mode": 0, "cudagraph_mode": "FULL_DECODE_ONLY"} + assert spec.command[spec.command.index("--max-cudagraph-capture-size") + 1] == "96" assert ("--headless" in spec.command) == bool(rank) assert serving.profile_value(spec.command, "context_length") == 262144 batch_tokens = spec.command.index("--max-num-batched-tokens") + 1 @@ -197,7 +201,7 @@ def test_row_owned_prefill_is_a_locked_deepseek_nccl_experiment(machine, sparks, engram = json.loads(spec.command[spec.command.index("--engram-config") + 1]) assert engram == {"table_memory": "disk", "disk_resident_scales": True, "projection_tp": False} draft = json.loads(spec.command[spec.command.index("--speculative-config") + 1]) - assert draft["num_speculative_tokens"] == 5 and draft["enable_adaptive_verification"] is False + assert draft["num_speculative_tokens"] == 5 and draft["enable_adaptive_verification"] is True # A shareable template repeats the install command that stages the plugin. output = tmp_path / "template.zip" From f5813a997d41e9f3845aa6794f1d54df4f59c378 Mon Sep 17 00:00:00 2001 From: FujitsuPolycom <87842395+FujitsuPolycom@users.noreply.github.com> Date: Thu, 19 Nov 2026 21:18:43 -0600 Subject: [PATCH 3/7] Validate DeepSeek row-owned prefill on native SIRCL --- docs/operations/install-reference.md | 2 +- integrations/vllm/ds41_row_shard/README.md | 16 ++-- performance/enhancements.json | 15 ++-- performance/enhancements.md | 11 +-- .../row-owned-sircl-path4-20261119.jsonl | 25 ++++++ .../row-owned-sircl-path4-20261119.md | 76 +++++++++++++++++++ .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- runtime/common/installer.py | 4 +- runtime/common/serving.py | 6 +- runtime/host/test_install_sircl.py | 40 +++++++--- 52 files changed, 200 insertions(+), 81 deletions(-) create mode 100644 performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.jsonl create mode 100644 performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md diff --git a/docs/operations/install-reference.md b/docs/operations/install-reference.md index c2194f07..155ad246 100644 --- a/docs/operations/install-reference.md +++ b/docs/operations/install-reference.md @@ -822,7 +822,7 @@ flag, the profile's value applies. | `--max-concurrency N` | `--max-num-seqs` | requests served at the same time | | `--kv-cache-gib N` | `--kv-cache-memory-bytes` | GiB of KV cache on each Spark, at most a tenth above the profile's value | | `--save-cpu` | vLLM's shared-memory reader window (container variable `SPARKRING_SHM_BUSY_LOOP_S`) | a switch: readers poll 2 ms after a read instead of one second | -| `--row-owned-prefill` | Eager prefill with replicated Engram projection and decode-only CUDA graphs | experimental [DeepSeek V4.1-Flash-1017 on a four-Spark NCCL cycle](../../integrations/vllm/ds41_row_shard/README.md#install-on-a-four-spark-cycle), via `sparkring install` | +| `--row-owned-prefill` | Eager prefill with replicated Engram projection and decode-only CUDA graphs | experimental [DeepSeek V4.1-Flash-1017 on a four-Spark SIRCL path](../../integrations/vllm/ds41_row_shard/README.md#install-on-a-four-spark-sircl-path), via `sparkring install` | | `--reasoning-effort LEVEL` | the model's default effort level, in `--default-chat-template-kwargs` on Node A | one of the model's [levels](#thinking) | | `--thinking off` | the model's default thinking, in `--default-chat-template-kwargs` on Node A | thinking stays off unless a request turns it on | | `--api-port N` | `--port` | the TCP port of the model's API, 1024 to 65535 ([API endpoint](#api-endpoint)) | diff --git a/integrations/vllm/ds41_row_shard/README.md b/integrations/vllm/ds41_row_shard/README.md index 84eb89ea..7eaa12f0 100644 --- a/integrations/vllm/ds41_row_shard/README.md +++ b/integrations/vllm/ds41_row_shard/README.md @@ -24,14 +24,13 @@ With a column-parallel projection, the input rows still need to match on all ranks for the output gather. The plugin preserves the full-row Engram reduction and projection for that configuration. -## Install on a four-Spark cycle +## Install on a four-Spark SIRCL path -On a directly cabled four-Spark cycle that SparkRing has set up, review the -deployment with: +Review the deployment on a four-Spark path with a recorded SIRCL fabric. ```sh sudo sparkring install --profile deepseek-v41-flash-tp4 --checkpoint 1017 \ - --image dev-20261013-dcp2prefill-status038-sircl-tp6 --transport nccl \ + --image dev-20261013-dcp2prefill-status038-sircl-tp6 --transport sircl --nccl never \ --row-owned-prefill --plan ``` @@ -44,12 +43,9 @@ context limit. Use `--context-length` for a smaller limit. The installer enables compact routing, full-head local-query attention, -narrow KV gathers, and packed compressor projections. At 8K chunks, these -settings cleared 6,000 prompt tokens/s on median at all three tested -prompt lengths with decode-only graphs enabled. -Full-head prefill holds additional weights per rank. [Four-Spark cycle record](../../../performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md) -The install planner has offline coverage. Hardware validation of the install -path and sustained decode is pending. +narrow KV gathers, and packed compressor projections. Full-head prefill +holds additional weights per rank. The SIRCL hardware trial used manual +containers. The installer plan has offline coverage. [SIRCL trial](../../../performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md) ### Configure a development container diff --git a/performance/enhancements.json b/performance/enhancements.json index e43e3485..79c772e7 100644 --- a/performance/enhancements.json +++ b/performance/enhancements.json @@ -144,7 +144,7 @@ "short_id": "3cc9a81fd344", "parent": "dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036", "transports": ["prepared", "sircl", "libsircl"], - "description": "Installer image of release 2026.10.4 with CUDA 13.4.2, NCCL 2.32.3, and runtime-status 0.3.8. The DeepSeek V4.1 row-owned prefill experiment pins this image and selects NCCL over RoCE.", + "description": "Installer image of release 2026.10.4 with CUDA 13.4.2, NCCL 2.32.3, and runtime-status 0.3.8. The DeepSeek V4.1 row-owned prefill experiment pins this image and uses native SIRCL.", "evidence": ["runtime/releases/dev-20261013-dcp2prefill-status038-sircl-tp6/README.md", "docs/operations/images.md#2026104-installer-image"] }, "shared-2026.09.3": { @@ -1800,17 +1800,19 @@ { "id": "ds41-row-owned-prefill", "title": "DeepSeek V4.1 row-owned prefill and distributed indexer scoring", - "description": "On a directly cabled four-Spark NCCL cycle, each rank keeps its encoder residual rows and receives their Engram lookup rows by reduce-scatter. The vLLM plugin distributes native indexer score and select tiles for eligible encoder layers and gathers the selected top-k rows in token order. Full-head prefill plans compute attention on owned query rows, gather narrow KV and compressor projections, and exchange compact expert routes. The pinned installer uses 8,192-token prefill chunks.", + "description": "On a four-Spark SIRCL path, each rank keeps its encoder residual rows and receives their Engram lookup rows by reduce-scatter. The vLLM plugin distributes native indexer score and select tiles for eligible encoder layers and gathers the selected top-k rows in token order. Full-head prefill plans compute attention on owned query rows, gather narrow KV and compressor projections, and exchange compact expert routes. The pinned installer uses 8,192-token prefill chunks.", "category": "vllm-plugin", "sides": ["prefill"], "models": [ {"name": "DeepSeek-V4.1-Flash", "checkpoints": ["deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e1088993b9b82de08f59de5be5a34e42170"]} ], "parallelism": {"supported": [{"tp": [4], "dcp": [1]}]}, - "enable": {"launcher": "sudo sparkring install --profile deepseek-v41-flash-tp4 --checkpoint 1017 --image dev-20261013-dcp2prefill-status038-sircl-tp6 --transport nccl --row-owned-prefill"}, + "enable": {"launcher": "sudo sparkring install --profile deepseek-v41-flash-tp4 --checkpoint 1017 --image dev-20261013-dcp2prefill-status038-sircl-tp6 --transport sircl --nccl never --row-owned-prefill"}, "detect": [ {"image": ["dev-20261013-dcp2prefill-status038-sircl-tp6"]}, {"env": "VLLM_PLUGINS", "has_item": "ds41_row_shard"}, + {"env": "VLLM_PLUGINS", "has_item": "sircl"}, + {"env": "SIRCL_NCCL", "equals": "never"}, {"env": "DS41_ROW_SHARD_PREFILL", "equals": "1"}, {"env": "DS41_ROW_SHARD_INDEXER", "equals": "1"}, {"env": "DS41_ROW_SHARD_COMPACT_ROUTES", "equals": "1"}, @@ -1824,12 +1826,13 @@ ], "provided_by": {"images": ["dev-20261013-dcp2prefill-status038-sircl-tp6"]}, "status": "research-only", - "gain": {"percent": 17.0, "summary": "Median 128K cold prefill rose from 5,234 to 6,124 tok/s with full-head attention, compact routes and packed projections, both at 8K chunks on one NCCL cycle"}, + "gain": {"percent": null, "summary": "SIRCL path-4 medians were 6,018 / 5,917 / 5,786 tok/s at 16K / 64K / 128K with 8K chunks"}, "measurements": [ {"image": "dev-20261013-dcp2prefill-status038-sircl-tp6", "tp": 4, "dcp": 1, "streams": "1", "context": "16K, 64K, 128K", "checkpoint": "deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10", "result": "Three cold requests per length on one four-Spark NCCL cycle with eager execution. Median prompt tok/s at 16K / 64K / 128K were 5,445 / 5,361 / 5,234 with distributed scoring and 6,334 / 6,250 / 6,124 with full-head local-query attention, compact routes and packed projections. All requests used 8K prefill chunks.", "evidence": "performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md"}, - {"image": "dev-20261013-dcp2prefill-status038-sircl-tp6", "tp": 4, "dcp": 1, "streams": "1", "context": "16K, 64K, 128K", "checkpoint": "deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10", "result": "With decode-only graphs and adaptive verification, three cold samples per length gave medians of 6,290 / 6,149 / 6,027 prompt tok/s at 16K / 64K / 128K. Three single-request runs of one short prompt at temperature zero gave median 71.50 output tok/s after the first token against 18.16 in the eager baseline.", "evidence": "performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md#decode-only-graph-trial"} + {"image": "dev-20261013-dcp2prefill-status038-sircl-tp6", "tp": 4, "dcp": 1, "streams": "1", "context": "16K, 64K, 128K", "checkpoint": "deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10", "result": "On the same NCCL cycle, with decode-only graphs and adaptive verification, three cold samples per length gave medians of 6,290 / 6,149 / 6,027 prompt tok/s at 16K / 64K / 128K. Three single-request runs of one short prompt at temperature zero gave median 71.50 output tok/s after the first token against 18.16 in the eager baseline.", "evidence": "performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md#decode-only-graph-trial"}, + {"image": "dev-20261013-dcp2prefill-status038-sircl-tp6", "tp": 4, "dcp": 1, "streams": "1", "context": "16K, 64K, 128K", "checkpoint": "deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10", "result": "Native SIRCL path-4 with NCCL disabled, decode-only graphs and adaptive DSpark5. Median cold prefill was 6,018 / 5,917 / 5,786 tok/s at 16K / 64K / 128K. Median short greedy decode was 77.60 tok/s after the first token. All medians have three samples", "evidence": "performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md"} ], - "evidence": ["performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md", "integrations/vllm/ds41_row_shard/README.md"], + "evidence": ["performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md", "performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md", "integrations/vllm/ds41_row_shard/README.md"], "profiles": [] }, { diff --git a/performance/enhancements.md b/performance/enhancements.md index b138e1b7..4027c058 100644 --- a/performance/enhancements.md +++ b/performance/enhancements.md @@ -31,7 +31,7 @@ An entry carried by an image is carried by the images built on it. | SIRCL 0.3.2, libsircl and GLM-5.3 plugin image (1a8c1035)
`dev-20261009-kraken-csf-sircl032-libsircl-plugins` | `1a8c10354eb0` | Kraken CSF sources | sircl, prepared, libsircl | The Kraken CSF sources (the composition of image 816c6d6a) with a SIRCL 0.3.2 layer (native ABI 9), libsircl 0.6.0 built from spark_transport/libsircl tree dbf36074 (fail-stop, NCCL API 22705) and the GLM-5.3 plugin layer with the vLLM general plugins glm_dsa_indexer_split and glm53full_speedups 1.1.0 and glm_dcp_decode_comm 2.0.1; SIRCL's pinned vLLM build sparkring-kraken-beta-20261007-bc9ea774; its v3 lock lists 13 profiles. Built on one Spark and loaded on the others, not published; release 2026.10.2's installer measurements ran on it. Every entry that image 27e9f75c carries, it carries too, and its SIRCL 0.3.2 sessions take the measured cycle-4 row of the installing package's default tuning table | | 2026.10.2
[`dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036`](../runtime/releases/dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036/release.json) | `d52737a109e0` | Kraken CSF sources | sircl, prepared, libsircl | Installer image of release 2026.10.2: the SIRCL 0.3.2 layer of image 1a8c10354eb0, libsircl 0.6.0 built from spark_transport/libsircl tree 030419b8 (fail-stop, NCCL API 22705, communicators created on the current device when no context is current), the GLM-5.3 plugin layer of the same sources as image 1a8c10354eb0's and runtime-status 0.3.6; its v3 lock lists 13 profiles. Every entry that image 1a8c10354eb0 carries, it carries too | | SparkCache layer image (e1607979)
`dev-20261010-sparkcache-gab86b70-plugins-status036` | `e1607979b7f0` | 2026.10.2 | sircl, prepared, libsircl | Release 2026.10.2's image with the derived layer sparkcache-gab86b70, which adds one file, SparkCache's connector-job lease contract vllm-connector-jobs-gab86b70.json for that image's vLLM, and restates three SparkCache files unchanged. Built on one Spark as sparkring:sparkcache-gab86b70 and present on all eight Sparks of the ring of eight, not published; its lock, the only one that lists glm53-flash-nvfp4-sparkcache-tp2 and glm53-flash-nvfp4-sparkcache-tp4, is not in the repository. Every entry that 2026.10.2 carries, it carries too | -| 2026.10.4
[`dev-20261013-dcp2prefill-status038-sircl-tp6`](../runtime/releases/dev-20261013-dcp2prefill-status038-sircl-tp6/release.json) | `3cc9a81fd344` | 2026.10.2 | prepared, sircl, libsircl | Installer image of release 2026.10.4 with CUDA 13.4.2, NCCL 2.32.3, and runtime-status 0.3.8. The DeepSeek V4.1 row-owned prefill experiment pins this image and selects NCCL over RoCE. | +| 2026.10.4
[`dev-20261013-dcp2prefill-status038-sircl-tp6`](../runtime/releases/dev-20261013-dcp2prefill-status038-sircl-tp6/release.json) | `3cc9a81fd344` | 2026.10.2 | prepared, sircl, libsircl | Installer image of release 2026.10.4 with CUDA 13.4.2, NCCL 2.32.3, and runtime-status 0.3.8. The DeepSeek V4.1 row-owned prefill experiment pins this image and uses native SIRCL. | | shared 2026.09.3
[`shared-2026.09.3`](../runtime/releases/shared-2026.09.3/release.json) | `bc16a9819d85` | — | prepared | Shared serving image of the manual-setup and SparkCache profiles; carries SparkCache and its native cache libraries | ## GLM-5.3-Flash @@ -136,7 +136,6 @@ Measured without a gain, not adopted: | Enhancement | Side | TP | How to enable | Gain | Status | |---|---|---|---|---|---| | [DSpark adaptive verification](#ds41-dspark-adaptive-verification) | decode | 4/8 (DCP 1) | `--speculative-config` keys `{"method":"dspark","num_speculative_tokens":5,"rejection_sample_method":"block","enable_adaptive_verification":true}` | TP4, temperature 1.0: 130.5 / 184.6 / 252.9 against 108.6 / 142.5 / 207.8 tok/s at 4 / 8 / 16 streams with greedy drafting (+20-30 %); with probabilistic drafting +26-37 % | implemented; from 2026.10.0, 2026.10.1 | -| [DeepSeek V4.1 row-owned prefill and distributed indexer scoring](#ds41-row-owned-prefill) (DeepSeek-V4.1-Flash-1017@1bae0e1088993b9b82de08f59de5be5a34e42170) | prefill | 4 (DCP 1) | sudo sparkring install --profile deepseek-v41-flash-tp4 --checkpoint 1017 --image dev-20261013-dcp2prefill-status038-sircl-tp6 --transport nccl --row-owned-prefill | Median 128K cold prefill rose from 5,234 to 6,124 tok/s with full-head attention, compact routes and packed projections, both at 8K chunks on one NCCL cycle | research-only; from 2026.10.4 | | [SIRCL ring sessions with NCCL off](#sircl-transport) | decode | 2/4/8 | sudo sparkring install --profile PROFILE --image-lock LOCK, with an image lock (v3) whose image carries the SIRCL layer and a fabric document that lists sircl; NCCL stays off unless --nccl auto | TP4 on a ring of four, one start per transport: decode tok/s with stock NCCL 2.32.3, or with NCCL and the net-sircl network plugin, a median 0.90 of the first SIRCL start's and 0.93 of a second's (SIRCL +8 % against the second); engine steps/s a median 10 % lower; prefill equal | research-only; from SIRCL 0.2.0 image (54af97d9), SIRCL 0.3.0 and libsircl image (816c6d6a), SIRCL 0.3.1, libsircl and GLM-5.3 plugin image (27e9f75c), SIRCL 0.3.2, libsircl and GLM-5.3 plugin image (1a8c1035), 2026.10.2 | | [NCCL on all four RoCE functions](#nccl-extended-ipv4-gids) | prefill | 2/4 | `NCCL_IB_EXTENDED_IPV4_GIDS=1` | TP4: prefill 4-9 % faster from 16K to 128K than with it off | implemented; from 2026.10.0, 2026.10.1 | | [Engram projection tensor parallelism](#ds41-engram-projection-tp) | decode, memory | 4 (DCP 1) | `--engram-config {"table_memory":"disk","disk_resident_scales":true,"projection_tp":true}` | TP4, llm-inference-bench defaults (the server's default temperature): engine steps/s +5.5 % at one stream and +12 % at eight; output tok/s +4-7 % at 1-8 streams and -2 to +2 % at 16; prefill -1 to -2 % | implemented; from 2026.10.0, 2026.10.1, 2026.10.2 | @@ -148,6 +147,7 @@ Measured without a gain, not adopted: | [B12X selection-cache reconciliation](#b12x-selection-cache-reconciliation) | startup | 2/4 | on in every image that carries it; nothing to set | restart healthy after 200-225 s instead of 652-741 s (DeepSeek-V4.1-Flash TP4) | implemented; from 2026.10.0, 2026.10.1 | | [Engram tables read from disk](#ds41-engram-disk-tables) | memory | any | `--engram-config {"table_memory":"disk","disk_resident_scales":true}` | keeps 189 GiB of tables out of GPU memory | implemented; from 2026.10.0, 2026.10.1 | | [TCP store without libuv at TP8](#ds41-no-libuv-store) | startup | 8 | `USE_LIBUV=0` | fixed a TP8 startup crash; startup 22 -> 5 min | research-only; any image | +| [DeepSeek V4.1 row-owned prefill and distributed indexer scoring](#ds41-row-owned-prefill) (DeepSeek-V4.1-Flash-1017@1bae0e1088993b9b82de08f59de5be5a34e42170) | prefill | 4 (DCP 1) | sudo sparkring install --profile deepseek-v41-flash-tp4 --checkpoint 1017 --image dev-20261013-dcp2prefill-status038-sircl-tp6 --transport sircl --nccl never --row-owned-prefill | SIRCL path-4 medians were 6,018 / 5,917 / 5,786 tok/s at 16K / 64K / 128K with 8K chunks | research-only; from 2026.10.4 | | [Split fused attention at TP8](#ds41-split-fused-attention) | decode | 8 (DCP 1) | no implementation in SparkRing | -0.7 ms per decode step | research-only; needs a port | | [GPU SM clock locked at 2,418 MHz](#host-sm-clock-lock) | decode | any | host: sudo nvidia-smi -lgc 2418,2418 on every Spark of the deployment; no configuration records it: pass --enabled host-sm-clock-lock to the checker | not measured for this model | research-only; host setting | | [libsircl copy-relay broadcast](#libsircl-copy-relay-broadcast) | prefill, decode | 8 | on by default in libsircl 0.7.0 for broadcasts from SIRCL_BROADCAST_MIN_BYTES (1 MiB) where the session's link area is on; SIRCL_BROADCAST_SCHEME=scatter selects the scatter-then-all-gather scheme instead | collective benchmark only, not measured in serving: on the cycle of eight from a chain-end root, 24.5 GB/s bus bandwidth at 256 MiB and at or above NVIDIA NCCL 2.32.3 from 2 MiB; from the chain's middle about half of that | research-only; needs a port | @@ -1037,15 +1037,16 @@ Measured without a gain, not adopted: ### `ds41-row-owned-prefill` -**DeepSeek V4.1 row-owned prefill and distributed indexer scoring.** On a directly cabled four-Spark NCCL cycle, each rank keeps its encoder residual rows and receives their Engram lookup rows by reduce-scatter. The vLLM plugin distributes native indexer score and select tiles for eligible encoder layers and gathers the selected top-k rows in token order. Full-head prefill plans compute attention on owned query rows, gather narrow KV and compressor projections, and exchange compact expert routes. The pinned installer uses 8,192-token prefill chunks. +**DeepSeek V4.1 row-owned prefill and distributed indexer scoring.** On a four-Spark SIRCL path, each rank keeps its encoder residual rows and receives their Engram lookup rows by reduce-scatter. The vLLM plugin distributes native indexer score and select tiles for eligible encoder layers and gathers the selected top-k rows in token order. Full-head prefill plans compute attention on owned query rows, gather narrow KV and compressor projections, and exchange compact expert routes. The pinned installer uses 8,192-token prefill chunks. - Category: vLLM general plugin, image feature hook or cache connector. - Models: DeepSeek-V4.1-Flash. Sizes: 4 (DCP 1). - Availability: from 2026.10.4. - Profiles that turn it on: none. - Measured (TP4/DCP1, 1 streams, context 16K, 64K, 128K, deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10, image 2026.10.4): Three cold requests per length on one four-Spark NCCL cycle with eager execution. Median prompt tok/s at 16K / 64K / 128K were 5,445 / 5,361 / 5,234 with distributed scoring and 6,334 / 6,250 / 6,124 with full-head local-query attention, compact routes and packed projections. All requests used 8K prefill chunks.. Evidence: [performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md](records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md). -- Measured (TP4/DCP1, 1 streams, context 16K, 64K, 128K, deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10, image 2026.10.4): With decode-only graphs and adaptive verification, three cold samples per length gave medians of 6,290 / 6,149 / 6,027 prompt tok/s at 16K / 64K / 128K. Three single-request runs of one short prompt at temperature zero gave median 71.50 output tok/s after the first token against 18.16 in the eager baseline.. Evidence: [performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md](records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md). -- Evidence: [performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md](records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md); [integrations/vllm/ds41_row_shard/README.md](../integrations/vllm/ds41_row_shard/README.md). +- Measured (TP4/DCP1, 1 streams, context 16K, 64K, 128K, deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10, image 2026.10.4): On the same NCCL cycle, with decode-only graphs and adaptive verification, three cold samples per length gave medians of 6,290 / 6,149 / 6,027 prompt tok/s at 16K / 64K / 128K. Three single-request runs of one short prompt at temperature zero gave median 71.50 output tok/s after the first token against 18.16 in the eager baseline.. Evidence: [performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md](records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md). +- Measured (TP4/DCP1, 1 streams, context 16K, 64K, 128K, deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10, image 2026.10.4): Native SIRCL path-4 with NCCL disabled, decode-only graphs and adaptive DSpark5. Median cold prefill was 6,018 / 5,917 / 5,786 tok/s at 16K / 64K / 128K. Median short greedy decode was 77.60 tok/s after the first token. All medians have three samples. Evidence: [performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md](records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md). +- Evidence: [performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md](records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md); [performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md](records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md); [integrations/vllm/ds41_row_shard/README.md](../integrations/vllm/ds41_row_shard/README.md). ### `ds41-split-fused-attention` diff --git a/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.jsonl b/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.jsonl new file mode 100644 index 00000000..12f71b6f --- /dev/null +++ b/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.jsonl @@ -0,0 +1,25 @@ +{"case": "cold_prefill", "prompt_tokens": 16384, "tok_s": 6016.09} +{"case": "cold_prefill", "prompt_tokens": 65536, "tok_s": 5916.06} +{"case": "cold_prefill", "prompt_tokens": 131072, "tok_s": 5796.17} +{"case": "cold_prefill", "prompt_tokens": 16384, "tok_s": 6019.82} +{"case": "cold_prefill", "prompt_tokens": 65536, "tok_s": 5916.96} +{"case": "cold_prefill", "prompt_tokens": 131072, "tok_s": 5786.05} +{"case": "cold_prefill", "prompt_tokens": 16384, "tok_s": 6017.88} +{"case": "cold_prefill", "prompt_tokens": 65536, "tok_s": 5920.16} +{"case": "cold_prefill", "prompt_tokens": 131072, "tok_s": 5781.23} +{"case": "short_greedy_decode", "output_tokens": 384, "tok_s": 54.05} +{"case": "short_greedy_decode", "output_tokens": 384, "tok_s": 84.91} +{"case": "short_greedy_decode", "output_tokens": 384, "tok_s": 77.6} +{"suite": "decode_workload_probe", "case": "short_t0", "temperature": 0, "prompt_tokens": 11, "cached": 0, "ttft_s": 0.2, "decode_tok_s": 120.43, "end_to_end_tok_s": 113.59, "accepted_pct": 87.0, "accepted_per_step": 4.12} +{"suite": "decode_workload_probe", "case": "short_t1", "temperature": 1, "prompt_tokens": 11, "cached": 0, "ttft_s": 0.206, "decode_tok_s": 81.56, "end_to_end_tok_s": 78.34, "accepted_pct": 53.7, "accepted_per_step": 2.32} +{"suite": "decode_workload_probe", "case": "8k_t0", "temperature": 0, "prompt_tokens": 8192, "cached": 0, "ttft_s": 1.363, "decode_tok_s": 103.39, "end_to_end_tok_s": 75.77, "accepted_pct": 75.1, "accepted_per_step": 3.33} +{"suite": "decode_workload_probe", "case": "8k_t1", "temperature": 1, "prompt_tokens": 8192, "cached": 0, "ttft_s": 1.363, "decode_tok_s": 72.4, "end_to_end_tok_s": 57.72, "accepted_pct": 47.0, "accepted_per_step": 1.83} +{"suite": "decode_workload_probe", "case": "64k_t1", "temperature": 1, "prompt_tokens": 65536, "cached": 0, "ttft_s": 11.095, "decode_tok_s": 67.15, "end_to_end_tok_s": 22.86, "accepted_pct": 41.9, "accepted_per_step": 1.72} +{"suite": "decode_workload_probe", "case": "short_t0", "temperature": 0, "prompt_tokens": 11, "cached": 0, "ttft_s": 0.206, "decode_tok_s": 78.31, "end_to_end_tok_s": 75.34, "accepted_pct": 49.7, "accepted_per_step": 2.19} +{"suite": "decode_workload_probe", "case": "short_t1", "temperature": 1, "prompt_tokens": 11, "cached": 0, "ttft_s": 0.206, "decode_tok_s": 69.45, "end_to_end_tok_s": 67.13, "accepted_pct": 42.4, "accepted_per_step": 1.82} +{"suite": "decode_workload_probe", "case": "8k_t0", "temperature": 0, "prompt_tokens": 8192, "cached": 0, "ttft_s": 1.37, "decode_tok_s": 71.37, "end_to_end_tok_s": 57.01, "accepted_pct": 44.0, "accepted_per_step": 1.95} +{"suite": "decode_workload_probe", "case": "8k_t1", "temperature": 1, "prompt_tokens": 8192, "cached": 0, "ttft_s": 1.367, "decode_tok_s": 63.65, "end_to_end_tok_s": 52.0, "accepted_pct": 40.0, "accepted_per_step": 1.53} +{"suite": "decode_workload_probe", "case": "64k_t1", "temperature": 1, "prompt_tokens": 65536, "cached": 0, "ttft_s": 11.152, "decode_tok_s": 78.75, "end_to_end_tok_s": 23.98, "accepted_pct": 52.0, "accepted_per_step": 2.34} +{"suite": "decode_workload_probe", "output_tokens": 2048, "case": "8k_t1_2048_output", "temperature": 1, "prompt_tokens": 8192, "cached": 0, "ttft_s": 1.437, "decode_tok_s": 82.67, "end_to_end_tok_s": 78.17, "accepted_pct": 54.6, "accepted_per_step": 2.44} +{"case": "fixed_first_token_parity", "prompt_tokens": 16384, "first_token_equal": true} +{"case": "fixed_first_token_parity", "prompt_tokens": 131072, "first_token_equal": true} diff --git a/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md b/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md new file mode 100644 index 00000000..3d2ab0e8 --- /dev/null +++ b/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md @@ -0,0 +1,76 @@ +# DeepSeek V4.1 row-owned prefill on a four-Spark SIRCL path + +**Research-only.** Ring 47 served DeepSeek-V4.1-Flash-1017 with native +SIRCL, 8,192-token row-owned prefill, adaptive DSpark5, and decode-only +CUDA graphs. All four ranks reported `nccl=none`, `pynccl=skipped`, and +no NCCL decision rows for TP and EP. The launch logs showed no NCCL +communicator initialization. + +## Conditions + +Four DGX Sparks used TP4, DCP1, the existing B12X installer image +`sha256:3cc9a81fd344fe52fe9cc261b46dc051e3c3f494e51b8142846a5f854835c502`, +and checkpoint `1bae0e1088993b9b82de08f59de5be5a34e42170`. The trial +used SIRCL `path:4` with `SIRCL_NCCL=never`, two lanes per peer and the +pinned `path-4` settings for large all-reduce, all-gather and +reduce-scatter. TP and EP shared the native session. A private fabric +document described the three links in use. The shared fabric records +and host routes stayed in place. + +The launch kept the full-head query weights, compact expert routes, +narrow KV gathers, packed compressor projections, and replicated disk +Engram projection. `FULL_DECODE_ONLY` used compilation mode `NONE` and +capture sizes through 96. The context limit was 262,144 tokens. + +## Throughput + +| Measurement | Samples in run order (tok/s) | Median tok/s | +|---|---|---:| +| 16,384-token cold prefill | 6,016.09, 6,019.82, 6,017.88 | 6,017.88 | +| 65,536-token cold prefill | 5,916.06, 5,916.96, 5,920.16 | 5,916.96 | +| 131,072-token cold prefill | 5,796.17, 5,786.05, 5,781.23 | 5,786.05 | +| Short greedy decode | 54.05, 84.91, 77.60 | 77.60 | + +The concurrency-one loopback client sent exact token IDs for prefill and +measured from request submission to the first text delta. Every request +reported zero cached prompt tokens and returned one output token. Decode +used three 384-token runs of the same short prompt at temperature zero, +measured after the first token. DSpark accepted 775 of 1,603 drafted +tokens over those runs. [Sample data](row-owned-sircl-path4-20261119.jsonl) + +The 16K samples cleared 6,000 tok/s. The 64K and 128K samples remained +below that mark. The earlier [cycle trial](row-owned-full-head-ring-20261119.md#decode-only-graph-trial) +used a different transport and topology. + +## Decode workload probe + +A separate probe ran each workload twice with 384 output tokens. The +median rates distinguish decode after the first token from request +throughput including prefill. The sampled runs used temperature one and +fixed seeds. [Sample data](row-owned-sircl-path4-20261119.jsonl) + +| Prompt and temperature | Decode tok/s | End-to-end tok/s | +|---|---:|---:| +| Short, 0 | 99.37 | 94.47 | +| Short, 1 | 75.50 | 72.73 | +| 8K, 0 | 87.38 | 66.39 | +| 8K, 1 | 68.03 | 54.86 | +| 64K, 1 | 72.95 | 23.42 | + +A single cold 8K request at temperature one also completed 2,048 output +tokens at 82.67 decode tok/s and 78.17 end-to-end tok/s. + +## Serving and installer checks + +All four ranks finished graph capture. An 8,192-token cold prefill +completed. Its 8,200-token continuation reused 7,936 cached tokens and +generated eight tokens. A 16,387-token unaligned prefill completed during +a concurrent 64-token decode. The row-owned counters showed 20 local +attention layers, 17 narrow KV gathers and three packed compressor +gathers at 8,192 rows. Two fixed prompts at 16K and 128K returned the +same first tokens as the earlier cycle run. + +Hardware validation used manually staged containers. The installer +renders the same serving options with `--transport sircl --nccl never` +in its offline path-4 tests. A live installer rollout and a SIRCL +cycle-4 run remain unverified. diff --git a/profiles/deepseek-v41-flash-tp4/compose/compose.rank0.yaml b/profiles/deepseek-v41-flash-tp4/compose/compose.rank0.yaml index e3fb6ec6..cf5160d5 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/compose.rank0.yaml +++ b/profiles/deepseek-v41-flash-tp4/compose/compose.rank0.yaml @@ -149,7 +149,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/deepseek-v41-flash-f625053225d4-dba1be0a40aa labels: - io.sparkring.deployment: 4fc9c714941981aff98a407cde150cbeea8a1e414fade0ad7bbc0b23d2772281 + io.sparkring.deployment: 40359aa8ecbff0adf1350a8b5a0b137d508a1afbe58c7e365fafc9f0901a8030 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/deepseek-v41-flash-tp4/compose/compose.rank1.yaml b/profiles/deepseek-v41-flash-tp4/compose/compose.rank1.yaml index 6d0f8cd0..bb71ddc5 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/compose.rank1.yaml +++ b/profiles/deepseek-v41-flash-tp4/compose/compose.rank1.yaml @@ -150,7 +150,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/deepseek-v41-flash-f625053225d4-dba1be0a40aa labels: - io.sparkring.deployment: 4fc9c714941981aff98a407cde150cbeea8a1e414fade0ad7bbc0b23d2772281 + io.sparkring.deployment: 40359aa8ecbff0adf1350a8b5a0b137d508a1afbe58c7e365fafc9f0901a8030 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/deepseek-v41-flash-tp4/compose/compose.rank2.yaml b/profiles/deepseek-v41-flash-tp4/compose/compose.rank2.yaml index 42bd973f..28e909cf 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/compose.rank2.yaml +++ b/profiles/deepseek-v41-flash-tp4/compose/compose.rank2.yaml @@ -150,7 +150,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/deepseek-v41-flash-f625053225d4-dba1be0a40aa labels: - io.sparkring.deployment: 4fc9c714941981aff98a407cde150cbeea8a1e414fade0ad7bbc0b23d2772281 + io.sparkring.deployment: 40359aa8ecbff0adf1350a8b5a0b137d508a1afbe58c7e365fafc9f0901a8030 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/deepseek-v41-flash-tp4/compose/compose.rank3.yaml b/profiles/deepseek-v41-flash-tp4/compose/compose.rank3.yaml index 77ddbeb7..0b5dc3d7 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/compose.rank3.yaml +++ b/profiles/deepseek-v41-flash-tp4/compose/compose.rank3.yaml @@ -150,7 +150,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/deepseek-v41-flash-f625053225d4-dba1be0a40aa labels: - io.sparkring.deployment: 4fc9c714941981aff98a407cde150cbeea8a1e414fade0ad7bbc0b23d2772281 + io.sparkring.deployment: 40359aa8ecbff0adf1350a8b5a0b137d508a1afbe58c7e365fafc9f0901a8030 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/deepseek-v41-flash-tp4/compose/selection.json b/profiles/deepseek-v41-flash-tp4/compose/selection.json index 975a74d6..cdf30e7e 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/selection.json +++ b/profiles/deepseek-v41-flash-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "deepseek-v41-flash-tp4", "checkpoint": "original", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "4fc9c714941981aff98a407cde150cbeea8a1e414fade0ad7bbc0b23d2772281" + "deployment": "40359aa8ecbff0adf1350a8b5a0b137d508a1afbe58c7e365fafc9f0901a8030" } diff --git a/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank0.yaml b/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank0.yaml index 84b9b083..eea49544 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank0.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank0.yaml @@ -181,7 +181,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: b5f8e9efad9972ed04d452aa4ac9d98a3313dd4e7f8ac00ad748961f9cd0af3c + io.sparkring.deployment: 53d530eee60d6b59dc377fba4330c3a6e008d8e1a2b0a2f2bdfc2bf101868183 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank1.yaml b/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank1.yaml index c91a12a7..c38cc9bd 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank1.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank1.yaml @@ -180,7 +180,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: b5f8e9efad9972ed04d452aa4ac9d98a3313dd4e7f8ac00ad748961f9cd0af3c + io.sparkring.deployment: 53d530eee60d6b59dc377fba4330c3a6e008d8e1a2b0a2f2bdfc2bf101868183 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp2/compose/selection.json b/profiles/glm53-flash-nvfp4-spark-tp2/compose/selection.json index 30b9f83a..87ebfe39 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp2/compose/selection.json +++ b/profiles/glm53-flash-nvfp4-spark-tp2/compose/selection.json @@ -3,5 +3,5 @@ "profile": "glm53-flash-nvfp4-spark-tp2", "checkpoint": "csf", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "b5f8e9efad9972ed04d452aa4ac9d98a3313dd4e7f8ac00ad748961f9cd0af3c" + "deployment": "53d530eee60d6b59dc377fba4330c3a6e008d8e1a2b0a2f2bdfc2bf101868183" } diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank0.yaml b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank0.yaml index e58912cd..fb554240 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank0.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank0.yaml @@ -195,7 +195,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: e907b3cc481ea82de11406a220b236fce152693a8ee3f9e0e2814908032ec5e5 + io.sparkring.deployment: 9cdffee9b81a23cbb1880bc4c664d32555f2a8794352e8a66e1e6d24efb3bfc1 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank1.yaml b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank1.yaml index f6bdf8cc..495174f1 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank1.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank1.yaml @@ -194,7 +194,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: e907b3cc481ea82de11406a220b236fce152693a8ee3f9e0e2814908032ec5e5 + io.sparkring.deployment: 9cdffee9b81a23cbb1880bc4c664d32555f2a8794352e8a66e1e6d24efb3bfc1 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank2.yaml b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank2.yaml index 8854d749..99a227e7 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank2.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank2.yaml @@ -194,7 +194,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: e907b3cc481ea82de11406a220b236fce152693a8ee3f9e0e2814908032ec5e5 + io.sparkring.deployment: 9cdffee9b81a23cbb1880bc4c664d32555f2a8794352e8a66e1e6d24efb3bfc1 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank3.yaml b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank3.yaml index 15a0e157..9ec00dd7 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank3.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank3.yaml @@ -194,7 +194,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: e907b3cc481ea82de11406a220b236fce152693a8ee3f9e0e2814908032ec5e5 + io.sparkring.deployment: 9cdffee9b81a23cbb1880bc4c664d32555f2a8794352e8a66e1e6d24efb3bfc1 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/selection.json b/profiles/glm53-flash-nvfp4-spark-tp4/compose/selection.json index 8fb842f2..29b00f78 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/selection.json +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "glm53-flash-nvfp4-spark-tp4", "checkpoint": "csf", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "e907b3cc481ea82de11406a220b236fce152693a8ee3f9e0e2814908032ec5e5" + "deployment": "9cdffee9b81a23cbb1880bc4c664d32555f2a8794352e8a66e1e6d24efb3bfc1" } diff --git a/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank0.yaml b/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank0.yaml index 0264e22d..dac99b74 100644 --- a/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank0.yaml +++ b/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank0.yaml @@ -149,7 +149,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: bf112dabbc79aa277bf471a49ede954118676bb92e6ddcb05fa83c71b6028c72 + io.sparkring.deployment: 51593dd4bc4d84304332eb5ad25c80bbeeed258a2f7ba829dc326f0365f9b08e io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank1.yaml b/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank1.yaml index 5cc856ae..c78741f2 100644 --- a/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank1.yaml +++ b/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank1.yaml @@ -150,7 +150,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: bf112dabbc79aa277bf471a49ede954118676bb92e6ddcb05fa83c71b6028c72 + io.sparkring.deployment: 51593dd4bc4d84304332eb5ad25c80bbeeed258a2f7ba829dc326f0365f9b08e io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp2/compose/selection.json b/profiles/mimo-v26-flash-mopd-tp2/compose/selection.json index 71e6f3c1..1e6fc348 100644 --- a/profiles/mimo-v26-flash-mopd-tp2/compose/selection.json +++ b/profiles/mimo-v26-flash-mopd-tp2/compose/selection.json @@ -3,5 +3,5 @@ "profile": "mimo-v26-flash-mopd-tp2", "checkpoint": null, "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "bf112dabbc79aa277bf471a49ede954118676bb92e6ddcb05fa83c71b6028c72" + "deployment": "51593dd4bc4d84304332eb5ad25c80bbeeed258a2f7ba829dc326f0365f9b08e" } diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank0.yaml b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank0.yaml index 71112e38..873acf90 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank0.yaml +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank0.yaml @@ -163,7 +163,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 4a5515d5ed4a3a34a5c4935130bbf1a2f89c7c6cc8aa6a75c07b77023caa36a5 + io.sparkring.deployment: 1c8092e8928152772a6d0f49a9add250745b1e2ac29ca933f3511f63705a8ff7 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank1.yaml b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank1.yaml index df3a9e2e..137ca415 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank1.yaml +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank1.yaml @@ -164,7 +164,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 4a5515d5ed4a3a34a5c4935130bbf1a2f89c7c6cc8aa6a75c07b77023caa36a5 + io.sparkring.deployment: 1c8092e8928152772a6d0f49a9add250745b1e2ac29ca933f3511f63705a8ff7 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank2.yaml b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank2.yaml index 83be33e5..fbc5033b 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank2.yaml +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank2.yaml @@ -164,7 +164,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 4a5515d5ed4a3a34a5c4935130bbf1a2f89c7c6cc8aa6a75c07b77023caa36a5 + io.sparkring.deployment: 1c8092e8928152772a6d0f49a9add250745b1e2ac29ca933f3511f63705a8ff7 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank3.yaml b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank3.yaml index fb095466..b9e0c57f 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank3.yaml +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank3.yaml @@ -164,7 +164,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 4a5515d5ed4a3a34a5c4935130bbf1a2f89c7c6cc8aa6a75c07b77023caa36a5 + io.sparkring.deployment: 1c8092e8928152772a6d0f49a9add250745b1e2ac29ca933f3511f63705a8ff7 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/selection.json b/profiles/mimo-v26-flash-mopd-tp4/compose/selection.json index 1b5deb77..36e87bb2 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/selection.json +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "mimo-v26-flash-mopd-tp4", "checkpoint": null, "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "4a5515d5ed4a3a34a5c4935130bbf1a2f89c7c6cc8aa6a75c07b77023caa36a5" + "deployment": "1c8092e8928152772a6d0f49a9add250745b1e2ac29ca933f3511f63705a8ff7" } diff --git a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank0.yaml b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank0.yaml index 13c8be1c..f25001f0 100644 --- a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank0.yaml +++ b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank0.yaml @@ -170,7 +170,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 6e46642c75cdf84b8fa7d99de505c930d9c6a7f161e41daa7d2bb896a9bc1996 + io.sparkring.deployment: d231bfa9b7e1d32841c668db45c49e1f44a622ffa46a0dd303753dd2437e2787 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank1.yaml b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank1.yaml index 75fd3c27..457de9cc 100644 --- a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank1.yaml +++ b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank1.yaml @@ -171,7 +171,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 6e46642c75cdf84b8fa7d99de505c930d9c6a7f161e41daa7d2bb896a9bc1996 + io.sparkring.deployment: d231bfa9b7e1d32841c668db45c49e1f44a622ffa46a0dd303753dd2437e2787 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank2.yaml b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank2.yaml index 31515b41..5b173638 100644 --- a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank2.yaml +++ b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank2.yaml @@ -171,7 +171,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 6e46642c75cdf84b8fa7d99de505c930d9c6a7f161e41daa7d2bb896a9bc1996 + io.sparkring.deployment: d231bfa9b7e1d32841c668db45c49e1f44a622ffa46a0dd303753dd2437e2787 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank3.yaml b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank3.yaml index 8f4f2ef5..ec33de7f 100644 --- a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank3.yaml +++ b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank3.yaml @@ -171,7 +171,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 6e46642c75cdf84b8fa7d99de505c930d9c6a7f161e41daa7d2bb896a9bc1996 + io.sparkring.deployment: d231bfa9b7e1d32841c668db45c49e1f44a622ffa46a0dd303753dd2437e2787 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank0.yaml b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank0.yaml index a23b5da5..4df1a395 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank0.yaml +++ b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank0.yaml @@ -176,7 +176,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-60215d26cf5e labels: - io.sparkring.deployment: f2eae8def378d9ba1102d463086e3f3f5f9a39a43141d2f9aef35bfcfa31e981 + io.sparkring.deployment: 93cf687f0cb689bc5b364ca59bc10713a4fcea9fda3d944b06719a04568946f3 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank1.yaml b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank1.yaml index 5e550dda..80baac94 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank1.yaml +++ b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank1.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-60215d26cf5e labels: - io.sparkring.deployment: f2eae8def378d9ba1102d463086e3f3f5f9a39a43141d2f9aef35bfcfa31e981 + io.sparkring.deployment: 93cf687f0cb689bc5b364ca59bc10713a4fcea9fda3d944b06719a04568946f3 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank2.yaml b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank2.yaml index 3befc9d4..89da5007 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank2.yaml +++ b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank2.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-60215d26cf5e labels: - io.sparkring.deployment: f2eae8def378d9ba1102d463086e3f3f5f9a39a43141d2f9aef35bfcfa31e981 + io.sparkring.deployment: 93cf687f0cb689bc5b364ca59bc10713a4fcea9fda3d944b06719a04568946f3 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank3.yaml b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank3.yaml index 6c28c3a0..fb079509 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank3.yaml +++ b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank3.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-60215d26cf5e labels: - io.sparkring.deployment: f2eae8def378d9ba1102d463086e3f3f5f9a39a43141d2f9aef35bfcfa31e981 + io.sparkring.deployment: 93cf687f0cb689bc5b364ca59bc10713a4fcea9fda3d944b06719a04568946f3 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/selection.json b/profiles/qwen38-flash-next-qad-tp4/compose/selection.json index 0e325c65..849cab01 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/selection.json +++ b/profiles/qwen38-flash-next-qad-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "qwen38-flash-next-qad-tp4", "checkpoint": "qad-step5500-ple1000", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "f2eae8def378d9ba1102d463086e3f3f5f9a39a43141d2f9aef35bfcfa31e981" + "deployment": "93cf687f0cb689bc5b364ca59bc10713a4fcea9fda3d944b06719a04568946f3" } diff --git a/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank0.yaml b/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank0.yaml index 9fc5e77d..99d61989 100644 --- a/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank0.yaml +++ b/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank0.yaml @@ -147,7 +147,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 0f36f4718a1f6a42cb528b53f45d6f89e11b27b786339f050544e053d85da5be + io.sparkring.deployment: 853e9a9743492db4e8cca2e83132b241866a04c0b17585f895b7900462443db5 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank1.yaml b/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank1.yaml index 2c1eb663..c5c1ca4f 100644 --- a/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank1.yaml +++ b/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank1.yaml @@ -148,7 +148,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 0f36f4718a1f6a42cb528b53f45d6f89e11b27b786339f050544e053d85da5be + io.sparkring.deployment: 853e9a9743492db4e8cca2e83132b241866a04c0b17585f895b7900462443db5 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-tp2/compose/compose.rank0.yaml b/profiles/qwen38-flash-next-tp2/compose/compose.rank0.yaml index 78b53a52..9aab44ba 100644 --- a/profiles/qwen38-flash-next-tp2/compose/compose.rank0.yaml +++ b/profiles/qwen38-flash-next-tp2/compose/compose.rank0.yaml @@ -160,7 +160,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-dc5b8ab2fa14 labels: - io.sparkring.deployment: 8d899daffc1f22567eca16a342a047efcd9bdc83915048f9a4c1a626b99c479d + io.sparkring.deployment: 6a243dc9219b8f87d10fa7ef20aad040c853bdc92fd3f599d196aa9963e2732b io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-tp2/compose/compose.rank1.yaml b/profiles/qwen38-flash-next-tp2/compose/compose.rank1.yaml index 2a9e7e2a..0d6d3283 100644 --- a/profiles/qwen38-flash-next-tp2/compose/compose.rank1.yaml +++ b/profiles/qwen38-flash-next-tp2/compose/compose.rank1.yaml @@ -161,7 +161,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-dc5b8ab2fa14 labels: - io.sparkring.deployment: 8d899daffc1f22567eca16a342a047efcd9bdc83915048f9a4c1a626b99c479d + io.sparkring.deployment: 6a243dc9219b8f87d10fa7ef20aad040c853bdc92fd3f599d196aa9963e2732b io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-tp2/compose/selection.json b/profiles/qwen38-flash-next-tp2/compose/selection.json index b9656766..16efc044 100644 --- a/profiles/qwen38-flash-next-tp2/compose/selection.json +++ b/profiles/qwen38-flash-next-tp2/compose/selection.json @@ -3,5 +3,5 @@ "profile": "qwen38-flash-next-tp2", "checkpoint": "csf", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "8d899daffc1f22567eca16a342a047efcd9bdc83915048f9a4c1a626b99c479d" + "deployment": "6a243dc9219b8f87d10fa7ef20aad040c853bdc92fd3f599d196aa9963e2732b" } diff --git a/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank0.yaml b/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank0.yaml index 19911b59..b88053eb 100644 --- a/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank0.yaml +++ b/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank0.yaml @@ -160,7 +160,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: 79e431a8a6ff395efbaf059ba6a198db3e912b21550a60ee9f1b91df24bc3d2c + io.sparkring.deployment: 304c7fc23b368598dbd2163fdfa39504ee3c2504889edb4962627890b99f77a6 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank1.yaml b/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank1.yaml index 7c9ef6d6..0680f6ad 100644 --- a/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank1.yaml +++ b/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank1.yaml @@ -161,7 +161,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: 79e431a8a6ff395efbaf059ba6a198db3e912b21550a60ee9f1b91df24bc3d2c + io.sparkring.deployment: 304c7fc23b368598dbd2163fdfa39504ee3c2504889edb4962627890b99f77a6 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp2/compose/selection.json b/profiles/swift15-qwen38-flash-next-tp2/compose/selection.json index c97bc846..45dad64d 100644 --- a/profiles/swift15-qwen38-flash-next-tp2/compose/selection.json +++ b/profiles/swift15-qwen38-flash-next-tp2/compose/selection.json @@ -3,5 +3,5 @@ "profile": "swift15-qwen38-flash-next-tp2", "checkpoint": null, "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "79e431a8a6ff395efbaf059ba6a198db3e912b21550a60ee9f1b91df24bc3d2c" + "deployment": "304c7fc23b368598dbd2163fdfa39504ee3c2504889edb4962627890b99f77a6" } diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank0.yaml b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank0.yaml index f687c151..b8a62ec6 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank0.yaml +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank0.yaml @@ -176,7 +176,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: d1f1bafaacca9142d2b07eed9d695051eb214f397ba6255e5247a325dcb569f7 + io.sparkring.deployment: 4a974e2db09286e9cb909bcc26f54940e37a75184941059f79e5952f23284a35 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank1.yaml b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank1.yaml index b17c2859..5ca34821 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank1.yaml +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank1.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: d1f1bafaacca9142d2b07eed9d695051eb214f397ba6255e5247a325dcb569f7 + io.sparkring.deployment: 4a974e2db09286e9cb909bcc26f54940e37a75184941059f79e5952f23284a35 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank2.yaml b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank2.yaml index 5749de80..74eb3af4 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank2.yaml +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank2.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: d1f1bafaacca9142d2b07eed9d695051eb214f397ba6255e5247a325dcb569f7 + io.sparkring.deployment: 4a974e2db09286e9cb909bcc26f54940e37a75184941059f79e5952f23284a35 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank3.yaml b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank3.yaml index ac611b41..b931930b 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank3.yaml +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank3.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: d1f1bafaacca9142d2b07eed9d695051eb214f397ba6255e5247a325dcb569f7 + io.sparkring.deployment: 4a974e2db09286e9cb909bcc26f54940e37a75184941059f79e5952f23284a35 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/selection.json b/profiles/swift15-qwen38-flash-next-tp4/compose/selection.json index 2b12bf70..edd1d562 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/selection.json +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "swift15-qwen38-flash-next-tp4", "checkpoint": null, "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "d1f1bafaacca9142d2b07eed9d695051eb214f397ba6255e5247a325dcb569f7" + "deployment": "4a974e2db09286e9cb909bcc26f54940e37a75184941059f79e5952f23284a35" } diff --git a/runtime/common/installer.py b/runtime/common/installer.py index f6cb4a50..96e330fc 100644 --- a/runtime/common/installer.py +++ b/runtime/common/installer.py @@ -819,9 +819,9 @@ def export(directory, output, *, share=False): files["profile.json"] = compose.encoded(lock["selection"]) if settings.get(serving.ROW_OWNED_PREFILL): files["README.txt"] = ( - "Configure a four-Spark cycle with sparkring setup. Then run sudo sparkring install --profile " + "Configure a four-Spark path with sparkring setup. Then run sudo sparkring install --profile " + lock["selection"]["profile"] + " --checkpoint " + lock["selection"]["target_variant"] - + " --image " + runtime["name"] + " --transport nccl" + flags + ".\n" + + " --image " + runtime["name"] + " --transport sircl --nccl never" + flags + ".\n" "The installer stages the plugin from its retained source checkout on every rank. " "The Compose files show the resulting rank settings with example paths.\n" ) diff --git a/runtime/common/serving.py b/runtime/common/serving.py index 5b481ed1..fdec8bf5 100644 --- a/runtime/common/serving.py +++ b/runtime/common/serving.py @@ -258,9 +258,9 @@ def check_row_owned_prefill(settings, model, image, transport): raise ValueError(f"{flag} requires --profile deepseek-v41-flash-tp4 --checkpoint 1017") if not image or image["image_id"] != ROW_OWNED_PREFILL_IMAGE_ID: raise ValueError(f"{flag} requires --image {ROW_OWNED_PREFILL_IMAGE}") - if (not transport or transport.get("backend") != "nccl" - or transport["group"]["shape"] != "cycle" or transport["group"]["dcp"] != 1): - raise ValueError(f"{flag} requires --transport nccl on a directly cabled four-Spark cycle") + if (not transport or transport.get("backend") != "sircl" or transport.get("nccl") != "never" + or transport["group"]["name"] != "path-4" or transport["group"]["dcp"] != 1): + raise ValueError(f"{flag} requires --transport sircl --nccl never on a four-Spark path") if settings.get("context_length", ROW_OWNED_PREFILL_CONTEXT) > ROW_OWNED_PREFILL_CONTEXT: raise ValueError(f"{flag} supports --context-length up to {ROW_OWNED_PREFILL_CONTEXT} tokens") diff --git a/runtime/host/test_install_sircl.py b/runtime/host/test_install_sircl.py index fa8592cd..9a26c3cc 100644 --- a/runtime/host/test_install_sircl.py +++ b/runtime/host/test_install_sircl.py @@ -13,8 +13,10 @@ from runtime.common import fabric_document, installer, serving from runtime.common.test_image_lock import sircl_lock -from runtime.host import colour, controller, fabric, install_workflow as flow, node, relays -from runtime.host.test_install_workflow import PROFILE, cluster, machine, sparks # noqa: F401 (pytest fixtures) +from runtime.host import colour, controller, fabric, install_workflow as flow, node, relays, topology +from runtime.host.test_appliance import nodes +from runtime.host.test_hairpin_ring import document as hairpin_document +from runtime.host.test_install_workflow import PROFILE, machine, sparks # noqa: F401 (pytest fixtures) from scripts import sparkring MARKER = {"binary": relays.MARKER_BINARY, "sha256": "ab" * 32} @@ -139,17 +141,29 @@ def test_the_nccl_transport_installs_on_a_pair_without_sircl(machine, capsys): assert json.loads(capsys.readouterr().out)["field"] == "transport" -def test_row_owned_prefill_is_a_locked_deepseek_nccl_experiment(machine, sparks, monkeypatch, capsys, tmp_path): # noqa: F811 - value = cluster(4) +def test_row_owned_prefill_is_a_locked_deepseek_sircl_experiment(machine, sparks, monkeypatch, capsys, tmp_path): # noqa: F811 + found = nodes(4) + for rank, direction in ((0, "ccw_"), (3, "cw_")): + closing_link = {port["netdev"] for role, port in topology.endpoints(found[rank]).items() + if role.startswith(direction)} + for interface in found[rank]["facts"]["interfaces"]: + if interface["name"] in closing_link: + interface["operstate"] = "DOWN" + reports = found[rank]["lldp"]["lldp"]["interface"] + found[rank]["lldp"]["lldp"]["interface"] = [row for row in reports if closing_link.isdisjoint(row)] + path = topology.build_spec(found, found[0]["node_id"]) + for rank in (1, 2): + path["nodes"][rank]["hairpin"] = hairpin_document(path, rank) + value = {"name": "test", "plan": path} node.save(controller.STATE, "cluster.json", value) monkeypatch.setattr(controller, "collect", lambda _: value["plan"]["nodes"]) - topology, _ = fabric.prepare(value["plan"], cluster="test", marker=MARKER) - (controller.STATE / "fabric.json").write_text(fabric_document.encoded(topology)) + fabric_record, _ = fabric.prepare(value["plan"], cluster="test", marker=MARKER) + (controller.STATE / "fabric.json").write_text(fabric_document.encoded(fabric_record)) sparks.mesh = lambda rank: {"reference": {"site_path": "/etc/sparkring/managed-mesh/site.json", "site_sha256": "c" * 64, "plan_sha256": "d" * 64}, "host_ip": f"192.0.2.{110 + rank}", "interface": "eth0", "unit": "sparkring-mesh.service"} request = ["install", "--profile", "deepseek-v41-flash-tp4", "--checkpoint", "1017", - "--image", serving.ROW_OWNED_PREFILL_IMAGE, "--transport", "nccl", "--plan", "--json"] + "--image", serving.ROW_OWNED_PREFILL_IMAGE, "--transport", "sircl", "--nccl", "never", "--plan", "--json"] assert sparkring.main(request) == 0 plain = json.loads(capsys.readouterr().out) @@ -159,7 +173,8 @@ def test_row_owned_prefill_is_a_locked_deepseek_nccl_experiment(machine, sparks, assert plan["serving"] == {"row_owned_prefill": True} assert "--row-owned-prefill" in plan["checkpoint"]["command"] saved = deployment(plan) - assert saved["transport"]["backend"] == "nccl" + assert saved["transport"]["backend"] == "sircl" and saved["transport"]["nccl"] == "never" + assert saved["transport"]["group"]["name"] == "path-4" assert saved["image_runtime"]["image_id"] == serving.ROW_OWNED_PREFILL_IMAGE_ID for rank, (plain_spec, spec) in enumerate(zip(installer.specifications(deployment(plain)), @@ -182,6 +197,9 @@ def test_row_owned_prefill_is_a_locked_deepseek_nccl_experiment(machine, sparks, assert spec.environment["PYTHONPATH"].split(":") == [ "/opt/ds41_row_shard", "/opt/sparkring/toolchain/python", "/opt/sparkring/addons/python"] assert spec.environment["VLLM_ENABLE_ROCE_ALLREDUCE"] == "0" + assert spec.environment["SIRCL_NCCL"] == "never" + assert spec.environment["SIRCL_FABRIC"] == "path:4" + assert "sircl" in spec.environment["VLLM_PLUGINS"].split(",") assert spec.mounts[:2] == plain_spec.mounts[:2] assert [mount.target for mount in spec.mounts[:-1]] == [mount.target for mount in plain_spec.mounts] plugin = spec.mounts[-1] @@ -209,12 +227,12 @@ def test_row_owned_prefill_is_a_locked_deepseek_nccl_experiment(machine, sparks, with zipfile.ZipFile(output) as template: text = template.read("README.txt").decode() assert "sparkring install --profile deepseek-v41-flash-tp4 --checkpoint 1017" in text - assert "--transport nccl --row-owned-prefill" in text + assert "--transport sircl --nccl never --row-owned-prefill" in text surveyed = len(sparks.surveys) for extra, complaint in ((["--checkpoint", "original"], "requires --profile"), - (["--image", "plainstatus"], "requires --image"), - (["--transport", "prepared"], "requires --transport nccl"), + (["--image", "2026.10.2"], "requires --image"), + (["--nccl", "auto"], "requires --transport sircl --nccl never"), (["--context-length", "262145"], "up to 262144 tokens")): assert sparkring.main([*request, "--row-owned-prefill", *extra]) == 3 refused = json.loads(capsys.readouterr().out) From a1ba9e5acb700f9e1e736a414e60851548408c78 Mon Sep 17 00:00:00 2001 From: FujitsuPolycom <87842395+FujitsuPolycom@users.noreply.github.com> Date: Thu, 19 Nov 2026 23:03:05 -0600 Subject: [PATCH 4/7] Use native SIRCL reduce-scatter for DeepSeek row-owned prefill --- integrations/vllm/ds41_row_shard/README.md | 5 ++-- .../vllm/glm_dcp_decode_comm/README.md | 12 +++++--- .../METADATA | 2 +- .../entry_points.txt | 0 .../top_level.txt | 0 .../glm_dcp_decode_comm/__init__.py | 4 +-- performance/enhancements.json | 7 +++-- performance/enhancements.md | 5 ++-- .../row-owned-sircl-path4-20261119.jsonl | 12 ++++++++ .../row-owned-sircl-path4-20261119.md | 26 +++++++++++++++++ .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/selection.json | 2 +- .../compose/compose.rank0.yaml | 2 +- .../compose/compose.rank1.yaml | 2 +- .../compose/compose.rank2.yaml | 2 +- .../compose/compose.rank3.yaml | 2 +- .../compose/selection.json | 2 +- runtime/common/installer.py | 2 +- runtime/common/serving.py | 7 ++++- runtime/common/test_image_lock.py | 2 +- runtime/host/test_install_sircl.py | 8 +++-- runtime/images/derive_glm53_plugins.py | 4 +-- runtime/images/installer-images.md | 2 +- runtime/images/test_derive_glm53_plugins.py | 4 +-- .../sircl/sparkring_sircl/vllm/adapter.py | 29 ++++++++----------- .../sircl/tests/test_vllm_registration.py | 20 +++++++++++++ 62 files changed, 153 insertions(+), 84 deletions(-) rename integrations/vllm/glm_dcp_decode_comm/dist-info/{glm_dcp_decode_comm-2.0.3.dist-info => glm_dcp_decode_comm-2.0.4.dist-info}/METADATA (97%) rename integrations/vllm/glm_dcp_decode_comm/dist-info/{glm_dcp_decode_comm-2.0.3.dist-info => glm_dcp_decode_comm-2.0.4.dist-info}/entry_points.txt (100%) rename integrations/vllm/glm_dcp_decode_comm/dist-info/{glm_dcp_decode_comm-2.0.3.dist-info => glm_dcp_decode_comm-2.0.4.dist-info}/top_level.txt (100%) diff --git a/integrations/vllm/ds41_row_shard/README.md b/integrations/vllm/ds41_row_shard/README.md index 7eaa12f0..514c76b9 100644 --- a/integrations/vllm/ds41_row_shard/README.md +++ b/integrations/vllm/ds41_row_shard/README.md @@ -35,8 +35,9 @@ sudo sparkring install --profile deepseek-v41-flash-tp4 --checkpoint 1017 \ ``` Run the command with `--yes` in place of `--plan` to apply the plan. The -installer stages its retained source on each rank and mounts the plugin -read-only. The setting selects eager prefill, full CUDA graphs for uniform +installer stages the retained source on each rank and mounts the plugin +and its SIRCL adapter read-only. The adapter prepares native TP +reduce-scatter for the row-owned prefill path. The setting selects eager prefill, full CUDA graphs for uniform decode, disk-resident Engram tables with replicated projection, 8,192-token prefill chunks, DSpark5 with adaptive verification, and a 262,144-token context limit. Use `--context-length` diff --git a/integrations/vllm/glm_dcp_decode_comm/README.md b/integrations/vllm/glm_dcp_decode_comm/README.md index fd194112..28f94047 100644 --- a/integrations/vllm/glm_dcp_decode_comm/README.md +++ b/integrations/vllm/glm_dcp_decode_comm/README.md @@ -1,6 +1,6 @@ # glm_dcp_decode_comm -A vLLM general plugin (distribution `glm-dcp-decode-comm` 2.0.3, entry point +A vLLM general plugin (distribution `glm-dcp-decode-comm` 2.0.4, entry point `glm_dcp_decode_comm = glm_dcp_decode_comm:register`) that changes how GLM-5.3's DSA attention layers run their decode context parallel (DCP) collectives when those collectives run on a SIRCL DCP session. Every item is @@ -89,7 +89,7 @@ GLM_DCP_DECODE_A2A_FUSED=1 GLM_DCP_DECODE_AUDIT=1 ``` -It passes when every rank logs the startup line `glm_dcp_decode_comm 2.0.3: +It passes when every rank logs the startup line `glm_dcp_decode_comm 2.0.4: enabled ...` naming the five items and audit mode, no `PatchRefused`, and every `glm_dcp_decode_comm audit cuda:N: CHECK: ...` line of every rank reports `0 differ` with a nonzero call count for each of the five checks @@ -141,7 +141,8 @@ The pins describe two builds: - SIRCL: package version 0.3.2, SparkRing's [`spark_transport/sircl/sparkring_sircl`](../../../spark_transport/sircl/sparkring_sircl) as commit `ab9e2888` has it, with the opt-in `SIRCL_SUBSET_RING` subset - mode (Git tree `462e000619e1` of `sparkring_sircl`). + mode (Git tree `462e000619e1` of `sparkring_sircl`) and the adapter change + in version 2.0.4. Version 2.0.1, which the images of releases 2026.10.2, 2026.10.4 and 2026.10.5 carry, pins the same files except `vllm/adapter.py`: it pins that file as release @@ -162,6 +163,9 @@ and its call order, and every subset statement runs only when `SIRCL_SUBSET_RING=1`, so a session that leaves the variable unset takes the ops and settings 2.0.2's build takes. +Version 2.0.4 updates the `vllm/adapter.py` pin for DeepSeek native TP +reduce-scatter. The DCP interface stays the same. + Each version therefore refuses an item flag on the other release's image. With every item flag `0`, registration patches nothing and compares no pin, so a profile that loads the plugin with its items off starts on either image. @@ -219,7 +223,7 @@ and the qualification run again. | `glm_dcp_decode_comm/_scatter_pack_cute.py` | the CuTe DSL packed all-to-all, the pinned SIRCL build's scatter op with the pack in its staging | | `glm_dcp_decode_comm/layout.py` | the query and wire-format geometry and the kernel's index helpers (pure Python) | | `glm_dcp_decode_comm/reference.py` | torch references of the image's computations and of the plugin's replacements | -| `dist-info/glm_dcp_decode_comm-2.0.3.dist-info/` | the installed distribution's metadata and its `vllm.general_plugins` entry point | +| `dist-info/glm_dcp_decode_comm-2.0.4.dist-info/` | the installed distribution's metadata and its `vllm.general_plugins` entry point | | `tools/refresh_pins.py` | records or checks every pin against vLLM, b12x and SIRCL trees | | `tests/` | the CPU suite (`test_dcp_decode_*.py`), the subprocess driver over SIRCL's CUDA stand-in (`scatter_driver.py`) and the GPU checks (`gpu_checks.py`) | diff --git a/integrations/vllm/glm_dcp_decode_comm/dist-info/glm_dcp_decode_comm-2.0.3.dist-info/METADATA b/integrations/vllm/glm_dcp_decode_comm/dist-info/glm_dcp_decode_comm-2.0.4.dist-info/METADATA similarity index 97% rename from integrations/vllm/glm_dcp_decode_comm/dist-info/glm_dcp_decode_comm-2.0.3.dist-info/METADATA rename to integrations/vllm/glm_dcp_decode_comm/dist-info/glm_dcp_decode_comm-2.0.4.dist-info/METADATA index 0a12ad4f..890968b0 100644 --- a/integrations/vllm/glm_dcp_decode_comm/dist-info/glm_dcp_decode_comm-2.0.3.dist-info/METADATA +++ b/integrations/vllm/glm_dcp_decode_comm/dist-info/glm_dcp_decode_comm-2.0.4.dist-info/METADATA @@ -1,5 +1,5 @@ Metadata-Version: 2.1 Name: glm-dcp-decode-comm -Version: 2.0.3 +Version: 2.0.4 Summary: vLLM general plugin that makes the GLM-5.3 DSA decode collectives of decode context parallelism cheaper on a SIRCL DCP session of image 816c6d6a7e96, with exact results: the query built by one kernel and gathered into the attention workspace, the DCP collectives on their own stream, the indexer wk GEMM beside the latent projection, one top-k slot conversion per indexer layer and the all-to-all combine packed into the scatter op; each item off until its GLM_DCP_DECODE_* flag is 1 Requires-Python: >=3.12 diff --git a/integrations/vllm/glm_dcp_decode_comm/dist-info/glm_dcp_decode_comm-2.0.3.dist-info/entry_points.txt b/integrations/vllm/glm_dcp_decode_comm/dist-info/glm_dcp_decode_comm-2.0.4.dist-info/entry_points.txt similarity index 100% rename from integrations/vllm/glm_dcp_decode_comm/dist-info/glm_dcp_decode_comm-2.0.3.dist-info/entry_points.txt rename to integrations/vllm/glm_dcp_decode_comm/dist-info/glm_dcp_decode_comm-2.0.4.dist-info/entry_points.txt diff --git a/integrations/vllm/glm_dcp_decode_comm/dist-info/glm_dcp_decode_comm-2.0.3.dist-info/top_level.txt b/integrations/vllm/glm_dcp_decode_comm/dist-info/glm_dcp_decode_comm-2.0.4.dist-info/top_level.txt similarity index 100% rename from integrations/vllm/glm_dcp_decode_comm/dist-info/glm_dcp_decode_comm-2.0.3.dist-info/top_level.txt rename to integrations/vllm/glm_dcp_decode_comm/dist-info/glm_dcp_decode_comm-2.0.4.dist-info/top_level.txt diff --git a/integrations/vllm/glm_dcp_decode_comm/glm_dcp_decode_comm/__init__.py b/integrations/vllm/glm_dcp_decode_comm/glm_dcp_decode_comm/__init__.py index f06dfeb1..8771a0bf 100644 --- a/integrations/vllm/glm_dcp_decode_comm/glm_dcp_decode_comm/__init__.py +++ b/integrations/vllm/glm_dcp_decode_comm/glm_dcp_decode_comm/__init__.py @@ -131,7 +131,7 @@ from types import CodeType, FunctionType, ModuleType PLUGIN_NAME = "glm_dcp_decode_comm" -PLUGIN_VERSION = "2.0.3" +PLUGIN_VERSION = "2.0.4" MARKER = "__glm_dcp_decode_comm__" HELPER_PREFIX = "_glm_dcp_decode_comm_" IMAGE = "816c6d6a7e96" @@ -344,7 +344,7 @@ class FileCheck: "communication stream wraps; the dcp_all_to_all and dcp_b12x_transport shims installed for a " "DCP group with a session"), FileCheck("sparkring_sircl", "vllm/adapter.py", - "ebe9b323907ca659f9b5222a9204e46b6b84ea06d734c48eeb014e92368aeb31", + "de2f4ecf6ec5a0a9415467e1a33e80b34cbd40d9c6ab4349666d1ac806084d59", "GroupAdapter keeps a DCP group's SirclDcpCollectives in .dcp and its runtime in .session; " "live_adapters"), FileCheck("sparkring_sircl", "vllm/dcp_collectives.py", diff --git a/performance/enhancements.json b/performance/enhancements.json index 79c772e7..dcf20284 100644 --- a/performance/enhancements.json +++ b/performance/enhancements.json @@ -1800,7 +1800,7 @@ { "id": "ds41-row-owned-prefill", "title": "DeepSeek V4.1 row-owned prefill and distributed indexer scoring", - "description": "On a four-Spark SIRCL path, each rank keeps its encoder residual rows and receives their Engram lookup rows by reduce-scatter. The vLLM plugin distributes native indexer score and select tiles for eligible encoder layers and gathers the selected top-k rows in token order. Full-head prefill plans compute attention on owned query rows, gather narrow KV and compressor projections, and exchange compact expert routes. The pinned installer uses 8,192-token prefill chunks.", + "description": "On a four-Spark SIRCL path, each rank keeps its encoder residual rows and receives their Engram lookup rows by reduce-scatter. The vLLM plugin distributes native indexer score and select tiles for eligible encoder layers and gathers the selected top-k rows in token order. Full-head prefill plans compute attention on owned query rows, gather narrow KV and compressor projections, and exchange compact expert routes. The pinned installer uses 8,192-token prefill chunks and native SIRCL reduce-scatter.", "category": "vllm-plugin", "sides": ["prefill"], "models": [ @@ -1826,11 +1826,12 @@ ], "provided_by": {"images": ["dev-20261013-dcp2prefill-status038-sircl-tp6"]}, "status": "research-only", - "gain": {"percent": null, "summary": "SIRCL path-4 medians were 6,018 / 5,917 / 5,786 tok/s at 16K / 64K / 128K with 8K chunks"}, + "gain": {"percent": 5.12, "summary": "Native SIRCL scatter raised the 128K median from 5,786 to 6,083 tok/s on the same four-Spark path"}, "measurements": [ {"image": "dev-20261013-dcp2prefill-status038-sircl-tp6", "tp": 4, "dcp": 1, "streams": "1", "context": "16K, 64K, 128K", "checkpoint": "deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10", "result": "Three cold requests per length on one four-Spark NCCL cycle with eager execution. Median prompt tok/s at 16K / 64K / 128K were 5,445 / 5,361 / 5,234 with distributed scoring and 6,334 / 6,250 / 6,124 with full-head local-query attention, compact routes and packed projections. All requests used 8K prefill chunks.", "evidence": "performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md"}, {"image": "dev-20261013-dcp2prefill-status038-sircl-tp6", "tp": 4, "dcp": 1, "streams": "1", "context": "16K, 64K, 128K", "checkpoint": "deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10", "result": "On the same NCCL cycle, with decode-only graphs and adaptive verification, three cold samples per length gave medians of 6,290 / 6,149 / 6,027 prompt tok/s at 16K / 64K / 128K. Three single-request runs of one short prompt at temperature zero gave median 71.50 output tok/s after the first token against 18.16 in the eager baseline.", "evidence": "performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md#decode-only-graph-trial"}, - {"image": "dev-20261013-dcp2prefill-status038-sircl-tp6", "tp": 4, "dcp": 1, "streams": "1", "context": "16K, 64K, 128K", "checkpoint": "deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10", "result": "Native SIRCL path-4 with NCCL disabled, decode-only graphs and adaptive DSpark5. Median cold prefill was 6,018 / 5,917 / 5,786 tok/s at 16K / 64K / 128K. Median short greedy decode was 77.60 tok/s after the first token. All medians have three samples", "evidence": "performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md"} + {"image": "dev-20261013-dcp2prefill-status038-sircl-tp6", "tp": 4, "dcp": 1, "streams": "1", "context": "16K, 64K, 128K", "checkpoint": "deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10", "result": "Native SIRCL path-4 with NCCL disabled, decode-only graphs and adaptive DSpark5. Median cold prefill was 6,018 / 5,917 / 5,786 tok/s at 16K / 64K / 128K. Median short greedy decode was 77.60 tok/s after the first token. All medians have three samples", "evidence": "performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md"}, + {"image": "dev-20261013-dcp2prefill-status038-sircl-tp6", "tp": 4, "dcp": 1, "streams": "1", "context": "16K, 64K, 128K", "checkpoint": "deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10", "result": "Native TP reduce-scatter on the same SIRCL path gave cold prefill medians of 6,354 / 6,221 / 6,083 tok/s at 16K / 64K / 128K with 8K chunks. 9 of nine requests cleared 6,000 tok/s. All four ranks reported native scatter and no NCCL calls", "evidence": "performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md#native-tp-reduce-scatter"} ], "evidence": ["performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md", "performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md", "integrations/vllm/ds41_row_shard/README.md"], "profiles": [] diff --git a/performance/enhancements.md b/performance/enhancements.md index 4027c058..2491e2d3 100644 --- a/performance/enhancements.md +++ b/performance/enhancements.md @@ -140,6 +140,7 @@ Measured without a gain, not adopted: | [NCCL on all four RoCE functions](#nccl-extended-ipv4-gids) | prefill | 2/4 | `NCCL_IB_EXTENDED_IPV4_GIDS=1` | TP4: prefill 4-9 % faster from 16K to 128K than with it off | implemented; from 2026.10.0, 2026.10.1 | | [Engram projection tensor parallelism](#ds41-engram-projection-tp) | decode, memory | 4 (DCP 1) | `--engram-config {"table_memory":"disk","disk_resident_scales":true,"projection_tp":true}` | TP4, llm-inference-bench defaults (the server's default temperature): engine steps/s +5.5 % at one stream and +12 % at eight; output tok/s +4-7 % at 1-8 streams and -2 to +2 % at 16; prefill -1 to -2 % | implemented; from 2026.10.0, 2026.10.1, 2026.10.2 | | [NVFP4 DSpark draft layers and head](#ds41-nvfp4-draft) | decode | any | `VLLM_DS41_MARKOV_NVFP4=1`; `VLLM_DS41_DRAFT_NVFP4_HEAD=1` | single-stream decode 3-8 % faster; acceptance unchanged | implemented; from 2026.10.0, 2026.10.1 | +| [DeepSeek V4.1 row-owned prefill and distributed indexer scoring](#ds41-row-owned-prefill) (DeepSeek-V4.1-Flash-1017@1bae0e1088993b9b82de08f59de5be5a34e42170) | prefill | 4 (DCP 1) | sudo sparkring install --profile deepseek-v41-flash-tp4 --checkpoint 1017 --image dev-20261013-dcp2prefill-status038-sircl-tp6 --transport sircl --nccl never --row-owned-prefill | Native SIRCL scatter raised the 128K median from 5,786 to 6,083 tok/s on the same four-Spark path | research-only; from 2026.10.4 | | [Probabilistic draft sampling](#probabilistic-draft-sampling) | decode | any | `--speculative-config` keys `{"draft_sample_method":"probabilistic"}` | TP4, with adaptive verification and block rejection: 138.9 / 195.2 / 260.9 against 130.5 / 184.6 / 252.9 tok/s at 4 / 8 / 16 streams (+3-6 %), temperature 1.0 | implemented; from 2026.10.0, 2026.10.1 | | [SIRCL ring schedules on a path of four](#sircl-ring-schedules-path4) | prefill, decode | 4 (DCP 1) | `SIRCL_LARGE_SCHEDULE=ring`; `SIRCL_GATHER_SCHEDULE=ring`; `SIRCL_SCATTER_SCHEDULE=ring`; `SIRCL_ONESHOT_MAX_BYTES=65536`; `SIRCL_LINK_SLOT_BYTES=1048576`; `SIRCL_GATHER_LINK_CHUNK_BYTES=1048576`; `SIRCL_REDUCE_LINK_CHUNK_BYTES=1048576`; `SIRCL_SCATTER_LINK_CHUNK_BYTES=1048576`; SIRCL serve or bundle: --large-schedule ring --gather-schedule ring --scatter-schedule ring --oneshot-max 65536 --link-slot 1048576 --gather-link-chunk 1048576 --reduce-link-chunk 1048576 --scatter-link-chunk 1048576; the installer applies them from the path-4 row of runtime/common/sircl-tuning-defaults.json to SIRCL 0.3.2 and 0.3.1 sessions | TP4: 64K prefill 4,141 -> 4,328 tok/s (+4.5 %), 16-stream decode 255 -> 265 tok/s (+3.9 %) against SIRCL's defaults | research-only; from SIRCL 0.2.0 image (54af97d9), SIRCL 0.3.0 and libsircl image (816c6d6a), SIRCL 0.3.1, libsircl and GLM-5.3 plugin image (27e9f75c), SIRCL 0.3.2, libsircl and GLM-5.3 plugin image (1a8c1035), 2026.10.2 | | [DeepSeek-V4.1-Flash on the 2026.10.0 image](#ds41-rollback-image) | decode, prefill | 4 (DCP 1) | sudo sparkring install --profile deepseek-v41-flash-tp4 --image 2026.10.0 | warm paired comparison: verification steps/s +1-3 %, prefill +2-5 % against 2026.10.1; cause not identified | implemented; any image | @@ -147,7 +148,6 @@ Measured without a gain, not adopted: | [B12X selection-cache reconciliation](#b12x-selection-cache-reconciliation) | startup | 2/4 | on in every image that carries it; nothing to set | restart healthy after 200-225 s instead of 652-741 s (DeepSeek-V4.1-Flash TP4) | implemented; from 2026.10.0, 2026.10.1 | | [Engram tables read from disk](#ds41-engram-disk-tables) | memory | any | `--engram-config {"table_memory":"disk","disk_resident_scales":true}` | keeps 189 GiB of tables out of GPU memory | implemented; from 2026.10.0, 2026.10.1 | | [TCP store without libuv at TP8](#ds41-no-libuv-store) | startup | 8 | `USE_LIBUV=0` | fixed a TP8 startup crash; startup 22 -> 5 min | research-only; any image | -| [DeepSeek V4.1 row-owned prefill and distributed indexer scoring](#ds41-row-owned-prefill) (DeepSeek-V4.1-Flash-1017@1bae0e1088993b9b82de08f59de5be5a34e42170) | prefill | 4 (DCP 1) | sudo sparkring install --profile deepseek-v41-flash-tp4 --checkpoint 1017 --image dev-20261013-dcp2prefill-status038-sircl-tp6 --transport sircl --nccl never --row-owned-prefill | SIRCL path-4 medians were 6,018 / 5,917 / 5,786 tok/s at 16K / 64K / 128K with 8K chunks | research-only; from 2026.10.4 | | [Split fused attention at TP8](#ds41-split-fused-attention) | decode | 8 (DCP 1) | no implementation in SparkRing | -0.7 ms per decode step | research-only; needs a port | | [GPU SM clock locked at 2,418 MHz](#host-sm-clock-lock) | decode | any | host: sudo nvidia-smi -lgc 2418,2418 on every Spark of the deployment; no configuration records it: pass --enabled host-sm-clock-lock to the checker | not measured for this model | research-only; host setting | | [libsircl copy-relay broadcast](#libsircl-copy-relay-broadcast) | prefill, decode | 8 | on by default in libsircl 0.7.0 for broadcasts from SIRCL_BROADCAST_MIN_BYTES (1 MiB) where the session's link area is on; SIRCL_BROADCAST_SCHEME=scatter selects the scatter-then-all-gather scheme instead | collective benchmark only, not measured in serving: on the cycle of eight from a chain-end root, 24.5 GB/s bus bandwidth at 256 MiB and at or above NVIDIA NCCL 2.32.3 from 2 MiB; from the chain's middle about half of that | research-only; needs a port | @@ -1037,7 +1037,7 @@ Measured without a gain, not adopted: ### `ds41-row-owned-prefill` -**DeepSeek V4.1 row-owned prefill and distributed indexer scoring.** On a four-Spark SIRCL path, each rank keeps its encoder residual rows and receives their Engram lookup rows by reduce-scatter. The vLLM plugin distributes native indexer score and select tiles for eligible encoder layers and gathers the selected top-k rows in token order. Full-head prefill plans compute attention on owned query rows, gather narrow KV and compressor projections, and exchange compact expert routes. The pinned installer uses 8,192-token prefill chunks. +**DeepSeek V4.1 row-owned prefill and distributed indexer scoring.** On a four-Spark SIRCL path, each rank keeps its encoder residual rows and receives their Engram lookup rows by reduce-scatter. The vLLM plugin distributes native indexer score and select tiles for eligible encoder layers and gathers the selected top-k rows in token order. Full-head prefill plans compute attention on owned query rows, gather narrow KV and compressor projections, and exchange compact expert routes. The pinned installer uses 8,192-token prefill chunks and native SIRCL reduce-scatter. - Category: vLLM general plugin, image feature hook or cache connector. - Models: DeepSeek-V4.1-Flash. Sizes: 4 (DCP 1). @@ -1046,6 +1046,7 @@ Measured without a gain, not adopted: - Measured (TP4/DCP1, 1 streams, context 16K, 64K, 128K, deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10, image 2026.10.4): Three cold requests per length on one four-Spark NCCL cycle with eager execution. Median prompt tok/s at 16K / 64K / 128K were 5,445 / 5,361 / 5,234 with distributed scoring and 6,334 / 6,250 / 6,124 with full-head local-query attention, compact routes and packed projections. All requests used 8K prefill chunks.. Evidence: [performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md](records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md). - Measured (TP4/DCP1, 1 streams, context 16K, 64K, 128K, deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10, image 2026.10.4): On the same NCCL cycle, with decode-only graphs and adaptive verification, three cold samples per length gave medians of 6,290 / 6,149 / 6,027 prompt tok/s at 16K / 64K / 128K. Three single-request runs of one short prompt at temperature zero gave median 71.50 output tok/s after the first token against 18.16 in the eager baseline.. Evidence: [performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md](records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md). - Measured (TP4/DCP1, 1 streams, context 16K, 64K, 128K, deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10, image 2026.10.4): Native SIRCL path-4 with NCCL disabled, decode-only graphs and adaptive DSpark5. Median cold prefill was 6,018 / 5,917 / 5,786 tok/s at 16K / 64K / 128K. Median short greedy decode was 77.60 tok/s after the first token. All medians have three samples. Evidence: [performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md](records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md). +- Measured (TP4/DCP1, 1 streams, context 16K, 64K, 128K, deepseek-ai/DeepSeek-V4.1-Flash-1017@1bae0e10, image 2026.10.4): Native TP reduce-scatter on the same SIRCL path gave cold prefill medians of 6,354 / 6,221 / 6,083 tok/s at 16K / 64K / 128K with 8K chunks. 9 of nine requests cleared 6,000 tok/s. All four ranks reported native scatter and no NCCL calls. Evidence: [performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md](records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md). - Evidence: [performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md](records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md); [performance/records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md](records/deepseek-v41-flash/row-owned-full-head-ring-20261119.md); [integrations/vllm/ds41_row_shard/README.md](../integrations/vllm/ds41_row_shard/README.md). ### `ds41-split-fused-attention` diff --git a/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.jsonl b/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.jsonl index 12f71b6f..c7d56e45 100644 --- a/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.jsonl +++ b/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.jsonl @@ -23,3 +23,15 @@ {"suite": "decode_workload_probe", "output_tokens": 2048, "case": "8k_t1_2048_output", "temperature": 1, "prompt_tokens": 8192, "cached": 0, "ttft_s": 1.437, "decode_tok_s": 82.67, "end_to_end_tok_s": 78.17, "accepted_pct": 54.6, "accepted_per_step": 2.44} {"case": "fixed_first_token_parity", "prompt_tokens": 16384, "first_token_equal": true} {"case": "fixed_first_token_parity", "prompt_tokens": 131072, "first_token_equal": true} +{"suite": "native_scatter", "case": "cold_prefill", "prompt_tokens": 16384, "tok_s": 6353.54} +{"suite": "native_scatter", "case": "cold_prefill", "prompt_tokens": 65536, "tok_s": 6225.15} +{"suite": "native_scatter", "case": "cold_prefill", "prompt_tokens": 131072, "tok_s": 6082.54} +{"suite": "native_scatter", "case": "cold_prefill", "prompt_tokens": 16384, "tok_s": 6308.33} +{"suite": "native_scatter", "case": "cold_prefill", "prompt_tokens": 65536, "tok_s": 6221.1} +{"suite": "native_scatter", "case": "cold_prefill", "prompt_tokens": 131072, "tok_s": 6089.56} +{"suite": "native_scatter", "case": "cold_prefill", "prompt_tokens": 16384, "tok_s": 6362.12} +{"suite": "native_scatter", "case": "cold_prefill", "prompt_tokens": 65536, "tok_s": 6203.49} +{"suite": "native_scatter", "case": "cold_prefill", "prompt_tokens": 131072, "tok_s": 6048.56} +{"suite": "native_scatter", "case": "short_greedy_decode", "output_tokens": 384, "tok_s": 63.58} +{"suite": "native_scatter", "case": "short_greedy_decode", "output_tokens": 384, "tok_s": 125.04} +{"suite": "native_scatter", "case": "short_greedy_decode", "output_tokens": 384, "tok_s": 62.55} diff --git a/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md b/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md index 3d2ab0e8..5f697a69 100644 --- a/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md +++ b/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md @@ -74,3 +74,29 @@ Hardware validation used manually staged containers. The installer renders the same serving options with `--transport sircl --nccl never` in its offline path-4 tests. A live installer rollout and a SIRCL cycle-4 run remain unverified. + +## Native TP reduce-scatter + +The initial SIRCL launch reported 352 `allreduce_slice` calls per rank +for a cold 128K prompt. The adapter prepared native TP reduce-scatter for +GLM and Qwen row sharding. It now prepares BF16 and FP32 scatter when the +DeepSeek row-owned flag is enabled and the TP group forbids NCCL. + +The follow-up reused the checkpoint, image, physical path, SIRCL settings +and serving command. It bind-mounted the updated adapter into the pinned +image, as the installer now renders for this opt-in preset. All four TP +receipts reported native `scatter` and zero `allreduce_slice` calls. +TP and EP again reported `nccl=none`, `pynccl=skipped` and zero NCCL calls. + +| Prompt | Before, median tok/s | Native scatter samples (tok/s) | Native scatter median tok/s | +|---|---:|---|---:| +| 16K | 6,017.88 | 6,353.54, 6,308.33, 6,362.12 | 6,353.54 | +| 64K | 5,916.96 | 6,225.15, 6,221.10, 6,203.49 | 6,221.10 | +| 128K | 5,786.05 | 6,082.54, 6,089.56, 6,048.56 | 6,082.54 | + +9 of nine cold requests cleared 6,000 prompt tok/s. Three short +384-token greedy runs gave a median of 63.58 tok/s after the first token. +Both fixed prompts returned the reference first token. Prefix continuation +reused 7,936 tokens and a concurrent 64-token decode finished during an +unaligned prefill. The serving trial used manual containers. The installer +plan was verified offline. [Sample data](row-owned-sircl-path4-20261119.jsonl) diff --git a/profiles/deepseek-v41-flash-tp4/compose/compose.rank0.yaml b/profiles/deepseek-v41-flash-tp4/compose/compose.rank0.yaml index cf5160d5..a62cb904 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/compose.rank0.yaml +++ b/profiles/deepseek-v41-flash-tp4/compose/compose.rank0.yaml @@ -149,7 +149,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/deepseek-v41-flash-f625053225d4-dba1be0a40aa labels: - io.sparkring.deployment: 40359aa8ecbff0adf1350a8b5a0b137d508a1afbe58c7e365fafc9f0901a8030 + io.sparkring.deployment: 1e3da93e6ef81bd3016f5aaab95f3978d9e8c4865170a29c9c7ebd4f7c45f50d io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/deepseek-v41-flash-tp4/compose/compose.rank1.yaml b/profiles/deepseek-v41-flash-tp4/compose/compose.rank1.yaml index bb71ddc5..ffedabe2 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/compose.rank1.yaml +++ b/profiles/deepseek-v41-flash-tp4/compose/compose.rank1.yaml @@ -150,7 +150,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/deepseek-v41-flash-f625053225d4-dba1be0a40aa labels: - io.sparkring.deployment: 40359aa8ecbff0adf1350a8b5a0b137d508a1afbe58c7e365fafc9f0901a8030 + io.sparkring.deployment: 1e3da93e6ef81bd3016f5aaab95f3978d9e8c4865170a29c9c7ebd4f7c45f50d io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/deepseek-v41-flash-tp4/compose/compose.rank2.yaml b/profiles/deepseek-v41-flash-tp4/compose/compose.rank2.yaml index 28e909cf..e3af3f85 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/compose.rank2.yaml +++ b/profiles/deepseek-v41-flash-tp4/compose/compose.rank2.yaml @@ -150,7 +150,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/deepseek-v41-flash-f625053225d4-dba1be0a40aa labels: - io.sparkring.deployment: 40359aa8ecbff0adf1350a8b5a0b137d508a1afbe58c7e365fafc9f0901a8030 + io.sparkring.deployment: 1e3da93e6ef81bd3016f5aaab95f3978d9e8c4865170a29c9c7ebd4f7c45f50d io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/deepseek-v41-flash-tp4/compose/compose.rank3.yaml b/profiles/deepseek-v41-flash-tp4/compose/compose.rank3.yaml index 0b5dc3d7..c12764b7 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/compose.rank3.yaml +++ b/profiles/deepseek-v41-flash-tp4/compose/compose.rank3.yaml @@ -150,7 +150,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/deepseek-v41-flash-f625053225d4-dba1be0a40aa labels: - io.sparkring.deployment: 40359aa8ecbff0adf1350a8b5a0b137d508a1afbe58c7e365fafc9f0901a8030 + io.sparkring.deployment: 1e3da93e6ef81bd3016f5aaab95f3978d9e8c4865170a29c9c7ebd4f7c45f50d io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/deepseek-v41-flash-tp4/compose/selection.json b/profiles/deepseek-v41-flash-tp4/compose/selection.json index cdf30e7e..28eef520 100644 --- a/profiles/deepseek-v41-flash-tp4/compose/selection.json +++ b/profiles/deepseek-v41-flash-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "deepseek-v41-flash-tp4", "checkpoint": "original", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "40359aa8ecbff0adf1350a8b5a0b137d508a1afbe58c7e365fafc9f0901a8030" + "deployment": "1e3da93e6ef81bd3016f5aaab95f3978d9e8c4865170a29c9c7ebd4f7c45f50d" } diff --git a/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank0.yaml b/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank0.yaml index eea49544..aa9b7237 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank0.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank0.yaml @@ -181,7 +181,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: 53d530eee60d6b59dc377fba4330c3a6e008d8e1a2b0a2f2bdfc2bf101868183 + io.sparkring.deployment: 6957fe61fd4c6a2a82da6809f0c8ddd6c49d856449efc04861eb29b66d3bcd11 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank1.yaml b/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank1.yaml index c38cc9bd..20e83ef6 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank1.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp2/compose/compose.rank1.yaml @@ -180,7 +180,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: 53d530eee60d6b59dc377fba4330c3a6e008d8e1a2b0a2f2bdfc2bf101868183 + io.sparkring.deployment: 6957fe61fd4c6a2a82da6809f0c8ddd6c49d856449efc04861eb29b66d3bcd11 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp2/compose/selection.json b/profiles/glm53-flash-nvfp4-spark-tp2/compose/selection.json index 87ebfe39..715021af 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp2/compose/selection.json +++ b/profiles/glm53-flash-nvfp4-spark-tp2/compose/selection.json @@ -3,5 +3,5 @@ "profile": "glm53-flash-nvfp4-spark-tp2", "checkpoint": "csf", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "53d530eee60d6b59dc377fba4330c3a6e008d8e1a2b0a2f2bdfc2bf101868183" + "deployment": "6957fe61fd4c6a2a82da6809f0c8ddd6c49d856449efc04861eb29b66d3bcd11" } diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank0.yaml b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank0.yaml index fb554240..4f0b2611 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank0.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank0.yaml @@ -195,7 +195,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: 9cdffee9b81a23cbb1880bc4c664d32555f2a8794352e8a66e1e6d24efb3bfc1 + io.sparkring.deployment: a668411273734bab27d4837b72a3e61e0067604dee91fccb1f4afb9926983fbd io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank1.yaml b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank1.yaml index 495174f1..7e2d16f2 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank1.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank1.yaml @@ -194,7 +194,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: 9cdffee9b81a23cbb1880bc4c664d32555f2a8794352e8a66e1e6d24efb3bfc1 + io.sparkring.deployment: a668411273734bab27d4837b72a3e61e0067604dee91fccb1f4afb9926983fbd io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank2.yaml b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank2.yaml index 99a227e7..71bc45fb 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank2.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank2.yaml @@ -194,7 +194,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: 9cdffee9b81a23cbb1880bc4c664d32555f2a8794352e8a66e1e6d24efb3bfc1 + io.sparkring.deployment: a668411273734bab27d4837b72a3e61e0067604dee91fccb1f4afb9926983fbd io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank3.yaml b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank3.yaml index 9ec00dd7..18adf2d8 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank3.yaml +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/compose.rank3.yaml @@ -194,7 +194,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/glm53-flash-nvfp4-spark-f625053225d4-dec48abd33ef labels: - io.sparkring.deployment: 9cdffee9b81a23cbb1880bc4c664d32555f2a8794352e8a66e1e6d24efb3bfc1 + io.sparkring.deployment: a668411273734bab27d4837b72a3e61e0067604dee91fccb1f4afb9926983fbd io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/glm53-flash-nvfp4-spark-tp4/compose/selection.json b/profiles/glm53-flash-nvfp4-spark-tp4/compose/selection.json index 29b00f78..4a789172 100644 --- a/profiles/glm53-flash-nvfp4-spark-tp4/compose/selection.json +++ b/profiles/glm53-flash-nvfp4-spark-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "glm53-flash-nvfp4-spark-tp4", "checkpoint": "csf", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "9cdffee9b81a23cbb1880bc4c664d32555f2a8794352e8a66e1e6d24efb3bfc1" + "deployment": "a668411273734bab27d4837b72a3e61e0067604dee91fccb1f4afb9926983fbd" } diff --git a/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank0.yaml b/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank0.yaml index dac99b74..2a6c8b27 100644 --- a/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank0.yaml +++ b/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank0.yaml @@ -149,7 +149,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 51593dd4bc4d84304332eb5ad25c80bbeeed258a2f7ba829dc326f0365f9b08e + io.sparkring.deployment: 832c1e5ed3b2cae0f51c1c28c370b01f57c7359a848085d1f5aa1bc5a1f77f61 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank1.yaml b/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank1.yaml index c78741f2..75827689 100644 --- a/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank1.yaml +++ b/profiles/mimo-v26-flash-mopd-tp2/compose/compose.rank1.yaml @@ -150,7 +150,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 51593dd4bc4d84304332eb5ad25c80bbeeed258a2f7ba829dc326f0365f9b08e + io.sparkring.deployment: 832c1e5ed3b2cae0f51c1c28c370b01f57c7359a848085d1f5aa1bc5a1f77f61 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp2/compose/selection.json b/profiles/mimo-v26-flash-mopd-tp2/compose/selection.json index 1e6fc348..885af0eb 100644 --- a/profiles/mimo-v26-flash-mopd-tp2/compose/selection.json +++ b/profiles/mimo-v26-flash-mopd-tp2/compose/selection.json @@ -3,5 +3,5 @@ "profile": "mimo-v26-flash-mopd-tp2", "checkpoint": null, "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "51593dd4bc4d84304332eb5ad25c80bbeeed258a2f7ba829dc326f0365f9b08e" + "deployment": "832c1e5ed3b2cae0f51c1c28c370b01f57c7359a848085d1f5aa1bc5a1f77f61" } diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank0.yaml b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank0.yaml index 873acf90..c76beb16 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank0.yaml +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank0.yaml @@ -163,7 +163,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 1c8092e8928152772a6d0f49a9add250745b1e2ac29ca933f3511f63705a8ff7 + io.sparkring.deployment: 05587f90eacca6669c3378bdb81875f076621f53ea521438cba4e5eb4838a890 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank1.yaml b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank1.yaml index 137ca415..1285067c 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank1.yaml +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank1.yaml @@ -164,7 +164,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 1c8092e8928152772a6d0f49a9add250745b1e2ac29ca933f3511f63705a8ff7 + io.sparkring.deployment: 05587f90eacca6669c3378bdb81875f076621f53ea521438cba4e5eb4838a890 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank2.yaml b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank2.yaml index fbc5033b..a006b08d 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank2.yaml +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank2.yaml @@ -164,7 +164,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 1c8092e8928152772a6d0f49a9add250745b1e2ac29ca933f3511f63705a8ff7 + io.sparkring.deployment: 05587f90eacca6669c3378bdb81875f076621f53ea521438cba4e5eb4838a890 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank3.yaml b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank3.yaml index b9e0c57f..47f71ed4 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank3.yaml +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/compose.rank3.yaml @@ -164,7 +164,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/mimo-v26-flash-rl-f625053225d4-2479e2d0029e labels: - io.sparkring.deployment: 1c8092e8928152772a6d0f49a9add250745b1e2ac29ca933f3511f63705a8ff7 + io.sparkring.deployment: 05587f90eacca6669c3378bdb81875f076621f53ea521438cba4e5eb4838a890 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/mimo-v26-flash-mopd-tp4/compose/selection.json b/profiles/mimo-v26-flash-mopd-tp4/compose/selection.json index 36e87bb2..cff103bf 100644 --- a/profiles/mimo-v26-flash-mopd-tp4/compose/selection.json +++ b/profiles/mimo-v26-flash-mopd-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "mimo-v26-flash-mopd-tp4", "checkpoint": null, "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "1c8092e8928152772a6d0f49a9add250745b1e2ac29ca933f3511f63705a8ff7" + "deployment": "05587f90eacca6669c3378bdb81875f076621f53ea521438cba4e5eb4838a890" } diff --git a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank0.yaml b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank0.yaml index f25001f0..66f84f4d 100644 --- a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank0.yaml +++ b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank0.yaml @@ -170,7 +170,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: d231bfa9b7e1d32841c668db45c49e1f44a622ffa46a0dd303753dd2437e2787 + io.sparkring.deployment: 1c2ca62bba16af82a2f513d05cad8fce49340ccd5e483991cf2b2ec7e09786b9 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank1.yaml b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank1.yaml index 457de9cc..b4de329d 100644 --- a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank1.yaml +++ b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank1.yaml @@ -171,7 +171,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: d231bfa9b7e1d32841c668db45c49e1f44a622ffa46a0dd303753dd2437e2787 + io.sparkring.deployment: 1c2ca62bba16af82a2f513d05cad8fce49340ccd5e483991cf2b2ec7e09786b9 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank2.yaml b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank2.yaml index 5b173638..6852e243 100644 --- a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank2.yaml +++ b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank2.yaml @@ -171,7 +171,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: d231bfa9b7e1d32841c668db45c49e1f44a622ffa46a0dd303753dd2437e2787 + io.sparkring.deployment: 1c2ca62bba16af82a2f513d05cad8fce49340ccd5e483991cf2b2ec7e09786b9 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank3.yaml b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank3.yaml index ec33de7f..dcd96a76 100644 --- a/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank3.yaml +++ b/profiles/qwen38-flash-next-qad-tp4-sparkcache/compose/compose.rank3.yaml @@ -171,7 +171,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: d231bfa9b7e1d32841c668db45c49e1f44a622ffa46a0dd303753dd2437e2787 + io.sparkring.deployment: 1c2ca62bba16af82a2f513d05cad8fce49340ccd5e483991cf2b2ec7e09786b9 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank0.yaml b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank0.yaml index 4df1a395..f7774858 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank0.yaml +++ b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank0.yaml @@ -176,7 +176,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-60215d26cf5e labels: - io.sparkring.deployment: 93cf687f0cb689bc5b364ca59bc10713a4fcea9fda3d944b06719a04568946f3 + io.sparkring.deployment: 6590727f23c579d72c2410aaff210a6abe8b812021b911641dafadd02e7bc477 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank1.yaml b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank1.yaml index 80baac94..7cba6da3 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank1.yaml +++ b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank1.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-60215d26cf5e labels: - io.sparkring.deployment: 93cf687f0cb689bc5b364ca59bc10713a4fcea9fda3d944b06719a04568946f3 + io.sparkring.deployment: 6590727f23c579d72c2410aaff210a6abe8b812021b911641dafadd02e7bc477 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank2.yaml b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank2.yaml index 89da5007..e09d69e8 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank2.yaml +++ b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank2.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-60215d26cf5e labels: - io.sparkring.deployment: 93cf687f0cb689bc5b364ca59bc10713a4fcea9fda3d944b06719a04568946f3 + io.sparkring.deployment: 6590727f23c579d72c2410aaff210a6abe8b812021b911641dafadd02e7bc477 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank3.yaml b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank3.yaml index fb079509..77a3d087 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank3.yaml +++ b/profiles/qwen38-flash-next-qad-tp4/compose/compose.rank3.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-60215d26cf5e labels: - io.sparkring.deployment: 93cf687f0cb689bc5b364ca59bc10713a4fcea9fda3d944b06719a04568946f3 + io.sparkring.deployment: 6590727f23c579d72c2410aaff210a6abe8b812021b911641dafadd02e7bc477 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-qad-tp4/compose/selection.json b/profiles/qwen38-flash-next-qad-tp4/compose/selection.json index 849cab01..642f17c2 100644 --- a/profiles/qwen38-flash-next-qad-tp4/compose/selection.json +++ b/profiles/qwen38-flash-next-qad-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "qwen38-flash-next-qad-tp4", "checkpoint": "qad-step5500-ple1000", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "93cf687f0cb689bc5b364ca59bc10713a4fcea9fda3d944b06719a04568946f3" + "deployment": "6590727f23c579d72c2410aaff210a6abe8b812021b911641dafadd02e7bc477" } diff --git a/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank0.yaml b/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank0.yaml index 99d61989..10e1bcdc 100644 --- a/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank0.yaml +++ b/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank0.yaml @@ -147,7 +147,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 853e9a9743492db4e8cca2e83132b241866a04c0b17585f895b7900462443db5 + io.sparkring.deployment: 4ff4f808683b7004c88c58c1ea2b500870578c79ecb3144d00984150625e60e4 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank1.yaml b/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank1.yaml index c5c1ca4f..70d4aff5 100644 --- a/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank1.yaml +++ b/profiles/qwen38-flash-next-tp2-sparkcache/compose/compose.rank1.yaml @@ -148,7 +148,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-bc16a9819d85-629bc3218833 labels: - io.sparkring.deployment: 853e9a9743492db4e8cca2e83132b241866a04c0b17585f895b7900462443db5 + io.sparkring.deployment: 4ff4f808683b7004c88c58c1ea2b500870578c79ecb3144d00984150625e60e4 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-tp2/compose/compose.rank0.yaml b/profiles/qwen38-flash-next-tp2/compose/compose.rank0.yaml index 9aab44ba..aa223900 100644 --- a/profiles/qwen38-flash-next-tp2/compose/compose.rank0.yaml +++ b/profiles/qwen38-flash-next-tp2/compose/compose.rank0.yaml @@ -160,7 +160,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-dc5b8ab2fa14 labels: - io.sparkring.deployment: 6a243dc9219b8f87d10fa7ef20aad040c853bdc92fd3f599d196aa9963e2732b + io.sparkring.deployment: 5798728b0ae8737b6526066948ee47316ab537865963aa924d09c74306215f7a io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-tp2/compose/compose.rank1.yaml b/profiles/qwen38-flash-next-tp2/compose/compose.rank1.yaml index 0d6d3283..062d8caa 100644 --- a/profiles/qwen38-flash-next-tp2/compose/compose.rank1.yaml +++ b/profiles/qwen38-flash-next-tp2/compose/compose.rank1.yaml @@ -161,7 +161,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/qwen-flash-next-f625053225d4-dc5b8ab2fa14 labels: - io.sparkring.deployment: 6a243dc9219b8f87d10fa7ef20aad040c853bdc92fd3f599d196aa9963e2732b + io.sparkring.deployment: 5798728b0ae8737b6526066948ee47316ab537865963aa924d09c74306215f7a io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/qwen38-flash-next-tp2/compose/selection.json b/profiles/qwen38-flash-next-tp2/compose/selection.json index 16efc044..26939bde 100644 --- a/profiles/qwen38-flash-next-tp2/compose/selection.json +++ b/profiles/qwen38-flash-next-tp2/compose/selection.json @@ -3,5 +3,5 @@ "profile": "qwen38-flash-next-tp2", "checkpoint": "csf", "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "6a243dc9219b8f87d10fa7ef20aad040c853bdc92fd3f599d196aa9963e2732b" + "deployment": "5798728b0ae8737b6526066948ee47316ab537865963aa924d09c74306215f7a" } diff --git a/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank0.yaml b/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank0.yaml index b88053eb..c68be1d0 100644 --- a/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank0.yaml +++ b/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank0.yaml @@ -160,7 +160,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: 304c7fc23b368598dbd2163fdfa39504ee3c2504889edb4962627890b99f77a6 + io.sparkring.deployment: c9b1364caea58042b3632f50c32ebefbab0c68af4913aa1c272d650ec8fb0ab4 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank1.yaml b/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank1.yaml index 0680f6ad..dc578a0f 100644 --- a/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank1.yaml +++ b/profiles/swift15-qwen38-flash-next-tp2/compose/compose.rank1.yaml @@ -161,7 +161,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: 304c7fc23b368598dbd2163fdfa39504ee3c2504889edb4962627890b99f77a6 + io.sparkring.deployment: c9b1364caea58042b3632f50c32ebefbab0c68af4913aa1c272d650ec8fb0ab4 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp2/compose/selection.json b/profiles/swift15-qwen38-flash-next-tp2/compose/selection.json index 45dad64d..071a832c 100644 --- a/profiles/swift15-qwen38-flash-next-tp2/compose/selection.json +++ b/profiles/swift15-qwen38-flash-next-tp2/compose/selection.json @@ -3,5 +3,5 @@ "profile": "swift15-qwen38-flash-next-tp2", "checkpoint": null, "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "304c7fc23b368598dbd2163fdfa39504ee3c2504889edb4962627890b99f77a6" + "deployment": "c9b1364caea58042b3632f50c32ebefbab0c68af4913aa1c272d650ec8fb0ab4" } diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank0.yaml b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank0.yaml index b8a62ec6..1e573697 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank0.yaml +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank0.yaml @@ -176,7 +176,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: 4a974e2db09286e9cb909bcc26f54940e37a75184941059f79e5952f23284a35 + io.sparkring.deployment: 38ea9c03171c5382f69311c06670d6b3c1f06926bb300516378563ade3cea2d9 io.sparkring.rank: '0' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank1.yaml b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank1.yaml index 5ca34821..5c94e18b 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank1.yaml +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank1.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: 4a974e2db09286e9cb909bcc26f54940e37a75184941059f79e5952f23284a35 + io.sparkring.deployment: 38ea9c03171c5382f69311c06670d6b3c1f06926bb300516378563ade3cea2d9 io.sparkring.rank: '1' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank2.yaml b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank2.yaml index 74eb3af4..b0367807 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank2.yaml +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank2.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: 4a974e2db09286e9cb909bcc26f54940e37a75184941059f79e5952f23284a35 + io.sparkring.deployment: 38ea9c03171c5382f69311c06670d6b3c1f06926bb300516378563ade3cea2d9 io.sparkring.rank: '2' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank3.yaml b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank3.yaml index b931930b..53f5347d 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank3.yaml +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/compose.rank3.yaml @@ -177,7 +177,7 @@ services: VLLM_WORKER_MULTIPROC_METHOD: spawn XDG_CACHE_HOME: /cache/swift15-qwen38-flash-next-f625053225d4-3ff0520224f2 labels: - io.sparkring.deployment: 4a974e2db09286e9cb909bcc26f54940e37a75184941059f79e5952f23284a35 + io.sparkring.deployment: 38ea9c03171c5382f69311c06670d6b3c1f06926bb300516378563ade3cea2d9 io.sparkring.rank: '3' network_mode: host ipc: host diff --git a/profiles/swift15-qwen38-flash-next-tp4/compose/selection.json b/profiles/swift15-qwen38-flash-next-tp4/compose/selection.json index edd1d562..c3db1940 100644 --- a/profiles/swift15-qwen38-flash-next-tp4/compose/selection.json +++ b/profiles/swift15-qwen38-flash-next-tp4/compose/selection.json @@ -3,5 +3,5 @@ "profile": "swift15-qwen38-flash-next-tp4", "checkpoint": null, "image_lock": "runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json", - "deployment": "4a974e2db09286e9cb909bcc26f54940e37a75184941059f79e5952f23284a35" + "deployment": "38ea9c03171c5382f69311c06670d6b3c1f06926bb300516378563ade3cea2d9" } diff --git a/runtime/common/installer.py b/runtime/common/installer.py index 96e330fc..590c2eb4 100644 --- a/runtime/common/installer.py +++ b/runtime/common/installer.py @@ -822,7 +822,7 @@ def export(directory, output, *, share=False): "Configure a four-Spark path with sparkring setup. Then run sudo sparkring install --profile " + lock["selection"]["profile"] + " --checkpoint " + lock["selection"]["target_variant"] + " --image " + runtime["name"] + " --transport sircl --nccl never" + flags + ".\n" - "The installer stages the plugin from its retained source checkout on every rank. " + "The installer stages the plugin and SIRCL adapter from its retained source checkout on every rank. " "The Compose files show the resulting rank settings with example paths.\n" ) else: diff --git a/runtime/common/serving.py b/runtime/common/serving.py index fdec8bf5..47a7ad2c 100644 --- a/runtime/common/serving.py +++ b/runtime/common/serving.py @@ -80,6 +80,8 @@ ROW_OWNED_PREFILL_CONTEXT = 262144 ROW_OWNED_PREFILL_SOURCE = "integrations/vllm/ds41_row_shard" ROW_OWNED_PREFILL_TARGET = "/opt/ds41_row_shard" +ROW_OWNED_SIRCL_SOURCE = "spark_transport/sircl/sparkring_sircl/vllm/adapter.py" +ROW_OWNED_SIRCL_TARGET = "/usr/local/lib/python3.12/dist-packages/sparkring_sircl/vllm/adapter.py" # name: (container environment variable, value, help). save_cpu shortens the # time vLLM's shared-memory readers poll after a read from one second to 2 ms, # so between decode steps they sleep until notified instead of keeping CPU @@ -450,7 +452,10 @@ def container(spec, settings, *, rank, model=None, source_root=None): python_path = env.get("PYTHONPATH", "/opt/sparkring/toolchain/python:/opt/sparkring/addons/python") env["VLLM_PLUGINS"] = ",".join(filter(None, (plugins, "ds41_row_shard"))) env["PYTHONPATH"] = f"{ROW_OWNED_PREFILL_TARGET}:{python_path}" - mounts = (*mounts, Bind(str(PurePosixPath(source_root) / ROW_OWNED_PREFILL_SOURCE), ROW_OWNED_PREFILL_TARGET, True)) + source = PurePosixPath(source_root) + mounts = (*mounts, + Bind(str(source / ROW_OWNED_PREFILL_SOURCE), ROW_OWNED_PREFILL_TARGET, True), + Bind(str(source / ROW_OWNED_SIRCL_SOURCE), ROW_OWNED_SIRCL_TARGET, True)) return dataclasses.replace(spec, command=command, mounts=mounts, environment=env, health_command=health) diff --git a/runtime/common/test_image_lock.py b/runtime/common/test_image_lock.py index a64a0162..431b0ea3 100644 --- a/runtime/common/test_image_lock.py +++ b/runtime/common/test_image_lock.py @@ -463,7 +463,7 @@ def test_the_glm53_tp8_profile_runs_only_on_an_image_that_carries_the_glm53_plug profile = "glm53-nvfp4-tp8" assert image_lock.required_plugins(profile) == ["glm_dsa_indexer_split", "glm53full_speedups", "glm_dcp_decode_comm"] - assert derive_glm53_plugins.PLUGINS == {**PLUGINS, "glm_dcp_decode_comm": "2.0.3"} + assert derive_glm53_plugins.PLUGINS == {**PLUGINS, "glm_dcp_decode_comm": "2.0.4"} with pytest.raises(ValueError, match=f"{profile} loads the vLLM plugins glm_dsa_indexer_split, " "glm53full_speedups, glm_dcp_decode_comm"): image_lock.for_profile(profile, with_eight_spark_profiles()) diff --git a/runtime/host/test_install_sircl.py b/runtime/host/test_install_sircl.py index 9a26c3cc..757eb97c 100644 --- a/runtime/host/test_install_sircl.py +++ b/runtime/host/test_install_sircl.py @@ -201,11 +201,15 @@ def test_row_owned_prefill_is_a_locked_deepseek_sircl_experiment(machine, sparks assert spec.environment["SIRCL_FABRIC"] == "path:4" assert "sircl" in spec.environment["VLLM_PLUGINS"].split(",") assert spec.mounts[:2] == plain_spec.mounts[:2] - assert [mount.target for mount in spec.mounts[:-1]] == [mount.target for mount in plain_spec.mounts] - plugin = spec.mounts[-1] + assert [(mount.target, mount.read_only) for mount in spec.mounts[:-2]] == [ + (mount.target, mount.read_only) for mount in plain_spec.mounts] + plugin, adapter = spec.mounts[-2:] assert (plugin.source, plugin.target, plugin.read_only) == ( saved["site"]["ranks"][rank]["repository"] + "/integrations/vllm/ds41_row_shard", "/opt/ds41_row_shard", True) + assert (adapter.source, adapter.target, adapter.read_only) == ( + saved["site"]["ranks"][rank]["repository"] + "/spark_transport/sircl/sparkring_sircl/vllm/adapter.py", + "/usr/local/lib/python3.12/dist-packages/sparkring_sircl/vllm/adapter.py", True) assert "--enforce-eager" not in spec.command and "--disable-custom-all-reduce" in spec.command plain_graphs = json.loads(plain_spec.command[plain_spec.command.index("--compilation-config") + 1]) graphs = json.loads(spec.command[spec.command.index("--compilation-config") + 1]) diff --git a/runtime/images/derive_glm53_plugins.py b/runtime/images/derive_glm53_plugins.py index 4ca7c8d8..795e9ec7 100644 --- a/runtime/images/derive_glm53_plugins.py +++ b/runtime/images/derive_glm53_plugins.py @@ -18,7 +18,7 @@ the fused ``q_a``/``kv_a`` latent projection is column-parallel over TP8 with one all-gather (``GLM53FULL_LATENT_SHARD=1``) and the MTP ``eh_proj`` is row-parallel (``GLM53FULL_EH_PROJ_TP=1``); -- ``glm_dcp_decode_comm`` 2.0.3 (``integrations/vllm/glm_dcp_decode_comm``): +- ``glm_dcp_decode_comm`` 2.0.4 (``integrations/vllm/glm_dcp_decode_comm``): exact changes to the DSA attention's decode context parallel collectives on a SIRCL DCP session, five items behind the ``GLM_DCP_DECODE_*`` flags (the query pack, the communication-stream overlap, the indexer ``wk`` overlap, @@ -84,7 +84,7 @@ SPEEDUPS = "integrations/vllm/glm53full_speedups/" DCP = "integrations/vllm/glm_dcp_decode_comm/" DCP_MODULES = ("__init__.py", "_scatter_pack_cute.py", "kernels.py", "layout.py", "reference.py", "runtime.py") -DCP_DIST_INFO = "glm_dcp_decode_comm-2.0.3.dist-info/" +DCP_DIST_INFO = "glm_dcp_decode_comm-2.0.4.dist-info/" # Every added file: the site-packages path, its repository source and the # SHA-256 of the repository bytes (the layer pins each result; additions have diff --git a/runtime/images/installer-images.md b/runtime/images/installer-images.md index f8a9e674..93dab2ef 100644 --- a/runtime/images/installer-images.md +++ b/runtime/images/installer-images.md @@ -151,7 +151,7 @@ inherited SHA-256 `None`, and the parent receipt must not record it. tool-result policy as a vLLM module and pins the `serving.py` that installs it. [derive_glm53_plugins.py](derive_glm53_plugins.py) adds the GLM-5.3 vLLM general plugins `glm_dsa_indexer_split` and `glm53full_speedups` 1.1.0 and -`glm_dcp_decode_comm` 2.0.3 with their dist-info directories and names all +`glm_dcp_decode_comm` 2.0.4 with their dist-info directories and names all three in `Layer.plugins`. The derived lock has its parent lock's schema. A parent with a diff --git a/runtime/images/test_derive_glm53_plugins.py b/runtime/images/test_derive_glm53_plugins.py index c0a545fa..ca083fd7 100644 --- a/runtime/images/test_derive_glm53_plugins.py +++ b/runtime/images/test_derive_glm53_plugins.py @@ -37,7 +37,7 @@ def test_replace_returns_only_the_pinned_files(): @pytest.mark.parametrize("plugin,package,version", [("glm_dsa_indexer_split", "glm-dsa-indexer-split", "1.1.0"), ("glm53full_speedups", "glm53full-speedups", "1.1.0"), - ("glm_dcp_decode_comm", "glm-dcp-decode-comm", "2.0.3")]) + ("glm_dcp_decode_comm", "glm-dcp-decode-comm", "2.0.4")]) def test_dist_info_registers_the_plugin_in_vllm_general_plugins(plugin, package, version): root = Path(derive_glm53_plugins.ROOT) metadata = (root / "integrations/vllm" / plugin / "dist-info" @@ -72,7 +72,7 @@ def re_fullmatch(value: str) -> bool: def test_the_layer_declares_each_plugin_at_its_dist_info_version(): """The derived v3 lock lists exactly the entry points and versions the layer's dist-info files register.""" - assert derive_glm53_plugins.PLUGINS == {"glm53full_speedups": "1.1.0", "glm_dcp_decode_comm": "2.0.3", + assert derive_glm53_plugins.PLUGINS == {"glm53full_speedups": "1.1.0", "glm_dcp_decode_comm": "2.0.4", "glm_dsa_indexer_split": "1.1.0"} assert derive_glm53_plugins.LAYER.plugins == derive_glm53_plugins.PLUGINS for name, version in derive_glm53_plugins.PLUGINS.items(): diff --git a/spark_transport/sircl/sparkring_sircl/vllm/adapter.py b/spark_transport/sircl/sparkring_sircl/vllm/adapter.py index 72ed32b5..d921735f 100644 --- a/spark_transport/sircl/sparkring_sircl/vllm/adapter.py +++ b/spark_transport/sircl/sparkring_sircl/vllm/adapter.py @@ -103,6 +103,7 @@ import contextlib import dataclasses import logging +import os import threading import time import weakref @@ -559,21 +560,17 @@ def _build_tp(self, slot: Any, single_node: bool | None, environ) -> None: gather=slot.size_limits.gather_bytes) def _prepare_tp_scatter(self, environ) -> tuple[str, ...]: - """BF16 session reduce-scatter for prefill row ownership, when the session has it. - - GLM-5.3-Flash's mHC rows (``VLLM_GLM53_MHC_PREFILL_SHARD``) and Qwen3.8's - hyper-connection rows (``VLLM_QWEN3_8_HC_PREFILL_MODE=shard``) - reduce-scatter every sublayer output. Without the session's - reduce-scatter the planner composes it as an all-reduce and this rank's - rows (same bits). Prepared only on a group NCCL may not run, with one of - the two settings and ``scatter_available`` on every rank (voted, like - every preparation). - """ + """Prepare the TP scatter dtypes used by row-owned prefill before graph capture.""" from . import mhc, qwen_hc - if self.placement.policy is not NcclPolicy.NONE or not (mhc.requested(environ) - or qwen_hc.requested(environ)): + if self.placement.policy is not NcclPolicy.NONE: + return () + env = os.environ if environ is None else environ + deepseek = env.get("DS41_ROW_SHARD_PREFILL", "").strip() == "1" + if not (deepseek or mhc.requested(env) or qwen_hc.requested(env)): return () + # DeepSeek stages Engram rows in BF16 and may defer the MoE sum in FP32. + dtypes = (torch.bfloat16, torch.float32) if deepseek else (torch.bfloat16,) available = bool(getattr(self.session, "scatter_available", False)) verdict = groupops.vote(self.cpu_group, (None, available), compare=True) if verdict is not None: @@ -581,18 +578,16 @@ def _prepare_tp_scatter(self, environ) -> tuple[str, ...]: f"{verdict}") if not available: return () - import torch - error = None try: - self.session.prepare((torch.bfloat16,), scatter=True, **sessionapi.link_keywords(self.session)) + self.session.prepare(dtypes, scatter=True, **sessionapi.link_keywords(self.session)) except Exception as exc: # noqa: BLE001 - voted below error = f"{type(exc).__name__}: {exc}" verdict = groupops.vote(self.cpu_group, error, compare=False) if verdict is not None: - raise SirclSetupError(f"SIRCL could not prepare the BF16 reduce-scatter of {self.placement.name}: " + raise SirclSetupError(f"SIRCL could not prepare reduce-scatter of {self.placement.name}: " f"{verdict}") - return ("bfloat16",) + return tuple(str(dtype).removeprefix("torch.") for dtype in dtypes) def _share_session(self) -> None: """Share the session of this rank's group with the same global ranks in the same order (voted).""" diff --git a/spark_transport/sircl/tests/test_vllm_registration.py b/spark_transport/sircl/tests/test_vllm_registration.py index a883975c..1db35a1f 100644 --- a/spark_transport/sircl/tests/test_vllm_registration.py +++ b/spark_transport/sircl/tests/test_vllm_registration.py @@ -426,6 +426,26 @@ def test_mhc_prefill_sharding_on_a_path_reduce_scatters_and_gathers_through_sirc assert sum(calls for (collective, _), calls in rows.items() if collective == "all_gather") == 3 +@pytest.mark.parametrize("enabled", [False, True]) +def test_deepseek_row_owned_prefill_prepares_native_tp_scatter(stub, monkeypatch, enabled): + module = emulation.session_module("sircl_emulated_deepseek_scatter", scatter_available=True) + monkeypatch.setitem(sys.modules, module.__name__, module) + stub.environ.update({"SIRCL_SESSION_MODULE": module.__name__, "SIRCL_NCCL": "never", + "DS41_ROW_SHARD_PREFILL": str(int(enabled))}) + plugin.register() + comms = _communicators("tp:0", [0, 1, 2, 3]) + for dtype in (torch.bfloat16, torch.float32): + partials = [(torch.arange(16 * 64).reshape(16, 64) % 31 + rank).to(dtype) for rank in range(4)] + expected = reference_sum(partials).chunk(4, dim=0) + outputs = run_ranks(4, lambda rank: comms[rank].reduce_scatter(partials[rank], dim=0)) + assert all(torch.equal(actual, owned) for actual, owned in zip(outputs, expected, strict=True)) + method = "scatter" if enabled else "allreduce_slice" + for comm in comms: + rows = [row for row in comm.sircl.counters.snapshot() if row["collective"] == "reduce_scatter"] + assert [(row["backend"], row["method"], row["calls"]) for row in rows] == [("sircl", method, 2)] + assert comm.pynccl_comm.disabled + + def test_mhc_prefill_sharding_is_refused_where_sircl_cannot_carry_it(stub, monkeypatch): stub.environ["VLLM_GLM53_MHC_PREFILL_SHARD"] = "1" plugin.register() From 0685378619fbac9582bbce3d8579f2e67fffa14c Mon Sep 17 00:00:00 2001 From: FujitsuPolycom <87842395+FujitsuPolycom@users.noreply.github.com> Date: Thu, 19 Nov 2026 23:03:25 -0600 Subject: [PATCH 5/7] Record sampled decode on the native SIRCL scatter trial --- .../row-owned-sircl-path4-20261119.jsonl | 4 ++++ .../deepseek-v41-flash/row-owned-sircl-path4-20261119.md | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.jsonl b/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.jsonl index c7d56e45..291d2baf 100644 --- a/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.jsonl +++ b/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.jsonl @@ -35,3 +35,7 @@ {"suite": "native_scatter", "case": "short_greedy_decode", "output_tokens": 384, "tok_s": 63.58} {"suite": "native_scatter", "case": "short_greedy_decode", "output_tokens": 384, "tok_s": 125.04} {"suite": "native_scatter", "case": "short_greedy_decode", "output_tokens": 384, "tok_s": 62.55} +{"suite": "native_scatter_decode_probe", "output_tokens": 384, "case": "short_t1", "temperature": 1, "prompt_tokens": 11, "cached": 0, "ttft_s": 0.21, "decode_tok_s": 55.96, "end_to_end_tok_s": 54.43, "accepted_pct": 31.0, "accepted_per_step": 1.18} +{"suite": "native_scatter_decode_probe", "output_tokens": 384, "case": "8k_t1", "temperature": 1, "prompt_tokens": 8192, "cached": 0, "ttft_s": 1.295, "decode_tok_s": 47.02, "end_to_end_tok_s": 40.68, "accepted_pct": 28.6, "accepted_per_step": 1.1} +{"suite": "native_scatter_decode_probe", "output_tokens": 384, "case": "short_t1", "temperature": 1, "prompt_tokens": 11, "cached": 0, "ttft_s": 0.206, "decode_tok_s": 62.94, "end_to_end_tok_s": 61.04, "accepted_pct": 37.5, "accepted_per_step": 1.54} +{"suite": "native_scatter_decode_probe", "output_tokens": 384, "case": "8k_t1", "temperature": 1, "prompt_tokens": 8192, "cached": 0, "ttft_s": 1.312, "decode_tok_s": 52.67, "end_to_end_tok_s": 44.74, "accepted_pct": 29.5, "accepted_per_step": 1.13} diff --git a/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md b/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md index 5f697a69..03c76f08 100644 --- a/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md +++ b/performance/records/deepseek-v41-flash/row-owned-sircl-path4-20261119.md @@ -100,3 +100,11 @@ Both fixed prompts returned the reference first token. Prefix continuation reused 7,936 tokens and a concurrent 64-token decode finished during an unaligned prefill. The serving trial used manual containers. The installer plan was verified offline. [Sample data](row-owned-sircl-path4-20261119.jsonl) + +Two temperature-one requests per workload measured 59.45 short-prompt +and 49.84 8K decode tok/s after the first token. The earlier probe +measured 75.50 and 68.03. Median draft acceptance fell from 48.05% to +34.25% for the short prompt and from 43.50% to 29.05% at 8K. The 8K probe +generates fresh prompt IDs on each run. Pure decode and the 11-token short +prefill do not use row-owned scatter. These results show a decode difference +between starts. Its cause remains unverified. From 3bd81f75d0f3496ffae828e9aa5340fc2584b16c Mon Sep 17 00:00:00 2001 From: FujitsuPolycom <87842395+FujitsuPolycom@users.noreply.github.com> Date: Thu, 19 Nov 2026 23:14:09 -0600 Subject: [PATCH 6/7] Fix libsircl builds with current CMake and GCC --- spark_transport/libsircl/CMakeLists.txt | 21 +++++++++++---------- spark_transport/libsircl/src/bootstrap.c | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/spark_transport/libsircl/CMakeLists.txt b/spark_transport/libsircl/CMakeLists.txt index 4d75bf84..e184e3cf 100644 --- a/spark_transport/libsircl/CMakeLists.txt +++ b/spark_transport/libsircl/CMakeLists.txt @@ -46,8 +46,15 @@ foreach(pack kernels fold links p2p) COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/embed_fatbin.py ${FATBIN} ${CMAKE_CURRENT_BINARY_DIR}/${pack}_fatbin.c --symbol sccl_${pack}_fatbin DEPENDS ${FATBIN} ${CMAKE_CURRENT_SOURCE_DIR}/tools/embed_fatbin.py) + list(APPEND LIBSIRCL_KERNEL_PACK_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${pack}_fatbin.c) endforeach() +# Share the generated pack objects so parallel Make targets cannot regenerate +# and read the same fatbin source at the same time. +add_library(sircl_kernel_packs OBJECT ${LIBSIRCL_KERNEL_PACK_SOURCES}) +set_target_properties(sircl_kernel_packs PROPERTIES POSITION_INDEPENDENT_CODE ON) +target_compile_options(sircl_kernel_packs PRIVATE -O0 -w) + # The engine's setup check of the library's local feature word (p2p_local_features bit 0: p2p_destroy counts # failed verbs calls; SIRCL change LF), on by default as in the Makefile (P2P_FEATURES). option(LIBSIRCL_P2P_FEATURES "check the point-to-point library's local feature word at setup" ON) @@ -78,9 +85,8 @@ foreach(target transport_hw transport_emu) endforeach() add_library(sircl SHARED src/api.c src/bootstrap.c src/stubs.c src/aliases.c src/device_api.c src/fabric.c src/engine.c - src/cuda_api.c src/kernelpack.c ${CMAKE_CURRENT_BINARY_DIR}/kernels_fatbin.c - ${CMAKE_CURRENT_BINARY_DIR}/fold_fatbin.c ${CMAKE_CURRENT_BINARY_DIR}/links_fatbin.c - ${CMAKE_CURRENT_BINARY_DIR}/p2p_fatbin.c $ $) + src/cuda_api.c src/kernelpack.c $ + $ $) target_compile_features(sircl PRIVATE c_std_11) target_compile_definitions(sircl PUBLIC LIBSIRCL_CPU_ONLY NCCL_OS_LINUX PRIVATE LIBSIRCL_VERSION="${PROJECT_VERSION}" @@ -90,9 +96,6 @@ if(LIBSIRCL_P2P_FEATURES) endif() target_include_directories(sircl PUBLIC include PRIVATE src) target_compile_options(sircl PRIVATE -Wall -Wextra -Werror -Wno-format-truncation ${LIBSIRCL_HARDENING_COMPILE}) -set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/kernels_fatbin.c ${CMAKE_CURRENT_BINARY_DIR}/fold_fatbin.c - ${CMAKE_CURRENT_BINARY_DIR}/links_fatbin.c ${CMAKE_CURRENT_BINARY_DIR}/p2p_fatbin.c - PROPERTIES COMPILE_OPTIONS "-O0;-w") target_link_libraries(sircl PRIVATE Threads::Threads ${CMAKE_DL_LIBS}) set_target_properties(sircl PROPERTIES NO_SONAME TRUE SUFFIX ".so.${PROJECT_VERSION}") target_link_options(sircl PRIVATE -Wl,-soname,libnccl.so.2 -Wl,-Bsymbolic-functions -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports.map @@ -108,8 +111,7 @@ set_target_properties(fake_cuda PROPERTIES OUTPUT_NAME cuda NO_SONAME TRUE SUFFI target_link_options(fake_cuda PRIVATE -Wl,-soname,libcuda.so.1) target_compile_options(fake_cuda PRIVATE -Wall -Wextra -Werror) add_executable(check_entries tests/check_entries.c src/kernelpack.c src/cuda_api.c - ${CMAKE_CURRENT_BINARY_DIR}/kernels_fatbin.c ${CMAKE_CURRENT_BINARY_DIR}/fold_fatbin.c - ${CMAKE_CURRENT_BINARY_DIR}/links_fatbin.c ${CMAKE_CURRENT_BINARY_DIR}/p2p_fatbin.c) + $) target_include_directories(check_entries PRIVATE include src) target_compile_definitions(check_entries PRIVATE LIBSIRCL_CPU_ONLY NCCL_OS_LINUX) target_link_libraries(check_entries PRIVATE Threads::Threads ${CMAKE_DL_LIBS}) @@ -131,8 +133,7 @@ target_include_directories(test_link_plan PRIVATE src) target_compile_options(test_link_plan PRIVATE -Wall -Wextra -Werror) add_test(NAME link_plan COMMAND test_link_plan) add_executable(test_kernelpack_cache tests/test_kernelpack_cache.c src/kernelpack.c src/cuda_api.c - ${CMAKE_CURRENT_BINARY_DIR}/kernels_fatbin.c ${CMAKE_CURRENT_BINARY_DIR}/fold_fatbin.c - ${CMAKE_CURRENT_BINARY_DIR}/links_fatbin.c ${CMAKE_CURRENT_BINARY_DIR}/p2p_fatbin.c) + $) target_include_directories(test_kernelpack_cache PRIVATE include src) target_compile_definitions(test_kernelpack_cache PRIVATE LIBSIRCL_CPU_ONLY NCCL_OS_LINUX) target_link_libraries(test_kernelpack_cache PRIVATE Threads::Threads ${CMAKE_DL_LIBS}) diff --git a/spark_transport/libsircl/src/bootstrap.c b/spark_transport/libsircl/src/bootstrap.c index 8dc61aac..5af568b1 100644 --- a/spark_transport/libsircl/src/bootstrap.c +++ b/spark_transport/libsircl/src/bootstrap.c @@ -72,7 +72,7 @@ struct root { }; static pthread_mutex_t roots_lock = PTHREAD_MUTEX_INITIALIZER; static struct root *roots; -static atomic_long process_owner = ATOMIC_VAR_INIT(0); +static atomic_long process_owner = 0; int sccl_bootstrap_process_valid(void) { long pid = (long)getpid(); From e996f9ee9fb955cc83c5efb054feb60608ea8ffb Mon Sep 17 00:00:00 2001 From: FujitsuPolycom <87842395+FujitsuPolycom@users.noreply.github.com> Date: Thu, 19 Nov 2026 23:36:22 -0600 Subject: [PATCH 7/7] Scope DeepSeek row-shard test dtype to its own tests --- integrations/vllm/ds41_row_shard/tests/conftest.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/integrations/vllm/ds41_row_shard/tests/conftest.py b/integrations/vllm/ds41_row_shard/tests/conftest.py index 71cb819c..9027b593 100644 --- a/integrations/vllm/ds41_row_shard/tests/conftest.py +++ b/integrations/vllm/ds41_row_shard/tests/conftest.py @@ -1,4 +1,4 @@ -"""Session setup: the plugin package on the path and float64 by default. +"""Make the plugin importable and use float64 for its numerical tests. float64 makes any arithmetic difference between the owned-row and full-row paths visible; summation order is fixed by ``tp_world``. @@ -7,8 +7,18 @@ import sys from pathlib import Path +import pytest import torch sys.path.insert(0, str(Path(__file__).resolve().parents[1])) sys.path.insert(0, str(Path(__file__).resolve().parent)) -torch.set_default_dtype(torch.float64) + + +@pytest.fixture(autouse=True) +def float64_default(): + previous = torch.get_default_dtype() + torch.set_default_dtype(torch.float64) + try: + yield + finally: + torch.set_default_dtype(previous)