diff --git a/.gitattributes b/.gitattributes index 4fb33ea0..69abd17d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,7 +4,6 @@ scripts/compose_builder/*.js text eol=lf *.patch text eol=lf integrations/sparkcache/*.patch whitespace=-trailing-space integrations/vllm/patches/**/*.patch whitespace=-trailing-space -runtime/releases/shared-2026.09.0-rc.1/sources/*.patch whitespace=-trailing-space # Qualification receipts bind the maintained conversation harness by file hash. performance/harnesses/validation/conversation_soak.py text eol=lf runtime/** text eol=lf @@ -26,10 +25,6 @@ runtime/deepseek0731-gb10/patches/*.patch whitespace=-trailing-space # Runtime overlays use byte-level hashes; these sources use LF on every platform. spark_transport/integrations/vllm/*.py text eol=lf -spark_transport/experiments/glm53_rocenante_overlay/** text eol=lf -spark_transport/experiments/cx7_hairpin_diagonal/** text eol=lf -# Preserve the vendored package's supplied bytes for its canonical tree digest. -third_party/b12x_roce/** -text whitespace=cr-at-eol runtime/transport_profiles/tp2-rocenante-adaptive/roce/** -text whitespace=cr-at-eol runtime/transport_profiles/tp2-rocenante-adaptive/LICENSE -text whitespace=cr-at-eol @@ -56,5 +51,4 @@ runtime/deepseek-v41-sglang/patches/*.patch whitespace=-trailing-space,-blank-at integrations/vllm/dcp2_prefill/*.patch whitespace=-trailing-space # Pinned SparkCache source bytes must survive Windows checkouts unchanged. -integrations/sparkcache/8abbe9da67b8/** -text integrations/sparkcache/4a17f1f5198e/** -text whitespace=cr-at-eol diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95677d30..ba222f0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,8 +102,6 @@ jobs: python -m pytest -n auto --dist loadfile runtime/images -q -rs - name: Test isolated-import Python suites run: | - # runtime/glm53-flash-e10536a/test_contract.py shares a module basename with - # runtime/glm53-spark-mtp3-mesh/performance/reasoning/test_contract.py. python -m pytest runtime/glm53-flash-e10536a -q -rs # Vendored SparkCache deploy/contract tests expect integrations/sparkcache/4a17f1f5198e on PYTHONPATH. # The two omitted files require unvendored upstream sparkcache repository files @@ -120,14 +118,12 @@ jobs: # Excluded here because another step or dedicated CI job owns them (zero duplicate runs): # - runtime/images, runtime/glm53-flash-e10536a, integrations/sparkcache/4a17f1f5198e (steps above) # - spark_transport/sircl (sircl job: isolated /sys/class/infiniband mount namespace) - # - integrations/lil (lil-bridge job: built pinned Go CLI) # - scripts/compose_builder (compose-builder job: Node 22 + SPARKRING_REQUIRE_NODE=1) # - runtime/common/test_compose*.py, runtime/common/test_toolchain_profiles.py, # scripts/test_sparkring_compose.py (compose-profiles job: Docker Compose + SPARKRING_REQUIRE_COMPOSE=1) # # Excluded because they require external container/GPU/image sources unavailable on CPU runners: # - runtime/deepseek-v41-gb10/tools/test_engram_packed.py (imports container-only vllm.models.deepseek_v4_1) - # - runtime/releases/shared-2026.09.0-rc.1/qualification (frozen b12x/GPU qualification fixtures) # - integrations/vllm/glm53full_speedups/tests and integrations/vllm/glm_dsa_indexer_split/tests # (require SPARKRING_GLM53_IMAGE_SOURCES pointing to the target image's vllm/ and b12x/ Python sources) image_tests=() @@ -140,14 +136,12 @@ jobs: --ignore=runtime/glm53-flash-e10536a \ --ignore=integrations/sparkcache/4a17f1f5198e \ --ignore=spark_transport/sircl \ - --ignore=integrations/lil \ --ignore=scripts/compose_builder \ --ignore=runtime/common/test_compose.py \ --ignore=runtime/common/test_compose_envelope.py \ --ignore=runtime/common/test_toolchain_profiles.py \ --ignore=scripts/test_sparkring_compose.py \ --ignore=runtime/deepseek-v41-gb10/tools/test_engram_packed.py \ - --ignore=runtime/releases/shared-2026.09.0-rc.1/qualification \ "${image_tests[@]}" -q -rs sircl: @@ -240,39 +234,6 @@ jobs: cmake --build build-cmake -j ctest --test-dir build-cmake --output-on-failure - lil-bridge: - name: pinned LIL bridge - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: actions/checkout@v7 - - uses: actions/checkout@v7 - with: - repository: FujitsuPolycom/lil - ref: 329cde801b847294005cb16765692032a6cdf206 - path: .lil-companion - persist-credentials: false - - uses: actions/setup-go@v7 - with: - go-version: '1.26.0' - cache-dependency-path: .lil-companion/go.sum - - uses: actions/setup-python@v7 - with: - python-version: ${{ env.PYTHON_VERSION }} - - name: Build and test companion lifecycle - working-directory: .lil-companion - run: | - go test ./... - go vet ./... - go build -o "$RUNNER_TEMP/lil" ./cmd/lil - - name: Test both SparkRing profiles against the pinned CLI - env: - LIL_TEST_BINARY: ${{ runner.temp }}/lil - run: | - python -m pip install --disable-pip-version-check -r requirements-dev.txt - test -x "$LIL_TEST_BINARY" - python -m pytest integrations/lil -q -rs - compose-profiles: name: generated Compose equivalence runs-on: ubuntu-latest diff --git a/.ruff.toml b/.ruff.toml index 5a43f11b..f027da44 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -11,15 +11,6 @@ extend-exclude = [ # transport manifest and protected baseline fixture inventories. "integrations/vllm/rocenante_prepared/roce/roce_oneshot.py" = ["F401"] "runtime/images/upgrades/checks/kda_baseline/reference_helpers.py" = ["F401"] -# The pinned upstream QSA fixture contains an unused diagnostic allocation; -# its bytes are part of the release's reference-fixture identity. -"runtime/releases/shared-2026.09.0-rc.1/qualification/fixtures/tests/attention/test_qsa_contract.py" = ["F841"] -# The decode A/B record binds this benchmark program by SHA-256 -# (decode-ab-20260925.json). Its CUDA-graph timing lambdas run inside each -# module-level loop iteration, before that iteration deletes `weights`. Ruff -# analyses the lambda bodies after the module-level `del weights` and reports -# `weights` inside them as an undefined name (F821). -"performance/records/qwen38-flash-next/decode-ab-20260925/bench_skinny.py" = ["F821"] # The CUDA/NCCL assembly installs this probe verbatim as # /opt/sparkring/toolchain/gpu_smoke.py. It verifies the toolchain receipt # before importing Torch, so that import follows the check deliberately. diff --git a/README.md b/README.md index aa46e9c4..d085f583 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ curl -fsSL https://fujitsupolycom.github.io/sparkring/install.sh | bash -s -- -- ``` This installs the release the [Install Builder](https://fujitsupolycom.github.io/sparkring/) -describes; the [pinned install command](docs/operations/install-reference.md#get-the-package) +describes; the [pinned install command](docs/operations/install-package.md#get-the-package) installs `main` or another commit. The installer asks before it changes anything: `--plan` previews and `--yes` @@ -41,7 +41,7 @@ a model on part of the Sparks. Node A restarts a model that stops serving; More: [documentation](docs/README.md) · [commands](docs/operations/commands.md) · [status dashboard](docs/operations/dashboard.md) · [Docker Compose files](docs/operations/compose-files.md) · -[pinned install command](docs/operations/install-reference.md#get-the-package) +[pinned install command](docs/operations/install-package.md#get-the-package) ## SIRCL @@ -145,7 +145,7 @@ Inference Lab), written by Jason (`original-el8`) in local-inference-lab/b12x dual-rail striping and graph-collective work by Luke Alonso (`lukealonso`), licensed under Apache-2.0; b12x now lives in FlashInfer at `flashinfer/experimental/b12x` -([provenance](third_party/b12x_roce/README.md#attribution-and-design-origins)). +([third-party notices](THIRD_PARTY_NOTICES.md)). SparkRing's NCCL patches follow Joseph Rose's [nccl-spark-switchless](https://github.com/josephdrose/nccl-spark-switchless). diff --git a/SECURITY.md b/SECURITY.md index b6f85e03..8bb8becf 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -20,5 +20,5 @@ A SparkRing deployment's model API has no authentication and listens on every interface of the Spark that serves it. Setup also adds an administration network and SSH service. The [install guide](docs/operations/install.md#security) and the -[install reference](docs/operations/install-reference.md#security-and-host-exposure) +[install reference](docs/operations/install-package.md#security-and-host-exposure) describe what is exposed and how to restrict it. diff --git a/docs/CI.md b/docs/CI.md index 7007826d..fe83adab 100644 --- a/docs/CI.md +++ b/docs/CI.md @@ -21,9 +21,8 @@ run this workflow. Jobs use read-only repository permissions. `--ignore` entries only for suites owned by dedicated jobs below (zero duplicate runs) and external image/GPU/upstream-only tests (`integrations/vllm/glm53full_speedups/tests`, - `integrations/vllm/glm_dsa_indexer_split/tests`, - `runtime/deepseek-v41-gb10/tools/test_engram_packed.py`, and - `runtime/releases/shared-2026.09.0-rc.1/qualification`). + `integrations/vllm/glm_dsa_indexer_split/tests`, and + `runtime/deepseek-v41-gb10/tools/test_engram_packed.py`). - `scripts/test_ci_checks.py` enforces that every tracked `test_*.py` file is either covered once by CI or explicitly listed as an external-artifact exclusion, so newly added tests cannot be silently orphaned. @@ -40,9 +39,6 @@ run this workflow. Jobs use read-only repository permissions. four CUDA 13.3 kernel packs (`nvcc`), checks exported library symbols (`tools/check_exports.py`), and runs `make check`, `make check-asan`, and the CMake `ctest` suite against the shared-memory verbs stand-in. -- `pinned LIL bridge` (`lil-bridge`) builds the source-pinned - [LIL deployment companion](../integrations/lil/README.md) with Go and - exercises `integrations/lil` against the built CLI. - `generated Compose equivalence` (`compose-profiles`) validates `scripts/generate_compose_examples.py --check` and runs the Compose and toolchain profile suites with Docker Compose (`SPARKRING_REQUIRE_COMPOSE=1`). diff --git a/docs/DEEPSEEK_V4_FLASH_SIRCL_AB.md b/docs/DEEPSEEK_V4_FLASH_SIRCL_AB.md deleted file mode 100644 index c99ed8ac..00000000 --- a/docs/DEEPSEEK_V4_FLASH_SIRCL_AB.md +++ /dev/null @@ -1,131 +0,0 @@ -# Four-Spark DeepSeek SIRCL A/B plan - -Status: **Experimental**, with bounded execution evidence from one four-Spark deployment. This -plan prepares a matched transport experiment for four directly cabled NVIDIA -DGX Sparks. It does not qualify SIRCL or the DeepSeek profile and does not -provide an execution command that contacts a host. The completed temperature-1 -transport comparison is recorded in -[`sircl-width4096-nccl-ab-20260822.md`](../performance/records/deepseek-v4-flash/sircl-width4096-nccl-ab-20260822.md). - -The patched-NCCL control and SIRCL candidate use the same serving contract. The -plan validates model, scheduler, memory, and speculation fields against -`recipes/deepseek-v4-flash-0731.json`, then applies the experiment's explicit -4,096-token batch budget to both arms: - -- TP4 across four ranks and DCP1; -- DSpark with five draft tokens and the B12X MoE backend; -- 1,048,576 maximum model tokens; -- 32 maximum sequences; -- 4,096 maximum batched tokens; -- 17,179,869,184 key-value-cache bytes per rank; -- `fp8_ds_mla` key-value representation; and -- the immutable serving-image digest in `runtime/faststart-lock.json`. - -Generate the offline plan: - -```bash -python scripts/deepseek_sircl_ab_plan.py \ - --output build/deepseek-sircl-ab-plan.json -``` - -The command reads local files and writes one JSON document. It has no execute -mode. The generated Docker argument arrays contain placeholders and must not be -treated as an authorized deployment. - -Before any live action, bind the completed patched-NCCL benchmark receipt and -the exact harness bytes into the experiment record, resolve all four rank -environments, build and hash the six SIRCL runtime mount inputs, and obtain -explicit authorization to stop the control and start the candidate. - -## Candidate environment - -Copy the canonical per-rank environment and the research overlay separately: - -```bash -cp scripts/config/deepseek-v4-flash-0731.env.example /path/to/rank-0.env -cp scripts/config/deepseek-v4-flash-0731-sircl-research.env.example \ - /path/to/rank-0-sircl.env -``` - -Repeat for ranks 1 through 3. The candidate uses both files; Docker applies the -research overlay after the canonical environment. Resolve each direct peer -address against the device named on the same line. Do not reuse the routed -`VLLM_HOST_IP` as both SIRCL peers unless that address is actually assigned on -both direct links. - -Both generated commands contain identical read-only placeholders for two vLLM -CUDA-capture overlays, the native SIRCL library, and three Python runtime -modules. Mounting the same bytes in both arms keeps transport activation in the -research environment overlay as the only A/B difference. Replace every -`/path/to/sircl-runtime/` source with an immutable file built from the checkout -and record its SHA-256. These mounts are launch inputs; the pinned serving image -is not claimed to contain their bytes. - -The candidate changes only transport activation. Eager prefill, width-256 -drafter collectives, and unsupported signatures remain on patched NCCL. The -width-4096 target-verification collectives are admitted only during CUDA graph -capture through the existing maximum-capacity `[Q <= 512, 4096]` session. -Five draft tokens plus one target row produce six verification rows per active -sequence, so the 32-sequence quickstart contract requires at most Q192. - -## Required live evidence - -A later authorized deployment must retain, for every rank: - -- the resolved Docker argument array and both environment files; -- image ID and manifest digest; -- model revision and file hashes; -- graph status before and after the measured request window; -- captured-node and published/consumed/completed sequence counts; -- zero overflow sequence; -- speculative draft and acceptance counters; -- bounded output comparison against the patched-NCCL control; and -- container and host health after the run. - -Only a matched A/B with identical prompts, seeds, request ordering, cache -state, warmup, and serving contract can support a performance conclusion. - -## Sustained-decode measurement - -The generated plan reproduces the accepted sustained-decode method rather -than a finite-request latency benchmark: - -- each concurrency level runs in a separate harness invocation; -- tokenized chat prompts contain exactly 2,048 or 8,192 input tokens; - generated output tokens are separate; -- every cell measures 90 seconds after a hidden ten-second C1 warmup at the - largest requested context; -- every stream has a fully unique context; -- requests use temperature 1.0, ignore EOS, and permit up to 8,192 output - tokens; observed concurrency and underfill flags determine cell validity; -- queueing, underfilled concurrency, errors, capacity rejection, warmup - timeout, and missing hardware samples reject a cell; and -- the headline uses client token timing only when it covers enough of the - measured window. Otherwise it uses the exact Prometheus generation-token - delta over the post-warmup 90-second wall window. - -The control and candidate must report the same headline source for a paired -cell. A client-timestamp result and a Prometheus-fallback result are separate -measurements even when both have tokens-per-second units. The harness file -must be retained with its version, Git revision, and SHA-256 because local -uncommitted changes are part of the measurement identity. - -## TP2-aligned C32 comparison - -The generated plan also contains one distinct comparison invocation matching -the established two-Spark base workload: one exact 16K context, C32, -temperature 1.0, a 240-second measurement window, 32,768 maximum output tokens, -a 2,198,756-token key-value budget, and a 600-second readiness timeout. The -large output ceiling keeps admitted streams alive while all 32 unique prompts -finish prefill. Measurement is valid only after the scheduler reports all 32 -requests running simultaneously and no request waiting. The command asserts -`--isolated-server` so the process-global vLLM generation-token counter is the -headline authority when duration-bounded streams do not emit complete OpenAI -usage. - -This invocation is not part of the 2K/8K validation matrix. Compare it only to -another 16K/C32 receipt using the same timing, output ceiling, temperature, -key-value budget, prompt construction, readiness gate and serving contract. -Both arms retain the same 4,096-token server batch budget. -The completed transport comparison is recorded in -[`sircl-width4096-nccl-ab-20260822.md`](../performance/records/deepseek-v4-flash/sircl-width4096-nccl-ab-20260822.md). diff --git a/docs/DEEPSEEK_V4_SIRCL_FINDINGS.md b/docs/DEEPSEEK_V4_SIRCL_FINDINGS.md deleted file mode 100644 index 57c9c5bf..00000000 --- a/docs/DEEPSEEK_V4_SIRCL_FINDINGS.md +++ /dev/null @@ -1,200 +0,0 @@ -# DeepSeek-V4-Flash-0731 on Four DGX Sparks: SIRCL Findings - -Status: **Experimental**. This page summarizes the recorded four-Spark -DeepSeek-V4-Flash-0731 SIRCL investigation and its matched patched-NCCL -comparison. It does not promote SIRCL into the public DeepSeek quickstart. - -## Executive summary - -The recorded four-Spark TP4/DCP1 run captured and replayed the width-4096 -target and DSpark CUDA-graph collective path on every rank, passed API smoke -checks, and reported zero overflow and fatal state under sustained C32 load. - -The comparison did not establish a SIRCL throughput improvement. Both arms -used NCCL for prefill. Coding Peak is about 1.9% -lower by mean. At near-identical DSpark acceptance, matched live samples place -SIRCL approximately 2.4–3.0% below patched NCCL. These diagnostic windows do -not establish causation. Patched NCCL remains the DeepSeek default. - -## Tested serving contract - -| Setting | Value | -|---|---| -| Model | `deepseek-ai/DeepSeek-V4-Flash-0731` | -| Hardware | Four directly cabled NVIDIA DGX Sparks, direct cycle | -| Parallelism | TP4 / DCP1 | -| Runtime image | `ghcr.io/fujitsupolycom/gb10-vllm-serving@sha256:6fc26fdad81a18f0fff67ce0a05f6d90165625ea2e1cac8a6f39bfb462017028` | -| Compute / activation dtype | BF16; checkpoint weights retain their FP8/FP4 formats | -| Model context | 1,048,576 tokens | -| Maximum sequences | 32 | -| Batch-token budget | 4,096 | -| KV reservation | 17,179,869,184 bytes/rank | -| KV format | `fp8_ds_mla` | -| KV block size | 256 | -| Scheduler | Async; full-input-length reservation | -| Prefix caching | Disabled | -| External KV cache | Disabled | -| Speculation | DSpark, 5 draft tokens, B12X, non-greedy draft | -| Public API model | `deepseek-v4-flash-0731` | - -The A/B control preserved the same image, model, six runtime mounts, shared -CUDA-capture stream, scheduler, KV reservation, and DSpark settings. It changed -only transport activation: - -| Arm | TP4 mode | Width-4096 admission | -|---|---|---:| -| SIRCL candidate | `custom` | `1` | -| Patched NCCL control | `disabled` | `0` | - -## SIRCL execution evidence - -| Gate | Observation | -|---|---| -| API health | HTTP 200 | -| Deterministic smoke | `SIRCL_OK_4096` returned | -| Captured graph nodes | 6,749 per rank | -| Final native sequence | 2,926,190 published/consumed/completed per rank | -| Overflow | 0 on every rank | -| Fatal state | None | -| Replay | Advanced and caught up on every rank | -| Final state | SIRCL containers stopped at the end of the recorded test | - -The recorded DeepSeek SIRCL session used: - -```text -graph kernel: tiered_64k -wire schedule: sequential -protocol: two_slot_deferred_ack -query capacity: 512 rows -width: 4096 elements -``` - -Five draft rows plus one target row require at most 192 verification rows at -32 sequences, inside the 512-row session capacity. - -## Benchmark method - -The sustained-decode matrix used separate invocations per concurrency, exact -token targeting, 100% unique contexts, temperature 1.0, EOS ignored, and a -90-second post-warmup window. The aligned transport comparison used this -16K/C32 workload: - -| Parameter | Value | -|---|---:| -| Context | 16,384 tokens | -| Concurrency | 32 | -| Measurement | 240 seconds | -| Maximum output | 32,768 tokens | -| KV budget | 2,198,756 tokens | -| Readiness timeout | 600 seconds | -| Readiness gate | 32 running, 0 waiting, stable before measurement | -| Isolation | `--isolated-server` for the final frozen-harness pair | - -Client-accounting policies differed across the retained samples. They include -server-counter observations from the comparison -and one additional run per arm using a frozen harness with explicit -isolated-server authority. The client stream headline is rejected whenever it disagrees with the -server generation-token delta. - -## Results - -### Cold prefill - -SIRCL is not expected to affect prefill. Both arms route prefill through NCCL. - -| Exact context | SIRCL client tok/s | NCCL client tok/s | Difference | -|---:|---:|---:|---:| -| 8K | 2,445 | 2,395 | SIRCL +2.1% | -| 64K | 2,364 | 2,381 | NCCL +0.7% | -| 128K | 2,172 | 2,212 | NCCL +1.8% | - -Server-side prefill validation tracked the client values within about 0.5%. -These observations do not demonstrate a SIRCL prefill effect. - -### C1 decode, three temperature-1.0 repetitions - -| Context | SIRCL repetitions | SIRCL mean | NCCL repetitions | NCCL mean | -|---:|---:|---:|---:|---:| -| 2K | 62.9, 97.1, 94.4 | 84.8 | 103.2, 103.2, 104.8 | 103.7 | -| 8K | 94.8, 99.3, 113.6 | 102.6 | 104.5, 54.3, 65.4 | 74.7 | - -These short C1 runs are not a clean transport measurement. Temperature-1.0 -DSpark acceptance varied enough to reverse the apparent winner between -contexts and repetitions. - -### Coding Peak - -Five sequential standard cc1 Coding Peak samples per arm: - -| Metric | SIRCL | NCCL | SIRCL delta | -|---|---:|---:|---:| -| Median tok/s | 92.7 | 95.8 | -3.2% | -| Mean tok/s | 93.4 | 95.2 | -1.9% | -| Maximum tok/s | 96.8 | 100.0 | -3.2% | -| CJK-corrupted runs | 0 | 0 | — | - -### Long C32/16K decode - -Three 240-second server-counter observations per arm were retained. Raw rates -are strongly coupled to speculative acceptance: - -| Arm | Round 1 | Round 2 | Round 3 | Mean | Mean acceptance | -|---|---:|---:|---:|---:|---:| -| SIRCL | 530.1 | 567.5 | 546.0 | 547.9 | 78.95% | -| NCCL | 550.6 | 577.8 | 472.9 | 533.8 | 69.70% | - -The raw means are not a transport verdict because SIRCL had higher average -acceptance. The frozen isolated-server pair was also acceptance-confounded: - -| Arm | Server tok/s | Acceptance | -|---|---:|---:| -| SIRCL | 598.8 | 84.06% | -| NCCL | 511.9 | 64.69% | - -### Matched-acceptance live samples - -The clearest transport signal came from nearby 10-second server-log samples -where mean accepted length and draft acceptance were effectively equal: - -| Mean accepted length | Draft acceptance | SIRCL tok/s | NCCL tok/s | SIRCL delta | -|---:|---:|---:|---:|---:| -| 4.46 | 69.2% | 585.1 | 599.6 | -2.4% | -| ~4.85 | ~77.1% | 636.8 | 653.1 | -2.5% | - -Other nearby matched windows placed SIRCL approximately 3% lower. These are -diagnostic windows rather than independent 240-second repetitions, but they -have the same direction as the Coding Peak difference. Matching acceptance -does not isolate transport cost from other runtime or workload differences. - -## Tiered-64K versus striped transport - -The recorded SIRCL arm used sequential `tiered_64k`. The separate dual-port striped -schedule has been probed, but it requires the fused graph kernel and cannot be -combined with tiered-64K in the current adapter. - -Existing four-Spark transport probes found: - -| Shape | Sequential tiered-64K | Dual-port striped/fused | Finding | -|---|---:|---:|---| -| Q40 p50 | 174.1 µs | 190.5–190.7 µs | Sequential faster | -| Q512 p50 | 1,223.4 µs | 1,228.5–1,234.6 µs | Essentially tied | - -Striping did not show a median win, so it is not enabled for the DeepSeek -width-4096 path. - -## Finding and next step - -The recorded run passed smoke and runtime-health checks but did not establish -a throughput advantage over patched NCCL. The public DeepSeek profile remains -on NCCL; these results do not qualify another SIRCL revision. - -The next useful experiment is acceptance-controlled transport profiling: - -1. Freeze one harness revision and one prompt set. -2. Use temperature 1.0 with identical prompt, seed, and request ordering, then - compare windows with matched DSpark acceptance. -3. Compare per-iteration collective timing and server generation counters. -4. Investigate the 2.4–3.0% graph transport gap before considering promotion. - -The implementation and evidence are linked from -[`docs/DEEPSEEK_V4_FLASH_SIRCL_AB.md`](DEEPSEEK_V4_FLASH_SIRCL_AB.md). diff --git a/docs/GLM52_35BPW_ACCEPTANCE_RUNBOOK.md b/docs/GLM52_35BPW_ACCEPTANCE_RUNBOOK.md deleted file mode 100644 index 6cf81901..00000000 --- a/docs/GLM52_35BPW_ACCEPTANCE_RUNBOOK.md +++ /dev/null @@ -1,142 +0,0 @@ -# GLM-5.2 rebuilt-image acceptance workload - -Status: **retired**. The GLM-5.2 EXL3 profile is defined only for TP4 with -decode context parallelism 4 (DCP4), which SparkRing does not offer or support. -This workload is retained for reproducing that profile's recorded evidence; it -does not lead to a supported deployment. - -Use this procedure for the fixed-seed and bounded-concurrency item in -[`GLM52_35BPW_PROMOTION_CHECKLIST.md`](GLM52_35BPW_PROMOTION_CHECKLIST.md). -It produces functional-equivalence, speculative-counter, transport, and C1/C2/C8 -receipts for one immutable rebuilt image. It does not promote an image by -itself or establish a general performance claim. -C1, C2 and C8 mean one, two and eight concurrent requests. - -## Conditions - -Record these values before sending traffic: - -- rebuilt Docker image ID and immutable parent manifest digest; -- SparkRing commit and generated exact-Q40 profile SHA-256; -- model repository, revision, config SHA-256, and index SHA-256; -- four physical ranks in cycle order, TP4/DCP4, all-gather/reduce-scatter - DCP communication (`ag_rs`), interleave one; -- KV representation and bytes per rank, model length, maximum sequences, and - maximum batched tokens; -- cache state and every client other than the acceptance harness; -- NVIDIA driver, CUDA runtime, and whether the P2P override is active. - -The MTP0 baseline and MTP4 candidate must use the same rebuilt image, -checkpoint, parallelism, KV geometry, graph settings, and transport settings. -Only the speculative depth changes. - -## Fixed-seed equivalence - -Start the rebuilt image with speculative decoding disabled and capture the -MTP0 baseline: - -```bash -python runtime/exl3-r7/mtp4_qualification.py capture-mtp0 \ - --base-url 'http://:8000' \ - --model glm-5.2-exl3-r7-3.5bpw \ - --output /path/to/receipts/mtp0.json -``` - -Restart the same image with its generated fixed-MTP4 exact-Q40 profile, then -qualify it against the baseline: - -```bash -python runtime/exl3-r7/mtp4_qualification.py qualify-mtp4 \ - --base-url 'http://:8000' \ - --model glm-5.2-exl3-r7-3.5bpw \ - --baseline /path/to/receipts/mtp0.json \ - --output /path/to/receipts/mtp4.json -``` - -The tracked harness fixes the prompt corpus, seed, greedy sampling, -repetitions, and 128/256-token completion lengths. It requires finite log -probabilities, repeatable completion hashes, equality with the MTP0 hashes, -and positive, coherent fixed-MTP4 counters at positions zero through three. -Either JSON document with status other than `pass` rejects promotion. - -## Bounded C1/C2/C8 workload - -Before the workload, copy each rank's JSON file at its configured -`SPARK_TP4_GRAPH_STATUS_PATH` to -`/path/to/receipts/transport-before-rank.json`. Use the reviewed site -plan for container names and SSH targets; keep those site values out of the -public receipt. - -Save the pre-workload `/v1/models` response as `models-before.json` with -these receipts; use it to check the served identity and model length afterward. - -Use -[`local-inference-lab/llm-inference-bench`](https://github.com/local-inference-lab/llm-inference-bench) -commit `0b4185b5b435e948b199c9077a00b084864aa963`. Install its declared -dependencies in an isolated environment, then run exactly one 16K-context -cell at C1, C2, and C8. `--skip-prefill` omits the separate prefill measurement; -the decode requests still carry their 16K prompts. The shown KV budget is the -recipe's recorded 1,156,864-token pool. Confirm that value in this image's startup -log, or use its reported logical KV capacity and record the difference: - -```bash -python llm_decode_bench.py \ - --host '' \ - --port 8000 \ - --model glm-5.2-exl3-r7-3.5bpw \ - --contexts 16k \ - --concurrency 1,2,8 \ - --request-count 16 \ - --warmup-request-count 1 \ - --max-tokens 128 \ - --temperature 1.0 \ - --token-targeting exact \ - --kv-budget 1156864 \ - --dcp-size 4 \ - --skip-prefill \ - --no-resume \ - --display-mode plain \ - --output /path/to/receipts/c1-c2-c8.json -``` - -This is a finite request-count gate: each cell discards one warm-up request and -waits for exactly 16 measured requests. Promotion requires all three cells, -zero request errors, no capacity skip, no warm-up timeout, the requested -concurrency in every cell, and 128 completion tokens for every successful -request. Throughput values are retained as observations but have no promotion -threshold. - -## Post-run gates and retention - -After the C8 cell: - -1. require `/health` HTTP 200 and the same `/v1/models` identity and model - length; -2. require all four containers to remain running with unchanged process - generations; -3. copy each rank's updated `SPARK_TP4_GRAPH_STATUS_PATH` JSON to - `/path/to/receipts/transport-after-rank.json` and run: - - ```bash - python runtime/exl3-r7/mtp4_qualification.py audit-transport \ - --before-status /path/to/receipts/transport-before-rank0.json \ - --before-status /path/to/receipts/transport-before-rank1.json \ - --before-status /path/to/receipts/transport-before-rank2.json \ - --before-status /path/to/receipts/transport-before-rank3.json \ - --after-status /path/to/receipts/transport-after-rank0.json \ - --after-status /path/to/receipts/transport-after-rank1.json \ - --after-status /path/to/receipts/transport-after-rank2.json \ - --after-status /path/to/receipts/transport-after-rank3.json \ - --output /path/to/receipts/transport.json - ``` - - Require status `pass`; this rejects fatal, overflow, dropped-signature, - stock TP/vocabulary fallback, and missing captured-width evidence. -4. record the SHA-256 of `models-before.json`, `mtp0.json`, `mtp4.json`, `c1-c2-c8.json`, and - `transport.json`; -5. copy sanitized receipts into the promotion evidence record or retain them at - an immutable public artifact location. - -The acceptance record must state conditions, measurement, result, conclusion, -and limitations. Missing receipts, a changed image ID, an incomplete cell, or -failed post-run health rejects promotion rather than becoming a partial pass. diff --git a/docs/GLM52_35BPW_FIXED_MTP4_PROFILE.md b/docs/GLM52_35BPW_FIXED_MTP4_PROFILE.md deleted file mode 100644 index 1bd11d47..00000000 --- a/docs/GLM52_35BPW_FIXED_MTP4_PROFILE.md +++ /dev/null @@ -1,53 +0,0 @@ -# GLM-5.2 EXL3 3.5-bpw fixed-MTP4 profile - -## Status and scope - -Status: **retired**. The profile is defined only for TP4 with decode context -parallelism 4 (DCP4), which SparkRing does not offer or support, and no -supported profile serves GLM-5.2. This record is retained for reproducing the -recorded configuration. - -The tested profile uses a 1,048,576-token request limit and 16 sequences on -four directly cabled DGX Sparks. - -The profile is defined by -[`recipes/glm52-exl3-r7-3.5bpw.json`](../recipes/glm52-exl3-r7-3.5bpw.json). -The checkpoint is -`brandonmusic/GLM-5.2-EXL3-TR3v4-3.5bpw-MTP78@9ab9579774cc432df91567a36f6e9e863e0d4c9f`. - -## Serving contract - -| Setting | Value | -|---|---| -| Parallelism | TP4 plus DCP4 `ag_rs` | -| Speculation | fixed MTP4, greedy draft sampling | -| Request limit | 1,048,576 tokens | -| Maximum sequences | 16 | -| Key-value cache | `nvfp4_ds_mla`, dynamic per-token scale, FP8 RoPE | -| Key-value allocation | 9,250,000,000 bytes per rank | -| Key-value block size | 64 tokens | -| Graph capture | `FULL_AND_PIECEWISE`, query rows Q1 through Q40 | -| TP transport | SIRCL with patched NCCL fallback | -| DCP and indexer | stock collectives | -| Online quantization | EXL3 K6, target-only scope | -| Prefix caching | native prefix caching enabled | - -The target-only exact-Q40 policy applies only to exactly 40 query rows. It uses -capacity 40 and route block 8; other row counts retain the profile's normal -routing behavior. - -## Measured results - -The [benchmark record](../performance/records/glm-3.5bpw/normalized-base-20260822.md) -contains prefill and C1/C2/C4/C8 decode through 128K, with the exact settings, -sample counts, variability limits, and receipts. Coding Peak averaged 25.39 -tokens/s over five requests. These results do not qualify an untested image -or establish quality at the configured 1,048,576-token limit. - -## Limits - -The TP native path covers tested TP all-reduce and vocabulary families; DCP and -indexer collectives remain stock. -The [retired profile guide](../profiles/glm52-exl3-r7-3.5bpw/README.md) and -[the reproduction procedure](GLM52_35BPW_REPRODUCTION.md) retain the build and -generated-layer steps. diff --git a/docs/GLM52_35BPW_PROMOTION_CHECKLIST.md b/docs/GLM52_35BPW_PROMOTION_CHECKLIST.md deleted file mode 100644 index 25566a94..00000000 --- a/docs/GLM52_35BPW_PROMOTION_CHECKLIST.md +++ /dev/null @@ -1,57 +0,0 @@ -# Promote a rebuilt GLM-5.2 EXL3 3.5-bpw image - -Status: **retired**. The GLM-5.2 EXL3 profile is defined only for TP4 with -decode context parallelism 4 (DCP4), which SparkRing does not offer or support, -so passing this checklist does not make a rebuilt image a supported deployment. -The checklist is retained as the qualification criteria recorded for that -profile. - -Use this checklist for an image built from the tracked GLM recipe -`recipes/glm52-exl3-r7-3.5bpw.json`. The qualified status of the operator image -does not transfer to another image ID. -Use the [retired GLM-5.2 profile guide](../profiles/glm52-exl3-r7-3.5bpw/README.md) -for build and profile-generation commands. - -## Offline qualification - -These preparation steps do not launch serving; downloads require network access. - -- [ ] Build from `runtime/exl3-r7/build-image.sh` with an immutable parent image - ID and an audited parent license expression. -- [ ] Record the resulting Docker image ID. -- [ ] Download and verify - `brandonmusic/GLM-5.2-EXL3-TR3v4-3.5bpw-MTP78@9ab9579774cc432df91567a36f6e9e863e0d4c9f` - using `scripts/download_exl3_r7.py`. -- [ ] Generate the candidate, dynamic-NVFP4, CKV-gather, SIRCL, and exact-Q40 - profile layers from the tracked scripts. -- [ ] Confirm every generated profile and site references the recorded image ID. -- [ ] Inspect the final preflight and launcher plans. - -## Four-rank live qualification - -- [ ] Place the identical rebuilt image ID on all four directly cabled DGX - Sparks. -- [ ] Pass the reviewed fabric and remote preflight for the final site. -- [ ] Start four ranks with the generated operator profile. -- [ ] Confirm `/health` returns HTTP 200 and `/v1/models` reports - `glm-5.2-exl3-r7-3.5bpw` with a 1,048,576-token maximum length. -- [ ] Run the fixed-seed equivalence and bounded C1, C2, and C8 workload in - [`GLM52_35BPW_ACCEPTANCE_RUNBOOK.md`](GLM52_35BPW_ACCEPTANCE_RUNBOOK.md) - against the image ID and preserve its receipts. -- [ ] Define and run a separate bounded C16 acceptance check for the same image - ID. The linked runbook does not supply a C16 command or evidence; record its - workload, admission and output criteria, and post-run health before promotion. - Capture separate before/after transport snapshots and repeat the runbook's - post-run gates for this C16 window. -- [ ] Confirm post-run rank and transport health. - -## Promotion record - -- [ ] Preserve sanitized receipts identifying the image ID, recipe, generated - profile hashes, and all four ranks without recording site addresses, - credentials, or local paths. -- [ ] State the hardware topology, evidence scope, and remaining limitations in - any result report. - -The profile becomes qualified only when every item above passes for the same -image ID. diff --git a/docs/GLM52_35BPW_REPRODUCTION.md b/docs/GLM52_35BPW_REPRODUCTION.md deleted file mode 100644 index 3ab76b27..00000000 --- a/docs/GLM52_35BPW_REPRODUCTION.md +++ /dev/null @@ -1,94 +0,0 @@ -# Reproduce the GLM-5.2 EXL3 3.5-bpw deployment profile - -Status: **retired**. The GLM-5.2 EXL3 profile is defined only for TP4 with -decode context parallelism 4 (DCP4), which SparkRing does not offer or support. -This procedure is retained for reproducing the recorded configuration. - -This procedure derives the recorded GLM serving configuration from tracked -inputs. It is for four directly cabled DGX Sparks. The resulting image has -evidence status **Development** unless it completes -[the promotion checklist](GLM52_35BPW_PROMOTION_CHECKLIST.md). - -## Inputs - -- Recipe: `recipes/glm52-exl3-r7-3.5bpw.json` -- Checkpoint: `brandonmusic/GLM-5.2-EXL3-TR3v4-3.5bpw-MTP78@9ab9579774cc432df91567a36f6e9e863e0d4c9f` -- Site template: `scripts/config/exl3-r7-site.example.yaml` -- Candidate template: `scripts/config/exl3-r7-candidate.example.json` -- Runtime builder: `runtime/exl3-r7/build-image.sh` - -Complete [the GLM quickstart](../profiles/glm52-exl3-r7-3.5bpw/README.md) through image build -before deriving the deployment foundation. - -## Derive the complete pre-exact-Q40 profile - -The consolidated compiler performs the fixed-MTP4, dynamic-NVFP4, -bounded full-CKV-gather, and tiered-SIRCL transformations in one hash-bound -local operation. The candidate template and site must bind the same image -identity, model path, and JIT-cache path. The SIRCL artifact paths must name -the exact locally built library and tracked adapter modules. - -```bash -python scripts/glm52_exl3_profile.py plan --execute \ - --site .sparkring/exl3-r7/site.yaml \ - --template .sparkring/exl3-r7/candidate.json \ - --output-dir .sparkring/exl3-r7 \ - --transport-library build/sircl-tiered/libspark_transport_capi.so \ - --backend spark_transport/integrations/vllm/spark_tp4_backend.py \ - --port-namespace spark_transport/integrations/vllm/spark_tp4_port_namespace.py -``` - -The module validates all inputs before creating the final bundle. The -deployment input immediately before exact-Q40 binding is: - -```text -.sparkring/exl3-r7/pre-q40-profile.json -.sparkring/exl3-r7/pre-q40-site.yaml -.sparkring/exl3-r7/pre-q40-receipt.json -.sparkring/exl3-r7/pre-q40-bundle/ -``` - -The same output directory contains the fixed-MTP4 foundation, dynamic-NVFP4 -and CKV-gather intermediates, and byte-identical rollback files. The printed -receipt records SHA-256 values for the complete profile, site, receipt, and -each mounted SIRCL artifact. - -## Bind the exact-Q40 runtime bytes and image identity - -Use [quickstart step 5](../profiles/glm52-exl3-r7-3.5bpw/README.md#5-bind-the-40-query-row-execution-and-attestation-overlays) -to prepare the pinned source and generate `exl3.py` and runtime-attestation -`model_runner.py`. These generators remain separate because they -reject unexpected source bytes and bind the attestation to the image ID. -Use the compiler receipt's `pre_q40_profile_sha256` as the baseline digest: - -```bash -python scripts/glm52_exl3_q40/prepare_q40_exact_state_serving.py \ - --base-profile .sparkring/exl3-r7/pre-q40-profile.json \ - --expected-base-profile-sha256 \ - --exl3 .sparkring/exl3-r7/q40-overlay/exl3.py \ - --model-runner .sparkring/exl3-r7/q40-overlay/model_runner.py \ - --expected-model-runner-sha256 \ - --bundle .sparkring/exl3-r7/q40-bundle \ - --output-profile .sparkring/exl3-r7/exact-q40-profile.json \ - --output-manifest .sparkring/exl3-r7/exact-q40-receipt.json -``` - -## Plan and launch - -Inspect the complete site and exact-Q40 profile before authorizing a start. - -```bash -python scripts/preflight.py \ - --site .sparkring/exl3-r7/pre-q40-site.yaml \ - --print-plan - -python scripts/sparkring_generic_launcher.py \ - --site .sparkring/exl3-r7/pre-q40-site.yaml \ - --profile .sparkring/exl3-r7/exact-q40-profile.json \ - plan -``` - -Copy both generated bundles to their declared remote roots before launch. -Staging files and starting are host-mutating, and starting can stop a running -service. Perform those actions only with authorization for the four named -hosts. Verify `/health`, the served model name, and the 1,048,576-token maximum. diff --git a/docs/GLM53_B12X_KDA_ADAPTIVE_MTP_SPARKCACHE_TP4_QUICKSTART.md b/docs/GLM53_B12X_KDA_ADAPTIVE_MTP_SPARKCACHE_TP4_QUICKSTART.md index fad80c05..79aba34d 100644 --- a/docs/GLM53_B12X_KDA_ADAPTIVE_MTP_SPARKCACHE_TP4_QUICKSTART.md +++ b/docs/GLM53_B12X_KDA_ADAPTIVE_MTP_SPARKCACHE_TP4_QUICKSTART.md @@ -144,7 +144,7 @@ geometry, or stored object schemas. Its embedded-MTP digest is SHA-256 over maximum depth five, and `adaptive:3:32`, separated by zero bytes. The digest domain and inclusion of the vLLM revision distinguish this cache -identity from the [adaptive embedded-MTP composition at vLLM revision `e10536a`](GLM53_E10536A_SPARKCACHE_TP4_QUICKSTART.md#resolve-a-serving-profile), +identity from the adaptive embedded-MTP composition at vLLM revision `e10536a` (archived in `sparkring-pre-diet-20261129.bundle`), which uses the domain `glm53-embedded-mtp-v1` without a runtime revision. Stored entries therefore recompute instead of crossing the KDA source boundary without byte-equivalence diff --git a/docs/GLM53_E10536A_SPARKCACHE_TP4_QUICKSTART.md b/docs/GLM53_E10536A_SPARKCACHE_TP4_QUICKSTART.md deleted file mode 100644 index 65abece6..00000000 --- a/docs/GLM53_E10536A_SPARKCACHE_TP4_QUICKSTART.md +++ /dev/null @@ -1,183 +0,0 @@ -# Compare GLM-5.3 speculation policies with SparkCache on four DGX Sparks - -Status: **Development**; four-rank serving is not validated. This guide builds vLLM -`e10536aadf02a18fccddda7ec939c33147e8b0b3` runtime and a SparkCache overlay. -The [DFlash2 validation record](../performance/records/glm53-flash/sparkcache-dflash2-bf16-tp4-20260828.md) -uses vLLM `da4d7be6c97434f6942292ed8abbf4b32dc44355`; its result does not -validate the runtime built here. - -The external BF16 DFlash2 profile uses depth five. It is not a source-only -comparison with the linked validated profile, which uses depth seven and a -different KV memory budget. Separate profiles exercise embedded static MTP5 and -acceptance-based adaptive MTP5 with initial depth three and a 32-step -observation window. Qualify one profile at a time so each result names one -runtime and speculation policy. - -An Experimental adaptive-MTP5 profile selects the fastsafetensors parallel -loader and sets `VLLM_FASTSAFETENSORS_QUEUE_SIZE=1`. The TP4 process group -forces `nogds=True` in vLLM revision `e10536a`, so this profile evaluates -pipelined shard loading without GPU Direct Storage. The queue can retain one -additional shard-sized device buffer during model loading. - -The profile templates below select TP4/DCP1, 20 GiB FP8 KV per rank, a 524,288-token request -limit, 32 sequences, native direct restore, two restore lanes, eight native -I/O workers, two 256 MiB arenas, shared GPU-prefix leases, and one-shot cache -clearing. - -## Build immutable inputs - -Use a Linux ARM64 build host with Docker BuildKit and at least 250 GiB free. -The operator host needs Python 3.11 or newer with PyYAML. Use a reviewed -40-character SparkRing commit in place of the checkout placeholder below. -Building on a serving rank competes for CPU, memory, storage, and network -bandwidth even though it does not stop the running service. - -```bash -git clone https://github.com/FujitsuPolycom/sparkring.git sparkring -git -C sparkring checkout --detach '' -git clone https://github.com/FujitsuPolycom/sparkcache.git sparkcache -git -C sparkcache checkout --detach eb3690c1aac2b9e86be8d513799dbb64afa53f25 - -IMAGE='sparkring-glm53-runtime:e10536a-source-arm64' \ -BUILD_RECEIPT="$PWD/glm53-e10536a-runtime-receipt.json" \ -bash sparkring/runtime/glm53-flash-e10536a/build-image.sh - -runtime_image='sparkring-glm53-runtime:e10536a-source-arm64' -runtime_image_id="$(docker image inspect --format '{{.Id}}' "${runtime_image}")" -sparkcache_source_sha256='34108fb22ba95b457bf4b357407b176dcbf3a6db6227227b21ecee045502a16f' -python sparkcache/deploy/glm53_flash/build_image.py \ - --repository "$PWD/sparkcache" \ - --containerfile deploy/glm53_flash/Containerfile.e10536a \ - --base-image "${runtime_image}" \ - --base-image-id "${runtime_image_id}" \ - --source-sha256 "${sparkcache_source_sha256}" \ - --sparkcache-revision eb3690c1aac2b9e86be8d513799dbb64afa53f25 \ - --output-image sparkring-glm53-sparkcache:e10536a-source-arm64 -``` - -Record the exact output identities: - -```bash -sparkcache_image='sparkring-glm53-sparkcache:e10536a-source-arm64' -sparkcache_image_id="$(docker image inspect --format '{{.Id}}' "${sparkcache_image}")" -native_sha256="$(docker run --rm --entrypoint sha256sum "${sparkcache_image}" \ - /opt/sparkcache-src/sparkcache/native/build-cuda/libspark_cache_placement.so \ - | cut -d ' ' -f1)" -test "${#native_sha256}" -eq 64 -``` - -## Resolve a serving profile - -The source-built runtime at vLLM revision `e10536a` supports the following -speculation and loader comparisons. Copy its site template and select exactly -one profile: - -| Status and runtime role | Profile template | Purpose | -|---|---|---| -| Development, external-speculator control | `glm53-flash-e10536a-dflash2-bf16-sparkcache-tp4-dcp1.example.json` | e10536a with external DFlash2 depth five | -| Development, embedded MTP | `glm53-flash-e10536a-mtp5-sparkcache-tp4-dcp1.example.json` | static internal MTP5 | -| Development, adaptive embedded MTP | `glm53-flash-e10536a-mtp5-adaptive-sparkcache-tp4-dcp1.example.json` | MTP5 maximum, initial depth three, 32-step window | -| Experimental, adaptive MTP loader comparison | `glm53-flash-e10536a-mtp5-adaptive-fastsafetensors-sparkcache-tp4-dcp1.example.json` | adaptive MTP5 with the fastsafetensors parallel loader, queue size one, and no GDS under TP4 | - -The commands below prepare the external-speculator control profile. Select a -different table entry only when the named speculation or loader behavior is -the intended test variable. - -```bash -profile_template='sparkring/scripts/config/glm53-flash-e10536a-dflash2-bf16-sparkcache-tp4-dcp1.example.json' -site_template='sparkring/scripts/config/glm53-flash-e10536a-tp4-site.example.yaml' -python sparkring/scripts/prepare_glm53_e105_profile.py \ - --profile-template "${profile_template}" \ - --site-template "${site_template}" \ - --image "${sparkcache_image}" \ - --image-id "${sparkcache_image_id}" \ - --parent-image "${runtime_image}" \ - --parent-image-id "${runtime_image_id}" \ - --native-library-sha256 "${native_sha256}" \ - --profile-output profile.json \ - --site-output site.yaml -``` - -Edit host-specific values in `site.yaml` and the target-model and rank-local -cache paths in `profile.json`. For the DFlash2 profile, also set its external -draft-model path; the MTP profiles have no external draft-model mount. -Each rank needs its own local cache storage; identical path strings on separate -hosts are acceptable. Do not use a shared cache directory. - -Distribute the built SparkCache image to all four hosts before launch. Use the -[image archive fanout procedure](DIRECT_FABRIC_IMAGE_ARCHIVE_FANOUT.md) with -the resolved site file, or copy a `docker image save` archive and load it on -each host. Require the same exact image ID and selected tag on every rank; -the profile resolver does not distribute images. - -The one-shot clear token is stored after successful removal. Restarting an -unchanged profile does not clear again. Every profile has a distinct clear -token. External DFlash2, static MTP5, and adaptive MTP5 have distinct cache -identities. The two adaptive-MTP5 profiles share a cache identity. Their distinct -clear tokens mean switching profiles can clear the selected cache root on first -use; shared identity does not prevent that clear operation. - -## Validate and launch - -```bash -python sparkring/scripts/preflight.py \ - --site site.yaml --strict-placeholders --json preflight.json -python sparkring/scripts/sparkring_generic_launcher.py \ - --site site.yaml --profile profile.json plan > start-plan.json -confirmation=$(python -c 'import json; print(json.load(open("profile.json", encoding="utf-8"))["confirmation"])') -python sparkring/scripts/sparkring_generic_launcher.py \ - --site site.yaml --profile profile.json \ - --execute --confirmation "${confirmation}" start -``` - -Tail the rank-zero container named by the selected profile. Replace the SSH -target and API endpoint below with rank zero's management address and the -configured API port: - -```bash -container_name=$(python -c 'import json; print(json.load(open("profile.json", encoding="utf-8"))["container_name"] + "-r0")') -ssh operator@rank0.example.net \ - "docker logs --follow --tail 120 '${container_name}' 2>&1" -``` - -Wait for health, then run the exact semantic canary: - -```bash -api_endpoint='http://rank0.example.net:8015' -served_model=$(python -c 'import json; d=json.load(open("profile.json", encoding="utf-8")); a=d["extra_vllm_args"]; print(a[a.index("--served-model-name") + 1])') -startup_timeout=$(python -c 'import json; print(json.load(open("profile.json", encoding="utf-8"))["startup_timeout_seconds"])') -timeout "$startup_timeout" bash -c 'until curl --fail --silent --show-error --max-time 10 "$1/health" >/dev/null; do sleep 5; done' _ "$api_endpoint" || { - echo "Readiness failed or timed out; inspect all rank logs before retrying" >&2; exit 1; -} -python sparkcache/deploy/glm53_flash/qualification_request.py \ - --endpoint "${api_endpoint}" --model "${served_model}" \ - --kind semantic --output semantic.json -``` - -Qualification requires health on all four ranks, an exact semantic match, the -e10536a and SparkCache source labels, the ten-file lease contract, the -native-library digest, and no engine exit, OOM, NCCL error, or traceback. Run -persistent restore and shared-prefix checks with 2, 8 and 16 concurrent requests -before labeling the image Validated. The fastsafetensors profile also requires a model-load result that -records elapsed startup time and peak device memory; it remains Experimental -without that evidence. - -## Cache namespace impact - -The e10536a overlay does not change SparkCache wire fields, digest salts, -256-token geometry, or stored object formats. External DFlash, static MTP5, -and adaptive MTP5 deliberately use different draft identity digests. A -speculator-policy change therefore recomputes instead of reusing an entry -published under another policy. Standard safetensors and fastsafetensors -loading use the same adaptive-MTP5 identity on the assumption that they -materialize equivalent pinned tensors without changing the KV representation. -The CPU identity checks do not establish live cross-loader cache equivalence; -include a cross-loader restore check before relying on that reuse. - -Embedded MTP identities are SHA-256 over -`glm53-embedded-mtp-v1`, the target cache identity, maximum depth five, and -either policy string `static` or `adaptive:3:32`, separated by zero bytes. -The [CPU contract](../scripts/test_prepare_glm53_e105_profile.py) recomputes both values instead of accepting -unexplained constants. - -[Profile validation: performance, accuracy, and restart checks](PROFILE_VALIDATION.md). diff --git a/docs/GLM53_FLASH_SPARK_TP2_EXPERIMENTAL_QUICKSTART.md b/docs/GLM53_FLASH_SPARK_TP2_EXPERIMENTAL_QUICKSTART.md deleted file mode 100644 index a781ca17..00000000 --- a/docs/GLM53_FLASH_SPARK_TP2_EXPERIMENTAL_QUICKSTART.md +++ /dev/null @@ -1,18 +0,0 @@ -# GLM-5.3 Flash NVFP4-Spark TP2 quickstart - -Use the [published-image TP2 guide](../profiles/glm53-flash-spark-tp2-dcp1/README.md) -for a two-Spark deployment with a 1M-token per-request context limit, or its -[SparkCache variant](../profiles/glm53-flash-spark-tp2-dcp1-sparkcache/README.md). - -The [retained source-image TP2 guide](../runtime/profiles/glm53-flash-spark-tp2/README.md) -defines a separate contract -for 8.75 GiB FP8 KV per node, managed B12X loading, static MTP3, and single-DAC -transport across both PCI domains. The reference allocator estimated 1,050,118 -KV tokens; the configured per-request context limit is 262,144. -The guide defines the source-image receipt, active 2 GiB host-memory guard, -and manual lifecycle commands. - -The retired 5 GiB adaptive-MTP profile and its image are preserved in -[Git history](https://github.com/FujitsuPolycom/sparkring/tree/2f01b6ee8f6173745c4b6b165498bbef82fc03f1/runtime/profiles/glm53-flash-spark-tp2). -Their bounded [installation and video observations](../performance/records/glm53-flash/tp2-public-image-install-20260906.md) -remain historical evidence; they do not qualify either deployment linked above. diff --git a/docs/GLM53_SPARK_MESH_HOST_SETUP.md b/docs/GLM53_SPARK_MESH_HOST_SETUP.md deleted file mode 100644 index f2beda4c..00000000 --- a/docs/GLM53_SPARK_MESH_HOST_SETUP.md +++ /dev/null @@ -1,504 +0,0 @@ -# Prepare four DGX Sparks for the MTP3 mesh quickstart - -This is the detailed managed-mesh extension to -[SparkRing prerequisites](operations/prerequisites.md#four-spark-managed-hardware-forwarded-mesh). -Use [the shared blank-cluster bootstrap](operations/bootstrap.md) for SSH enrollment, -primary-interface netplans, host checks, and kernel routing/firewall setup. -This extension adds the second Socket Direct functions, mesh-specific driver -requirements, and then hands off to the selected model guide. This page prepares -hosts; image and checkpoint selection belongs to that guide. Start with -[setup](operations/setup.md) and complete [host preparation](operations/host-preparation.md) -on every rank before section 2. Already prepared hosts verify existing settings -instead of repeating configuration changes. - -Status: **research-only**. The recorded serving deployment passed the bounded -checks in the [managed functional record](../performance/records/glm53-flash/spark-mtp3-managed-mesh-functional-20260905.md). -The complete procedure below has **not** been rerun from four factory-reset -systems. Factory OS/driver versions can differ. Stop at a failed prerequisite; -do not treat this guide as permission to change arbitrary NICs or firmware. - -Commands run in Bash on Linux. A Spark may also be the management host. -Keep a monitor/keyboard or independent management connection available while -changing data-network settings. Do not use a ConnectX data link as the only -way to administer a host being reconfigured. - -## 1. Unbox, label, and onboard the hosts - -Label the four systems **rank 0**, **rank 1**, **rank 2**, and **rank 3**. -Rank is the stable model-process position, not a performance ranking. -Attach power, the normal management-network connection, and any peripherals -needed for initial setup. Complete NVIDIA's first-boot wizard on every host, -creating a login account and allowing its critical software installation to -finish. Do not interrupt updates. NVIDIA documents both local-display and -network onboarding in [Initial Setup](https://docs.nvidia.com/dgx/dgx-spark/first-boot.html). - -Use a separate Ethernet management LAN, or a stable Wi-Fi management network, -for internet access and SSH. Reserve each Spark's management IP in the router -or DHCP server so it does not change during testing. This LAN can use a normal -switch; the four high-speed ConnectX cables below do not connect to it. - -Apply supported DGX OS/component updates before configuring the mesh, and -reboot when requested. Keep all four hosts on compatible software versions. -Use NVIDIA's [OS and Component Update Guide](https://docs.nvidia.com/dgx/dgx-spark/os-and-component-update.html), -preferably DGX Dashboard on Founders Edition, or the partner vendor's update -procedure for its hardware. Do not use an unrelated desktop GPU driver -installer. Record the resulting versions: - -```bash -cat /etc/os-release -uname -r -nvidia-smi -ip -br address -ip route show default -``` - -Write down the following inventory privately. The usernames may differ: - -| Rank | Physical label | Login username | Management IP | Management netdev | -|---|---|---|---|---| -| 0 | Spark 0 | Your account | Actual LAN IP | Interface carrying the LAN default route | -| 1 | Spark 1 | Your account | Actual LAN IP | Interface carrying the LAN default route | -| 2 | Spark 2 | Your account | Actual LAN IP | Interface carrying the LAN default route | -| 3 | Spark 3 | Your account | Actual LAN IP | Interface carrying the LAN default route | - -Never use the example's synthetic management addresses as if they identify -your hosts. Do not assign a second default route on the ConnectX links. - -The inspected rank-zero software was Ubuntu 24.04.4, kernel -`6.17.0-1029-nvidia`, NVIDIA driver `580.173.02`, rdma-core 50, -NetworkManager 1.46, Docker 29.2.1, and NVIDIA Container Toolkit 1.19.1. -These identify a tested prepared host, not a universal factory image or a -requirement to downgrade other hosts blindly. Compare your inventory and -resolve driver-capability differences before starting the mesh. - -## 2. Cable the four-node data ring - -Use four compatible high-speed QSFP cables, one per row in this table: - -| Cable | First end | Other end | -|---|---|---| -| 0–1 | Rank 0 physical port 0 | Rank 1 physical port 1 | -| 1–2 | Rank 1 physical port 0 | Rank 2 physical port 1 | -| 2–3 | Rank 2 physical port 0 | Rank 3 physical port 1 | -| 3–0 | Rank 3 physical port 0 | Rank 0 physical port 1 | - -Port 0 points clockwise; port 1 points counter-clockwise. There are no -physical diagonal cables. NVIDIA's rear-view mapping identifies the left -ConnectX socket nearest Ethernet as port 0/f0 and the right socket as port -1/f1. Confirm that mapping using link state and the device inventory on your -hardware. The published transport contract requires this orientation. - -Each physical port exposes two Socket Direct PCI functions. Therefore every -Spark needs four configured data netdevs, although it has only two cable -sockets. NVIDIA describes this distinction in -[ConnectX-7 Networking](https://docs.nvidia.com/dgx/dgx-spark/spark-clustering.html). -This guide's four-host ring is the SparkRing profile. Do not ask NVIDIA -Sync's cluster assistant to configure a four-host direct ring: its documented -four-host topology uses a switch, not this cable cycle. - -## 3. Complete shared bootstrap and check additional tools - -Follow [Bootstrap a blank SparkRing cluster](operations/bootstrap.md) from rank zero: -install the shared CLI, run `sparkring host check`, enroll four ranks with -`sparkring cluster init --size 4`, review/apply the primary-interface -netplans, and review the Ring Doctor plan. Keep its -`~/.config/sparkring/cluster.yaml` and management-safety checks. - -The shared bootstrap configures **two primary data interfaces per host**. -It does not configure the two secondary Socket Direct functions or managed -hairpin services. Preserve its kernel routes, IPv4 forwarding, and scoped -fabric firewall rules: NCCL fallback and ordinary routed fabric traffic -still need them. ASIC-forwarded diagonals do not justify deleting those -baseline requirements. - -Use `sparkring host check` on each host to identify missing components. -Install additional host utilities as needed: - -```bash -sudo apt-get update -sudo apt-get install -y git openssh-client openssh-server rsync curl \ - ca-certificates openssl python3 python3-venv python3-pip iproute2 \ - ethtool rdma-core ibverbs-utils pciutils -sudo systemctl enable --now ssh -python3 --version -command -v devlink ibv_devinfo ip tc ethtool nmcli -systemctl is-active NetworkManager -``` - -Use Python 3.12 or later for the shared-image operator paths. The persistent network commands in section 6 -require NetworkManager to manage the selected data interfaces. If `nmcli` -is absent, NetworkManager is inactive, or those interfaces are managed by -systemd-networkd/netplan instead, do not enable a second network manager over -the existing configuration. Resolve the backend mismatch using the supported -DGX OS configuration before continuing. - -Docker and the NVIDIA Container Toolkit are supplied with DGX Spark's -supported software stack. Verify them before replacing packages: - -```bash -sudo systemctl enable --now docker -sudo docker version -sudo docker info --format '{{json .Runtimes}}' -nvidia-ctk --version -``` - -The runtime list should include NVIDIA support. If Docker or the toolkit is -missing, repair the supported DGX installation using NVIDIA's -[Spark container-runtime guide](https://docs.nvidia.com/dgx/dgx-spark/nvidia-container-runtime-for-docker.html) -and [Container Toolkit installation guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). -Do not install a host CUDA toolkit or compile vLLM for this quickstart; the -published serving image carries the model runtime. - -The scripts call Docker as the login user. Grant that user Docker access on -each dedicated test host and then log out and back in: - -```bash -sudo usermod -aG docker "$(id -un)" -``` - -Confirm `docker info` works without sudo after the fresh login. Membership in -the Docker group effectively grants host-root authority; use a trusted -operator account, not an untrusted multiuser account. - -On the host that will download weights, install the Hugging Face CLI in a -private virtual environment, not into the system Python: - -```bash -python3 -m venv "$HOME/.venvs/sparkring-download" -"$HOME/.venvs/sparkring-download/bin/python" -m pip install --upgrade huggingface_hub -source "$HOME/.venvs/sparkring-download/bin/activate" -hf --help -``` - -The CLI is included in `huggingface_hub`; see its -[official CLI installation instructions](https://huggingface.co/docs/huggingface_hub/guides/cli#install-with-pip). -Activate this environment again in a shell that reports `hf: command not -found`. If a download requires authentication, run `hf auth login` -interactively; do not put tokens into repository files or command examples. - -## 4. Configure management SSH and root authorization - -Use rank zero as the management host after shared bootstrap. Its enrollment -step has already established verified self/worker SSH access using -`~/.ssh/id_ed25519`. Do not create a second enrollment workflow or overwrite -that key. If another management host is required, enroll its own key with -`ssh-copy-id` and verify fingerprints separately; do not copy rank zero's -private key. - -Add four entries to your existing `~/.ssh/config` with a text editor. Replace -every angle-bracket placeholder with the inventory from section 1: - -```sshconfig -Host spark-r0 - HostName - User - IdentityFile ~/.ssh/id_ed25519 -Host spark-r1 - HostName - User - IdentityFile ~/.ssh/id_ed25519 -Host spark-r2 - HostName - User - IdentityFile ~/.ssh/id_ed25519 -Host spark-r3 - HostName - User - IdentityFile ~/.ssh/id_ed25519 -``` - -The aliases must refer to the same management targets enrolled by bootstrap. -Verify them without weakening host-key checks: - -```bash -for host in spark-r0 spark-r1 spark-r2 spark-r3; do - ssh -o BatchMode=yes "$host" 'hostname; id -un; docker info >/dev/null' -done -``` - -The coordinator also requires `sudo -n` for systemd and the installed Python -supervisor. On each dedicated test host, use `sudo visudo -f -/etc/sudoers.d/sparkring-operator` to grant the trusted operator appropriate -noninteractive root access. For a personal dedicated cluster, the simple -policy below grants **full root authority**; replace `YOUR_USERNAME` and -accept that security scope explicitly: - -```sudoers -YOUR_USERNAME ALL=(ALL:ALL) NOPASSWD: ALL -``` - -Use `visudo`, which checks syntax, rather than piping an unchecked line into -sudoers. On a managed network, obtain an administrator-approved policy or -root-operated workflow instead of weakening site security. Verify: - -```bash -for host in spark-r0 spark-r1 spark-r2 spark-r3; do - ssh -o BatchMode=yes "$host" 'sudo -n true' -done -``` - -Keep the management LAN trusted. Allow SSH between the management host and -each Spark and permit the four Sparks to reach each other's management TCP -port 9975. The model API port 8015 and liveness port 8016 need access only -from intended clients/operators. Do not expose these unauthenticated model -endpoints to the internet. Follow site firewall policy; do not flush rules -or disable the firewall globally. - -## 5. Inventory each data function and save rollback information - -On each Spark, identify the management interface before touching data links: - -```bash -ip route show default -nmcli device status -nmcli -f NAME,UUID,TYPE,DEVICE connection show -rdma link show -``` - -Use the management LAN address of your administration computer to confirm -the return path, with `ip route get ACTUAL_MANAGEMENT_COMPUTER_IP`. Record -that `dev` as `MESH_MANAGEMENT_NETDEV`; never pass it to the data-configuration -commands. The profile expects these RDMA names, but netdev names must be -discovered locally: - -| Direction/function | RDMA device | Common netdev name, verify before use | -|---|---|---| -| Clockwise primary | `rocep1s0f0` | `enp1s0f0np0` | -| Clockwise secondary | `roceP2p1s0f0` | `enP2p1s0f0np0` | -| Counter-clockwise primary | `rocep1s0f1` | `enp1s0f1np1` | -| Counter-clockwise secondary | `roceP2p1s0f1` | `enP2p1s0f1np1` | - -Use `rdma link show` and `/sys/class/infiniband/DEVICE/device/net/` to match -each RDMA device to its actual netdev. Record each interface's real MAC from -`ip link show dev NETDEV`; do not copy the synthetic MACs in the JSON example. - -Before changes, make an unused root-only backup directory on each host: - -```bash -MESH_BACKUP="/var/tmp/sparkring-network-before-$(date +%Y%m%d-%H%M%S)" -sudo install -d -m 0700 "$MESH_BACKUP" -sudo tar -C / -czf "$MESH_BACKUP/network-config.tar.gz" \ - etc/NetworkManager/system-connections etc/netplan -ip -j addr show | sudo tee "$MESH_BACKUP/addresses.json" >/dev/null -ip -j route show table all | sudo tee "$MESH_BACKUP/routes.json" >/dev/null -ip -j neigh show | sudo tee "$MESH_BACKUP/neighbors.json" >/dev/null -sudo devlink dev param show | sudo tee "$MESH_BACKUP/devlink-params.txt" >/dev/null -nmcli -f NAME,UUID,TYPE,DEVICE connection show | sudo tee "$MESH_BACKUP/connections.txt" >/dev/null -``` - -If a listed configuration directory does not exist, inspect the actual host -backend and adjust the archive's explicit directory list; do not ignore a -failed backup. Preserve existing TC state for each verified data netdev with -`sudo tc -j -s filter show dev NETDEV ingress` and `sudo tc -j qdisc show dev -NETDEV`. Record the active NetworkManager profile UUID for each data netdev; -rollback uses those identifiers, not a guessed connection name. - -## 6. Configure persistent data IPv4 and MTU - -The addresses below retain the `198.18.*` benchmark-network values from -`fabric.example.json`. Verify that this isolated range does not overlap any -existing LAN/VPN route. Each cable has separate primary and secondary /24 -subnets. Host /24 masks create connected routes to adjacent peers. -The fabric JSON's `ipv4_cidr` must remain **/32** because that field is a -single endpoint locator, not the host's subnet configuration. For example, -use `198.18.101.1/24` on the netdev and `198.18.101.1/32` in the JSON. -The renderer rejects /24 endpoint locators. - -| Rank | Clockwise primary | Clockwise secondary | Counter-clockwise primary | Counter-clockwise secondary | -|---|---|---|---|---| -| 0 | `198.18.1.1/24` | `198.18.101.1/24` | `198.18.4.2/24` | `198.18.104.2/24` | -| 1 | `198.18.2.1/24` | `198.18.102.1/24` | `198.18.1.2/24` | `198.18.101.2/24` | -| 2 | `198.18.3.1/24` | `198.18.103.1/24` | `198.18.2.2/24` | `198.18.102.2/24` | -| 3 | `198.18.4.1/24` | `198.18.104.1/24` | `198.18.3.2/24` | `198.18.103.2/24` | - -If shared bootstrap already configured the primary interfaces, preserve their -actual /24 addresses from `cluster.yaml`. Its default subnet numbering can -differ from this table. Copy those actual IPs into the private fabric's -primary endpoint locators as /32; do not replace working primary addresses -just to match an example. The secondary columns above use separate subnets. - -Create one named NetworkManager profile per verified **secondary** data netdev. -The example below adds **only rank 0's clockwise secondary function**. Replace the -management and data netdev variables with the names you verified. All RDMA -workloads must be stopped. Keep the independent management connection open. - -```bash -set -euo pipefail -MESH_MANAGEMENT_NETDEV='REPLACE_WITH_VERIFIED_MANAGEMENT_NETDEV' -MESH_NETDEV='REPLACE_WITH_RANK0_CLOCKWISE_SECONDARY_NETDEV' -MESH_CONNECTION='sparkring-r0-cw-secondary' -MESH_ADDRESS='198.18.101.1/24' -test "$MESH_NETDEV" != "$MESH_MANAGEMENT_NETDEV" -ip link show dev "$MESH_NETDEV" -nmcli -f GENERAL.CONNECTION,GENERAL.STATE device show "$MESH_NETDEV" -if nmcli -g connection.id connection show "$MESH_CONNECTION" >/dev/null 2>&1; then - echo 'Connection name already exists; inspect it instead of overwriting.' >&2 - exit 1 -fi -sudo nmcli connection add type ethernet ifname "$MESH_NETDEV" \ - con-name "$MESH_CONNECTION" connection.autoconnect yes \ - connection.autoconnect-priority 100 \ - ipv4.method manual ipv4.addresses "$MESH_ADDRESS" \ - ipv4.never-default yes ipv4.ignore-auto-dns yes \ - ipv6.method link-local ipv6.never-default yes \ - 802-3-ethernet.mtu 9000 -sudo nmcli connection up "$MESH_CONNECTION" -ip -br addr show dev "$MESH_NETDEV" -ip route show dev "$MESH_NETDEV" -``` - -Repeat for each host's counter-clockwise secondary function and the other -hosts, choosing distinct profile names and the matching secondary address. -Do not create an additional NetworkManager primary profile over the shared -bootstrap's netplan-managed primary connection. Add no gateway or DNS server -to these data profiles. Activating a profile can displace an existing profile -on that **data** device; preserve the displaced UUID. Do not deactivate or -delete management profiles. NetworkManager persists the named configuration -across reboot; the command interface is described in the -[NetworkManager manual](https://networkmanager.dev/docs/api/latest/nmcli.html). - -Test each direct neighbor after both ends of its cable are configured. For -rank 0's clockwise secondary example: - -```bash -ping -c 3 -I "$MESH_NETDEV" 198.18.101.2 -ping -c 3 -M do -s 8972 -I "$MESH_NETDEV" 198.18.101.2 -``` - -The first ping checks address/cable reachability; the second checks a -9,000-byte IPv4 frame without fragmentation. Neither proves RDMA correctness. -Repeat on primary and secondary functions in both directions. Resolve link, -subnet, firewall, or MTU failures before continuing. - -### Roll back only the profiles created here - -With all RDMA users stopped and the independent management session intact, -use the exact created connection name and the saved former UUID: - -```bash -sudo nmcli connection down "$MESH_CONNECTION" -sudo nmcli connection delete "$MESH_CONNECTION" -# Only if an earlier profile was recorded for this data netdev: -sudo nmcli connection up uuid 'REPLACE_WITH_RECORDED_PRIOR_UUID' -``` - -Never delete all NetworkManager connections or restore a whole network -archive blindly over an active host. For each function, verify the restored -address/MTU/route state against the saved inventory. The archive is an -operator-controlled recovery copy, not an automatic rollback program. - -## 7. Verify GID index 3 and provision hardware hairpins - -The serving containers and mesh services on this mesh use RoCE GID index 3 -on every RDMA function: the mesh plan's `roce_gid_index`, `NCCL_IB_GID_INDEX` -and the image's B12X RoCE transport, which takes one index for all HCAs of a -rank. For each RDMA device, print the index at which its data address has its -RoCE v2 GID. The resolver is read-only; run it from a SparkRing checkout or -from the installed package directory `/usr/lib/sparkring`: - -```bash -MESH_RDMA_DEVICE='rocep1s0f0' -MESH_IPV4='198.18.1.1' -python3 integrations/vllm/spark_roce_gid.py "$MESH_RDMA_DEVICE" "$MESH_IPV4" -ibv_devinfo -d "$MESH_RDMA_DEVICE" -i 1 -``` - -The resolver reads the GID table under -`/sys/class/infiniband/$MESH_RDMA_DEVICE/ports/1` and prints the index of the -single entry of type `RoCE v2` whose GID is the IPv4-mapped data address -(`::ffff:198.18.1.1` for the table's rank-zero primary example; substitute the -actual address if shared bootstrap allocated a different subnet). It ignores -IPv6 and RoCE v1 entries. When no entry or more than one matches, it exits -with status 1 and lists the RoCE v2 IPv4 entries present. Require it to print -`3` for every function, with active MTU 4,096. - -Preserve IPv6 link-local addressing on the data netdevs. The example uses -`ipv6.method link-local`; disabling IPv6 can change GID allocation so an -IPv4 RoCE-v2 GID appears at index 1 instead of index 3. On the -netplan-managed primary profiles, retain IPv6 link-local support rather than -adding a global IPv6-disable setting. - -An address whose link drops while a model or mesh service holds its GID entry -returns at another index, typically 5; this happens on the Sparks cabled to -one that restarts. With the model and mesh services stopped, deleting and -adding the address again, with its prefix and flags, returns it to index 3. -For the four-Spark installer profiles, `sparkring install` does this on every -Spark before it starts the model; see -[Four-Spark rings](operations/install-reference.md#four-spark-rings). - -If the resolver fails or prints another index on a freshly configured host: - -1. Confirm the intended data profile is active and the cable link is up. -2. Check that the netdev has the single intended IPv4 address, rather than - leftover addresses from another profile. Remove only configuration you - explicitly created, never an unknown address or management profile. -3. Inspect all entries under that device's `gids/` and `gid_attrs/` directories - to identify how the driver populated the table. -4. If the address still does not resolve to index 3, stop. This published - profile fixes GID index 3; editing only a JSON value does not retarget all - transport paths. Do not write GID sysfs files or claim a different index - is equivalent without a validated transport change. - -Complete the retained hardware-reference sections for -[ConnectX-7 driver configuration](GLM53_SPARK_MTP3_MESH_QUICKSTART.md#connectx-7-driver-configuration-for-hardware-forwarding) -and [stopped-stack hairpin provisioning](GLM53_SPARK_MTP3_MESH_QUICKSTART.md#optional-stopped-stack-hairpin-provisioning). -They discover PCI addresses, check the tested `hmfs`/legacy configuration, -set four hairpin queues with `hairpin_queue_size` 8192 only if needed, and -explain driver reload hazards. The hairpin values are `driverinit` settings: -the driver starts with its default queue size of 1024 at every boot, so check -them again after each reboot and repeat the stopped-stack provisioning when -they differ. On a four-Spark ring set up by `sparkring install` or -`sparkring setup`, `sudo sparkring hairpin` on Node A applies them and records -them, and SparkRing then applies them itself at every boot; see -[Four-Spark rings](operations/install-reference.md#four-spark-rings). Do not reload -through a data-link-only SSH connection. After -reload, bring up the four named data profiles, repeat pings/GID/MTU checks, -and verify management access before proceeding. -Those links supply hardware instructions; their retired model/image selection -does not apply to the shared-image deployment in Sections 8 and 9 below. - -For primary interfaces managed by the shared bootstrap's netplan, restore -that configuration rather than creating competing connection profiles. -Run Ring Doctor read-only only after primary addresses and interface identity -are correct; inspect its repair plan before applying it. Do not discard the -shared IPv4-forwarding or Docker firewall requirements because mesh traffic -also has an ASIC-forwarded path. - -The installer will not create the direct IP configuration, configure the -driver, or repair a failed GID check. It does install the subsequent exact -opposite-peer routes and hardware TC rules once these prerequisites pass. - -## 8. Prepare storage and obtain the public runtime - -Host preparation owns the [per-filesystem storage check](operations/host-preparation.md#5-check-storage-on-every-rank). -Repeat it with the actual deployment destinations if they differ from the initial -plan. Every rank needs the complete checkpoint. A host-check PASS or a configured -KV allocation is not proof that a model fits in disk or shared CPU/GPU memory. - -For a managed GLM deployment, provision its parent on every host for the operator: - -```bash -sudo install -d -m 0755 -o "$(id -un)" -g "$(id -gn)" /srv/sparkring -``` - -Choose a new workspace beneath it in the deployment plan. Do not pre-create -`/opt/sparkring/managed-mesh` or `/etc/sparkring/managed-mesh`; managed installation -requires those targets absent. Inspect an existing installation before reuse. - -## 9. Fill the private site and start serving - -Host preparation ends here. Continue with the selected model's image and launch -procedure, keeping the exact checkout and verified fabric inventory: - -- [GLM image and managed deployment](../profiles/glm53-flash-spark-tp4-dcp1-sparkcache/README.md#2-select-the-published-image). -- [Qwen image and Compose deployment](../profiles/qwen38-flash-next-qad-tp4/README.md#prepare-image-model-and-fabric). - -Those guides own image identities, checkpoint revisions, receipts, API model -names, startup and shutdown. Do not select an image from the historical hardware -reference linked in section 7. Use /32 endpoint locators in private fabric JSON -and retain /24 host subnet masks. Preserve the observed MACs, device roles and -management addresses. Native collective checks remain required before model -startup where the managed lifecycle supplies them. - -The complete sequence still requires a supervised blank-host rehearsal. Prepared -ring serving results do not qualify every factory OS/driver combination. diff --git a/docs/GLM53_SPARK_MTP3_MESH_QUICKSTART.md b/docs/GLM53_SPARK_MTP3_MESH_QUICKSTART.md deleted file mode 100644 index 55b1227e..00000000 --- a/docs/GLM53_SPARK_MTP3_MESH_QUICKSTART.md +++ /dev/null @@ -1,789 +0,0 @@ -# Run GLM-5.3 Flash Spark with MTP3 and hardware-forwarded mesh - -This guide reproduces the retired `glm53-spark-mtp3-managed-mesh-tp4` recipe -with the `sparkring-glm53-sparkcache` image pinned below, DCP4, and a 40 GiB -SparkCache ceiling. SparkRing does not offer or support DCP4 deployments. For -deployment with the shared-image MTP3 profile, use the -[maintained TP4 guide](../profiles/glm53-flash-spark-tp4-dcp1-sparkcache/README.md), -which uses DCP1 and offers optional SparkCache. Its host setup links -here only for the hardware-forwarding instructions. - -Status: **research-only** profile with **implemented** source packaging and -managed host services. The published image passed the native, GPU stream, -serving, idle rank-loss, restart, and persistent-recall checks in its -[exact-image validation record](../performance/records/glm53-flash/spark-mtp3-compute-stream-safety-20260906.md). -That record defines the qualified conditions; in-flight collective failure -containment and unattended availability are not established. - -**Starting with four stock Sparks and no image?** Follow -[the managed-mesh prerequisite section](operations/prerequisites.md#four-spark-managed-hardware-forwarded-mesh) -first. It reuses the shared blank-cluster bootstrap and adds the secondary -data interfaces, GID/MTU checks, and driver configuration required below. -Return here only when reproducing the retained image and settings described above. - -**Preparing hosts that have already run GPU workloads?** Consider a reboot -before installation and the first model start, after stopping active workloads. -It can reduce memory fragmentation even when plenty of RAM appears free. -The [startup memory gate](../runtime/glm53-spark-mtp3-mesh/MANAGED_MESH.md#automatic-startup-memory-preparation) -checks available memory and large contiguous free blocks; rebooting does not -replace that check. A reboot interrupts every workload on that host. - -The profile uses the `GLM-5.3-Flash-NVFP4-Spark` target's built-in multi-token -predictor with three speculative tokens. Its separate proposal head is packed -to NVFP4 at model load and uses BF16 activations. The target/verifier head -retains its BF16 checkpoint representation. Graph-native SIRCL handles most -captured target verification, fused SIRCL handles large eager prefill, and -RoCEnante handles selected small all-reduces. Patched NCCL retains the other -collectives. The host fabric supplies hardware-forwarded paths between -opposite ranks without extra diagonal cables. No external draft checkpoint or -DFlash model is used. - -The [profile contract](../runtime/glm53-spark-mtp3-mesh/README.md) and -[pins](../runtime/glm53-spark-mtp3-mesh/pins.json) are the canonical inputs. -The packaged RoCEnante runtime orders shared staging buffers across streams -and preserves its one-stream-per-CUDA-capture guard. CPU regressions and -four-rank GPU tests cover alternating streams, misaligned buffers, -changed-input graph replay, and second-stream capture rejection. - -## Attribution and design origins - -RoCEnante originates with Local Inference Lab's contributors, not SparkRing. -Credit goes to Luke (`lukealonso`) and the Local Inference Lab community, -including PR author `original-el8`, for the communication implementation in -[B12X #295](https://github.com/local-inference-lab/b12x/pull/295) and its -[vLLM integration in #597](https://github.com/local-inference-lab/vllm/pull/597). - -SparkRing adapts that communication package to hardware-forwarded paths -between opposite ranks and combines it with SIRCL routing and managed -deployment. The [vendored-source provenance](../third_party/b12x_roce/README.md) -identifies the included code and retained license. - -The proposal-head, metadata and compute changes derive from Local Inference -Lab's vLLM and B12X work. The [compute source composition](../runtime/glm53-spark-mtp3-mesh/compute/README.md) -records contributor revisions, feature provenance and exact source identities. - -## Recorded benchmark observations - -The [profile results](../runtime/glm53-spark-mtp3-mesh/README.md#operator-benchmark-observations) -collect throughput and long-context accuracy measurements, their image and -workload conditions, and limitations. The -[validation report](../performance/records/glm53-flash/spark-mtp3-validation-summary-20260905.md) -records completed checks and remaining qualification gates. - -## Preparation order and command locations - -Use one management shell to prepare the shared site and coordinate all four -hosts. Host installation commands run locally on each Spark. Commands below -assume a Linux Bash shell and a checkout containing this guide: - -```bash -set -euo pipefail -git clone --branch main https://github.com/FujitsuPolycom/sparkring.git -cd sparkring -git rev-parse HEAD -test -f runtime/glm53-spark-mtp3-mesh/managed_install.py -``` - -Use the same reviewed Git revision on the management host and all four -Sparks; keep it alongside the image receipt. The checkout must contain the -source inputs required by that receipt and `managed_install.py`. Do not -substitute files from a private experiment directory. -Keep `set -euo pipefail` enabled in each shell running the following command -blocks so a failed identity check prevents subsequent steps. - -The preparation order is image/model → extracted artifacts → private -site/topology → rendered launch → distribution → stopped containers → -managed installation → native checks → model startup/readiness. The -[managed operations guide](../runtime/glm53-spark-mtp3-mesh/MANAGED_MESH.md) -provides the key-generation, install, startup, and recovery commands. - -The [deployment recipe](../recipes/glm53-spark-mtp3-managed-mesh-tp4.json) -indexes image, model, topology, settings, and evidence metadata using -`sparkring-recipe/v1`. The profile renderer consumes the separate dedicated -site/topology contracts described below; the recipe is not a substitute for -those private inputs or an executable host installer. - -## Hardware and safety prerequisites - -- Four NVIDIA DGX Spark GB10 systems, arranged in the physical cable cycle - `0-1-2-3-0`, with two physical ConnectX-7 ports per system. -- Both Socket Direct PCI functions for each physical port must be available: - four RDMA functions per system. These are not four additional cables. -- A verified rank, interface, MAC, IP, GID, and cable inventory matching the - mesh contract. Do not infer physical connections from interface names. -- Working direct-neighbor RoCE, Ethernet MTU 9,000, RoCE MTU 4,096, GID index - 3, and the ability to install hardware-only traffic-control redirect rules. -- The same pinned image, model revision, transport bundle, and marker binary - on all four ranks. Docker with NVIDIA runtime support is required. -- A systemd Linux host with Python 3.10 or later, Git, OpenSSH, `rsync`, `openssl`, - `ip`/`tc` from iproute2, `ethtool`, rdma-core, and `ibv_devinfo` from - ibverbs-utils. The host Python helpers use the standard library. The - download host additionally needs the Hugging Face `hf` CLI. Building - locally requires a Linux/ARM64 Docker host; no model weights are embedded - in the image. -- Space for the complete checkpoint and image on every host, plus the - configured 40 GiB persistent cache per rank and JIT/build cache headroom. - Image export can require another tens-of-GiB archive. Confirm free disk - and memory instead of deleting another workload's artifacts. -- A trusted management network. Restrict port 8015 to intended clients. - API authentication is implemented through the optional `api_keys_file` site - field in [site configuration](#describe-and-render-the-site). Omitting it - leaves the API unauthenticated. Key changes require container recreation. -- An operator-approved maintenance window for host networking and model - startup. Preserve host routes, neighbor entries, traffic-control rules, - qdiscs, MTUs, and process ownership before making changes. - -A small native helper, called the source marker, installs the source NIC's -packet-header rewrite used by the hardware-forwarded paths. It selects -**every RDMA-TX packet with UDP source port 65535 -on its selected device**. It is not scoped to a particular IP or QP number. -Reserve that source port for the mesh and exclude unrelated users of the -selected functions during testing. - -The source-bound peer map requires clockwise links on physical f0 and -counter-clockwise links on physical f1, using RDMA names `rocep1s0f0`, -`rocep1s0f1`, `roceP2p1s0f0`, and `roceP2p1s0f1`. Netdev names may differ, -but the RDMA-function roles must agree. Other cabling/HCA maps need a -separately validated transport contract; changing the site JSON alone is -insufficient. - -For each verified interface/function pair, read its identity before editing -the private topology. Replace the two variables with one actual pair: - -```bash -MESH_NETDEV='REPLACE_WITH_ACTUAL_NETDEV' -MESH_RDMA_DEVICE='rocep1s0f0' -ip -j addr show dev "$MESH_NETDEV" -ethtool -k "$MESH_NETDEV" -ibv_devinfo -d "$MESH_RDMA_DEVICE" -i 1 -cat "/sys/class/infiniband/$MESH_RDMA_DEVICE/ports/1/gids/3" -cat "/sys/class/infiniband/$MESH_RDMA_DEVICE/ports/1/gid_attrs/ndevs/3" -``` - -Repeat for all four functions on every host. Require the GID's IPv4-mapped -address and netdev to match the private inventory, Ethernet MTU 9,000, and -active RDMA MTU 4,096. Hardware TC offload must be available; the managed -service requires actual `skip_sw`/`in_hw` rules. It does not configure -cabling, IP addresses, MTUs, firmware, or switch modes. Establish those -direct-link prerequisites first using your host network configuration. -Do not blindly enable switchdev or modify management interfaces. Hardware -support is accepted only when the exact managed TC rules and bidirectional -native RC checks succeed on the deployment. - -### ConnectX-7 driver configuration for hardware forwarding - -The qualified deployment used the following NIC profile. These are host -driver prerequisites, not settings embedded in the model image: - -| Setting | Observed value and scope | -|---|---| -| `hairpin_num_queues` | `4`, `driverinit`, all four PCI functions on every host | -| `hairpin_queue_size` | `8192` (driver maximum; 64-byte strides, 512 KiB per queue), `driverinit`, all four PCI functions on every host | -| `flow_steering_mode` | `hmfs`, `runtime`, all four PCI functions on every host | -| eSwitch | `legacy`, inline mode `none`, encapsulation `basic`, all 16 PCI functions across the four hosts | -| Hardware TC offload | Enabled on all 16 verified data functions across the four hosts | - -`hmfs` is an observed capability of the tested driver, not a promise that -every upstream kernel, vendor driver, or firmware exposes that value. If the -driver rejects the parameter or reports a different steering mode, stop and -establish a compatible host configuration. Do not substitute `smfs`/`dmfs`, -enable switchdev, or update firmware merely to get past a check. - -Hairpin queues implement mlx5 hardware forwarding for TC redirect rules. -Their count and packet capacity are `driverinit` parameters in the -[kernel mlx5 devlink documentation](https://docs.kernel.org/next/networking/device_drivers/ethernet/mellanox/mlx5/devlink.html#hairpin-num-queues-number-of-hairpin-queues). -Discover each function's PCI identity from its verified RDMA device instead -of copying PCI addresses from another host: - -```bash -MESH_RDMA_DEVICE='rocep1s0f0' -MESH_BDF=$(basename "$(readlink -f "/sys/class/infiniband/$MESH_RDMA_DEVICE/device")") -[[ "$MESH_BDF" =~ ^[[:xdigit:]]{4}:[[:xdigit:]]{2}:[[:xdigit:]]{2}\.[0-7]$ ]] -MESH_DEVLINK="pci/$MESH_BDF" -sudo devlink dev info "$MESH_DEVLINK" -sudo devlink dev param show "$MESH_DEVLINK" name hairpin_num_queues -sudo devlink dev param show "$MESH_DEVLINK" name hairpin_queue_size -sudo devlink dev param show "$MESH_DEVLINK" name flow_steering_mode -sudo devlink dev eswitch show "$MESH_DEVLINK" -``` - -Repeat the read-only inventory for `rocep1s0f1`, `roceP2p1s0f0`, and -`roceP2p1s0f1` on every host. Retain driver/firmware information and the -observed values with the private site record. A configured queue count alone -does not prove that a TC rule is hardware resident or that RC works. - -### Optional stopped-stack hairpin provisioning - -On a four-Spark ring set up by `sparkring install` or `sparkring setup`, -`sudo sparkring hairpin` on Node A applies these values and records them, and -SparkRing then applies them itself at every boot; see -[Four-Spark rings](operations/install-reference.md#four-spark-rings). The commands -below are for other hosts. - -Skip this section when the verified settings already match. These commands -change the NIC driver and are **not safe during serving**. Before running -them, stop the managed stack across all four hosts and stop **every other -RDMA user** of the affected ASIC, not just this model. Use a separate -management connection or physical console. An SSH alias routed over the -RoCE links can disconnect during reload. - -Save the host's persistent IP/MTU configuration, routes, neighbor state, -TC rules, and devlink settings. Have an explicit restoration method for -that host's network manager before proceeding. Driver reinitialization -applies `driverinit` values but can remove/recreate driver entities and -cause additional reset or downtime depending on the driver; inspect the -actions actually performed. See -[devlink reload semantics](https://docs.kernel.org/networking/devlink/devlink-reload.html). - -For **one reviewed data PCI function**, using the discovered `MESH_DEVLINK` -above and only after the stopped-stack prerequisites: - -```bash -sudo devlink dev param set "$MESH_DEVLINK" name hairpin_num_queues value 4 cmode driverinit -sudo devlink dev param set "$MESH_DEVLINK" name hairpin_queue_size value 8192 cmode driverinit -sudo devlink dev reload "$MESH_DEVLINK" action driver_reinit -``` - -Re-establish the saved host IP/MTU configuration after reload, rediscover -the RDMA/netdev mapping, and repeat the read-only inventory before touching -another function. Do not run a blind reload loop over an entire PCI tree. -Provision the four verified functions deliberately, accounting for their -shared ASIC and disruption scope. This procedure does not change steering -mode, eSwitch mode, or firmware. - -If hardware TC offload is disabled on a verified **data** netdev used by the -plan and the driver supports enabling it, enable only that interface while -the stack remains stopped: - -```bash -sudo ethtool -K "$MESH_NETDEV" hw-tc-offload on -ethtool -k "$MESH_NETDEV" -``` - -Recheck addresses, MTUs, GID index 3, steering mode, and direct-neighbor RoCE. -Then install/start the managed mesh and require actual `in_hw` rules plus -the native all-rank RC correctness checks before model startup. The managed -installer intentionally does not reload NIC drivers or perform this bootstrap. - -Use the [managed mesh service](../runtime/glm53-spark-mtp3-mesh/MANAGED_MESH.md) -to configure and monitor the hardware-forwarded paths between opposite -Sparks. Model startup requires authenticated readiness from all four ranks; -unhealthy fabric stops dependent serving, and the operator explicitly -initiates recovery. Changing forwarding helpers beneath live RDMA connections -is unsupported. The bounded diagnostic mode is separate from this serving -procedure. - -## Exact serving settings - -| Setting | Value | -|---|---| -| Target | `local-inference-lab/GLM-5.3-Flash-NVFP4-Spark` revision `df116c4fb16b1d37ae43d2cfd624de26ffbc832e` | -| Speculation | Built-in MTP, depth 3, draft TP4, probabilistic proposals, standard rejection | -| External draft weights | None | -| Rank layout | TP4 / DCP4 / PP1 | -| Compute / weights | BF16 compute; ModelOpt mixed quantization, including NVFP4 routed experts and MXFP8 attention/shared-expert projections | -| Request length / sequences | 1,048,576 tokens / 16 | -| Batched-token budget | 8,192 | -| Scheduler | Asynchronous, prefill interval 2, chunked prefill, prefix caching | -| KV | FP8, 24 GiB per rank | -| Kernels | B12X attention, KDA prefill, MoE, and linear | -| Graphs | `FULL_AND_PIECEWISE`, rows 4, 8, 12, ..., 64 | -| Fusion / autotuning | All-reduce/RMSNorm fusion disabled; FlashInfer autotuning disabled | -| Loader / CPU | fastsafetensors, queue 1; OMP threads 16 | -| Serving ports | API 8015; scheduler liveness 8016; rendezvous 29775 | -| SIRCL graph control | Ports 9970/9971; submit CPU 10; progress CPU 11; inflight limit 64 | -| SIRCL eager transport | Fused dual rail; two 64 MiB operation arenas; 120-second operation timeout | -| RoCEnante | Six origin QPs per rank, two paths per peer, two operation slots, proxy CPU 13 | - -The launcher warms concurrency 1 through 16. Its `DFLASH_WARMUP*` environment -names are compatibility interfaces for the shared speculation warmup entry -point; they do not select DFlash when `SPECULATION_METHOD=mtp`. -The required source-bound child image uses temperature one with thinking -disabled, selected by `SPARKRING_WARMUP_TEMPERATURE=1`. Its verified receipt -must attest both the sampling warmup helper and the managed marker source. -The parent image alone does not provide this managed quickstart contract. -Completed warmup establishes that its requests ran, not comprehensive -sampling correctness or thinking-enabled generation coverage. - -The pinned image supplies the defaults -`VLLM_MTP_NVFP4_LM_HEAD=1`, `VLLM_LM_HEAD_A16=1`, and -`VLLM_MXFP8_LM_HEAD=0`. The target checkpoint's unquantized `lm_head.weight` -initializes a distinct proposal-head copy on each tensor-parallel rank. For -154,880 vocabulary rows, width 4,096, and TP4, the packed NVFP4 values and -scales add approximately 85.08 MiB per rank. The retained BF16 target head -remains allocated, so 85.08 MiB is an added proposal allocation, not a net -model-memory reduction. - -For a full MTP3 verification batch, target rows are approximately -`Q = 4 × active requests`. Draft execution and partial batches can use -different shapes. A capture list is not proof that every live step replays a -full graph. - -The scheduled-token budget is 8,192. MTP3 in the pinned runtime -reserves zero extra parallel-drafting slots. This guide does not change -the scheduler's input capacity independently of that budget. - -### Collective routing - -The custom paths require a contiguous CUDA BF16 TP tensor of shape -`[Q,4096]`. `Q` is the number of rows in that collective, not context length. - -| Execution / rows | Transport | -|---|---| -| Captured Q4, Q8, Q12 | RoCEnante over direct and hardware-forwarded mesh paths | -| Captured Q16, Q20, Q24, Q28, Q32 | Graph-native SIRCL | -| Captured Q36, Q40, ..., Q64 | Graph-native SIRCL | -| Eager Q1 through Q32 | RoCEnante | -| Eager Q33 through Q127 | NCCL fallback | -| Eager Q128 through Q8192 | Dual-rail fused SIRCL | -| Other signatures, DCP, and other collectives | Existing fallback dispatch | - -RoCEnante all-gather is not enabled. RoCEnante sends both path sets below -Q24 and uses direct-then-diagonal scheduling from Q24. WQE tiling and -hardware rate limiting are not enabled. The source-bound overlay selects -these settings from its bundle configuration; the image's model kernels are -not replaced by the RoCEnante package. - -### Persistent cache - -SparkCache runs read-write with `tail-cow-v2` publication, a 300-second shared -GPU-prefix lease, 40 GiB capacity per rank, a 32 GiB low watermark, and no TTL -expiration. Publication spans range from 4,096 to 1,048,576 tokens. Restore -uses eight I/O workers, eight load threads, eight pending operations, and two -256 MiB arenas. Async capture uses two 3 GiB slots per rank; these are -separate from SIRCL's two 64 MiB transport arenas. - -Native MTP's cache draft identity is the target checkpoint. The profile uses -the dedicated namespace -`glm53-spark-df116c4f-mtp3-nvfp4-a16-c139f3670-mesh69313e19-tail-cow-v2`; -shared-BF16-head and external-DFlash entries must not be renamed into it. The -`draft_policy=separate` field describes cache registration layout, not an -external draft model. The -[exact-image validation record](../performance/records/glm53-flash/spark-mtp3-compute-stream-safety-20260906.md) -includes publication and restoration of a 26,624-token prefix after all model -containers stopped and restarted under this namespace. The answer, external-hit -counters, and all four restore logs agree. This qualifies the recorded recall -case, not every context length or concurrent cache workload. - -## Obtain the image and target - -Pull the published Linux/ARM64 managed image on every Spark. No local build -is required. The [registry receipt](../runtime/glm53-spark-mtp3-mesh/public-image.json) -records anonymous access and the published image's manifest/config identities. The separate -[content receipt](../runtime/glm53-spark-mtp3-mesh/image-receipt.json) is the -input accepted by the renderer, installer, and native qualification runner. -Keep both with the checkout; do not substitute `public-image.json` for the -content receipt. - -The content and registry receipts identify the same public image. The -[compute-image equivalence record](../runtime/glm53-spark-mtp3-mesh/compute-image-equivalence.json) -verifies all 4,891 vLLM, 385 B12X, and 150 SparkCache package files plus the -selected environment against tested private image -`sha256:3b4768e5ba31cadcc882dffa06d7b667af44abdf157d5c11b7ac7fe962e80c43`. -The mounted transport is checked separately. The published config-image ID -below is also the exact image used for the linked runtime validation. - -```bash -mtp_image='ghcr.io/fujitsupolycom/sparkring-glm53-sparkcache@sha256:67dc0ae453baaae6831ccec1d259b4ef8b236a8b0dc9f747d901b95c66ec1987' -mtp_image_id='sha256:2e41b1e934a85ff7c21b780532db2f0a0e978df081e52f4ae2bf11f8992fb24f' -docker pull "${mtp_image}" -test "$(docker image inspect "${mtp_image}" --format '{{.Id}}')" = "${mtp_image_id}" - -hf download local-inference-lab/GLM-5.3-Flash-NVFP4-Spark \ - --revision df116c4fb16b1d37ae43d2cfd624de26ffbc832e \ - --local-dir /srv/models/GLM-5.3-Flash-NVFP4-Spark/df116c4fb16b1d37ae43d2cfd624de26ffbc832e -``` - -Distribute that checkpoint directory and the identical verified child image -to all four ranks. Follow the [image and model distribution procedure](GLM53_JJ_R8_GB10_SPARKCACHE_TP4_QUICKSTART.md) -for transfer mechanics, but do not download or configure its external draft. -Do not substitute a mutable model branch or a different image tag. The -launcher checks the target configuration and index hashes; operators must -also verify every indexed weight shard after transfer. - -For example, if all hosts use the checkpoint path above, copy it from the -download host over trusted SSH aliases defined in your topology: - -```bash -mtp_target='/srv/models/GLM-5.3-Flash-NVFP4-Spark/df116c4fb16b1d37ae43d2cfd624de26ffbc832e' -for host in spark-r1 spark-r2 spark-r3; do - ssh "$host" mkdir -p "$mtp_target" - rsync -aH --partial --info=progress2 "$mtp_target/" "$host:$mtp_target/" - rsync -aHnc --itemize-changes "$mtp_target/" "$host:$mtp_target/" -done -``` - -Provision destination directory permissions first. The final checksum dry -run must report no content differences; it verifies transfer equality, not -independent model-publisher authenticity. You may instead download the exact -revision independently on every host. Do not download an external drafter. - -## Extract the transport bundle and host marker - -On a host with the published image already pulled, extract its packaged -artifacts without starting a container. Provision `/srv/sparkring` for the -operator first. Both artifact destinations and the temporary container name -must be unused: - -```bash -mkdir -p /srv/sparkring/artifacts -test ! -e /srv/sparkring/artifacts/mtp3-mesh-bundle -test ! -e /srv/sparkring/artifacts/mlx5-rdma-tx-marker -docker create --name sparkring-mtp3-extract --entrypoint /bin/true "$mtp_image_id" -docker cp sparkring-mtp3-extract:/opt/spark-sircl /srv/sparkring/artifacts/mtp3-mesh-bundle -docker cp sparkring-mtp3-extract:/opt/sparkring/bin/mlx5-rdma-tx-marker /srv/sparkring/artifacts/mlx5-rdma-tx-marker -docker rm sparkring-mtp3-extract -cp runtime/glm53-spark-mtp3-mesh/image-receipt.json /srv/sparkring/verified-image-receipt.json - -printf '%s %s\n' \ - '69313e19e881ec93e9ed3bd150d2f24fc6b444488ac729a69f45d038e2243500' \ - '/srv/sparkring/artifacts/mtp3-mesh-bundle/sparkring-overlay-manifest.json' \ - '2828c07e4255c4962c77425be2c88969e7eb7dd4b1bf9e36485bc705bb5d6d64' \ - '/srv/sparkring/artifacts/mlx5-rdma-tx-marker' | sha256sum --check -``` - -Do not run `profile.py bundle` on this extracted child bundle: that command -composes a child bundle from the **parent** image's SIRCL input and is only -needed for source reproduction. The published child already contains the -canonical bundle. The renderer and installer verify manifest entries. - -Keep these artifacts outside `/opt/sparkring/managed-mesh`, which must not -exist before service installation. Check the extracted marker's host-library -linkage before attachment. For an optional local source build, follow -[image reproduction](../runtime/glm53-spark-mtp3-mesh/IMAGE_BUILD.md); -use the resulting verified receipt instead of the published receipt if its -image identity differs. - -## Describe and render the site - -Copy `runtime/glm53-spark-mtp3-mesh/site.example.json` and -`fabric.example.json` into a private site directory. Replace every synthetic -address, MAC, path, and device mapping with the verified four-rank inventory. -The site document must identify the marker executable by its actual SHA-256. -Extract the managed executable from the verified child image using the -[image packaging guide](../runtime/glm53-spark-mtp3-mesh/IMAGE_BUILD.md). -The installer verifies its source and binary identities against the receipt. - -Create a private site directory and copy the templates without overwriting -an existing deployment: - -```bash -mkdir -p /srv/sparkring/site -cp -n runtime/glm53-spark-mtp3-mesh/site.example.json /srv/sparkring/site/mtp3-mesh.json -cp -n runtime/glm53-spark-mtp3-mesh/fabric.example.json /srv/sparkring/site/fabric.example.json -``` - -Edit those private copies. At minimum, review every field below: - -| Input | Required value | -|---|---| -| `topology_file` | The sibling private fabric JSON filename | -| `management_addresses` and each rank's SSH alias | Four distinct reachable hosts in rank order; passwordless SSH plus authorized `sudo -n` | -| Fabric ports and reciprocal peers | Actual direction/function, netdev, RDMA device, IPv4, MAC, and cable mapping | -| `model_roots` | Actual immutable target directory on each host | -| `cache_roots` | Dedicated writable persistent/JIT cache root on each host; preserve across model restart | -| `bundle_root` | `/srv/sparkring/artifacts/mtp3-mesh-bundle`, or your verified staged equivalent | -| `marker_binary` | `/srv/sparkring/artifacts/mlx5-rdma-tx-marker`, or your extracted equivalent | -| `marker_binary_sha256` | `inside_image.marker_binary_sha256` from the verified image receipt, not the template's diagnostic binary hash | -| `container_prefix` | An unused prefix reserved for this deployment | -| `state_root` | Retain the schema's planned state path; the managed service separately uses `/run/sparkring-mesh` | -| `api_keys_file` | Optional. Absolute host path to a readable mode-0600 file of newline-separated API keys, present at the same path on every rank. The renderer sets `API_KEYS_FILE`; the launcher passes one `--api-key` option followed by all non-empty keys. Keys cannot contain whitespace. Omitting this field leaves the API unauthenticated. | -| `target_model_variant` | Optional: `nvfp4-spark` (default) or `nvidia-nvfp4`. The [NVIDIA target guide](../profiles/glm53-nvidia-nvfp4.md) defines its model pins, loader, isolated cache namespace, image restrictions and evidence. | -| `liveness_output_seconds` | Optional integer seconds from 1 through 2,147,483,647. Overrides the output-stall timeout on every rank; omission retains 300 seconds. Select above the longest legitimate measured output gap with margin. Requires an image containing the output-stall liveness rule; regenerate launch inputs and recreate containers after changing it | - -API keys are separate from the managed mesh health key. Container creation -copies API keys into the model arguments and the first key into the warmup -environment. Treat Docker command plans and inspection output as sensitive. -Rendering stores only the key-file path; it does not capture or rotate keys. - -To rotate API keys, coordinate a stop across all ranks, update the private key -files, and recreate the serving containers. Update and revalidate the managed -container identities before restarting through the -[managed lifecycle](../runtime/glm53-spark-mtp3-mesh/MANAGED_MESH.md). -Re-render if the key-file path changes. Re-rendering alone or restarting an -existing container does not change its captured keys. The first-install helper -is not an in-place deployment updater. - -Retain the topology's `bounded_runtime_seconds: 7200` compatibility field. -It describes diagnostic-plan arguments and is validated by the renderer; -it does not impose a runtime limit on the managed service. Do not change it -to zero to request persistent serving. The managed service supplies -`--managed` itself and does not execute the bounded marker argument arrays. - -```bash -python3 runtime/glm53-spark-mtp3-mesh/profile.py render \ - --site /srv/sparkring/site/mtp3-mesh.json \ - --bundle /srv/sparkring/artifacts/mtp3-mesh-bundle \ - --image-receipt runtime/glm53-spark-mtp3-mesh/image-receipt.json \ - --output build/mtp3-mesh-launch -``` - -Review `rank0.env` through `rank3.env` and `fabric-plan.json`. The latter -contains argument arrays, not permission to execute them. Stage the bundle -at the site's `bundle_root` on every rank. Stage the rendered directory at -`/srv/sparkring/mtp3-mesh-launch`, and retain a checkout for the read-only -inspector. Use identical bytes on all ranks. - -Distribute the checkout at the same reviewed commit, rendered launch, image -receipt, canonical bundle, and extracted marker to every host. The private -site JSON is identical on all hosts: the installer chooses its local rank. -Do not run `make_example.py` on a configured private site. Create each -`cache_roots` directory with sufficient capacity before container creation. -Example transfers, after provisioning the destination paths and permissions: - -```bash -for host in spark-r0 spark-r1 spark-r2 spark-r3; do - rsync -a --checksum build/mtp3-mesh-launch/ "$host:/srv/sparkring/mtp3-mesh-launch/" - rsync -a --checksum /srv/sparkring/artifacts/ "$host:/srv/sparkring/artifacts/" - scp /srv/sparkring/verified-image-receipt.json "$host:/srv/sparkring/verified-image-receipt.json" -done -``` - -The artifact directory in this example contains only public transport files, -not the health key or cache contents. Do not transfer an entire private work -directory. Protect configuration and code from unprivileged modification. - -The SIRCL endpoint slots are ordered by peer rank: slot 0 connects rank `r` -to `r XOR 1`, and slot 1 connects it to `r XOR 3`. On this four-node cycle, -odd ranks therefore use counter-clockwise before clockwise. The renderer -applies that order to both primary and secondary SIRCL functions. Do not -replace it with clockwise-first on every rank. RoCEnante's canonical HCA -inventory is a separate ordering and remains unchanged. - -## Install and operate the managed fabric - -Follow the [managed mesh installation and lifecycle guide](../runtime/glm53-spark-mtp3-mesh/MANAGED_MESH.md). -It is the executable host-operations procedure for this profile: - -1. Stage identical image, bundle, marker, and rendered site inputs. -2. Pre-create stopped containers using `SPARKRING_CREATE_ONLY=1`. -3. Install each rank with a shared private health key and epoch. -4. Establish authenticated four-rank mesh readiness. -5. Run native RC correctness checks before starting the model. -6. Start the model through the managed model units and verify completed - temperature-one warmup. - -The service installs only exact missing planned routes, neighbors, and -hardware rules. Matching preexisting state is adopted, not owned for removal. -It never flushes unrelated networking. The service monitors the configured -paths and their helper processes for the lifetime of the deployment. -The host installer copies only its [explicit source allowlist](../runtime/glm53-spark-mtp3-mesh/managed_install.py). Private inputs are supplied -separately; do not place keys or cached results into source trees for transfer. - -The source ASIC changes Ethernet type `0x0800` to `0x88b5`. The intermediate -ASIC restores `0x0800`, rewrites the destination MAC, and redirects to the -opposite physical port. RC transport headers and payload are preserved. -Endpoints still use pinned, GPU-mapped host memory and CPU-side posting. - -After managed startup, require the combined four-rank readiness check: - -```bash -python3 runtime/glm53-spark-mtp3-mesh/wait_managed_ready.py \ - --launch /srv/sparkring/mtp3-mesh-launch --timeout 900 \ - --output /path/to/private-receipts/model-ready.json -``` - -Create the receipt's parent directory first and use an absent output path. -The tool requires all four containers to be running and Docker-health healthy, -plus rank-zero API health and scheduler liveness HTTP 200. It is read-only -and does not treat systemd active state as model readiness. - -Set optional authentication in the management shell. Leave `api_auth` empty -for an API without keys. For an authenticated API, use the same private key file -as the serving configuration; credentials are read from a file, not printed: - -```bash -api_auth=() -# When API keys are configured, uncomment and set the private path: -# api_key_file=/path/to/private-api-keys -if [[ -n "${api_key_file:-}" ]]; then - api_auth=(--api-key-file "$api_key_file") -fi -``` - -With the example container prefix, inspect serving logs and endpoints: - -```bash -ssh spark-r0 'docker logs -f --tail 100 glm53-spark-mtp3-mesh-r0' -curl --fail http://RANK0_MANAGEMENT_ADDRESS:8015/health -if [[ -n "${api_key_file:-}" ]]; then - curl --fail --header @<(awk 'NF { print "Authorization: Bearer " $0; exit }' "$api_key_file") \ - http://RANK0_MANAGEMENT_ADDRESS:8015/v1/models -else - curl --fail http://RANK0_MANAGEMENT_ADDRESS:8015/v1/models -fi -curl --fail http://RANK0_MANAGEMENT_ADDRESS:8016/liveness -``` - -Use model name `glm-5.3-flash-spark`. Confirm native MTP depth three, completed -warmup, all ranks healthy, and the expected image/bundle identities. API -health alone is not scheduler liveness, numerical correctness, or end-to-end -transport qualification. - -For shutdown or recovery, use `managed_cluster.py stop-model`, `down`, or -`recover` as documented in the managed guide. Drain requests first. The -coordinator verifies all four pinned model containers are stopped before -planned fabric removal. Hot replacement beneath live QPs and automatic model -restart are unsupported. No unattended-high-availability claim is made. - -## Run bounded qualification checks - -Status: **implemented** test tooling. These commands produce evidence for -individual checks; they do not qualify failure containment or unattended -serving. Run from the repository root with Python and SSH available. Keep -receipts outside version control: they contain resolved site information. - -### Native RC correctness before model startup - -After managed `up` passes the four-rank readiness gate, test the packaged -child image before starting any model containers. The following -command prints a plan without contacting hosts: - -```bash -python3 runtime/glm53-spark-mtp3-mesh/qualification/run_native.py \ - --launch build/mtp3-mesh-launch \ - --image-receipt runtime/glm53-spark-mtp3-mesh/image-receipt.json \ - --output /path/to/private-receipts/native -``` - -Review the SSH targets, exact image ID, temporary container names and cache -mounts. Run the same command with `--execute-authorized` to execute it. The -output directory must not exist. This requires a render made with that exact -image receipt; the parent-image-only mode does not contain the embedded mesh -source that the standalone probe selects. - -The runner refuses running containers on any rank and never stops them. It -uses the site's management network and the source-bound six-QP map. Four -concurrent ranks check Q4, Q20, Q28 and Q64 BF16 payloads, changed graph inputs, -poisoned outputs, repeated slot reuse, and all 24 origin-QP completion/byte -balances. Require every cell to pass with zero completion errors. Native -RoCEnante checks do not test the serving adapter's SIRCL routing for Q20/Q28. - -Each container has a 240-second process timeout. If SSH or a rank fails, -inspect the named test containers on all hosts before proceeding; a timeout -is not proof of cleanup. No route, marker, or traffic-control cleanup is -performed by the runner. Its three timing samples per cell are diagnostics, -not performance claims. Managed markers remain under supervision throughout -model loading and qualification; the test runner does not own or stop the -mesh service. - -### GPU stream safety - -For the selected stream-safety cases, use the same stopped-model test window -and rendered image receipt as the native check: - -```bash -python3 runtime/glm53-spark-mtp3-mesh/qualification/run_native.py \ - --launch /srv/sparkring/mtp3-mesh-launch \ - --image-receipt /srv/sparkring/verified-image-receipt.json \ - --mode streams --rows 4 64 --port 30140 \ - --output /path/to/private-receipts/stream-checks --execute-authorized -``` - -This checks alternating caller streams with misaligned buffers, changed-input -graph replay, and rejection of a second stream in one CUDA capture. It does -not inject in-flight link or GPU failures. -### Model output and persistent-cache restoration - -The managed startup command checks available and contiguous memory on all four -hosts. With serving stopped, it automatically reclaims clean page cache and -compacts memory only where required. If a rank still fails, startup stops and -identifies the host requiring a reboot; it never reboots automatically. Stop -unrelated containers and GPU workloads first. See -[startup memory preparation](../runtime/glm53-spark-mtp3-mesh/MANAGED_MESH.md#automatic-startup-memory-preparation). - -Start the four-rank model through `managed_cluster.py start-model` and wait -for completed speculation warmup. Set the endpoint to the rank-zero -management address: - -```bash -export MTP_ENDPOINT='http://RANK0_MANAGEMENT_ADDRESS:8015' -mkdir -p /path/to/private-receipts -python3 runtime/glm53-spark-mtp3-mesh/qualification/recall_prompt.py \ - --output /path/to/private-receipts/recall.txt -python3 runtime/glm53-spark-mtp3-mesh/qualification/model_cache.py \ - --endpoint "$MTP_ENDPOINT" --model glm-5.3-flash-spark "${api_auth[@]}" \ - --kind semantic --output /path/to/private-receipts/semantic-before \ - --execute-authorized -python3 runtime/glm53-spark-mtp3-mesh/qualification/model_cache.py \ - --endpoint "$MTP_ENDPOINT" --model glm-5.3-flash-spark "${api_auth[@]}" \ - --kind persistent --phase before-restart \ - --prompt-file /path/to/private-receipts/recall.txt \ - --expected-text 'cobalt orchard lantern' --max-tokens 512 --temperature 1 \ - --output /path/to/private-receipts/prefix-before --execute-authorized -``` - -Without `--execute-authorized`, the request tool prints its plan and makes no -API calls. Requests default to temperature one, a fixed seed, and a bounded output. -Require the exact semantic answer and `stop`. The recall generator creates -129,455 UTF-8 bytes, with SHA-256 -`3d2bc5228895566b1497e6f35f6c5aa051685f99438f27226134dfcfab15c277`. -It makes no API calls and refuses to overwrite a file. The long-prefix request -records actual token usage; text length is not a token-count guarantee. Retain -successful publication and compatible cache-identity evidence on every rank -before restarting. Preserve the cache directory and namespace. - -For this cache check, preserve the pinned container IDs, image, cache mounts, -namespace, and forwarding contract. Drain API traffic and use the managed -all-rank model-stop barrier; do not invoke the launcher again or independently -restart Docker containers: - -```bash -python3 runtime/glm53-spark-mtp3-mesh/managed_cluster.py stop-model \ - --site /srv/sparkring/mtp3-mesh-launch/site.json \ - --output /path/to/private-receipts/model-stop.json --execute-authorized - -python3 runtime/glm53-spark-mtp3-mesh/managed_cluster.py start-model \ - --site /srv/sparkring/mtp3-mesh-launch/site.json \ - --output /path/to/private-receipts/model-restart.json --execute-authorized -``` - -Do not proceed after a failed phase. Inspect its receipt and use the managed -recovery procedure if the fabric or a supervisor failed. The same-fabric -model restart does not require marker renewal. - -A successful model-unit start is not readiness. Inspect rank logs, completed -speculation warmup, API health and scheduler liveness as described above. -Restarting replaces GPU prefix state; simply repeating a request within one -process cannot prove disk restoration. Wait for compatible inventory discovery -on all ranks, then run: - -```bash -python3 runtime/glm53-spark-mtp3-mesh/qualification/model_cache.py \ - --endpoint "$MTP_ENDPOINT" --model glm-5.3-flash-spark "${api_auth[@]}" \ - --kind persistent --phase after-restart \ - --prompt-file /path/to/private-receipts/recall.txt \ - --expected-text 'cobalt orchard lantern' --max-tokens 512 --temperature 1 \ - --reference /path/to/private-receipts/prefix-before \ - --output /path/to/private-receipts/prefix-after --execute-authorized -python3 runtime/glm53-spark-mtp3-mesh/qualification/model_cache.py \ - --endpoint "$MTP_ENDPOINT" --model glm-5.3-flash-spark "${api_auth[@]}" \ - --kind semantic --output /path/to/private-receipts/semantic-after \ - --execute-authorized -``` - -The tool verifies identical request bodies across the restart and records -visible-output agreement, raw responses, usage, and separate prefix/external -cache metric deltas. It deliberately does not set `persistent_restore_proven` -to true. Acceptance additionally requires successful restoration logs on all -four ranks, a nonzero external-prefix-hit delta, the matching native-MTP cache -identity, and no transport/model errors. RAM-prefix hits, shorter latency, -or a successful HTTP response cannot substitute for those checks. A clean -recomputation after late inventory discovery is a cache miss, not a restore. - -These canaries are bounded semantic checks, not general model-quality tests. -Retain native correctness, serving routing evidence, restart evidence and -persistent-cache evidence as distinct results. - -The generated recall workload places a known phrase before 700 varied neutral -records and asks for that phrase at the end. Alternative private UTF-8 prompt -files are supported through `--prompt-file` and `--expected-text`, but identify -them separately in any evidence. Verify actual prompt-token counts from the -response. The tool -requires identical submitted requests for the restart comparison; a fixed -seed does not guarantee identical generated sequences at temperature one. -Visible-output equality is diagnostic, not a restart pass criterion. A -single failed semantic canary is inconclusive and requires repeated controls; -it must not be erased or replaced by a passing workload. - -[Profile validation: performance, accuracy, and restart checks](PROFILE_VALIDATION.md). diff --git a/docs/ISSUE224_ENGINE_STALL.md b/docs/ISSUE224_ENGINE_STALL.md deleted file mode 100644 index 7710de5d..00000000 --- a/docs/ISSUE224_ENGINE_STALL.md +++ /dev/null @@ -1,111 +0,0 @@ -# Running-request stall: evidence and recovery detection - -The [source-level indexer investigation](ISSUE224_INDEXER_BARRIER.md) identifies -a histogram-publication race and includes a GPU-tested kernel fix and targeted -isolation experiment. This document covers the fallback liveness detector. - -Status: **Development** for stall detection; unattended recovery is unverified. The -separate kernel fix addresses a confirmed publication race that can cause the -blocked response path described in -[issue #224](https://github.com/FujitsuPolycom/sparkring/issues/224). End-to-end -incident resolution remains unverified. - -## Source evidence - -The [operator runtime source pins](../runtime/glm53-flash-jj-r8-gb10/pins.json) -identify the affected vLLM commit as -`e02b174693e13859de61811b5e8cd13d5308e259` and the earlier comparison commit as -`22ffe1401ca9bd3e4503e62de7b414deca7661a1`. The comparison image is bound by the -[page-tail image receipt](../runtime/glm53-flash-jj-r8-gb10/page-tail-v2-public-image-receipt.json). -Both commits are available in -`https://github.com/FujitsuPolycom/vllm`. - -Comparing those exact commits shows no differences in -`vllm/v1/executor/multiproc_executor.py`, -`vllm/distributed/device_communicators/shm_broadcast.py`, or -`vllm/v1/engine/core.py`. The 15 changed files concern B12X attention/model -paths, associated tests, and argument handling. Timing changes can expose a -pre-existing race, so this does not exonerate the executor. - -The affected queue already caps shared-memory reader waits at five seconds -(`SHM_READER_RECHECK_INTERVAL_MS`). A stack sampled in `poll()` does not show -that the individual poll is indefinite. Lost notification alone should not -permanently hide a published shared-memory slot with this source. - -With async scheduling enabled, `WorkerProc.handle_output()` puts outputs on -`async_output_queue`. A separate `async_output_busy_loop()` invokes -`enqueue_output()`, which calls `AsyncModelRunnerOutput.get_output()` before -publishing the response. The main worker can therefore wait for its next RPC -while its response thread is still blocked. Main-thread-only stacks cannot -establish that a response was produced or lost. - -## Discriminating evidence to collect during a hang - -Capture all Python threads in EngineCore and every TP worker, twice at least -ten seconds apart, before stopping the stack. Use `py-spy dump --pid PID` -inside each relevant process namespace. Include native frames if supported. -Preserve the full output, not just MainThread. - -Check these possibilities in order: - -1. Async output is waiting for CUDA completion. A response thread in - `get_output()` or event synchronization supports this; repeated stacks and - GPU/stream evidence are needed to identify the dependency that cannot finish. -2. Async output failed before publishing. A missing output thread and an - associated traceback support this. Inspect logs from all ranks; the process - itself may still be alive. -3. Transport lost a response or queue state diverged. This requires evidence - that the relevant response was published, plus queue/slot and rank identity. - An idle main thread alone is insufficient. - -Preserve full image digests and hashes of the three source files above from -the running containers. A stale version string or JIT namespace is insufficient -to establish the actual runtime source. Record async-output stacks, metrics, -and logs together so they can be correlated with the same stall. - -## Detection and recovery - -The source's progress-aware rank-zero monitor detects sustained running requests without observable -output, prompt-counter, or KV-allocation progress. The 300-second default -`SPARKRING_LIVENESS_OUTPUT_SECONDS` must exceed legitimate gaps without these -signals. Output batches reset the interval. KV allocation must exceed the -interval's high-water mark; allocation/release oscillation does not renew it. -An output-counter change or running work after an idle observation starts a -fresh high-water interval. A change in running-request count alone does not. -Prompt totals are optional and are not assumed to report every prefill chunk. -This is a fallback heuristic for the single-engine TP4 profile, not proof of -GPU execution. Fully preallocated work still needs a suitable timeout override. - -The offline regression feeds fresh unchanged metrics with three running -requests for 300 seconds and requires HTTP 503 with `engine_output_stall`. -Other checks cover a growing prefill cache for 600 seconds, progress stopping, -allocation oscillation, idle periods, counter reset, recovery, missing metrics, -invalid timeouts, and the timeout override. No GPU race is reproduced by these -tests. Raw output-gap reporting remains available alongside the separate -inactivity timer. - -The progress-aware monitor has a separate -[million-token prefill record](../performance/records/glm53-flash/prefill-aware-liveness-20260908.md). -All 206 liveness polls were healthy; the maximum raw output gap was 398.582 -seconds while the maximum inactivity interval was 9.967 seconds. This validates -one healthy-prefill case, not automatic recovery from a stalled engine. - -The [published operator image](../runtime/glm53-flash-jj-r8-gb10/hotfix/README.md) -contains the output-only monitor and its source receipt. Deployment of the -progress-aware policy requires an image with the corresponding verified source; -editing a timeout cannot install it. Preserve the deployment's coordinated -stop/start procedure when replacing its runtime. -Unattended recovery remains unqualified: the deployment must first establish -its longest healthy prefill/restore gap and verify its response to an injected -output stall. The monitor reports health and does not restart the cluster. - -The executor RPC deadline and monitor inactivity timer have different starting -points and observation intervals. Either may report first even when both are -set to 300 seconds; retain both executor errors and liveness samples. - -Do not automatically replay a timed-out model step. The executor's responses -are ordered without per-call IDs, and a partially completed step can mutate KV -and speculative state. A future executor timeout must invalidate the executor -and propagate failure through the established recovery path, including pending -futures. It needs separate tests for late responses and partial multi-rank -completion; adding a retry to `get_response()` is not a safe fix. diff --git a/docs/ISSUE224_INDEXER_BARRIER.md b/docs/ISSUE224_INDEXER_BARRIER.md deleted file mode 100644 index b6c23044..00000000 --- a/docs/ISSUE224_INDEXER_BARRIER.md +++ /dev/null @@ -1,209 +0,0 @@ -# Issue 224: sparse-indexer publication barrier race - -Status: **Validated** for the bounded publication-order regression and tested -single-GPU indexer cases. The publication race reproduced on all four -GB10 GPUs; entry synchronization prevented it in all 80 cooperatively launched -probes. The mixed-line-ending patched source passed 15 GPU correctness tests -and 2,000 graph replays with concurrent copies. The source-equivalent LF build -output separately passed the 15 correctness tests. Full-model and ordinary-launch -forward progress remain unqualified. See the -[bounded GPU evidence](../performance/records/glm53-flash/issue224-dgx4-validation.md). - -## Finding - -The fused DSA indexer's cooperative top-k merge contains a publication race -capable of causing GPU deadlock. Such a deadlock can block the executor's -response path; it does not establish the cause of every reported stall. - -Affected source: B12X commit -`9ae41c5cb9935d740456479954b0089f80bd2ef2`, file -`b12x/attention/dsa_indexer/fused_indexer.py`. - -The defect is in `_fused_group_barrier()` at lines 377–386. Its leader publishes -arrival before synchronizing the rest of its thread block: - -```python -if tx == Int32(0): - red_add_global_release_i32(arrival_ptr, Int32(1)) - spin_wait_global_ge_i32(arrival_ptr, (phase + Int32(1)) * ctas_per_group) -cute.arch.sync_threads() -``` - -`_coop_wide_round()` and `_coop_narrow_round()` publish global histogram bins -from multiple warps and then call this helper. There is no block-wide barrier -between those publications and the leader's arrival. A release fence on thread -0 orders that thread's operations; it cannot make an unscheduled publishing -warp finish. NVIDIA documents this distinction in the -[CUDA synchronization and memory-fence rules](https://docs.nvidia.com/cuda/archive/13.0.0/cuda-c-programming-guide/index.html#memory-fence-functions). - -The barrier after the spin only protects consumers inside the same block. -Another block can already have passed its own barrier and started reading the -global histogram while the delayed publisher is still running. - -## Why this becomes a permanent GPU wait - -The cooperative merge computes a pivot from the histogram independently in each -block. It conditionally stops refining when `bin_count == remaining_k`. -Inconsistent histogram snapshots can therefore change the number of subsequent -barriers each block executes. - -One legal schedule, using three blocks and top-k 512: - -1. Block A contributes 512 candidates in a lower pivot bin. Block B contributes - one higher candidate, but its publishing warp is delayed. Block C has no - candidates. Total candidate count is 513. -2. All three block leaders announce arrival. A reads an incomplete histogram - with 512 lower candidates and concludes that refinement is done. -3. B's delayed publication completes. B now sees one higher candidate, leaving - 511 slots to select from the lower bin's 512 candidates. B needs another - radix round. -4. A and C do not enter that round. B increments the cumulative arrival count - from 3 to 4 and spins waiting for 6. The missing arrivals cannot occur. - -The model collapses matching coarse/fine bins into two abstract bins and models -one leader plus one representative nonleader warp per block. It executes an -AST-lowered copy of the actual barrier helper; CUDA scheduling and code generation -are not executed. This is evidence of a reachable protocol failure, not a -hardware reproduction or a measurement of its production frequency. - -The CPU interleaving harness, -[`repro_indexer_barrier.py`](../performance/harnesses/indexer_barrier/repro_indexer_barrier.py), -uses only Python's standard library. From the SparkRing repository root, run it -against the B12X source at commit -`9ae41c5cb9935d740456479954b0089f80bd2ef2`, apply the checked source transform, -and repeat. Before applying the transform, verify the file's raw SHA-256 is -`d3ec6274e142a4e7d1062ea6d2d99b97db0a02e92bb976c6570ae990b836b18d`. -Git line-ending conversion can change those bytes; the transform rejects any -other input hash. - -```bash -python performance/harnesses/indexer_barrier/repro_indexer_barrier.py /path/to/b12x/b12x/attention/dsa_indexer/fused_indexer.py --expect deadlock -python runtime/glm53-flash-jj-r8-gb10/patch_indexer_barrier.py /path/to/b12x/b12x/attention/dsa_indexer/fused_indexer.py -python performance/harnesses/indexer_barrier/repro_indexer_barrier.py /path/to/b12x/b12x/attention/dsa_indexer/fused_indexer.py --expect complete -``` - -The harness prints a JSON trace. Without entry synchronization, the modeled -arrival count is 4 while a block waits for 6. With entry synchronization, the -count reaches 6 and no actors remain pending. - -## Response path when the indexer stalls - -```text -EngineCore.step_with_batch_queue() - -> MultiprocExecutor.execute_model() / sample_tokens() - -> worker main thread submits model GPU work - -> B12xSparseIndexer.forward() - -> dsa_indexer.run() -> fused paged indexer - -> cooperative histogram merge can deadlock - -> AsyncGPUModelRunnerOutput enqueues output copy - -> copy stream waits for the model stream - -> WorkerProc.handle_output() queues the asynchronous output object - -> worker main thread returns to RPC dequeue - -> async_output_busy_loop() -> enqueue_output() -> get_output() - -> async_copy_ready_event.synchronize() cannot finish - -> response never gets enqueued - -> EngineCore waits in get_response() -``` - -Relevant vLLM locations at `e02b174693e13859de61811b5e8cd13d5308e259`: - -- `vllm/v1/engine/core.py`: `step_with_batch_queue()` schedules ahead, then drains - the oldest result through `future.result()`. -- `vllm/v1/executor/multiproc_executor.py`: `handle_output()` sends asynchronous - results to a separate thread. `enqueue_output()` must resolve `get_output()` - before publishing a response. All main worker threads can be idle during this - failure. -- `vllm/v1/worker/gpu_model_runner.py:326`: the output copy stream waits for the - current model stream. Line 356 synchronizes the output-completion event. - -Other ranks can be waiting in later GPU collectives when one rank stops making -progress. The specific kernel running on each rank still requires a GPU trace. -GPU utilization alone does not identify a kernel or prove this attribution. - -## Regression evidence - -The [page-tail comparison image receipt](../runtime/glm53-flash-jj-r8-gb10/page-tail-v2-public-image-receipt.json) -pins B12X to `6255090a03b12c3f7d552102a02fac0b542fb8c9`. The -[affected operator runtime pins](../runtime/glm53-flash-jj-r8-gb10/pins.json) -select `9ae41c5cb9935d740456479954b0089f80bd2ef2`. - -B12X commit `357576e6d49a2d9fbf623cd73542826fdf55bb8e` introduces the separate -12/12/8-bit cooperative merge and its conditional refinement. It is not an -ancestor of the comparison image's pin and is an ancestor of the affected pin. The comparison -merge also has publication-order concerns, but its main refinement loop uses a -fixed four rounds; it does not use this conditional early-exit protocol. Absence of -observed hangs in the comparison image is not proof that it is race-free. - -The affected GB10 profile's `attention.dsa_indexer` entry contains only -`backend: native`. Missing `fused_merge` resolves to `auto`, which resolves -to cooperative for multi-block groups. GLM's 32-head/top-k-512 shape permits the -fused path for decode plans up to 16 rows on SM121. With 48 SMs and a 16-row -plan, the scratch planner assigns three blocks per group. Request concurrency -and query-row count are not interchangeable, especially with speculation. - -This makes the failure path reachable under the recorded default composition. -The exact live plan and group shape at each reported hang are not available. - -## Executor response deadlines - -The exact vLLM comparison from `22ffe140` to `e02b1746` leaves the executor, -shared-memory queue, and EngineCore files unchanged. Their source already has: - -- Five-second shared-memory rechecks, independent of notification delivery. -- `VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS`, default 300, passed to both execution - and sampling RPCs. `collective_rpc()` computes a deadline and passes the - remaining time to `dequeue()`. - -A stack in `poll()` cannot establish an indefinite poll. A supervisor restarting -after 60 seconds can prevent the 300-second timeout from being observed. If the -same RPC is confirmed to remain blocked beyond its configured deadline, inspect -the actual container files, environment, and closure's method/deadline; that is -additional evidence not explained by the source-pinned timeout behavior. - -## Implemented fix and isolation experiment - -Add `cute.arch.sync_threads()` at entry to `_fused_group_barrier()`, before the -leader publishes arrival. Keep the existing trailing barrier. This makes every -publishing warp participate before peers are allowed to consume the histogram. -Bump the `KernelCompileSpec` revision in -`b12x/attention/dsa_indexer/fused_indexer.py` from 1 to 2 so existing cached -compiled artifacts do not reuse the old protocol. - -The kernel patch contains those changes only. The image builder applies -`runtime/glm53-flash-jj-r8-gb10/patch_indexer_barrier.py` to the exported B12X -source before creating its source manifest. The transform checks both input -and output hashes and records its own digest in the build receipt. It rejects -unexpected source rather than applying a speculative replacement. The accepted -input is the raw byte sequence with SHA-256 -`d3ec6274e142a4e7d1062ea6d2d99b97db0a02e92bb976c6570ae990b836b18d`; -the transform does not normalize input before hashing. Its patched output uses -LF line endings. The separately GPU-tested patched file had mixed line endings; -its normalized Python source matches the transform output, which also passed -the 15 GPU correctness tests recorded in the linked evidence. - -The [published child image](../runtime/glm53-flash-jj-r8-gb10/hotfix/README.md) -includes the fix; users do not need to rebuild it. Existing image digests are -unchanged, so restarting an old image alone does not install the update. - -For a targeted A/B run, pass `B12X_FUSED_INDEXER=0` inside every worker container -before startup. The pinned `dsa_indexer/scratch.py` recognizes this switch and -selects the tiled decode route. It bypasses the suspect kernel while retaining -SparkCache, speculation, and the transport configuration. The SparkRing launcher -patch forwards this variable and validates 0/1; the default remains 1. Existing -installed launchers do not forward it automatically. - -Use a separate `JIT_CACHE_NAMESPACE` for that run so captured/compiled model -artifacts cannot hide the changed dispatch. Apply the same setting to all ranks -through the managed coordinated restart procedure. Changing the environment in -an already-running container cannot change its existing plans and graphs. - -If a stall recurs after installing the fix, retain full worker-thread dumps, -image/source hashes, and the selected indexer route. Capture every worker thread -twice, ten seconds apart, and include EngineCore, executor-timeout errors, and -SparkCache metrics. GPU kernel coverage does not establish that every possible -EngineCore stall has the same cause. - -The regular indexer launch also assumes co-resident blocks without requesting -cooperative launch. That is a separate forward-progress risk requiring occupancy -and concurrent-stream validation; the publication-barrier patch does not claim to solve -all possible kernel hangs. diff --git a/docs/README.md b/docs/README.md index c652e672..45bb4da0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -21,7 +21,7 @@ Find the page for what you want to do. - [Status dashboard](operations/dashboard.md): each model's status page and the ring dashboard on Node A (`sparkring dashboard`, port 8090). - [Install reference](operations/install-reference.md): serving settings, - checkpoints, [two models on one ring](operations/install-reference.md#two-models-on-one-ring), + checkpoints, [two models on one ring](operations/install-fabrics.md#two-models-on-one-ring), storage and security. - [Enhancements by model](../performance/enhancements.md): every speed enhancement, how to enable it and its measured gain; check a deployment @@ -31,7 +31,7 @@ Find the page for what you want to do. - [Install troubleshooting](operations/install.md#troubleshooting): common messages and their fixes. -- [When a model stops serving](operations/install-reference.md#when-a-model-stops-serving): +- [When a model stops serving](operations/install-models.md#when-a-model-stops-serving): automatic recovery and the admin tunnel. - [Ring networking](operations/fabric-repair.md): inspect and repair fabric routing. diff --git a/docs/RESULTS.md b/docs/RESULTS.md deleted file mode 100644 index 74e162fa..00000000 --- a/docs/RESULTS.md +++ /dev/null @@ -1,53 +0,0 @@ -# SparkRing benchmark results - -Selected benchmark records are summarized below. Throughput is in tokens per -second; decode throughput is aggregate across concurrent requests. `C1`, `C8` -and similar labels mean one, eight or that many simultaneous requests. -The records use different models, images, sampling settings and sample counts; -consult their conditions and limitations before comparing results. - -The GLM-5.3 Flash DCP4 rows and the GLM-5.2 EXL3 rows measure TP4/DCP4 -configurations of retired profiles. SparkRing does not offer or support DCP4 -deployments; these records remain measurement evidence for their named images -and settings only. - -## Recorded throughput at 16K context - -| Profile | Prefill | C1 decode | C8 decode | Highest recorded concurrency at 16K | -|---|---:|---:|---:|---:| -| GLM-5.3 Flash B12X-KDA DCP4 public image, four Sparks | 2,649 | 37.97 | — | C4: 90.36 | -| GLM-5.2 EXL3 3.5-bpw, four Sparks | 671 | 20.15 | 64.13 | C8: 64.13 | -| DeepSeek-V4-Flash DSpark, two Sparks | 1,926 | 58.36 | 162.69 | C32: 307.13 | -| DeepSeek-V4-Flash-0731, four Sparks | 2,488 | 68.84 | 265.16 | C32: 508.11 | -| Qwen3.8-27B EXL3 K5/K6, two Sparks | 1,367 | 29.50 | 142.20 | C16: 184.39 | -| Qwen3.8-27B EXL3 K5/K6, four Sparks | 1,964 | 35.07 | 191.02 | C8: 191.02 | - -Dashes indicate no value in the linked record. Full context/concurrency matrices, -coding workloads, sample counts and uncertainty estimates remain in those records. -The GLM-5.3 B12X-KDA row is one bounded observation per cell; it has no -repeated-sample performance qualification. -Exact GLM-5.2 sample counts are in its -[machine-readable summary](../performance/records/glm-3.5bpw/normalized-base-20260822.json): -all C8 cells, 64K C2/C4, and 128K C1/C2/C4 use three observations; the remaining -decode cells use one. -The two-Spark Qwen record withholds its 128K/C16 cell despite two accepted -observations; its published C16 values run through 64K. - -## Records and receipts - -| Profile | Results | Matrix image | Receipts | -|---|---|---|---| -| GLM-5.3 Flash B12X-KDA DCP4 public image, four Sparks | [Bounded record](../performance/records/glm53-flash/b12x-kda-dcp4-20260903.md) | — | [Sanitized summary](../performance/receipts/glm53-flash/b12x-kda-dcp4-20260903/summary.json) | -| GLM-5.3 Flash DCP4 image `380283a5`, four Sparks | [Bounded record](../performance/records/glm53-flash/dcp4-24g-default-20260901.md) | — | [Sanitized summary](../performance/receipts/glm53-flash/dcp4-24g-default-20260901/summary.json) | -| GLM-5.2 EXL3 3.5-bpw, four Sparks | [Full record](../performance/records/glm-3.5bpw/normalized-base-20260822.md) | [Matrix image](../performance/records/glm-3.5bpw/normalized-base-20260822.png) | [Receipts](../performance/receipts/glm-3.5bpw/temp1/) | -| DeepSeek-V4-Flash DSpark, two Sparks | [Full record](../performance/records/deepseek-v4-flash/normalized-tp2-base-temp1-n5-20260823.md) | [Matrix image](../performance/records/deepseek-v4-flash/normalized-tp2-base-temp1-n5-20260823.png) | [Receipts](../performance/receipts/deepseek-v4-flash/temp1/) | -| DeepSeek-V4-Flash-0731, four Sparks | [Full record](../performance/records/deepseek-v4-flash/normalized-tp4-base-temp1-n5-20260823.md) | [Matrix image](../performance/records/deepseek-v4-flash/normalized-tp4-base-temp1-n5-20260823.png) | [Receipts](../performance/receipts/deepseek-v4-flash/temp1/20260823-tp4/) | -| Qwen3.8-27B EXL3 K5/K6, two Sparks | [Full record](../performance/records/qwen38-27b/normalized-tp2-1m-probmtp-temp1-20260823.md) | [Matrix image](../performance/records/qwen38-27b/normalized-tp2-1m-probmtp-temp1-20260823.png) | [Receipts](../performance/receipts/qwen38-27b/temp1/20260823-tp2/) | -| Qwen3.8-27B EXL3 K5/K6, four Sparks | [Full record](../performance/records/qwen38-27b/normalized-tp4-1m-probmtp-temp1-20260823.md) | [Matrix image](../performance/records/qwen38-27b/normalized-tp4-1m-probmtp-temp1-20260823.png) | [Receipts](../performance/receipts/qwen38-27b/temp1/20260823-tp4/) | - -The normalized DeepSeek two-Spark profile also completed a -[three-hour llama-benchy prefix-cache benchmark](../performance/records/deepseek-v4-flash/llama-benchy-normalized-tp2-20260822.md). - -The GLM-5.3 Linux/ARM64 image identified by the linked validation report completed a TP4/DCP1 -[942,898-token needle retrieval](../runtime/glm53-flash-jj-r8-gb10/PUBLIC_IMAGE_VALIDATION.md) -with a 1M-token request limit and 26 GiB of FP8 KV per rank. diff --git a/docs/architecture/overview.md b/docs/architecture/overview.md index ea73a2c1..c3177ca2 100644 --- a/docs/architecture/overview.md +++ b/docs/architecture/overview.md @@ -28,7 +28,7 @@ lists every saved configuration. Each Spark has a ConnectX-7 network card with two ports, port 0 (p0) and port 1 (p1). `sparkring setup` accepts three layouts -([cabling](../operations/install-reference.md#cabling)): +([cabling](../operations/install-package.md#cabling)): | Layout | Cabling | |---|---| @@ -38,27 +38,27 @@ port 1 (p1). `sparkring setup` accepts three layouts Node A is position 0, and positions follow the cables. Each port appears to the operating system as two network functions, so each cable carries two -fabric subnets ([addresses](../operations/install-reference.md#addresses-on-any-layout)). +fabric subnets ([addresses](../operations/install-fabrics.md#addresses-on-any-layout)). **Relays.** A Spark can only send directly to its cable neighbours. To reach a Spark further away, its packets pass through the Sparks in between, whose ConnectX-7 cards forward them in hardware without involving their CPU or GPU. On a ring of eight, traffic from Spark 0 to Spark 3 crosses Sparks 1 and 2: two relays. `sparkring setup` installs one -[relay table](../operations/install-reference.md#the-relay-table) on every +[relay table](../operations/install-fabrics.md#the-relay-table) on every Spark that serves every pair of Sparks: routes toward Sparks it shares no cable with, ConnectX rules that pass a packet out of the other port, and a marker process that tags each RDMA packet with the number of relays left. Every Spark between two cables also needs the ConnectX -[hairpin setting](../operations/install-reference.md#the-hairpin-setting). +[hairpin setting](../operations/install-fabrics.md#the-hairpin-setting). Boot services restore the setting and the relay table after every reboot -([boot and reboot](../operations/install-reference.md#boot-and-reboot)). +([boot and reboot](../operations/install-fabrics.md#boot-and-reboot)). A SIRCL connection crosses at most three relays. A ring of eight stays within that limit (the farthest Spark is three relays away either way round), and so does a line of up to five Sparks. One model on a line of six or more Sparks is **unsupported** because its end Sparks are four or more relays apart -([models on part of the fabric](../operations/install-reference.md#models-on-part-of-the-fabric)). +([models on part of the fabric](../operations/install-fabrics.md#models-on-part-of-the-fabric)). The six-Spark GLM-5.3 profile `glm53-nvfp4-csf-tp6` (**research-only**) runs on positions 0-5 of an eight-Spark ring and routes around the whole ring, so none of its connections crosses more than three relays @@ -110,7 +110,7 @@ messages are small, so there a collective's latency matters more than bandwidth; prefill sends large messages. `sparkring install` runs collectives on one of four transports -([transport and receipts](../operations/install-reference.md#transport-and-receipts)): +([transport and receipts](../operations/install-models.md#transport-and-receipts)): | Transport | When it runs | Status | |---|---|---| diff --git a/docs/architecture/sircl.md b/docs/architecture/sircl.md index 5768b679..d8ab2583 100644 --- a/docs/architecture/sircl.md +++ b/docs/architecture/sircl.md @@ -36,7 +36,7 @@ of up to eight Sparks and a line of up to five. A line of six or more is Relaying needs the relay table and the ConnectX hairpin setting on every Spark between two cables; `sparkring setup` installs both -([the relay table](../operations/install-reference.md#the-relay-table)). A +([the relay table](../operations/install-fabrics.md#the-relay-table)). A marker on the sending Spark tags each relayed RDMA packet with the number of relays left, and each relay passes it on and lowers the count. A relay holds forwarded bytes in a hairpin queue of 512 KiB that cannot pause the sender, so SIRCL keeps the @@ -93,7 +93,7 @@ launch grid per collective and message size. The installer's default table ([`sircl-tuning-defaults.json`](../../runtime/common/sircl-tuning-defaults.json)) has measured rows for a pair, a line of four, a ring of four and a ring of eight; `sudo sparkring fabric tune` measures one for your fabric -([measure the tuning table](../operations/install-reference.md#measure-the-tuning-table)). +([measure the tuning table](../operations/install-fabrics.md#measure-the-tuning-table)). A table chooses only among SIRCL's own settings and never sends a call to NCCL. @@ -144,8 +144,8 @@ per-deployment mesh service installs its relays. Only the retired `glm53-spark-mtp3-managed-mesh-tp4` profile uses it. The [mesh runtime contract](../../runtime/glm53-spark-mtp3-mesh/README.md) identifies its dispatch configuration, source packages and evidence; -RoCEnante's origins are in its -[source attribution](../../third_party/b12x_roce/README.md). +RoCEnante's origins are recorded in +[third-party notices](../../THIRD_PARTY_NOTICES.md). Ring sessions use the same kind of hardware relay. On a fabric that `sparkring setup` formed, the relay table serves every transport, and a @@ -158,7 +158,7 @@ them when the image carries the SIRCL layer (image lock v3, [SIRCL layer](../../runtime/images/installer-images.md#sircl-layer)) and `sparkring setup` installed the fabric's relay table; otherwise it uses the prepared transport -([transport and receipts](../operations/install-reference.md#transport-and-receipts)). +([transport and receipts](../operations/install-models.md#transport-and-receipts)). No profile names a transport. The installer's transport adapter, [`runtime/common/transport.py`](../../runtime/common/transport.py), sets the same session settings as the SIRCL serve launcher's plan for the same @@ -202,7 +202,7 @@ it forms survive a reboot, and boot services restore the rest: `sparkring-hairpin.service` applies the hairpin setting, `sparkring-fabric.service` restores routes and the relay table, and `sparkring-relay-marker.service` runs the markers -([boot and reboot](../operations/install-reference.md#boot-and-reboot)). A +([boot and reboot](../operations/install-fabrics.md#boot-and-reboot)). A relay plan installed by the standalone `sircl-fabric up` is not restored at boot; run it again after every reboot. @@ -231,7 +231,7 @@ python scripts/configure_sircl_rail.py "${rail_args[@]}" --verify # read-only The helper disables IPv6 on the rail. Managed GLM-5.3 mesh deployments keep IPv6 link-local addressing for their fixed GID index 3 and use the [mesh host -setup](../GLM53_SPARK_MESH_HOST_SETUP.md#6-configure-persistent-data-ipv4-and-mtu) +setup](../operations/host-preparation.md) instead. The [secondary-rail persistence validation](../../runtime/glm53-flash-jj-r8-gb10/sircl-secondary-rail-persistence-live-validation.json) records eight rails on four GB10 ranks passing every check after a reboot. diff --git a/docs/development/installer-acceptance.md b/docs/development/installer-acceptance.md index 51f5fd7e..cca7528a 100644 --- a/docs/development/installer-acceptance.md +++ b/docs/development/installer-acceptance.md @@ -74,7 +74,7 @@ failed after model startup, because Docker's default seccomp profile blocked previous deployment, which passed readiness and generation checks. The installer inspects images by exact ID and runs the checkpoint loader under a container-scoped `io_uring` policy with a CPU preflight, as described in -[Install SparkRing: reference](../operations/install-reference.md#serving-image-and-profiles). +[Install SparkRing: reference](../operations/install-models.md#serving-image-and-profiles). Installer source `02a873c0a389` passed 1,187 Linux tests. Its ARM64 package passed manifest, source-bundle, CLI and eight service-definition checks. Test fixture preparation diff --git a/docs/development/installer-profiles.md b/docs/development/installer-profiles.md index 1f8d5b1b..095df5df 100644 --- a/docs/development/installer-profiles.md +++ b/docs/development/installer-profiles.md @@ -2,7 +2,7 @@ An installer profile is a profile that `sparkring install` sets up end to end on its group of 2 to 8 cabled Sparks, on all Sparks of the fabric or on some of them -([models on part of the fabric](../operations/install-reference.md#models-on-part-of-the-fabric)). It is +([models on part of the fabric](../operations/install-fabrics.md#models-on-part-of-the-fabric)). It is one pinned checkpoint and its serving settings, on the shared serving image of an installer image lock, `runtime/releases//installer-image.json`, which pins that image and lists the admitted profiles. Without `--image`, `sparkring install` uses the lock of the newest kraken-line v3 image that carries @@ -82,10 +82,10 @@ Tests that list installer profiles: Hand-maintained pages, which no check compares with the code: -- `docs/operations/install-reference.md`: the profile table in [Serving image and profiles](../operations/install-reference.md#serving-image-and-profiles), the ring list in Four-Spark rings, API ports in Security and host exposure, and checkpoint sizes, files and headroom, and blank-Spark totals in Downloads, storage and outbound hosts. +- `docs/operations/install-reference.md`: the profile table in [Serving image and profiles](../operations/install-models.md#serving-image-and-profiles), the ring list in Four-Spark rings, API ports in Security and host exposure, and checkpoint sizes, files and headroom, and blank-Spark totals in Downloads, storage and outbound hosts. - In `docs/operations/`: `install.md` (free disk), `images.md` (profile count), `compose.md` (profile list), `compose-files.md` (rank files). - [`README.md` Profiles](../../README.md#profiles): model, checkpoint link and publisher, Sparks and `--profile` value. `generate_profiles.py` fills the Context, KV tokens and Thinking columns for the checkpoint `sparkring install` installs: the configured `--max-model-len`, a KV pool from `performance/profile-capacity.json` measured at the profile's KV size (otherwise `—`), and the thinking default. The website's profile table shows the same values. -- `docs/operations/install-reference.md`: the table in [Thinking](../operations/install-reference.md#thinking). +- `docs/operations/install-reference.md`: the table in [Thinking](../operations/install-models.md#thinking). ## Steps @@ -139,7 +139,7 @@ takes its sizes. It keeps no `SHA256SUMS` file: the installer checks its files against the pin manifest. Register it in `LISTED` in `scripts/test_pin_checkpoint.py`, add render assertions for its settings to `runtime/common/test_toolchain_profiles.py`, and list it in -[Another checkpoint of a profile](../operations/install-reference.md#another-checkpoint-of-a-profile) +[Another checkpoint of a profile](../operations/install-checkpoints.md#another-checkpoint-of-a-profile) with its size in the Downloads table. Without `--checkpoint`, the profile installs its preferred checkpoint on an image that reads it and otherwise its default checkpoint with unchanged settings; each other name is a separate @@ -160,7 +160,7 @@ default entry. A derived entry describes a checkpoint that no repository publishes: the installer acquires its base like any checkpoint, then writes the derived files on the Sparks with a recipe module below `runtime/` and serves them from -their own checkpoint directory ([derived checkpoints](../operations/install-reference.md#derived-checkpoints)). +their own checkpoint directory ([derived checkpoints](../operations/install-checkpoints.md#derived-checkpoints)). A derived entry without `base` may be the profile's default when it holds only `model` and `derived`: the profile's `model` then names the published checkpoint the installer acquires, its pin manifest and `SHA256SUMS`, and the @@ -255,7 +255,7 @@ list of the shared installer images. It has no Compose export; `compose.specific - [ ] One `status` in `profile.json` and `config.json`: `research-only` (shown as Experimental) or `implemented` (Development); `qualified` (Validated) follows maintainer release qualification ([releases](releases.md)). Each `implemented` installer profile cites one `sparkring install` run that passed functional checks such as counting, arithmetic and code; without such a run, use `research-only`. - [ ] `evidence_scope` of the form ` on installer image : on (); single-run timing; not serving-qualified.`, limited to what ran; say so when nothing ran on hardware, and name both images when the lock's image differs from the measured one. `config.json` `qualification.scope`: `See the profile evidence scope.` - [ ] Measurements under `performance/records/images/`, named `---.md` like the existing records, with programs and raw files in the directory of the same name, the five [record sections](../../performance/README.md#evidence-record-format), and no addresses, hostnames or credentials. The [profile acceptance harness](../../performance/harnesses/acceptance/README.md) installs a profile, runs the functional checks, the correctness screen and the throughput matrix, and drafts such a record. -- [ ] Validation, per the [PR template](../../.github/PULL_REQUEST_TEMPLATE.md): the CPU checks run and their skips, and any hardware run. CPU tests do not validate CUDA, RDMA, serving or performance; hardware is not required, and maintainers own release qualification. `install.sh --ref BRANCH --repository URL --profile `, with `install.sh` fetched from the same ref, installs a pushed branch ([Get the package](../operations/install-reference.md#get-the-package)). +- [ ] Validation, per the [PR template](../../.github/PULL_REQUEST_TEMPLATE.md): the CPU checks run and their skips, and any hardware run. CPU tests do not validate CUDA, RDMA, serving or performance; hardware is not required, and maintainers own release qualification. `install.sh --ref BRANCH --repository URL --profile `, with `install.sh` fetched from the same ref, installs a pushed branch ([Get the package](../operations/install-package.md#get-the-package)). - [ ] Compatibility: the lock is part of `installer.make_lock`'s digest and of the instance hash in `runtime/host/install_workflow.py`, so editing it gives every installer profile a separate deployment on a later `sparkring install`. - [ ] Credit: the checkpoint publisher in `profiles/model-names.json` `publishers` and in the `README.md` row. A profile guide opens by naming the checkpoint repository, its publisher and, for a derived checkpoint, the original model and its maker ([example](../../profiles/glm53-flash-spark-tp2-dcp1/README.md)). The repository holds no weights and no checkpoint license ([License](../../README.md#license)); list copied or adapted code and its license in [third-party notices](../../THIRD_PARTY_NOTICES.md). diff --git a/docs/development/releases.md b/docs/development/releases.md index 11ebfe4a..e28f5e55 100644 --- a/docs/development/releases.md +++ b/docs/development/releases.md @@ -90,8 +90,7 @@ ARM64 rebuild of the R33 composition, and `Jovian Judgement Community R10` is a separate community release; the `r8` of `sparkring-glm53-jj-r8-gb10` numbers that builder's interface, not a release. LIL abbreviates Local Inference Lab in composition names such as `lil-r37-shared`, which build on -R37; `lil` alone names a separate launcher tool -([lil integration](../../integrations/lil/README.md)). +R37; `lil` alone named a separate Go launcher tool that has been retired. The default tuning table's rows are the accepted defaults until a measurement replaces them: the `pair`, `path-4`, `cycle-4` and `cycle-8` rows diff --git a/docs/development/testing.md b/docs/development/testing.md index 189902b1..44d6f582 100644 --- a/docs/development/testing.md +++ b/docs/development/testing.md @@ -35,8 +35,7 @@ elsewhere; its vLLM adapter tests need the CPU torch build. For implementation changes, run tests beside the affected component. The [CI workflow](../../.github/workflows/ci.yml) lists the broader suite and pinned CPU torch dependency. Some tests require POSIX modes, -Bash, the pinned [LIL deployment companion](../../integrations/lil/README.md) -or optional dependencies; report skips accurately. +Bash, or optional dependencies; report skips accurately. CPU tests cover configuration, packaging and lifecycle contracts. They do not validate CUDA kernels, RDMA behavior, live serving, GPU memory stability or diff --git a/docs/history/glm53-cache-checkpoints.md b/docs/history/glm53-cache-checkpoints.md index 3aa30a27..1b8914d5 100644 --- a/docs/history/glm53-cache-checkpoints.md +++ b/docs/history/glm53-cache-checkpoints.md @@ -24,7 +24,7 @@ gate requires a rebuilt image and separate startup verification. ## Prerequisites -Use four NVIDIA Sparks with the [managed mesh host setup](../GLM53_SPARK_MESH_HOST_SETUP.md). +Use four NVIDIA Sparks with the [managed mesh host setup](../operations/host-preparation.md). The model uses TP4/DCP4 and native MTP depth three. Keep the reviewed fabric, driver, GID and interface settings; this guide does not reconfigure NICs. Follow [host prerequisites](../operations/prerequisites.md#four-spark-managed-hardware-forwarded-mesh), diff --git a/docs/operations/commands.md b/docs/operations/commands.md index 7d0a19a7..b4f1dfc9 100644 --- a/docs/operations/commands.md +++ b/docs/operations/commands.md @@ -92,33 +92,33 @@ serves, it releases what older deployments hold on the Sparks | Flag | Meaning | |---|---| | `--profile PROFILE` | Exact profile from `sparkring models`; asked in a terminal when omitted | -| `--on ARC` | Run the profile on these consecutive Sparks: `0,1`, `0-3`, `4-7`, or `6-1` across the cable to Node A ([models on part of the fabric](install-reference.md#models-on-part-of-the-fabric)). Default: every Spark, or for a profile of fewer Sparks the one group that divides the fabric from Node A and serves no model. The `prepared` transport runs two-Spark models only on a four-Spark ring's halves, `0,1` and `2,3` | +| `--on ARC` | Run the profile on these consecutive Sparks: `0,1`, `0-3`, `4-7`, or `6-1` across the cable to Node A ([models on part of the fabric](install-fabrics.md#models-on-part-of-the-fabric)). Default: every Spark, or for a profile of fewer Sparks the one group that divides the fabric from Node A and serves no model. The `prepared` transport runs two-Spark models only on a four-Spark ring's halves, `0,1` and `2,3` | | `--plan` | Print and save the setup, checkpoint and model plan; change nothing. A later `--yes` run stays within the saved plan. Before the first setup, use `sudo sparkring setup --plan` | | `--cancel` | [Stop the running installation](#cancel-an-installation) at its next step boundary, or settle a model switch an interrupted installation left; takes no other installation option | | `--yes` | Approve setup, the checkpoint plan, ConnectX restarts on an idle ring and the model switch. Unknown SSH host keys still need confirmation, and stopping another program's GPU containers still asks unless you add `--stop-workloads` | | `--json` | One JSON result on stdout; progress on stderr | | `--override-hold` | Proceed although another operator [holds the cluster](#hold); the override is recorded | | `--display-name TEXT` | Set the [ring display name](#name) | -| `--checkpoint NAME` | Another checkpoint the profile lists ([names](install-reference.md#another-checkpoint-of-a-profile)). Default: the profile's preferred checkpoint on an image whose vLLM reads it, else the profile's own | +| `--checkpoint NAME` | Another checkpoint the profile lists ([names](install-checkpoints.md#another-checkpoint-of-a-profile)). Default: the profile's preferred checkpoint on an image whose vLLM reads it, else the profile's own | | `--model-path [N=]PATH` | A checkpoint copy to reuse, for every Spark or for Node N; repeatable; never written | | `--ignore-local-copies` | Use only SparkRing's own checkpoint directories and named copies | | `--cache-path PATH` | Another writable compile cache on each Spark | -| `--download-limit RATE` | Cap the checkpoint download from Hugging Face: `850Mbit`, `2Gbit` or `none` ([details](install-reference.md#limit-the-download-rate)) | -| `--events FILE` | Also write progress to FILE, one JSON object per line ([fields](install-reference.md#event-stream)) | -| `--env FILE` | Preferences file: setup keys on first installation, the download limit and the [retained deployments](#automatic-release) on every run ([keys](install-reference.md#optional-preferences)) | +| `--download-limit RATE` | Cap the checkpoint download from Hugging Face: `850Mbit`, `2Gbit` or `none` ([details](install-storage.md#limit-the-download-rate)) | +| `--events FILE` | Also write progress to FILE, one JSON object per line ([fields](install-models.md#event-stream)) | +| `--env FILE` | Preferences file: setup keys on first installation, the download limit and the [retained deployments](#automatic-release) on every run ([keys](install-package.md#optional-preferences)) | | `--stop-workloads` | Stop (never remove) GPU containers that are not SparkRing's | -| `--no-auto-recover` | Do not restart this model by itself when a Spark stops serving ([automatic recovery](install-reference.md#automatic-recovery)) | -| `--image NAME` | Another installer image: a name or release tag from [`sparkring images`](#images) ([details](install-reference.md#another-image)). Default: the installer's own image | +| `--no-auto-recover` | Do not restart this model by itself when a Spark stops serving ([automatic recovery](install-models.md#automatic-recovery)) | +| `--image NAME` | Another installer image: a name or release tag from [`sparkring images`](#images) ([details](install-models.md#another-image)). Default: the installer's own image | | `--image-lock FILE` | Development image lock that replaces the installer image; not with `--image` | -| `--transport sircl\|prepared\|nccl\|libsircl` | The collective transport ([transport and receipts](install-reference.md#transport-and-receipts)). Default: `sircl` where the image and the recorded fabric carry it, else `prepared`. `nccl` (vLLM's PyNccl alone, on a cabled pair or a whole cycle) and `libsircl` (research-only) only by name | +| `--transport sircl\|prepared\|nccl\|libsircl` | The collective transport ([transport and receipts](install-models.md#transport-and-receipts)). Default: `sircl` where the image and the recorded fabric carry it, else `prepared`. `nccl` (vLLM's PyNccl alone, on a cabled pair or a whole cycle) and `libsircl` (research-only) only by name | | `--nccl never\|auto` | NCCL on a SIRCL deployment: `never` (default) keeps it off; `auto` lets it carry what the cabling allows; `topology` is another name for `auto` | | `--image REF --transport libsircl --libsircl-library PATH --model-path DIR --plan -- VLLM_ARGUMENTS` | Plan a stock vLLM image (a registry reference or image ID) with libsircl as its NCCL: checks every Spark and writes each rank's Compose file. Research-only, plan only ([stock image](../architecture/libsircl.md#stock-image-option)) | -| `--max-images N`, `--max-videos N`, `--context-length N`, `--max-concurrency N`, `--kv-cache-gib N`, `--save-cpu` | Replace one of the profile's serving values for this deployment ([serving settings](install-reference.md#serving-settings)) | +| `--max-images N`, `--max-videos N`, `--context-length N`, `--max-concurrency N`, `--kv-cache-gib N`, `--save-cpu` | Replace one of the profile's serving values for this deployment ([serving settings](install-models.md#serving-settings)) | | `--sparkcache-size SIZE` | Per-Spark SparkCache disk budget (default 32G) | | `--sparkcache-integrity fast\|sha256\|none` | SparkCache payload check (default fast) | | `--sparkcache-debug` | Detailed SparkCache logs for this deployment | -| `--reasoning-effort LEVEL`, `--thinking off` | How hard the model thinks, or that it doesn't, when a request doesn't say; requests can still choose ([thinking](install-reference.md#thinking)) | -| `--api-port N` | The port of the model's API, 1024 to 65535; a serving setting ([API endpoint](install-reference.md#api-endpoint)). Default: the profile's | +| `--reasoning-effort LEVEL`, `--thinking off` | How hard the model thinks, or that it doesn't, when a request doesn't say; requests can still choose ([thinking](install-models.md#thinking)) | +| `--api-port N` | The port of the model's API, 1024 to 65535; a serving setting ([API endpoint](install-models.md#api-endpoint)). Default: the profile's | | `--api-bind ADDRESS` | Let the API listen only on this IPv4 address of the Spark that serves it; a serving setting. Default: every address | | `--allow-loopback-bind` | Accept a loopback `--api-bind`, such as 127.0.0.1, which only programs on Node A can reach | | `--api-address ADDRESS` | The name or address shown for the model, such as `llm.example.net`; shown only, not part of the deployment | @@ -126,7 +126,7 @@ serves, it releases what older deployments hold on the Sparks In a terminal, without `--yes` and without the API options, `install` asks which address the model's API listens on and which port it uses; Enter keeps -both ([API endpoint](install-reference.md#api-endpoint)). +both ([API endpoint](install-models.md#api-endpoint)). ### Cancel an installation @@ -164,7 +164,7 @@ sudo sparkring install --cancel [`install.sh`](../../install.sh) builds the SparkRing package from a full Git clone, installs it with `apt` and runs `sudo sparkring install` with every other option you pass it. Run it on Node A as a user with sudo; the one-line -command is in [Get the package](install-reference.md#get-the-package). The +command is in [Get the package](install-package.md#get-the-package). The copy in this repository builds `main`; the copy the Install Builder site publishes builds the release that site describes. @@ -183,8 +183,8 @@ publishes builds the release that site describes. | `--plan` | Install nothing; plan with the built version (below) | | `--package-only` | Install or keep the package and stop before `sparkring install`; not with `--plan` | | `--json` | One `sparkring-install-result/v1` document on stdout (below); progress, questions and `apt` output on stderr | -| `--ref BRANCH_TAG_OR_COMMIT`, `--repository URL` | Build another ref or repository ([Pin a commit](install-reference.md#pin-a-commit)) | -| `--relay-marker-binary PATH` | Ship this copy of the published relay marker instead of downloading it ([Build from a full clone](install-reference.md#build-from-a-full-clone)) | +| `--ref BRANCH_TAG_OR_COMMIT`, `--repository URL` | Build another ref or repository ([Pin a commit](install-package.md#pin-a-commit)) | +| `--relay-marker-binary PATH` | Ship this copy of the published relay marker instead of downloading it ([Build from a full clone](install-package.md#build-from-a-full-clone)) | `--plan` runs `sparkring install --plan` from the installed package when this Spark has the built version, otherwise from the built package extracted into @@ -232,32 +232,32 @@ terminal view's header, `status`, and the Model ready card's or ring of up to eight) and configures them, without a model. `sparkring install` runs it on first use. Sparks that belonged to other SparkRing clusters are -[re-formed](install-reference.md#re-form-sparks-into-another-pair-or-ring) +[re-formed](install-package.md#re-form-sparks-into-another-pair-or-ring) into the cabled layout. The plan shows the layout, the port map, the -[relay table](install-reference.md#the-relay-table) and the transports the +[relay table](install-fabrics.md#the-relay-table) and the transports the fabric can carry. When no model serves, setup measures each cable's [speed](#cable-speed); a degraded cable is a warning with its repair steps, not a failure. It then verifies the fabric and records the -[fabric document](install-reference.md#the-fabric-document) on every Spark. +[fabric document](install-fabrics.md#the-fabric-document) on every Spark. | Flag | Meaning | |---|---| | `--plan` | Discover and review over existing SSH access; configure nothing | | `--yes` | Accept the listed changes; unknown SSH host keys still need confirmation, and stopping GPU containers still asks unless you add `--stop-workloads` | | `--override-hold` | Proceed although another operator [holds the cluster](#hold); the override is recorded | -| `--env FILE` | Literal preferences file; its keys set the defaults below ([keys](install-reference.md#optional-preferences)) | +| `--env FILE` | Literal preferences file; its keys set the defaults below ([keys](install-package.md#optional-preferences)) | | `--name NAME` | Cluster name: a lowercase letter, then lowercase letters, digits or `-`; at most 35 characters (default `sparkring`) | | `--display-name TEXT` | The [ring display name](#name) | | `--ssh-user USER` | Worker account (default: the account that ran `sudo`; `root` with `--env` or port 2222) | | `--ssh-port 22\|2222` | Worker SSH port; 2222 reaches workers prepared with `--worker-bundle` | | `--control-cidr CIDR` | Administration network, an IPv4 `/29` or `/28` (default `10.253.255.0/29`; the `/28` containing it for seven or eight Sparks) | | `--fabric-cidr CIDR` | Fabric addresses, an IPv4 `/16` to `/21` with room for two `/24` per cable (default `198.18.0.0/21` up to four cables, `198.18.0.0/20` above) | -| `--re-form` | Set the cabled Sparks up again as a new cluster, as after recabling them into another layout; what they keep from the earlier setup is moved aside with a receipt ([change the layout](install-reference.md#change-the-layout)) | +| `--re-form` | Set the cabled Sparks up again as a new cluster, as after recabling them into another layout; what they keep from the earlier setup is moved aside with a receipt ([change the layout](install-fabrics.md#change-the-layout)) | | `--no-share-internet` | Do not route workers' downloads and DNS through Node A | | `--reset-links` | Replace incompatible fabric IPv4 settings, also without a terminal | | `--stop-workloads` | Stop (never remove) GPU containers that block fabric preparation | -| `--worker-bundle` | Build a USB bundle for [workers without SSH](install-reference.md#if-a-worker-has-no-ssh) | -| `--admin-fallback` | On a set-up cluster, add [fallback paths](install-reference.md#admin-tunnel) (the other cables, the LAN) to the admin tunnel and change nothing else; with `--plan`, list them | +| `--worker-bundle` | Build a USB bundle for [workers without SSH](install-package.md#if-a-worker-has-no-ssh) | +| `--admin-fallback` | On a set-up cluster, add [fallback paths](install-models.md#admin-tunnel) (the other cables, the LAN) to the admin tunnel and change nothing else; with `--plan`, list them | | `--allow-driver-reload` | Accepted and not needed | With `--node` or `--inventory`, setup uses listed targets instead of discovery @@ -289,7 +289,7 @@ Two setup actions run offline without sudo and accept cables are cabled: the layout (`pair`, `path-N` or `cycle-N`, up to eight Sparks), the port-to-Spark map and free ports, or what to move. It changes nothing on any Spark. Setup stops with the same advice when the cables do not -fit ([cabling rules](install-reference.md#cabling)). +fit ([cabling rules](install-package.md#cabling)). ```text Sparks read: @@ -374,19 +374,19 @@ that does not hold the link's address. It exits with 0 when every cable is healthy, 1 when a cable is degraded, could not be measured or was skipped, and 2 when the check could not run, for example while a model serves on every cable. -[Cable speed](install-reference.md#cable-speed) explains the test. +[Cable speed](install-package.md#cable-speed) explains the test. ## fabric `sparkring fabric show [--json]` prints the recorded -[fabric document](install-reference.md#the-fabric-document): the layout, each +[fabric document](install-fabrics.md#the-fabric-document): the layout, each Spark's ports and cables, cable health, the hairpin requirement, the relay table, the transports and the last verification. It reads only Node A. `sudo sparkring fabric verify [flags]` checks every Spark's links, addresses, routes, hairpin setting, relay table, markers and boot units, and the reachability of every other Spark's addresses -([what it checks](install-reference.md#verify-the-fabric)). It changes +([what it checks](install-fabrics.md#verify-the-fabric)). It changes nothing. ```text @@ -405,7 +405,7 @@ could not run. `sudo sparkring fabric spread-check [flags]` copies test files from Node A to every Spark along the cables, as an install spreads the serving image and the -checkpoint ([Spreading along the cables](install-reference.md#spreading-along-the-cables)). +checkpoint ([Spreading along the cables](install-storage.md#spreading-along-the-cables)). Run it before an installation needs the spread or after recabling; it works on any recorded layout. @@ -436,7 +436,7 @@ or is incomplete, and 2 when it could not run. table on this fabric; `--execute` measures. Later installations use the measured table instead of the release's default while the fabric, the image and the Sparks' drivers stay the same -([measure the tuning table](install-reference.md#measure-the-tuning-table)). +([measure the tuning table](install-fabrics.md#measure-the-tuning-table)). ```bash sudo sparkring fabric tune # the plan; contacts nothing @@ -478,7 +478,7 @@ each installer profile it also shows: - what the model does with thinking when a request doesn't say, such as `on · xhigh`, and the effort levels it accepts - ([thinking](install-reference.md#thinking)); + ([thinking](install-models.md#thinking)); - the checkpoint it installs and the others `--checkpoint` takes; - any other name that selects it, such as `glm53-flash-tp4`. @@ -503,7 +503,7 @@ line names the holder, the reason and the times, such as `Held by alice since sparkring hold --release`. A model switch that is in progress or stopped before it finished adds its own line, `Model switch: ... | next: ...`, naming the step that [settles](#cancel-an-installation) or resumes it. On a fabric that serves -[several models](install-reference.md#models-on-part-of-the-fabric) it prints +[several models](install-fabrics.md#models-on-part-of-the-fabric) it prints each group's model under its Sparks, such as `Sparks 0-3:` and `Sparks 4-7:`, with a `Group:` line naming its shape, positions and API Spark: @@ -517,15 +517,15 @@ Automatic recovery: on - `Checkpoint`: a profile with one checkpoint shows only `REPOSITORY @ REVISION`; a - [derived checkpoint](install-reference.md#derived-checkpoints) adds + [derived checkpoint](install-checkpoints.md#derived-checkpoints) adds `, derived from REPOSITORY @ REVISION` of its base. - `Thinking`: what the model does when a request doesn't say whether, or how hard, to think: the model's default, or the deployment's own default beside - it ([thinking](install-reference.md#thinking)). + it ([thinking](install-models.md#thinking)). - The model's API URL follows, at the address `install --api-address` named when there is one, with the URL SparkRing's own checks use in parentheses. - `Transport`: the deployment's transport and, on SIRCL ring sessions, the - last receipt verdict ([transport and receipts](install-reference.md#transport-and-receipts)). + last receipt verdict ([transport and receipts](install-models.md#transport-and-receipts)). `Transport check failed: ...` names the first rank and collective that differs. - `Automatic recovery`: adds the Spark it waits for, its last attempt and the @@ -540,11 +540,11 @@ Automatic recovery: on table`, `measured on this fabric DATE for ROWS with image IMAGE`, or why a measured table does not apply, such as a GPU driver other than the one it was measured with - ([measure the tuning table](install-reference.md#measure-the-tuning-table)). + ([measure the tuning table](install-fabrics.md#measure-the-tuning-table)). With `--refresh`, a line per model container follows the saved model. When the model does not serve, the first line says why and gives the command that -fixes it ([every case](install-reference.md#when-a-model-stops-serving)): +fixes it ([every case](install-models.md#when-a-model-stops-serving)): ```text The model runs on rank 0 (spark-a) but stopped on rank 1 (spark-b) | next: sudo sparkring down --execute, then sudo sparkring up --execute @@ -564,7 +564,7 @@ It sends the functional requests of the acceptance harness to the model's API (counting, arithmetic and code, and a tool call, an image and thinking where the profile serves them). For a model on SIRCL ring sessions it also reads every rank's receipts and the NCCL lines of its log and judges them as the -installation does ([transport and receipts](install-reference.md#transport-and-receipts)). +installation does ([transport and receipts](install-models.md#transport-and-receipts)). It exits with 0 when every check passes, 1 when one fails and 2 when it cannot run. @@ -718,7 +718,7 @@ and automatic recovery write. at every boot, on every Spark that relays between its cables: every Spark of a ring of four or more, and every Spark but the ends of a line of three or more. It first updates any Spark that runs a different SparkRing revision than -Node A. [More about the setting](install-reference.md#four-spark-rings). +Node A. [More about the setting](install-fabrics.md#four-spark-rings). | Flag | Meaning | |---|---| @@ -731,7 +731,7 @@ Node A. [More about the setting](install-reference.md#four-spark-rings). `sudo sparkring checkpoints [flags]` lists SparkRing's checkpoint directories on every Spark, the deployments that use them and what a release frees. A -[derived checkpoint](install-reference.md#derived-checkpoints)'s directory +[derived checkpoint](install-checkpoints.md#derived-checkpoints)'s directory names the base it is derived from; a deployment of it uses both directories. | Flag | Meaning | @@ -776,7 +776,7 @@ ran out. A release asks first. Each Spark then checks again that no installed deployment, no installed mesh (running or not) and no running container uses -the path ([Finding and freeing space](install-reference.md#finding-and-freeing-space)). +the path ([Finding and freeing space](install-storage.md#finding-and-freeing-space)). A release never removes: - a checkpoint directory; `sudo sparkring checkpoints --release PATH` does; @@ -815,7 +815,7 @@ container and recompiles kernels whose cache was removed. `sudo sparkring storage --retain-deployments off` turns it off; `sudo sparkring storage` shows the setting. The preference -[`SPARKRING_RETAIN_DEPLOYMENTS`](install-reference.md#optional-preferences) +[`SPARKRING_RETAIN_DEPLOYMENTS`](install-package.md#optional-preferences) sets it too. ## up, down and restart @@ -842,7 +842,7 @@ before the steps start, they stop and ask for a new review. Repeating `up` re-checks a running deployment and starts one whose containers stopped on every Spark, for example after a restart -([when a model stops serving](install-reference.md#when-a-model-stops-serving)). +([when a model stops serving](install-models.md#when-a-model-stops-serving)). A completed `up` clears [automatic recovery's](#recover) failed attempts, keeps its on or off choice, then runs [automatic release](#automatic-release). After `down` the model stays stopped. @@ -851,7 +851,7 @@ After `down` the model stays stopped. `sparkring down PROFILE --instance i` stops one of them. The deployment directories are under `/var/lib/sparkring/controller/deployments/`. -On a fabric that serves [several models](install-reference.md#models-on-part-of-the-fabric), +On a fabric that serves [several models](install-fabrics.md#models-on-part-of-the-fabric), each group of Sparks has its own active deployment: `sudo sparkring down --on 4-7 --execute` stops the model on Sparks 4 to 7. Without a profile or `--on`, the commands act on the one recorded model and ask for `--on` when there are @@ -872,15 +872,15 @@ runs, and names the `down` command that frees them. | `--image NAME` | `up PROFILE` only: another installer image from [`sparkring images`](#images) | | `--image-lock FILE` | `up PROFILE` only: another image lock, for a rehearsal; not with `--image`. An existing deployment keeps the image it recorded, and naming another lock for it is refused | | `--transport NAME`, `--nccl MODE` | `up PROFILE` only: the transport of a new deployment, as for [`install`](#install) | -| `--max-images N`, `--reasoning-effort LEVEL` and the other [serving settings](install-reference.md#serving-settings) | `up PROFILE` only: replace one of the profile's serving values, or the model's thinking default, for a new deployment; an existing deployment keeps its own | +| `--max-images N`, `--reasoning-effort LEVEL` and the other [serving settings](install-models.md#serving-settings) | `up PROFILE` only: replace one of the profile's serving values, or the model's thinking default, for a new deployment; an existing deployment keeps its own | | `--allow-loopback-bind` | `up PROFILE` only: accept a loopback `--api-bind` for a new deployment | -| `--deployment DIR` | Use a deployment saved by `sparkring init` instead ([lower-level commands](install-reference.md#lower-level-commands-and-compose-sharing)) | +| `--deployment DIR` | Use a deployment saved by `sparkring init` instead ([lower-level commands](install-package.md#lower-level-commands-and-compose-sharing)) | ## recover `sudo sparkring recover [status|on|off] [flags]` shows or sets the automatic restart of the active models when a Spark stops serving -([how it works](install-reference.md#automatic-recovery)). `on` and `off` +([how it works](install-models.md#automatic-recovery)). `on` and `off` apply to every active deployment, the whole ring's and each group's, unless `--on` names one. @@ -968,7 +968,7 @@ most actions. Useful by hand: (`--site`); - for `--model glm53|mimo26|qwen38` or `--profile`; - with optional `--variant`, `--image-lock`, `--name`, `--workspace`, - `--output` and [serving settings](install-reference.md#serving-settings). + `--output` and [serving settings](install-models.md#serving-settings). `sparkring export --output FILE` writes the deployment as a zip; `--deployment DIR` selects another. Its Compose files carry the deployment's @@ -981,7 +981,7 @@ serving settings. discard. `export` accepts `--json`. See -[lower-level commands](install-reference.md#lower-level-commands-and-compose-sharing). +[lower-level commands](install-package.md#lower-level-commands-and-compose-sharing). ## compose and validate-compose diff --git a/docs/operations/compose-builder.md b/docs/operations/compose-builder.md index 3f13827e..af832b8a 100644 --- a/docs/operations/compose-builder.md +++ b/docs/operations/compose-builder.md @@ -89,12 +89,12 @@ offers two images: - `NAME` is the release tag that published the image, such as `2026.10.2`. The other images that [`sparkring images`](commands.md#images) lists remain installable with `--image NAME` - ([another image](install-reference.md#another-image)); the page does not + ([another image](install-models.md#another-image)); the page does not offer them. Step 4 offers **Save CPU between decode steps** only for a model whose image reads its variable, as the page's data records for each image -([serving settings](install-reference.md#serving-settings)). On an image +([serving settings](install-models.md#serving-settings)). On an image that does not, step 4 says the image can't, and the commands and files leave the switch out. @@ -117,7 +117,7 @@ Step 2 chooses how the Sparks serve: |---|---|---| | Two Sparks | One model on a pair | Two-Spark profiles | | Four Sparks – One Model | One model on a four-Spark ring | Four-Spark profiles | -| Four Sparks – Two Models | One model on each half of a ring: Sparks 0 and 1, and Sparks 2 and 3 ([two models on one ring](install-reference.md#two-models-on-one-ring)) | Two-Spark profiles, for each pair | +| Four Sparks – Two Models | One model on each half of a ring: Sparks 0 and 1, and Sparks 2 and 3 ([two models on one ring](install-fabrics.md#two-models-on-one-ring)) | Two-Spark profiles, for each pair | With two pairs, steps 3 and 4 show one pair at a time behind **First pair** and **Second pair** tabs. Each pair keeps its own profile, checkpoint, @@ -152,7 +152,7 @@ repeats the status of each model it installs. Statuses use the labels of the (`sparkring-profile-labels/v1`) holds each profile's line and, for each checkpoint a profile lists, what it is for; a checkpoint other than the default also has its own status and the record that establishes it, such as - [checkpoint status](install-reference.md#another-checkpoint-of-a-profile) + [checkpoint status](install-checkpoints.md#another-checkpoint-of-a-profile) for the research-only `jmni-qad5500-hybrid`. The page is not built while a profile or checkpoint lacks its labels. - The labels are not in the profiles' configurations: the deployment identity @@ -207,7 +207,7 @@ The options above the commands apply to every install command: | Option | Commands | |---|---| -| New installation | The first command is the [one-command installer](install-reference.md#get-the-package) on Node A for the page's source, or from `main`. On the Pages site it fetches the site's own `install.sh`, whose default `--ref` is the page's source; elsewhere, such as a local preview, it fetches `install.sh` from the repository at that source with `--ref`. It passes `--on` and every other option to `sparkring install`. Later commands run the `sudo sparkring install` it installed. | +| New installation | The first command is the [one-command installer](install-package.md#get-the-package) on Node A for the page's source, or from `main`. On the Pages site it fetches the site's own `install.sh`, whose default `--ref` is the page's source; elsewhere, such as a local preview, it fetches `install.sh` from the repository at that source with `--ref`. It passes `--on` and every other option to `sparkring install`. Later commands run the `sudo sparkring install` it installed. | | SparkRing already installed | Every command is `sudo sparkring install …` | | Approval | No flag (asks before changes), `--plan` or `--yes`. A new installation offers no `--plan`: `install.sh --plan` stops on a Spark without the SparkRing package | | Spark order | Automatic, Ask during install or Fill in my Sparks ([below](#spark-order)) | @@ -215,7 +215,7 @@ The options above the commands apply to every install command: Each install command carries `--profile`, `--on` for a pair of a ring, `--image` and `--checkpoint` when they are not the defaults, the -[serving settings](install-reference.md#serving-settings) changed for that +[serving settings](install-models.md#serving-settings) changed for that selection and its [API endpoint](#api-endpoint). ### Fields that need a change @@ -238,7 +238,7 @@ command pack lists the fields it cannot use; the tests drive both. ### API endpoint Step 4 ends with **API endpoint**: where the model's API listens and the -address shown for it ([API endpoint](install-reference.md#api-endpoint)). It +address shown for it ([API endpoint](install-models.md#api-endpoint)). It belongs to each model, and with two pairs to each pair. | Choice | Install command | Compose files | @@ -390,7 +390,7 @@ each model directory, check the RoCE GID index, start the workers before rank 0. [Compose deployments](compose.md) covers checking and starting the files with `sparkring compose`. A derived checkpoint, such as `qad-step5500-mxfp8-attention`, is written only by `sudo sparkring install ---checkpoint` ([derived checkpoints](install-reference.md#derived-checkpoints)). +--checkpoint` ([derived checkpoints](install-checkpoints.md#derived-checkpoints)). ## Limits diff --git a/docs/operations/compose.md b/docs/operations/compose.md index 56165ba1..0ad4d276 100644 --- a/docs/operations/compose.md +++ b/docs/operations/compose.md @@ -38,7 +38,7 @@ Other Compose routes: - `sparkring export --share`: an example site and per-rank Compose templates from a deployment saved by `sparkring init`, without private inputs - ([lower-level commands and Compose sharing](install-reference.md#lower-level-commands-and-compose-sharing)). + ([lower-level commands and Compose sharing](install-package.md#lower-level-commands-and-compose-sharing)). - [Standalone TP2 Compose file](../../profiles/qwen38-flash-next-tp2/compose/README.md): one file per Spark for `qwen38-flash-next-tp2` ([measurements](../../performance/records/qwen38-flash-next/installer-tuning-20260925.md#installation-from-the-published-branch-and-the-standalone-compose-recipe)). @@ -54,7 +54,7 @@ A site cannot change serving settings or select another image. | Profile configuration | Model, context, KV allocation, batching, MTP, media limits, engine arguments and integrations | | `render --checkpoint NAME` | Another checkpoint the profile lists, with the settings it needs, as `sparkring install --checkpoint` selects it | | `render --image NAME` | Another installer image that runs the profile: a name or release tag that [`sparkring images`](commands.md#images) lists, as `sparkring install --image` selects it | -| `render` serving-setting flags | The [serving settings](install-reference.md#serving-settings) that `sparkring install` accepts, such as `--max-concurrency 8`, replacing the profile's values in every rank; `--reasoning-effort` and `--thinking off` set the model's [thinking](install-reference.md#thinking) default in the API rank only; `--api-bind` replaces rank 0's listen address only | +| `render` serving-setting flags | The [serving settings](install-models.md#serving-settings) that `sparkring install` accepts, such as `--max-concurrency 8`, replacing the profile's values in every rank; `--reasoning-effort` and `--thinking off` set the model's [thinking](install-models.md#thinking) default in the API rank only; `--api-bind` replaces rank 0's listen address only | | Image release or installer image lock | Registry digest, image ID, platform and image verification | | Site file | SSH targets, rank addresses, bootstrap interface, HCA order, GID index, and model, cache, repository and deployment paths; TP4 adds the prepared fabric reference | | Generated container specification | Effective arguments, environment, entrypoint, mounts, GPU/RDMA access, limits and health checks | @@ -94,7 +94,7 @@ other workloads. Before you render: `ip`. - For TP4, `sudo -n` on each host: the read-only host checks read root-owned fabric markers and logs with the RDMA and traffic-control tools from - [mesh host setup](../GLM53_SPARK_MESH_HOST_SETUP.md#3-complete-shared-bootstrap-and-check-additional-tools). + [mesh host setup](host-preparation.md). - Cache and deployment-root directories you create. Model, cache, repository and deployment-root directories must not overlap, and deployment roots must not contain symlinks. Generated files are mode 0600 in 0700 directories; on diff --git a/docs/operations/dashboard.md b/docs/operations/dashboard.md index de7726df..d0641ad8 100644 --- a/docs/operations/dashboard.md +++ b/docs/operations/dashboard.md @@ -17,11 +17,11 @@ http://API_HOST:PORT/v1/sparkring/status/view - `API_HOST` is the deployment's first Spark, where its API serves: Node A for a model on positions starting at 0, Spark 2 for a model installed with - `--on 2,3` ([several models on one ring](install-reference.md#two-models-on-one-ring)). + `--on 2,3` ([several models on one ring](install-fabrics.md#two-models-on-one-ring)). A deployment installed with `--api-bind` serves only at that address. - `PORT` is the profile's API port, 8000, 8015 or 8020 - ([ports by profile](install-reference.md#security-and-host-exposure)), or - the port that `--api-port` sets ([API endpoint](install-reference.md#api-endpoint)). + ([ports by profile](install-package.md#security-and-host-exposure)), or + the port that `--api-port` sets ([API endpoint](install-models.md#api-endpoint)). The card that `sparkring install` prints after `Model ready:` gives the exact address as `Model status:`. The page refreshes every 5 seconds while it is @@ -55,7 +55,7 @@ Two settings tables need a note: - **Decode and speculation** ends with `Shared-memory reader window`: how long vLLM's waiting processes poll after each step before they sleep. It reads `2 ms (sparkring install --save-cpu)` with - [`--save-cpu`](install-reference.md#serving-settings) and + [`--save-cpu`](install-models.md#serving-settings) and `1 s (vLLM default)` without. ![Memory and disk space on each Spark](assets/dashboard-memory.png) diff --git a/docs/operations/deepseek-0731.md b/docs/operations/deepseek-0731.md index 8df0cd57..c51915dc 100644 --- a/docs/operations/deepseek-0731.md +++ b/docs/operations/deepseek-0731.md @@ -705,9 +705,9 @@ are not part of this quickstart. Diagnostic tool-call evidence, benchmark image identities, acceptance lengths, dates, and published-digest replay requirements are retained in [the profile record](../profiles/DEEPSEEK_V4_FLASH_0731.md) and -[results](../RESULTS.md). +[results](../../performance/benchmarks.md). -The offline-only [four-Spark SIRCL A/B plan](../DEEPSEEK_V4_FLASH_SIRCL_AB.md) +The offline-only four-Spark SIRCL A/B plan (archived in `sparkring-pre-diet-20261129.bundle`) validates both transport arms against this quickstart's machine-readable recipe, applies a 4,096-token batch budget to both arms, and uses the same model, memory, scheduler mode, and five-token DSpark diff --git a/docs/operations/deployment-suite.md b/docs/operations/deployment-suite.md index 18ab6406..62948b2b 100644 --- a/docs/operations/deployment-suite.md +++ b/docs/operations/deployment-suite.md @@ -10,7 +10,7 @@ ordering; this complete workflow has not been tested on factory-reset Sparks. - Use Bash and Python on a Linux or WSL controller with Git, SSH, SCP, and PyYAML. Run commands from this checkout; deployment source must be tracked by Git before staging. Keep private inputs and receipts outside commits. -- Complete [host setup](../GLM53_SPARK_MESH_HOST_SETUP.md): first boot, supported +- Complete [host setup](host-preparation.md): first boot, supported drivers, Docker/NVIDIA Container Toolkit, SSH enrollment, noninteractive sudo, required networking tools, and the documented four-cable ring. - Use four enrolled SSH aliases, one per rank. Each host needs an independent @@ -102,7 +102,7 @@ do not loop blindly through reloads. Review the resulting device state. administration network (`sr-control`), because the reload can cut that path. A ring set up with `sparkring install` or `sparkring setup` uses `sudo sparkring hairpin` on Node A instead; see -[Four-Spark rings](install-reference.md#four-spark-rings). +[Four-Spark rings](install-fabrics.md#four-spark-rings). Network backups remain on each host at the paths in the plan. After changes, repeat discovery into a **different** inventory filename and diff --git a/docs/operations/host-preparation.md b/docs/operations/host-preparation.md index 55f3c37c..3e33eaed 100644 --- a/docs/operations/host-preparation.md +++ b/docs/operations/host-preparation.md @@ -57,7 +57,7 @@ sudo usermod -aG docker "$(id -un)" Log out and back in; `docker info` must then work without sudo. Docker-group membership is equivalent to root. Ring repair and managed mesh operations also need noninteractive sudo on the affected ranks; set that up before running -bootstrap repairs, as the [mesh authorization procedure](../GLM53_SPARK_MESH_HOST_SETUP.md#4-configure-management-ssh-and-root-authorization) +bootstrap repairs, as the [mesh authorization procedure](host-preparation.md) describes. Pair networking uses interactive sudo. ## 3. Install and record one checkout @@ -160,7 +160,7 @@ file again as headroom, at most 16 GiB, from the pin manifest in [storage-planning.json](../../profiles/storage-planning.json). The image figure is that file's image allowance, because these selections record no image sizes, and the compile cache figure its compile cache allowance, whose -evidence the [install reference](install-reference.md#downloads-storage-and-outbound-hosts) +evidence the [install reference](install-storage.md#downloads-storage-and-outbound-hosts) states. `--reuse-model` (an existing, nonempty model directory) and `--reuse-image` drop the checkpoint and image figures; they do not verify the assets. Also allow diff --git a/docs/operations/images.md b/docs/operations/images.md index 3cb49f8d..dfcf1f69 100644 --- a/docs/operations/images.md +++ b/docs/operations/images.md @@ -24,7 +24,7 @@ image downloads only the added layers: 692 KiB for 2026.10.5 over 2026.10.4, default first, with the GitHub release that published it, its transports and the profiles it runs. `--image` accepts a release tag (`2026.10.2`), a full image name, or a part of the name that only one image has -([Another image](install-reference.md#another-image)). +([Another image](install-models.md#another-image)). ## Installer image @@ -41,7 +41,7 @@ five SparkCache profiles (research-only): `qwen38-flash-next-csf-sparkcache-tp2`, `glm53-flash-nvfp4-sparkcache-crc32-tp2` and `glm53-flash-nvfp4-sparkcache-crc32-tp4`, which take `--sparkcache-size`, `--sparkcache-integrity` and `--sparkcache-debug` -([install reference](install-reference.md#serving-image-and-profiles)). +([install reference](install-models.md#serving-image-and-profiles)). Transports and default checkpoints are the 2026.10.4 image's. Status: **implemented**, release maturity candidate. Two SparkCache profiles @@ -68,7 +68,7 @@ adds these layers to the [2026.10.2 image](#2026102-installer-image): On a fabric that `sudo sparkring setup` recorded, `sparkring install` runs profiles on this image with SIRCL ring sessions and NCCL off, and on the prepared RoCE transport elsewhere -([transport and receipts](install-reference.md#transport-and-receipts)). +([transport and receipts](install-models.md#transport-and-receipts)). The GLM-5.3-Flash two- and four-Spark profiles and `qwen38-flash-next-tp2` install their CSF checkpoints by default ([default checkpoint by profile](../../profiles/glm53-checkpoints.md#default-checkpoint-by-profile)). @@ -116,7 +116,7 @@ SIRCL layer, so its deployments run on the prepared RoCE transport. Its | CUDA 13.4.2 and NCCL 2.32.3 | CUDA runtime and the NCCL library the installer selects | | Prepared RoCE transport (`tp2-rocenante-adaptive-prepared`) | Collectives over RoCE through B12X's RoCE communication package, RoCEnante, on two- and four-Spark profiles ([prepared transport](../../integrations/vllm/rocenante_prepared/README.md)). All Sparks of a deployment must run the same image | | runtime-status 0.3.4 | The [model status page](dashboard.md) at `/v1/sparkring/status/view` on the model API port | -| SparkRing vLLM and B12X changes | B12X [selection-cache reconciliation](../../integrations/b12x/selection_cache/README.md), the [tool-result contract](../../integrations/vllm/tool_choice_contract/README.md), the shared-memory reader window that `--save-cpu` sets ([serving settings](install-reference.md#serving-settings)), MiMo-V2.6 vision attention sinks ([derive_mimo_vision.py](../../runtime/images/derive_mimo_vision.py)), and Qwen decode and host-to-device staging fixes | +| SparkRing vLLM and B12X changes | B12X [selection-cache reconciliation](../../integrations/b12x/selection_cache/README.md), the [tool-result contract](../../integrations/vllm/tool_choice_contract/README.md), the shared-memory reader window that `--save-cpu` sets ([serving settings](install-models.md#serving-settings)), MiMo-V2.6 vision attention sinks ([derive_mimo_vision.py](../../runtime/images/derive_mimo_vision.py)), and Qwen decode and host-to-device staging fixes | The [publication record](../../runtime/releases/dev-20261004-kraken-cuda1342-nccl2323-status034/publication.json) names the base image and the layers. diff --git a/docs/operations/install-checkpoints.md b/docs/operations/install-checkpoints.md new file mode 100644 index 00000000..49ab1d04 --- /dev/null +++ b/docs/operations/install-checkpoints.md @@ -0,0 +1,478 @@ +# Install SparkRing: checkpoints and derived checkpoints + +Selecting alternate checkpoints of a profile, checkpoint resolution, and building or verifying derived checkpoints. + +Part of the [Install SparkRing reference](install-reference.md) · [Quick install](install.md) · [Commands](commands.md) + +## Checkpoints + +SparkRing keeps one checkpoint directory per cluster and checkpoint revision, +`/srv/sparkring//checkpoints/--/`, shared by +every deployment of that revision. It holds exactly the files the pin +manifest in [`profiles/checkpoints/`](../../profiles/checkpoints) requires (53 +for Qwen); the profile's `SHA256SUMS` lists the same files. + +### Another checkpoint of a profile + +Some profiles list more than one checkpoint. `--checkpoint NAME` installs a +listed one with the settings it needs, as its own deployment with its own +pinned revision and checkpoint directory; an unlisted name changes nothing. +Installing again without `--checkpoint` switches back to the default. + +The GLM-5.3-Flash profiles of two and four Sparks and `qwen38-flash-next-tp2` +prefer `csf`: without `--checkpoint`, an image whose vLLM reads the CSF +checkpoint installs `csf`, and every other image, 2026.10.1's among them, +installs the profile's default, `nvfp4-spark` or `qad-step5500-ple1000`. +`--checkpoint nvfp4-spark` and `--checkpoint qad-step5500-ple1000` install +that default on either image, and `--checkpoint csf` on an image that cannot +read it is refused before any Spark changes. A checkpoint that +`image_lock.CHECKPOINT_STATUS` lists, one with no installation that passed the +installer's checks, gets a `Note:` in every plan that installs it with that +status and, when the image chose it, the profile's default checkpoint. The +GLM-5.3-Flash and Qwen `csf` entries are not listed. +`sparkring images` does not list the image of the +[`dev-20261007-kraken-csf-sircl-cuda1342-nccl2323-status034` recipe](../../runtime/releases/dev-20261007-kraken-csf-sircl-cuda1342-nccl2323-status034/README.md), +which reads it; its lock is selected with `--image-lock`: + +```bash +sudo sparkring install --profile glm53-flash-nvfp4-spark-tp2 --image-lock LOCK +sudo sparkring install --profile glm53-flash-nvfp4-spark-tp2 --image-lock LOCK --checkpoint nvfp4-spark +``` + +```bash +sudo sparkring install --profile qwen38-flash-next-tp2 --checkpoint qad-step-4000 +sudo sparkring install --profile qwen38-flash-next-tp2 --checkpoint qad-step5500-mxfp8-attention +sudo sparkring install --profile qwen38-flash-next-tp2 --checkpoint jmni-qad5500-hybrid +sudo sparkring install --profile qwen38-flash-next-tp2 --checkpoint qad-step5500-ple1000 +sudo sparkring install --profile glm53-flash-nvfp4-spark-tp4 --checkpoint nvidia-nvfp4 +sudo sparkring install --profile glm53-flash-nvfp4-spark-tp2 --checkpoint nvfp4-qad +sudo sparkring install --profile deepseek-v41-flash-tp4 --checkpoint 1017 +``` + +| Profiles | `--checkpoint` | Checkpoint | Settings that differ from the default | +|---|---|---|---| +| `qwen38-flash-next-tp2`, `qwen38-flash-next-qad-tp4` | `qad-step5500-ple1000`, also `qad-step-5500` (default; for `qwen38-flash-next-tp2`, on an image that cannot read `csf`) | Branch `qad-step5500-ple1000` of Local Inference Lab's Qwen3.8-Flash-Next NVFP4, revision `60215d26cf5e` | — | +| `qwen38-flash-next-tp2`, `qwen38-flash-next-qad-tp4` | `qad-step-4000` | Branch `qad-step-4000` of the same repository, revision `629bc3218833` | The draft's NVFP4 experts on B12X | +| `qwen38-flash-next-tp2`, `qwen38-flash-next-qad-tp4` | `qad-step5500-mxfp8-attention` | Step 5500 with its 240 text attention projections in MXFP8, which the installer derives on the Sparks from step 5500 and step 4000's MXFP8 tensors ([derived checkpoints](#derived-checkpoints)) | Served as `Qwen3.8-Flash-Next-NVFP4-QAD-MXFP8-Attention-TP2` or `-TP4`; other settings as step 5500 | +| `qwen38-flash-next-tp2`, `qwen38-flash-next-qad-tp4` | `jmni-qad5500-hybrid` | [Qwen3.8-Flash-Next NVFP4 QAD-5500 Hybrid](https://huggingface.co/JMNI-Labs/Qwen3.8-Flash-Next-NVFP4-QAD5500-Hybrid/tree/87c8f2fb738b597de99bf9a885130f4a18a94f3d) by JMNI Labs, revision `87c8f2fb738b` | The draft's NVFP4 experts on B12X; served as `Qwen3.8-Flash-Next-NVFP4-QAD5500-Hybrid-TP2` or `-TP4` | +| `qwen38-flash-next-tp2` | `csf` (default on an image that reads it) | [Qwen3.8-Flash-Next NVFP4-MXFP8 CSF QAD](https://huggingface.co/local-inference-lab/Qwen3.8-Flash-Next-NVFP4-MXFP8-CSF-QAD/tree/dc5b8ab2fa14bc4fecd6886273b7ebc6095662e2) by Local Inference Lab, revision `dc5b8ab2fa14`, licensed under the Local Inference Lab License, Version 1.0 | `--quantization nvfp4_csf --load-format nvfp4_csf`; the draft's NVFP4 experts on B12X; served as `Qwen3.8-Flash-Next-NVFP4-MXFP8-CSF-QAD-TP2` | +| `glm53-flash-nvfp4-spark-tp4` | `nvfp4-spark` (default on an image that cannot read `csf`) | [GLM-5.3-Flash NVFP4-Spark](https://huggingface.co/local-inference-lab/GLM-5.3-Flash-NVFP4-Spark) by Local Inference Lab, revision `a608241037e4` | — | +| `glm53-flash-nvfp4-spark-tp4` | `csf` (default on an image that reads it) | [GLM-5.3-Flash NVFP4-MXFP8 CSF QAD](https://huggingface.co/local-inference-lab/GLM-5.3-Flash-NVFP4-MXFP8-CSF-QAD/tree/dec48abd33efa73c3bb7c95b74eee10cad34f9be) by Local Inference Lab, revision `dec48abd33ef` | `--quantization nvfp4_csf --load-format nvfp4_csf`; W4A16 decode (`VLLM_B12X_MOE_FP4_FORCE_A16=1`) with two CTAs per SM for small-M experts (`B12X_W4A16_SMALL_M_OCCUPANCY=2`); the draft's experts on the Marlin MoE backend; 37 GiB of KV cache per Spark; served as `GLM-5.3-Flash-CSF-TP4` | +| `glm53-flash-nvfp4-spark-tp4` | `nvfp4-qad` | [GLM-5.3-Flash NVFP4 QAD](https://huggingface.co/local-inference-lab/GLM-5.3-Flash-NVFP4/tree/175ae8ce3b5af842b0d0140dbeb43e9cfc557c49) by Local Inference Lab, revision `175ae8ce3b5a` | The draft's MXFP8 experts on the Humming MoE backend; 37 GiB of KV cache per Spark; served as `GLM-5.3-Flash-NVFP4-QAD-TP4` | +| `glm53-flash-nvfp4-spark-tp2` | `nvfp4-spark` (default on an image that cannot read `csf`) | GLM-5.3-Flash NVFP4-Spark, as above | — | +| `glm53-flash-nvfp4-spark-tp2` | `csf` (default on an image that reads it) | GLM-5.3-Flash NVFP4-MXFP8 CSF QAD, as above | `--quantization nvfp4_csf --load-format nvfp4_csf`; W4A16 decode with two CTAs per SM for small-M experts; KDA prefill coalescing (`VLLM_B12X_KDA_PREFILL_COALESCING=1`); the draft's experts on the Marlin MoE backend instead of Humming, with the four-Spark profile's draft tensor parallelism, probabilistic draft sampling and standard rejection; the pair's 10 GiB of KV cache per Spark and 1,048,576-token context window; served as `GLM-5.3-Flash-CSF-TP2` | +| `glm53-flash-nvfp4-spark-tp2` | `nvfp4-qad` | GLM-5.3-Flash NVFP4 QAD, as above | 5 GiB of KV cache per Spark; a 524,288-token context window; served as `GLM-5.3-Flash-NVFP4-QAD-TP2`. The pair's draft already runs its experts on the Humming MoE backend | +| `glm53-flash-nvfp4-spark-tp4` | `nvidia-nvfp4` | [GLM-5.3-Flash NVFP4](https://huggingface.co/nvidia/GLM-5.3-Flash-NVFP4/tree/da920bb0b9f4a06727223a349e55468e38352348) by NVIDIA (ModelOpt), revision `da920bb0b9f4` | `--quantization modelopt_fp4` and `--load-format safetensors`; the draft's BF16 experts on vLLM's unquantized MoE kernel; 36 GiB of KV cache per Spark; served as `GLM-5.3-Flash-NVFP4-NVIDIA-TP4` | +| `deepseek-v41-flash-tp4` | `original` (default) | [DeepSeek-V4.1-Flash](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash/tree/dba1be0a40aa45a94ad051997016db3960a90277) by DeepSeek, revision `dba1be0a40aa` | — | +| `deepseek-v41-flash-sparkcache-tp4` | `original` (default) | DeepSeek-V4.1-Flash, as above | — | +| `deepseek-v41-flash-sparkcache-tp4` | `1017` | DeepSeek-V4.1-Flash-1017, as below | Served as `DeepSeek-V4.1-Flash-1017-TP4`; the connector's checkpoint identity `642667f8…` and the cache root `/cache/deepseek-v41-flash-sparkcache-ab53c097d7ca-1bae0e108899`, so each revision's cache is its own. Research-only: the 1017 weights served under this profile on 2026-10-17 as a research configuration ([record](../../performance/records/images/dev-20261016-sparkcache-4a17f1f5198e-status038-installer-fixes-ring8-20261017.md)); no run with the entry itself yet. | +| `deepseek-v41-flash-tp4` | `1017` | [DeepSeek-V4.1-Flash-1017](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017/tree/1bae0e1088993b9b82de08f59de5be5a34e42170) by DeepSeek, revision `1bae0e108899`: new weights with the original's architecture, `config.json`, weight index and tokenizer files | Served as `DeepSeek-V4.1-Flash-1017-TP4`. The release's reference prompt encoder (`encoding/encoding.py`) changed how tool results are rendered; the image's vLLM encoder predates that change | + +- The DeepSeek `1017` entry is **implemented** on installer image + `dev-20261013-dcp2prefill-status038-sircl-tp6` on four Sparks: `sudo sparkring + install --checkpoint 1017` installed it on one ring, where it passed all 7 + functional checks and a 256-request correctness screen with no degenerate, + failed or wrong response + ([record](../../performance/records/images/dev-20261013-dcp2prefill-status038-sircl-tp6-deepseek-v41-flash-tp4-1017-20261017.md)). + With tool definitions in a request, the image's vLLM encoder renders the + same prompt as the 1017 release's reference encoder; without them and with + thinking on, the reference keeps the reasoning of earlier tool steps and + the image's encoder drops it. +- The Qwen `qad-step5500-mxfp8-attention` entry is **implemented** on the + installer image on two and four Sparks. On one pair and one four-Spark + ring, `sudo sparkring install` derived it on the Sparks (on the pair, + including the 2.6 GiB donor download in 31 s; the recipe took 32 s and + 39.5 s), every file matching the manifest. Served from it, each passed all + 7 functional checks and a 256-request correctness screen with no + degenerate or failed response. Against stock step 5500 on the same + cluster and image, two runs each, it ran more decode steps per second at + 1, 8 and 16 streams: 17%, 8% and 7% more on the pair (27.3 / 92.2 / 130.8 + against 23.3 / 85.5 / 122.1) and 8%, 4% and 1% more on the ring (36.8 / + 124.5 / 178.9 against 34.0 / 119.5 / 176.9), and prefilled 4.2 to 5.3% and + 1.9 to 2.3% faster ([pair](../../performance/records/images/dev-20261001-kraken-qwen38-flash-next-tp2-qad-step5500-mxfp8-attention-20261002.md), [ring](../../performance/records/images/dev-20261001-kraken-qwen38-flash-next-qad-tp4-qad-step5500-mxfp8-attention-20261002.md)). It + costs a little quality: the [research record](../../performance/records/qwen38-flash-next/mxfp8-attention-20261001.md) + measured, over a 9,708-token log-likelihood check, a mean negative + log-likelihood 0.0045 and 0.0063 nats per token above step 5500's, about + 0.5% in perplexity, against 0.0003 and 0.0015 between two runs of one + checkpoint, and 1.19 GiB less weight memory on each Spark of a pair. It is + never a profile's default. +- The Qwen `jmni-qad5500-hybrid` entry is **research-only** and third-party: + JMNI Labs built it from Local Inference Lab's published tensors, and Local + Inference Lab has not reviewed or qualified it. Its model card reports, on + two Sparks with another vLLM build, 26.5 decode steps per second at one + stream against 23.0 for step 5500 (with its draft on the Marlin MoE + kernel), and 66.9% on 1,000 MMLU-Pro questions with direct answers against + 67.0% for step 5500. It needs a runtime whose `modelopt_mixed` method + serves MXFP8 attention, W4A16 NVFP4 MTP experts and NVFP4 PLE; the installer + image serves each of them in step 4000 or step 5500. A tensor-by-tensor + comparison with the research checkpoint of the derived entry found its 480 + attention weight and scale tensors byte-identical (same dtype, shape and + bytes); the shard that holds them, `hybrid-main-00002.safetensors`, has the + SHA-256 of step 4000's `model-00035-of-00036.safetensors`. It differs from + the derived checkpoint in its weights' publisher and in the MTP draft's + routed experts, which it stores as W4A16 NVFP4 from Local Inference Lab's + `main` revision `7c4f1bc1a2d6`, as step 4000 does, so its draft runs them on + B12X; the derived checkpoint keeps step 5500's MXFP8 draft experts on + Humming. Draft experts change how fast drafting runs, not the output + distribution, so the card's MMLU-Pro result also describes the derived + checkpoint's target weights. No installation has run on Sparks. +- The Qwen `csf` entry is **implemented**, and `qwen38-flash-next-tp2` + installs it without `--checkpoint` on an image whose vLLM reads it. On a + pair of the ring of eight with release 2026.10.2's image, one installation + of it loaded, served and answered the fingerprint prompts in a single + measured start + ([record](../../performance/records/images/dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036-qwen38-flash-next-tp2-csf-pair-20261011.md)), + and later installations on 2026-10-11 passed the installer's checks. None + has had a correctness screen or a soak. Its `config.json` gives the 435 text + and MTP layers the recipes of `jmni-qad5500-hybrid`: step 5500's QAD + experts, MXFP8 attention and W4A16 NVFP4 MTP experts. It adds CSF encoding + of the routed experts' block scales and recipes for 110 vision linears + (MXFP8 attention, W4A16 NVFP4 MLP). Its model card states that CSF + reconstructs the original scale bytes exactly and that GPU inference and + multimodal quality were not evaluated. By its pin manifest it takes + 95.2 GiB against 102.6 GiB for step 5500. Only the `nvfp4_csf` quantization and + loader of the vLLM build `sparkring-kraken-beta-20261007-bc9ea774` read it + (`image_lock.CHECKPOINT_BUILDS`), so it installs only with an image lock + that lists that build in `sircl.vllm_pins`, such as release 2026.10.2's. + That loader splits the 640-channel expert width only into steps of 64 + channels per rank: it accepts 320 channels on each of two Sparks and + refuses 160 on each of four, so `qwen38-flash-next-qad-tp4` does not list + it. The profile does not set `VLLM_B12X_MOE_FP4_FORCE_A16`, which a + checkpoint entry cannot add, so the entry does not force W4A16 decode, unlike + GLM's `csf` entries. Every other setting is step 5500's, including the + 24 GiB KV cache per Spark. Its vision tower and its quality are + unmeasured. +- The four-Spark `nvfp4-qad` entry is **implemented** on the installer + image: on one four-Spark ring it passed all 7 functional checks and a + 256-request correctness screen with no degenerate or wrong response, and + decoded 57.7 / 184 / 258 tok/s at 1 / 8 / 16 streams in one run + ([record](../../performance/records/images/dev-20260928-plainstatus-glm53-flash-nvfp4-spark-tp4-nvfp4-qad-20261001.md)). + Its host memory headroom was not measured. +- The GLM `nvidia-nvfp4` checkpoint is **implemented** on the installer + image: on one four-Spark ring it passed all 7 functional checks and a + 256-request correctness screen with no degenerate or wrong response, and + decoded 53.2 / 171 / 244 tok/s at 1 / 8 / 16 streams in one run + ([record](../../performance/records/images/dev-20260928-plainstatus-glm53-flash-nvfp4-spark-tp4-nvidia-nvfp4-20261001.md)). + Its host memory headroom and multi-turn tool calls were not checked. +- The four-Spark GLM profile's evidence and the + [GLM memory record](../../performance/records/glm53-flash/installer-memory-20260929.md) + cover NVFP4-Spark only. +- By their pin manifests, the QAD and NVIDIA weights take 2.4 and 3.9 GiB more + than NVFP4-Spark's on each Spark of a ring. Their KV caches are smaller than + the profile's 40 GiB by that much, rounded up to whole GiB, so each Spark + keeps the free memory that the memory record measured for images, videos and + long requests. The ring's KV cache held 5,668,802 tokens at 37 GiB with + NVFP4-Spark. +- The two-Spark GLM profile offers the QAD checkpoint with 5 GiB of KV cache + per Spark and a 524,288-token context window, and does not list NVIDIA's. + On a pair, the QAD and NVIDIA weights take 4.9 and 7.8 GiB more on each + Spark than NVFP4-Spark's. The QAD entry's KV cache is the pair's 10 GiB less + that 4.9 GiB, rounded down to whole GiB, so each Spark keeps the free memory + the memory record measured. The pair's KV cache held about 137,000 tokens per + GiB with a 262,144-token context window and 153,000 with a 1,048,576-token + window, so 5 GiB holds 0.68 to 0.77 million tokens: one request of 524,288 + tokens needs 3.4 to 3.8 GiB. A 1,048,576-token request needs about 6.8 GiB, + more than 5 GiB, and NVIDIA's weights would leave about 2 GiB. The entry + keeps the pair's other settings, which do not size the KV cache: at most 8 + requests at a time, which share the smaller cache, 8,192 tokens per batch + and 8 images per request. +- The pair's `nvfp4-qad` entry is **implemented**: on one pair it passed all 7 + functional checks and a 256-request correctness screen with no degenerate or + wrong response, decoded 30.7 / 94 tok/s at 1 / 8 streams in one run, and one + request with 8 images left Node A 2.19 GiB of memory, as NVFP4-Spark's pair + profile does + ([record](../../performance/records/images/dev-20260930-spinwait-glm53-flash-nvfp4-spark-tp2-nvfp4-qad-20261001.md)). +- The `csf` entries of both GLM profiles are **implemented** on the SIRCL + 0.3.2 image `1a8c10354eb0`: installations on four and on two Sparks, of a + ring of eight and of rings of four, passed the installer's 7 functional + checks and its transport check + ([ring of eight](../../performance/records/images/dev-20261009-kraken-csf-sircl032-libsircl-plugins-installer-ring8-20261009.md), + [rings of four](../../performance/records/images/dev-20261009-kraken-csf-sircl032-libsircl-plugins-installer-ring4-20261010.md)); on four + Sparks the installation decoded 67.5 / 225.9 tok/s at 1 / 8 streams + without context and 65.6 / 214.5 at 16K tokens in one measured series + (rings-of-four record); and on four and on two Sparks a 256-request + correctness screen returned no degenerate, wrong or failed response + ([screens](../../performance/records/images/dev-20261009-kraken-csf-sircl032-libsircl-plugins-csf-screens-20261010.md)). + Qualification still needs a soak. + Their quantization, loader, W4A16 + decode and draft MoE backend are those of `glm53-flash-csf-tp8` + ([guide](../../profiles/glm53-flash-csf-tp8/README.md)). On one pair, + SIRCL's serve launcher served this checkpoint with the pair profile's + 10 GiB of KV cache and 1,048,576-token context window, the same + quantization, loader and draft backend and the CSF source overlay instead + of the image's sources, and its check passed + ([measured results](../../spark_transport/sircl/sparkring_sircl/vllm/RUNBOOK.md#measured-results)); + that row records no change to the profile's environment, which does not + force W4A16 (`VLLM_B12X_MOE_FP4_FORCE_A16=0`). By their pin manifests the + CSF weights take 2.3 GiB less than NVFP4-Spark's on each Spark of a ring + and 4.6 GiB less on each Spark of a pair. The ring's entry takes the 37 GiB + of KV cache of the QAD entry and of the eight-Spark profile, 3 GiB less + than NVFP4-Spark's; the pair's entry keeps the pair's 10 GiB. Neither has a + measured KV capacity or host memory headroom. +- The serving A/B runner measured the `csf` entries' settings, with SIRCL's + ring schedules, on a pair and on a path of four Sparks of a ring of eight + ([record](../../performance/records/images/dev-20261008-kraken-csf-sircl-libsircl-tp2-tp4-matrix-20261009.md)). + Measured serving of the CSF checkpoint at TP4 on SIRCL, outside this + repository, also set `B12X_W4A16_FP32_TOPK_WEIGHTS=1` and + `B12X_W4A16_A4_PREFILL_MIN_TOKENS=1536`. Both profiles set + `B12X_W4A16_A4_PREFILL_MIN_TOKENS=1536` for every checkpoint; it acts only + on the W4A16 experts that `csf` forces. Neither sets + `B12X_W4A16_FP32_TOPK_WEIGHTS`, and `glm53-flash-csf-tp8` sets neither + variable. +- NVIDIA's revision `da920bb0b9f4` holds the same weights and weight index as + revision `423acf37583782c51c142d145aef733d72943d93`, which the + [manual NVIDIA target](../../profiles/glm53-nvidia-nvfp4.md) pins. Its + `config.json` and `hf_quant_config.json` also exclude the BF16 MTP layer + from quantization, the entries that the manual target adds with + `--hf-overrides`. + +### Derived checkpoints + +A derived checkpoint is one that no repository publishes: the installer writes +it on the Sparks from pinned published files and a recipe in this repository, +then serves it from its own checkpoint directory. `--checkpoint +qad-step5500-mxfp8-attention` is one: step 5500 with its 240 text attention +projections stored as MXFP8 block 32 instead of BF16. Its recipe, +[`mxfp8_attention.py`](../../runtime/common/mxfp8_attention.py), takes those +tensors from step 4000, which stores the same frozen weights in MXFP8, only +after vLLM's MXFP8 quantization of each step-5500 BF16 weight reproduces step +4000's weight and scale bytes exactly. Its +[manifest](../../profiles/checkpoints/sparkring-derived--Qwen3.8-Flash-Next-NVFP4-QAD5500-MXFP8-Attention/648b194a96e5f130ab62702113242d8e1ddd6e76.json) +pins the size and SHA-256 of all 54 files: 48 that are step 5500's, unchanged, +and 6 that the recipe writes (both shards that hold projections, +`config.json`, `hf_quant_config.json`, the weight index and +`derivation.json`). Its revision is the identity of the base revision, the +donor revision and files, and the recipe's SHA-256, so a changed input or +recipe is another checkpoint. + +An installation: + +1. acquires step 5500 into its own checkpoint directory on every Spark, as + for `--checkpoint qad-step5500-ple1000`: from copies found on the Sparks, + from another Spark or, failing those, from Hugging Face; +2. hard-links on every Spark the 48 unchanged files from step 5500's directory + into the derived directory, so they take no space; +3. downloads on Node A the two step-4000 files the recipe reads, the weight + index and `model-00035-of-00036.safetensors` (2.8 GB), unless step 4000's + own checkpoint directory already holds them, and checks each against step + 4000's pin manifest; +4. runs the recipe on Node A in the deployment's installer image, CPU only + and without network, with both checkpoints mounted read-only; +5. copies the 6 written files (5.6 GiB) to the other Sparks over the fabric. + +Every written, downloaded or copied file is placed only after its SHA-256 +equals the manifest's, and both directories are verified again before the +model starts. The plan lists each step with its sizes, and the download +counts toward the approval that a download of more than 1 GiB needs. A +repeated installation finds the derived directory complete and only verifies +it. + +The derived directory is +`/srv/sparkring//checkpoints/sparkring-derived--Qwen3.8-Flash-Next-NVFP4-QAD5500-MXFP8-Attention/`, +beside step 5500's; step 4000's files go to its own checkpoint directory. The +installation stops, naming what failed, when: + +- step 5500 would be served in place from a named copy, or the derived + directory lies on another filesystem than step 5500's directory, because + the unchanged files are hard links; +- quantizing a step-5500 projection does not reproduce step 4000's bytes; the + message names the projection; +- a written file differs from the manifest, or the recipe in the installed + package differs from the one the manifest pins; the message names the file + or the recipe. + +Every Spark needs 5.6 GiB free beside step 5500 for the written files, and +Node A 2.6 GiB more for step 4000's files ([space](install-storage.md#downloads-storage-and-outbound-hosts)). +`sudo sparkring checkpoints` and `sudo sparkring storage` list the derived +directory with the base it is derived from; releasing it frees only the 5.6 +GiB the recipe wrote, because its other files are hard links to step 5500's. +Step 5500's directory keeps its data whatever happens to the derived one, and +neither is released while a protected deployment uses it. + +The derived files do not depend on where or when they are written: the recipe +writes each shard with its own safetensors writer, in the layout of the +safetensors library, so the manifest can pin every file. From step 5500's +`config.json`, `hf_quant_config.json`, weight index and shard headers, the +recipe reproduces the research checkpoint's `config.json`, +`hf_quant_config.json` and weight index byte for byte, and the index's total +size fixes the two rewritten shards' sizes; the shards' SHA-256 come from the +[research record](../../performance/records/qwen38-flash-next/mxfp8-attention-20261001.md), and an installation on one pair wrote all +6 files with the manifest's SHA-256 ([record](../../performance/records/images/dev-20261001-kraken-qwen38-flash-next-tp2-qad-step5500-mxfp8-attention-20261002.md)). + +#### A serving directory + +The default checkpoint of `glm53-nvfp4-csf-tp8`, `csf-serving`, is derived +from the profile's own checkpoint, GLM-5.3-NVFP4-CSF, without a donor. vLLM +reads that NVFP4-CSF container only from a directory whose `config.json` +names `nvfp4_csf` and the container's root, and the container's own root +holds neither that file nor a weight index. Its +[manifest](../../profiles/checkpoints/sparkring-derived--GLM-5.3-NVFP4-CSF-Serving/bbd8f71def6bde14a201887796692cb1cc4828a8.json) +pins 189 files: 187 hard links to the container's required files, its 7 +`metadata/` files among them linked at the root instead of in `metadata/`, +and `config.json` and `derivation.json`, which the recipe +[`csf_serving.py`](../../runtime/common/csf_serving.py) writes. An +installation: + +1. acquires the container into its own checkpoint directory on every Spark, + like any checkpoint; +2. hard-links the 187 kept files into the serving directory on every Spark; +3. runs the recipe on Node A in the installer image, CPU only and without + network: it checks the container's `metadata/config.json` against the + manifest and the container's `manifest.json`, and writes `config.json` + with the `nvfp4_csf` configuration and `checkpoint_root` `/models/target`; +4. copies the 2 written files to the other Sparks over the fabric. + +The rank container mounts the serving directory at `/models/target`, so it is +also the container root that `checkpoint_root` names: `manifest.json`, +`build-contract.json` and `tensors/` are its own hard links. That path is the +same on every Spark, so `config.json` has one SHA-256, which the profile pins. +A source configuration that differs from the manifest stops the recipe +before it writes anything. + +### Where the installer looks + +Before printing the plan, `sudo sparkring install` searches every Spark at +once: + +- SparkRing's own checkpoint directories and records, and the staging folder + `/srv/sparkring/downloads/--/`, such as + `/srv/sparkring/downloads/local-inference-lab--GLM-5.3-NVFP4-CSF/a4d406932f2db96db8e852867c7939f448e0cd6f` + for a copy downloaded with `hf download --local-dir` before the install; +- Hugging Face caches in every account's home, and those that `HF_HOME`, + `HF_HUB_CACHE` and similar variables name in system files, systemd units and + root's and your own shell files; +- Docker containers' model mounts, volumes and Hugging Face caches; +- folders with any name, such as `hf download --local-dir` folders and git-lfs + clones, under `/var/tmp/models`, `/models`, home directories, `/data`, + `/srv`, `/mnt`, `/opt` and other local disks. A folder is found by its + weight index or a weight file at its root, or one directory down for a + checkpoint that keeps them there, as the NVFP4-CSF container keeps + `metadata/model.safetensors.index.json` and `tensors/`. The search does not + enter `/srv/sparkring` beyond the paths above. + +Each Spark searches for up to 20 s, and once more for up to 40 s if that runs +out; Docker queries take up to 15 s, so a Spark's search ends within 75 s. It +runs as root and reads directory listings, file sizes, download metadata and +SparkRing's records, home directories included; it hashes only files up to +64 MiB, does not read other accounts' shell files and never enters network +storage or automounts. The plan names what was not searched. + +If the search missed your copy, check the plan's `Not searched` line and +whether a Spark's search hit its time limit, then repeat the plan; a repeated +search is faster. Otherwise name the copy with `--model-path N=PATH`. + +### What it does with a copy + +Files are identified by SHA-256 against the pin manifest, not by name: a copy +of the repository's `main` branch supplies every file of Qwen checkpoint step +4000 (`--checkpoint qad-step-4000`) except `config.json`, and a copy of NVIDIA +GLM revision `423acf37` every file of `--checkpoint nvidia-nvfp4` except +`config.json` and `hf_quant_config.json`. SparkRing hashes each file before +using it. + +- Weight files on the same filesystem as SparkRing's directory are hard-linked + into it and take no extra space. That changes only the link count and change + time of your weight files; a backup tool comparing change times reads them + once more. +- Other files (configuration, tokenizer, chat template) are copied, so later + edits to your copy do not reach the served model. +- A copy in another account's home is listed but used only when named with + `--model-path`. +- Files no Spark holds are downloaded once by Node A. + +**SparkRing never writes, moves or deletes files it did not create.** + +Copies between Sparks travel over the fabric cables outward from a Spark that +holds the checkpoint; with a fabric document they run as pipelines +([Spreading along the cables](install-storage.md#spreading-along-the-cables)). Each receiver +binds only its fabric addresses and accepts only the sending Spark's address +and a one-time token sent over administration SSH. Where the fabric cannot +carry a copy, rsync over administration SSH fills in: it sends only files the receiver lacks, into an empty staging +directory beside SparkRing's directory, reading them without changing their +access times (`--open-noatime`, which needs rsync 3.2.3 or later on both ends; +Ubuntu 24.04 ships 3.2.7). Each received file is placed only after its +SHA-256 matches. + +Later starts compare each file's recorded device, inode, size and times, and +re-hash a changed file. The model switch's last step, +`Confirm checkpoint unchanged during loading`, compares them again on every +Spark once the model has loaded; a change fails the switch and restores the +previous deployment. + +### Plan approval + +The plan shows, per Spark, its sources and their owners, how many files it +hard-links, and the bytes it copies, receives or downloads. + +A plan reviewed with `--plan`, or approved at a terminal prompt, bounds every +later `--yes` run. Such a run searches again and proceeds only while its plan +stays within the reviewed one: no new downloads, at most 1 GiB more written +per Spark, and the same mode and no new source folders on each Spark. +Otherwise it stops, prints the difference and keeps the reviewed plan as the +bound, so repeating `--yes` stops again: review the changed plan with +`--plan`, then repeat `--yes`. The refused plan is saved as +`checkpoint-plan.refused.json` beside the reviewed one. + +- A download or write the approved plan does not include stops the + installation with `needs_input` (field `checkpoint`) before it starts; the + running model is unchanged. +- Setup's approval of a first installation does not cover a download over + 1 GiB or a search that stopped early or failed: a terminal asks + `Proceed with this checkpoint plan? [y/N]` + ([Questions and approvals](install-models.md#questions-and-approvals)), and a run without + one stops. +- A plan whose problems stop the installation, such as a named path that + exists on no Spark or too little free space, records no deployment. +- Commands suggested in messages repeat your `--profile`, `--model-path`, + `--cache-path` and `--image-lock` options, which identify the deployment. +- With `--json`, the result carries a plan summary as `checkpoint`; the full + plan, with each file's action, is `checkpoint-plan.json` in the result's + `deployment` directory. The result also carries the spread plan as `spread`. +- The spread plan stays within the reviewed one while the fabric is the same, + no Spark writes more than 1 GiB beyond it and no Spark receives over the + administration network what the reviewed plan sent over the cables. + +### Options + +- `--model-path PATH` names a copy for every Spark, `--model-path N=PATH` one + for Node N; repeat as needed. Named copies are used first; the search still + runs. + - A named copy on another filesystem than SparkRing's directory that holds + exactly the pinned files is served in place, read-only; the model does not + start while that folder is changed or missing. Serving in place is decided + when the deployment is first planned; if the copy later changes, the + installation stops and says how to continue. + - SparkRing never creates or writes a named path. + - Named paths are part of the deployment: other named paths plan another + deployment, so repeat every command with the same `--model-path` options. +- `--ignore-local-copies` uses only SparkRing's own checkpoint directories and + named copies. +- A `.sparkring-ignore` file keeps SparkRing out of its folder and everything + below, even a named path. For a Hugging Face cache, put it in `$HF_HOME` + (the parent of `hub`) or in a `models--*` folder; in `hub` itself it makes + `hf cache scan` report an error. +- `--cache-path /absolute/cache` chooses another writable compilation cache. + +`sparkring up PROFILE` does not search: each Spark uses SparkRing's checkpoint +directory and downloads the files it lacks itself, with the serving image's +Hugging Face client. That download runs before `up` pulls the image, so a +Spark that lacks checkpoint files must already hold the image +(`sudo sparkring install` distributes it). `sparkring up --model-path PATH` +serves a complete copy in place. + +### Disk space held by links + +While SparkRing's directory links a copy's weight files, deleting that copy or +pruning the Hugging Face cache frees nothing; release SparkRing's directory +instead. + +- `sudo sparkring checkpoints` lists SparkRing's checkpoint directories on + every Spark, the deployments using each, the copies it shares files with and + the space a release frees. +- `sudo sparkring checkpoints --release PATH` removes one from every Spark + after asking (`--yes` in scripts). It refuses a directory that the active + deployment or the rollback target uses, also one served in place, and one a + running container mounts. It names other deployments using it; they need + `sudo sparkring install` again. It removes only the names and directories + SparkRing placed and never writes, moves or deletes the copies they were + linked from. diff --git a/docs/operations/install-fabrics.md b/docs/operations/install-fabrics.md new file mode 100644 index 00000000..a1a488f3 --- /dev/null +++ b/docs/operations/install-fabrics.md @@ -0,0 +1,599 @@ +# Install SparkRing: fabrics, rings and multi-model slices + +Cabling, addressing, ConnectX-7 relay tables and hairpin settings for pairs, four-Spark rings, eight-Spark fabrics, partial-fabric slices, and running two models on one ring. + +Part of the [Install SparkRing reference](install-reference.md) · [Quick install](install.md) · [Commands](commands.md) + +## Fabrics of up to eight Sparks + +Setup forms a pair, a ring of three to eight Sparks or a line of three to +eight ([cabling](install-package.md#cabling)), installs what lets every Spark reach every +other, makes it survive a reboot, verifies it and records it. + +### Addresses on any layout + +Cable e runs from position e's port 0 to position e+1's port 1; a ring's +last cable returns to position 0. It carries two `/24` subnets, the (2e)th +and (2e+1)th of the fabric network, one per ConnectX function; the port-0 +end is `.1` and the other end `.2`. Setup keeps compatible addresses a Spark +already has. + +- With up to four cables setup uses `198.18.0.0/21`, with more + `198.18.0.0/20`. Both start at the same subnet, so cables 0 to 3 keep their + addresses. `--fabric-cidr` names another network; setup refuses one that + is too small, such as a `/21` for more than four cables. +- Each Spark routes to every cable it is not on through its neighbor: on a + ring the shorter way, on a line the only way. Each Spark between two cables + forwards between them ([fabric addresses and + routes](#fabric-addresses-and-routes)). +- The admin network takes a `/29` for up to six Sparks. With seven or eight, + setup uses the `/28` that contains the default `/29`; a subnet named with + `--control-cidr` is used as it is. + +### The relay table + +Sparks two or more cables apart reach each other through the Sparks between +them, whose ConnectX cards pass RDMA traffic on in hardware. Setup installs +one relay table for the whole fabric. It serves every pair of Sparks at once, +for every transport: + +- each Spark has a `/32` route and a permanent neighbor entry (protocol 82) + toward each Spark it shares no cable with; +- each Spark between two cables has ConnectX ingress rules (`tc` flower, + `skip_sw`, preferences 11 to 17) that pass a packet on to the next Spark; +- each Spark runs one relay marker process per fabric RDMA device + (`sparkring-relay-marker`). It tags RDMA packets to relayed Sparks with how + many relays remain (EtherType `0x88b4` plus that number). +- On a four-Spark ring the markers also tag the four-Spark transport's + two-hop traffic (UDP source port 65535). Four-Spark models then need no + per-deployment [mesh service](#the-rings-mesh). + +The table comes from SIRCL's relay plan for the whole fabric, so it carries +every lane SIRCL derives. Routes with more than three relays, on lines of +six or more Sparks, are research-only. Every Spark between two cables needs +the [ConnectX hairpin setting](#the-hairpin-setting). + +The relay marker ships prebuilt in the SparkRing package, so no Spark +compiles it and Sparks need neither `gcc` nor `libibverbs-dev`. The release +build compiles it once for arm64; every other package build takes the +published binary ([Build from a full clone](install-package.md#build-from-a-full-clone)). The +package records the binary's SHA-256 in `distribution.json` (`relay_marker`). +Package installation fails when the installed binary is missing or differs +from it, and each Spark checks the digest again before it starts a marker. +A package built for package tests without the marker (`--relay-marker skip`) +installs no relay table: four-Spark models then use their mesh service, and +setup's plan says so. + +### Boot and reboot + +At boot, in order: + +1. `sparkring-hairpin.service` applies the ConnectX hairpin setting. +2. `sparkring-fabric.service` adds the routes, settings, forwarding rules and + the relay table. +3. `sparkring-relay-marker.service` starts the markers, and starts them again + when one stops, as after a ConnectX driver restart. +4. The admin network starts, and `sparkring-recover.timer` restarts the + active model ([automatic recovery](install-models.md#automatic-recovery)). + +`sparkring-agent` adds back, every 30 seconds, routes and relay objects that +a link change removed. After a reboot, `sudo sparkring fabric verify` +confirms the fabric. + +### The fabric document + +Setup ends by recording the fabric document (`sparkring-fabric/v1`) in +`/var/lib/sparkring/controller/fabric.json` on Node A and the same bytes in +`/etc/sparkring/fabric/topology.json` on every Spark. It lists: + +- each Spark's position, node identity and management address; +- both ports of each Spark, with the cable and the far end, and each + function's network interface, RDMA device, MAC, role and address; +- the cables with their subnets and last measured health; +- the hairpin requirement, the relay plan's digest and whether boot units + restore it; +- the transports the fabric can carry: `sircl`, and `prepared` on a pair or a + four-Spark ring; +- the verification setup ran before it recorded the document. + +Its `id` is a digest of the Sparks, ports and cables; addresses, names and +health can change without changing it. The relay plan (`relay-plan.json`) +lies beside it on Node A. `sparkring fabric show` prints both +([command](commands.md#fabric)). SIRCL reads device names from the document +that `SIRCL_FABRIC_DOCUMENT` names. + +### Verify the fabric + +`sudo sparkring fabric verify` checks every Spark: + +- links, addresses, MTU and [RoCE GID index 3](install-models.md#roce-gid-index-3); +- the approved routes and forwarding settings; +- the hairpin setting where the Spark relays; +- every relay route, neighbor entry, ingress rule and marker; +- that the boot units are enabled and the Spark's copy of the document is + the recorded one; +- that every other Spark's fabric addresses answer ICMP. Relayed addresses + answer through the kernel's forwarding, so this checks routes, not the + hardware relays. + +`--traffic light` adds one bidirectional RDMA write test per relayed lane, +about 10 seconds each, which crosses the hardware relays. It is refused while +a model serves unless `--while-serving` is given. Each run writes +`fabric-verify-TIME.json` in `/var/lib/sparkring/controller/fabric-reports/`. +Setup runs the same checks before it records the document. + +### Measure the tuning table + +`sudo sparkring fabric tune` prints what it would measure; +`sudo sparkring fabric tune --execute` measures +([flags](commands.md#fabric-tune)). Without it, deployments use the default +table, measured on the owner's fabric. The measurement: + +- times, with SIRCL's ring harness, every SIRCL candidate of the all-reduce, + all-gather, reduce-scatter and all-to-all from 4 KiB to 128 MiB per rank, + eagerly and in CUDA graph replay: one-shot and two-shot at each launch grid + (latency), and from 256 KiB the two-shot pieces, the chain and the ring at + each piece (crossover). NCCL is not measured; +- measures one group of each shape a deployment can use: on a cycle the pair, + the paths of 3 to 5 Sparks shorter than the cycle, and the whole cycle; on a + path the pairs and paths shorter than it. A deployment on any positions of + that shape uses the group's measurement; +- cannot measure a pair cabled port 0 to port 0, or every Spark of a path: + the ring harness describes the Sparks as a cycle. Those groups keep the + default table's row; +- runs one container per rank on GPU 0 of the measured Sparks and fills the + fabric. It holds the installation lock, so nothing installs or starts while + it runs, and refuses while a model serves unless `--stop-serving` stops it + first. A stopped model stays stopped; +- takes at most `--layout-timeout` (30 minutes) per group, plus staging and + checks; the plan prints the worst case. `--max-hours` leaves the groups that + do not fit for the next run, and a repeated command keeps the groups already + measured. + +It writes `/var/lib/sparkring/controller/sircl-tuning.json` on Node A and the +measured SIRCL tables to `/etc/sparkring/fabric/sircl-tuning/` on every Spark, +each named by its SHA-256. The table records: + +| Field | What it binds | +|---|---| +| `fabric` | The fabric document's identity: another cabling, Spark or port invalidates it | +| `image_id`, `binding.image`, `binding.tuning_key` | The installer image and its SIRCL build: another image, SIRCL version or SIRCL source invalidates it | +| `binding.drivers` | Each Spark's GPU driver and kernel: a change on Node A invalidates it; the measurement refuses Sparks whose drivers differ | +| `layouts` | `measured` rows: the default table's settings for that group shape, except the link slots and link slot that the row's measured SIRCL table records, which replace them; `default:` rows carried from the default table | +| `tables` | The measured SIRCL tables, each with the session settings its choices ran under (link slots, link slot, chain slot, large-message piece) | + +A measured `cycle-8` row therefore keeps the default row's 1 MiB capacity and +dispatch ceiling and 28 KiB one-shot limit, and its sessions take the link +slots and link slot measured on this fabric. The installation plan states the +rule on a `Measured row` line. + +A deployment records the table's digest in its lock, mounts the SIRCL tables +of its tensor-parallel group and its decode-context-parallel groups read-only +in every rank's container and checks each Spark's copy before a container +starts. Its receipts must show that every session decided +from that table and uses the table's settings. A deployment made before the +measurement keeps its own table; `sudo sparkring install` makes another one on +the measured table. `sudo sparkring status` prints which table installations +use, and `sudo sparkring fabric tune --distribute` copies the tables to a +Spark that lost them. + +The harness measures this package's SIRCL sources built inside the image. It +refuses when they differ from the image's SIRCL layer, because the image's +sessions would not take the table; install the package the image was built +with, or name its image with `--image`. + +### Change the layout + +A cluster whose Sparks are now cabled as another layout, such as a ring that +lost a cable, stops setup with both layouts named. Restore the cables, or +run `sudo sparkring setup --re-form` to set the Sparks up again as they are +cabled; it moves each Spark's setup aside first, as a +[re-form](install-package.md#re-form-sparks-into-another-pair-or-ring) does. Adding or removing +a Spark re-forms the cluster without the flag. + +## Four-Spark rings + +Rings of four or more Sparks need the ConnectX hairpin setting on every Spark, +and lines of three or more on every Spark between two cables; pairs and +three-Spark rings do not use it. SparkRing applies it itself; a first +installation needs no flag or separate step. + +### The hairpin setting + +Every four-Spark installer profile (`qwen38-flash-next-qad-tp4`, +`glm53-flash-nvfp4-spark-tp4`, `mimo-v26-flash-mopd-tp4`, +`deepseek-v41-flash-tp4` and `swift15-qwen38-flash-next-tp4`) relays traffic +between nonadjacent Sparks through ConnectX hardware forwarding, as does the +[relay table](#the-relay-table) on any layout. That needs, +on each of a Spark's four ConnectX functions, a hairpin queue of 8192 packets +(`hairpin_queue_size`), four hairpin queues (`hairpin_num_queues`) and +hardware TC offload. + +The driver starts each boot at 1024 packets and uses the larger queue only +after that function's driver restarts +(`devlink dev reload … action driver_reinit`), which takes the function's link +down for about 8 seconds. SparkRing restarts the functions: + +- **At the first installation**, whose approval question lists the restarts: + each function once, after fabric addressing is configured, Node A first, + then one worker at a time, about 30 seconds per Spark. +- **At every boot**: `sparkring-hairpin.service` restarts each function before + NetworkManager starts, adding about 30 seconds per boot. SparkRing enables + it on a Spark after a run there in which every restart succeeded; from then + on, a reboot needs no manual step for the setting. + +SparkRing never restarts a driver while a model, a mesh service, mesh +forwarding rules or another RDMA program is present on the ring; it lists +what to stop and restarts nothing. + +### Apply or repair the setting + +On Node A, with this package installed, run this for any installed ring whose +Sparks lack the setting or its boot service: + +```bash +sudo sparkring hairpin +``` + +That includes a ring set up by a SparkRing package without +`sparkring-hairpin.service`: it has no boot record for the setting, and a +reboot leaves its mesh services stopped by their start check. + +- It lists what it will change, including a SparkRing package update on + workers running another revision, and asks once. `--plan` only prints the + list; `--yes` approves without asking. +- If the setting is already in effect, it only records the approval and + enables the boot service, without a restart. +- If an updated worker then needs a restart the list did not show, it stops + and asks for that restart first. +- Once every Spark has the setting, it starts each enabled mesh service the + start check refused. +- `--json` prints one `sparkring-hairpin-result/v1` document; exit codes are + those of `sparkring install`. Each run leaves a receipt below + `/var/lib/sparkring/controller/hairpin/`. +- `sudo sparkring hairpin --revoke` stops applying the setting at boot on + every Spark. The setting stays in effect until each Spark reboots; after + that, the start check keeps each mesh service stopped until the setting is + applied again. + +`sudo sparkring install` includes the same step in its question when a Spark +needs it. `sparkring setup` and `sparkring install` accept +`--allow-driver-reload`, which is not needed. + +### Missing setting or failed restart + +Without the setting in effect, a Spark's mesh service does not start and its +log names the function, `sparkring status` reports the Spark as +[`needs-attention`](install-models.md#status-observations), and `sparkring up --execute` starts +nothing. Run `sudo sparkring hairpin` on Node A; `sudo sparkring install` +starts the mesh its installation uses ([The ring's mesh](#the-rings-mesh)). + +- If a restart fails during a boot, or a boot ends during a restart, later + boots of that Spark restart nothing, and `sparkring status` warns, until + `sudo sparkring hairpin` succeeds. +- A Spark unreachable after a failed restart becomes reachable after a power + cycle, without the setting. +- A failed restart of a function carrying the administration network to + other Sparks cuts them off from Node A unless a + [fallback path](install-models.md#admin-tunnel) carries them, while the Spark itself stays + reachable over its other links; `sparkring status` then names the Spark to + reboot. Its next boot restarts no function, and `sudo sparkring hairpin` + then retries it. +- To boot once without the restarts, add `sparkring.hairpin=off` to the + kernel command line. + +On a Spark: + +| Command | Shows | +|---|---| +| `journalctl -b -u sparkring-hairpin.service` | The boot run | +| `sudo sparkring node hairpin status` | Each function's setting | +| `sudo sparkring node hairpin apply --dry-run --boot` | The restarts that the next boot performs, in order, or none while the service is not enabled | + +### Fabric addresses and routes + +Each cable carries two `/24` subnets, one per ConnectX function of its +ports ([addresses on any layout](#addresses-on-any-layout)). On a four-Spark +ring with the default fabric network, the cable from port 0 of rank e to +port 1 of rank e+1 (rank 0 after rank 3) uses `198.18.(2e).0/24` and +`198.18.(2e+1).0/24`; compatible addresses that setup kept may differ. Each +Spark reaches the cables it is not on through a neighbor: one static route per +subnet, over the shorter side of a ring, for example +`198.18.4.0/24 via 198.18.6.1 dev enp1s0f1np1` on rank 0. Setup records these +approved routes, and the Spark's part of the [relay table](#the-relay-table), +in `/etc/sparkring/fabric.json`; a pair has no routes. + +- **At boot**, `sparkring-fabric.service` adds the routes, sets each fabric + function's per-interface settings (`net.ipv4.conf.IFACE.forwarding=1` and + `net.ipv4.conf.IFACE.rp_filter=0`) and adds the forwarding rules. +- **When a link returns.** A link goes down when the Spark at its other end + reboots or restarts a ConnectX function, or when the cable is out. + NetworkManager then removes the function's fabric address, and the kernel + deletes the routes through it. NetworkManager adds the address again when + the link returns, and `sparkring-agent`, which checks every 30 seconds, + adds each missing approved route once its function has its link and + address. +- **After a driver restart** of a ConnectX function, its netdev returns with + the kernel's default settings, such as `rp_filter` 2. The agent sets the + approved settings that differ again on every fabric function that exists, + and logs each change. +- The agent changes only approved routes and settings, never another + interface or a global setting, and never removes or replaces a route: + another route to the same subnet stays, and `sparkring status` names it. + It acts while `sparkring-fabric.service` is active, as it is after a + successful boot restoration; stopping that service stops it until the + next boot. The forwarding rules come from `sparkring-fabric.service` + alone: they match interfaces by name, so a link going down or a restarted + function leaves them in place. +- **Status.** While a link is down, `sparkring status` names the link and + the rank at its other end; the routes need no step + ([Status observations](install-models.md#status-observations)). +- The routes stay while [two models serve on the ring](#two-models-on-one-ring); + the halves do not use them. +- Installing the package restarts `sparkring-agent`, so an updated Spark + restores routes and settings this way without setup or a reboot. + +### The ring's mesh + +On a ring whose fabric document records a relay table that boot units +restore, four-Spark installer profiles use that table: each rank's deployment +refers to the fabric document, no mesh service is installed, and the ring +check before the model starts checks the table and its markers on every +Spark. A deployment that still has a mesh service does not start beside the +table's markers; install it again. The rest of this section describes the +mesh service that carries the two-hop paths on rings set up without the +relay table. + +Every four-Spark installer profile runs on a native mesh; the installer +renders each rank's container from the profile's shared container +specification. + +- It reuses the mesh service every Spark has enabled or running, or stopped + while [two models served on the ring](#two-models-on-one-ring). +- If no Spark has one, it downloads and verifies the pinned host marker on + every rank, creates stopped model containers, installs supervised mesh + services, waits for every rank and starts the model. +- A mesh that only some Sparks have, or that differs between them, stops the + plan for inspection. + +SparkRing enables the mesh service, so it starts at each boot after the +hairpin setting. Before an installation starts the model, every Spark first +stops its mesh service where it must start again: where the mesh's routes or +forwarding rules are missing, and where a port's IPv4 address must be re-added +because its RoCE v2 GID is not at the pinned +[GID index 3](install-models.md#roce-gid-index-3). Then each Spark starts its mesh service if +it is stopped, and the installation waits up to four minutes for the ring +check on every Spark. + +**When mesh code changes take effect.** Each Spark runs its mesh from the +supervisor code and systemd units installed for that mesh: +`/opt/sparkring/managed-mesh` and the `sparkring-mesh*` units for the default +mesh, `/opt/sparkring/deployments/NAME` and the `sparkring-NAME-*` units for a +named one. Installing a package, `sparkring install` and `sparkring up` never +change the code of a running mesh service, and a boot starts the installed +code. When `sparkring install` or `sparkring up` starts a mesh service, each +Spark first compares the installed files with the deployment's own SparkRing +source. Where they differ, it installs the deployment's files, updates the +mesh's installation receipt (`source-hashes.json` or `installation.json` in +`/etc/sparkring/managed-mesh` or `/etc/sparkring/deployments/NAME`), reloads +systemd if a unit file changed, and then starts the mesh. It does so only when +all of these hold: + +- the mesh, model and liveness services on that Spark have stopped; +- the deployment's code accepts the mesh's installed configuration; +- every mesh supervisor running on another Spark runs the deployment's code. + The four supervisors form a mesh only when they run the same code, so the + four Sparks change code together. + +A fix to the mesh supervisor therefore reaches a ring at the first +`sparkring install` or `sparkring up` of a deployment that includes it, once +the mesh service has stopped on all four Sparks: for example after the mesh +failed on every Spark, or after `sudo sparkring down --execute` and +`sudo systemctl stop sparkring-mesh.service` on each Spark (a named mesh's +unit is `sparkring-NAME-mesh.service`). The `up` of a deployment created from +other SparkRing source installs that source's mesh code in the same way. +Files that the receipt lists but the deployment's code does not include are +removed; other files in the code directory stay. + +Until the files match, `sparkring status` reports on each such Spark, for +example, `mesh code of sparkring-mesh.service installed 2026-09-21 differs +from this deployment's; it refreshes when sparkring up next starts the mesh on +all four Sparks`. The deployment it compares with is the last one whose +`install` or `up` started or checked that mesh. + +`sparkring install` does not replace an existing mesh: +`sparkring up PROFILE --fresh-mesh --plan` prints an explicit replacement +plan, and `sparkring up PROFILE --instance fresh --fresh-mesh` rehearses the +replacement beside an existing deployment. A replaced deployment's container, +source and weight directories are retained. + +A mesh takes its name from the cluster, profile and instance. Changing a +deployment's package or settings means creating another deployment: +`sparkring install` names each deployment by its request, and +`sparkring up PROFILE --instance NAME` takes an unused name. Each instance has +its own workspace, containers and mesh, and `sparkring status --json` lists +its containers and their labels. A deployment created under an earlier +deployment's instance needs that deployment's workspace released and its model +containers removed; it installs its mesh where the earlier mesh is. While a +mesh that the earlier deployment created is installed on the Sparks, its host +marker keeps that workspace in use and `sudo sparkring storage` does not +release it ([Finding and freeing space](install-storage.md#finding-and-freeing-space)); create +the deployment under an unused instance name instead. With +`--fresh-mesh`, the installation takes over that earlier mesh on each Spark +when the reviewed plan listed its service, its site file is +unchanged since that review, and its model container on that Spark is stopped +(by `sparkring down`) or removed. It stops the earlier mesh, model and +liveness services and moves their configuration, code and unit files to +`/var/lib/sparkring/replaced-meshes/`; nothing is deleted. Every Spark is +checked before any changes, so a refusal on one Spark leaves all four as they +were. A mesh service that is installed but neither enabled nor running is not +listed by the plan and is not taken over. + +The mesh services start and check the exact model containers that the +deployment created. When those containers are created again, for example +after `docker container prune` removed them while the model was stopped, the +deployment's next `up` installs its mesh services again for the new +containers, in the same way. + +## Models on part of the fabric + +Install, swap, down and restart operations on disjoint slices can run at +the same time. An overlapping operation is refused with the holder and its +Sparks; retry after it finishes. `--yes` never overrides this conflict. +Setup, fabric changes, package upgrades and global storage release exclude +all slices. A slice whose worker packages need an upgrade asks you to run +setup first. Automatic retention is deferred for slice operations. + +Before an action, SparkRing reports recorded activity on other slices and +shared download or image-copy resources. An advisory warning asks for +confirmation; `--yes` approves it and `--json` includes it as data. Metrics +are sampled once per neighbouring deployment, with a 200 ms socket timeout; +four running requests or any waiting request count as heavy traffic. Quiet +mode suppresses these samples. Missing metrics mean unknown traffic. + +Use `sparkring logs --on 4-5 --follow` for the latest operation on a slice, +or `sparkring logs --operation ID` for one operation's retained log. Use +`sparkring restart --on 4-5 --plan` before `--execute`, and `sparkring recover +off --on 4-5` to disable recovery on just those Sparks. The +[dashboard's manage mode](dashboard.md#managing-slices) provides the same +reviewed actions through the privileged helper. See the +[design and compatibility contract](../architecture/independent-slices.md). + +A fabric serves one model on all its Sparks, or several models side by side +on runs of consecutive Sparks that share no Spark. `--on` names the Sparks of +one model: + +```bash +sudo sparkring install --profile FOUR_SPARK_PROFILE --on 0-3 # positions 0 to 3 +sudo sparkring install --profile FOUR_SPARK_PROFILE --on 4-7 # positions 4 to 7, beside it +sudo sparkring install --profile TWO_SPARK_PROFILE --on 6,7 # stops the model on 4-7, then serves on 6 and 7 +sudo sparkring install --profile EIGHT_SPARK_PROFILE # every Spark, which stops the others +``` + +- **Which Sparks.** `--on` takes consecutive positions in cable order, as a + list (`0,1`, `6,7,0,1`) or as the first and last position (`0-3`, `4-7`). On + a ring a group may cross the cable to Node A: `--on 6-1` is positions 6, 7, + 0 and 1. The group has the profile's number of Sparks; `--on` naming every + Spark from Node A on is the same as no `--on`. On a pair, `--on` is refused. +- **Ranks and API.** Rank `r` runs on the `r`-th Spark of the group, so its + first Spark serves the API at the profile's port: Node A's address when the + group starts at Node A, otherwise that Spark's own LAN address, or its + administration address, which only Node A reaches, when it has no LAN + connection. The card below `Model ready:` and `sudo sparkring status` + print each group's URL. +- **Which transport.** The prepared transport runs a + pair, a four-Spark ring and that ring's [halves](#two-models-on-one-ring), + `--on 0,1` and `--on 2,3`. Every other group needs [SIRCL ring + sessions](install-models.md#transport-and-receipts): two Sparks that share a cable, a line of + three to five Sparks, or every Spark of a ring of three to eight. A line of + six or more Sparks is not supported: its end Sparks are four or more relays + apart, and SIRCL's lanes cross at most three. The installation names the + reason before it changes anything. +- **What stops.** A group's installation replaces the model of the same group + and stops every model on a Spark it uses; models on other Sparks keep + serving. The plan lists each model it stops (`It stops PROFILE on Sparks + 0-3.`), and the run asks before it stops one outside the named group; + `--yes` approves that. +- **Without `--on`.** A profile of fewer Sparks than the fabric goes on the + one group, of those that divide the fabric from Node A (the halves of a + four-Spark ring for two Sparks, positions 0-3 and 4-7 of an eight-Spark ring + for four), on whose Sparks no model runs; the run says which. When several + or none are free, it asks for `--on`. A profile of more Sparks than the + fabric is refused with the installer profiles that fit. +- **Its own Sparks.** A group's checkpoint plan and model steps call its + Sparks Node 0 onwards and name their host names; its checkpoint moves + between its own Sparks over their shared cables, and the serving image goes + only to its own Sparks, so a model serving beside the group gets no image + write ([Image](install-storage.md#spreading-along-the-cables)). A group of more than two + Sparks bootstraps over their management addresses, because the relays carry + only tagged RDMA traffic, and checks the fabric's [relay + table](#the-relay-table) on every Spark before it starts. +- **Hairpin.** An installation on part of the fabric applies no ConnectX + hairpin change: a driver restart would interrupt the models beside it. A + Spark that relays the group's traffic (an inner Spark of a line) must have + the [setting](#the-hairpin-setting) in effect, which setup applies; the + installation stops and names `sudo sparkring setup` otherwise. + +`sudo sparkring status` prints one block per group: `Sparks 4-7:`, its shape, +positions and API Spark (`Group: path-4 at positions 4, 5, 6, 7; API on +Spark 4`), the saved operation, the transport and the API URL. `sudo sparkring +down --on 4-7 --execute`, `up --on 4-7` and `check --on 4-7` act on one group; +with several recorded, `up` and `down` without a profile ask for `--on`. +[Automatic recovery](install-models.md#automatic-recovery) restarts only the group that stopped +serving. + +## Two models on one ring + +A four-Spark ring serves one four-Spark model, or two two-Spark models: one +on Sparks 0 and 1, one on Sparks 2 and 3. Switch between them with +`sudo sparkring install`, as you switch models. + +```bash +sudo sparkring install --profile TWO_SPARK_PROFILE --on 0,1 # Sparks 0 and 1 +sudo sparkring install --profile TWO_SPARK_PROFILE --on 2,3 # Sparks 2 and 3 +sudo sparkring install --profile FOUR_SPARK_PROFILE # all four again +``` + +- **Which half.** `--on` takes `0,1` or `2,3`: each pair shares a cable. + Without `--on`, a two-Spark profile goes on the half that serves no model, + and the run says which. When both halves serve, or neither does, it asks + for `--on`. `--on` is refused on a pair and for four-Spark profiles. +- **What stops.** A model on a half replaces that half's model and leaves the + other half running. It stops a running four-Spark model. A four-Spark + model stops the models on both halves. The plan lists every model the + switch stops (`It stops PROFILE on Sparks 2 and 3.`), and the run asks + before it stops one outside the half you named; `--yes` approves that. +- **Where it serves.** A half serves on its first Spark, at the profile's + port: Sparks 0 and 1 on Node A's address, Sparks 2 and 3 on Spark 2's own + LAN address. The card below `Model ready:` and `sudo sparkring status` + print each URL. A + Spark 2 without its own LAN connection serves on its administration + address, which only Node A reaches; the plan says so. For Sparks 2 and 3, + the [API options](install-models.md#api-endpoint) and the question name Spark 2's + addresses. +- **Its own steps.** A half's checkpoint plan and model steps call its two + Sparks Node 0 and Node 1 and name their host names. Package updates go to + every Spark and the serving image only to the half's two Sparks; neither + restarts a model. + +### The ring's mesh while halves serve + +Before a half's model starts, every Spark stops and disables its mesh +service, and the half's own start checks that no mesh runs on its two Sparks. +A two-Spark model uses its cable directly, as a pair does, so its two Sparks +restore their fabric addresses in [GID index 3](install-models.md#roce-gid-index-3) first. +Fabric addresses, [routes](#fabric-addresses-and-routes) and the +[hairpin setting](#the-hairpin-setting) stay as setup left them, and a +half's installation applies no hairpin change. + +Each Spark records the mesh services it stopped in +`/etc/sparkring/mesh-parked.json`, and such a service counts as enabled for +the next four-Spark installation, which reuses it. That installation's +[mesh step](#the-rings-mesh) enables and starts it again on every Spark and +removes the record. `sudo sparkring node mesh-park` stops and disables the +mesh services of one Spark by hand. + +### Status, stop and recovery + +- `sudo sparkring status` lists each half's model, its checkpoint, its API + URL and its automatic recovery. +- `sudo sparkring down --on 2,3 --execute` stops one half's model, and + `sudo sparkring up --on 2,3 --execute` starts it again. With models on + both halves, `up` and `down` without a profile ask for `--on`. +- `sudo sparkring up` refuses a four-Spark model while a half's model runs, + and a half's model while the four-Spark model runs, and names the `down` + command that frees the Sparks. +- [Automatic recovery](install-models.md#automatic-recovery) checks each half's model and + restarts only the half that stopped serving. `recover on` and `recover off` + apply to both halves. +- [Automatic release](install-storage.md#automatic-release) keeps each half's active model and + the model its last switch replaced. + +One installation lock covers the whole ring. While one half installs, the +other half's model keeps serving, and its recovery check reports `busy` and +runs again a minute later. + +Node A keeps each half's records in +`/var/lib/sparkring/controller/slots/0-1/` and `slots/2-3/` +(`active.json`, `transaction.json`); the whole ring's stay in +`/var/lib/sparkring/controller/`. diff --git a/docs/operations/install-models.md b/docs/operations/install-models.md new file mode 100644 index 00000000..177d4d5c --- /dev/null +++ b/docs/operations/install-models.md @@ -0,0 +1,1214 @@ +# Install SparkRing: models, profiles and runtime status + +Installing models, serving settings, thinking defaults, image and profile selection, status observations, and recovery when a model stops serving. + +Part of the [Install SparkRing reference](install-reference.md) · [Quick install](install.md) · [Commands](commands.md) + +## Install a model + +`sudo sparkring install --profile PROFILE` on Node A installs one installer +profile ([commands](install.md#install)) and ends with `Model ready:` and the +served model, Spark positions and recorded host names, and elapsed time. +The card lists the profile, TP size and transport, observed capacity when +available, the API, `Model status` and `Ring dashboard` addresses, the +`Thinking` mode, effective level and available levels, and a `Test it` request. `Start again` repeats +this installation's saved command. Suggested install commands repeat explicit +serving choices; inherited profile defaults remain defaults on the next install. +`Stop`, `Recovery` and `Uninstall` name the corresponding commands. See the +[API endpoint](#api-endpoint) and [dashboards](dashboard.md). +Without `--profile`, it lists the installer profiles for the +cabled node count and asks for one. + +### Questions and approvals + +First use lists everything setup will do and asks `Proceed? [Y/n]` (Enter +approves). That covers: + +- discovery, and trusting each cabled Spark's SSH host key on first contact + (setup prints the recorded fingerprints); +- package installation and the administration network; +- fabric addressing, including replacing incompatible fabric IPv4 settings + ([Setup and access](install-package.md#setup-and-access)); +- on four Sparks, the ConnectX driver restarts for the + [hairpin setting](install-fabrics.md#four-spark-rings); +- the first model installation, unless the checkpoint plan downloads more than + 1 GiB or a Spark's search stopped early or failed. Then it prints the plan + and asks `Proceed with this checkpoint plan? [y/N]`; answer `y`. Enter + cancels; setup stays complete and the same command asks again. + +Asked separately: each worker's SSH password when no key login exists, a +non-root worker account's sudo password (twice), and stopping any running GPU +container, which always needs its own answer or `--stop-workloads`. In a +terminal, a run without `--yes` and without the API options also asks, before +it searches the Sparks, which address the model's API listens on and which +port it uses ([API endpoint](#api-endpoint)); Enter keeps both. Setup +signs in to each Spark once; that Spark's inventory identifies its other +fabric functions and return paths. + +Before it asks, the plan prints a `Warning:` line for each check of the +[enhancement catalog](../../performance/enhancements.md) (`checks` in +`performance/enhancements.json`) that rank 0's rendered container meets, such +as MXFP8 or NVFP4 dense linears without `--linear-backend`, which run on a +slow default kernel. No catalog profile meets one; a warning names a changed +setting to review before approving. + +### What a run does + +It updates workers from Node A's package through a bundle of the package and +its dependencies. Each worker's copy in `/var/tmp` is removed once that +worker runs Node A's revision, and Node A's copy when the update ends. It +reuses cached images and weights, copies missing assets over verified fabric +paths, and prepares assets before stopping the running managed model; +preparation never creates, starts or stops a model container. If the switch fails, it attempts recovery from the +retained deployment and records the outcome. Before each model container +starts: + +- **GPU access.** Docker must give the container its GPU through the NVIDIA + CDI specification, `/var/run/cdi/nvidia.yaml`. Otherwise Docker falls back + to the NVIDIA runtime hook, and the next systemd reload on the host (snapd + performs them on its own) removes the container's GPU access; a starting + model then stops with NVML `Unknown Error`. Each Spark therefore enables + NVIDIA's `nvidia-cdi-refresh.service`, which DGX OS ships disabled, so the + specification is written at every boot, and starts it when the + specification is missing. + + If startup reports `Unit file nvidia-cdi-refresh.service does not exist`, + use the `Stopped: Node N: Start model` line to identify the failing rank + and match it to its Spark in the deployment. On that host, run + `nvidia-ctk --version` and + `systemctl show -p LoadState nvidia-cdi-refresh.service`. + `LoadState=not-found` means the unit is missing. Install or update the host + NVIDIA Container Toolkit to a release with automatic CDI refresh, which + NVIDIA introduced in Toolkit 1.18.0. Follow the + [NVIDIA CDI guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/cdi-support.html). + Before retrying, confirm that the unit reports `LoadState=loaded`, + `/var/run/cdi/nvidia.yaml` exists, and `nvidia-ctk cdi list` includes + `nvidia.com/gpu=all`. + +- **Memory.** A GB10's GPU allocates from the same memory as the CPU, so the + page cache that checkpoint reads and the previous model leave behind counts + against the free memory vLLM checks at startup (`--gpu-memory-utilization` + of the total). Before any container of the deployment starts, Node A has + every Spark of the deployment write back dirty pages and drop its page, + dentry and inode caches, then reads `MemAvailable` every 5 s until two + readings differ by less than 256 MiB on every Spark (at most 180 s) and + prints each Spark's available memory. When a Spark has less available + memory than vLLM asks for, the start is refused with each such Spark's + available memory, total and vLLM's share, and a switch recovers the + previous model. Then, immediately before its container starts, each Spark + drops its caches again and compacts free memory, so the model starts from + cleared memory and reads its weights from disk. Every installer profile + sets `--gpu-memory-utilization`; all but the DeepSeek-V4.1-Flash profiles + also fix the KV cache size with `--kv-cache-memory-bytes`, so the page + cache cannot shrink their KV pool, only stop their start. Before it waits, + the start is also refused when vLLM's share plus the pinned host memory of + a SparkCache connector (its capture slots and CUDA restore arenas, from the + connector settings) exceeds a Spark's total less 6 GiB for the system, as + `Not starting: the model's memory does not fit on HOST (vLLM's share 0.87 of + 121.69 GiB is 105.87 GiB, SparkCache pins 16.25 GiB, together 122.12 GiB, + above 115.69 GiB: ...)`. With caches dropped and no model running, a GB10 + Spark holds 5.0-5.3 GiB of its 121.69 GiB for the system. + +Once the model serves, the run releases what older deployments hold on the +Sparks ([automatic release](install-storage.md#automatic-release)). + +The installer does not manage the page cache while a model serves. Another +team's GB10 notes (not reproduced here) report that the page cache took +CUDA-visible memory one for one (a 37 GiB cache cost 47.4 GiB of CUDA memory) +and that they flush the cache periodically and set `vm.swappiness=10`. Both +are host settings that SparkRing neither applies nor has measured +(**unsupported**); a site that adopts them owns them, for example +`sudo sysctl -w vm.swappiness=10` (DGX OS default 60) and a timer that runs +`sync; echo 3 | sudo tee /proc/sys/vm/drop_caches`. + +### Running the command again + +- **Same package, model serving:** it keeps running. Serving means its + container runs on every Spark and every ring check passes (four Sparks) or + every fabric address is in RoCE GID index 3 (pair). +- **Model not serving**, for example after one Spark restarted: it stops the + model on every Spark and starts it again, because the Sparks that stayed up + keep a model waiting for the restarted one. +- **Package from another source revision**, even one differing only in + documentation or profile text: a separate deployment, because the + deployment lock and ID cover the source revision and the source bundle's + SHA-256, and its directory, workspace and container names derive from the + source revision. It is prepared, then replaces the running model, which + restarts the model. +- **Preparation failed or was interrupted** before the switch, for example by + a storage check, a download error or Ctrl-C: the same choices restart + preparation, re-verify what the earlier attempt left and continue an + unfinished checkpoint download. +- **Switch interrupted** while it stopped the running model or started the + selected one, for example because a Spark restarted: the same command + resumes the switch. Another profile or checkpoint replaces it instead: after + the GPU check, the installer stops the unfinished model through its own + deployment and switches from the last model that served. + `sudo sparkring install --cancel` settles it without installing anything + ([cancel an installation](commands.md#cancel-an-installation)). +- **Selected model's last start did not complete**, for example when a first + installation failed its readiness check or a restart of the installed model + failed: the same command first stops that model on every Spark, then + prepares and starts it again. The stop checks ownership labels and stops + only that model's containers, so another model that serves keeps serving + until the switch. A stop of the selected model that did not complete + finishes first; a stop action whose outcome is uncertain, for example one + that timed out, stops the command before any preparation until its receipt + and the Spark are inspected. +- **A file missing from, or changed in, SparkRing's own checkpoint + directory:** the run copies it from another Spark or downloads it again. + A copy you named with `--model-path` and that SparkRing serves in place is + never repaired; restore its files, or install without naming it. + +For any other operation, inspect an execution receipt that says `running` or +`uncertain`, and the host state, before recovery; do not delete receipts to +force a blind retry. + +### A start that does not become ready + +Once every Spark's model container runs, Node A waits for the API on Node 0 +(`Node 0: Wait for API readiness`). Node N is rank N. The start fails, and +the console prints the error after `Error:`, when: + +| Error | Cause | +|---|---| +| `API rank exited during startup` | Node 0's model container exited. | +| `API health check failed; inspect this rank's logs` | Node 0's container health check reported `unhealthy`. | +| `Readiness exceeded 30 minutes; inspect logs before restarting` | The API was not ready after 30 minutes. | +| `Rank N's model container on HOST stopped while rank 0 was loading (exit code CODE)` | Docker on Node N reports its model container stopped. | +| `Rank N's model container on HOST was removed while rank 0 was loading` | Docker on Node N has no model container. | + +During the wait, Node A asks every other Spark every 5 seconds whether its +model container runs, with the check that confirmed the container started. +Only Docker's answer counts: a check that cannot reach the Spark, takes +longer than 60 seconds or fails in any other way is repeated 5 seconds later, +and a Spark still loading the model answers that its container runs. A +stopped container on another Spark therefore fails the start within about 10 +seconds; Node 0's model itself notices a missing rank only when its +collective operations time out, about 11 minutes on two Sparks. + +- `install-details.log` (`sudo sparkring logs --details`) holds the last 5 + lines of the stopped container's log, above the error. +- Node 0's model container keeps running until the model is stopped or it + gives up on the missing rank. +- The start is recorded as incomplete, as for every error in the table. + +### RoCE GID index 3 + +Installer containers run NCCL on RoCE GID index 3 for every fabric function: +profiles set `NCCL_IB_GID_INDEX=3`. The installer image's RoCEnante transport +instead reads each HCA's index at startup and uses index 3 only for a device +whose GID table does not identify its fabric address +([GID index per port](../../integrations/vllm/rocenante_prepared/README.md#gid-index-per-port)). + +The index is not a fixed property of an address. When a link drops while a +model holds the address's GID entry, as on the Sparks cabled to one that +restarts, the address's RoCE v2 GID returns at another index, and a Spark's +ports facing the restarted Spark can differ from its other ports. Before a +pair's model starts, each Spark therefore re-adds a fabric address whose RoCE +GID has left index 3, as the [ring step](install-fabrics.md#the-rings-mesh) does on four +Sparks, because NCCL needs index 3 to hold the address's GID on every HCA. + +The pair's GID check and the ring step locate each address's RoCE v2 GID with +the resolver in +[`spark_roce_gid.py`](../../integrations/vllm/spark_roce_gid.py), which reads +the host's GID table. A failed pair check names the index the GID moved to, or +the RoCE v2 entries present when the address has none. To see the index on a +Spark: + +```bash +python3 /usr/lib/sparkring/integrations/vllm/spark_roce_gid.py DEVICE ADDRESS +``` + +Index 3 also needs exactly one IPv6 link-local address per fabric function, +derived from its hardware address. SparkRing's fabric connections use +NetworkManager's `ipv6.addr-gen-mode eui64`. A connection made by hand often +uses `default` or `stable-privacy`, which adds another link-local address and +moves the IPv4 GID to a higher index. Setup then stops, names the connection +and the fix: + +```bash +nmcli connection modify CONNECTION ipv6.addr-gen-mode eui64 +nmcli connection up CONNECTION +``` + +### Scripts and JSON + +For an LLM or a repeatable installation: + +```bash +sudo sparkring install --profile PROFILE --plan --json +sudo sparkring install --profile PROFILE --yes --json +sudo sparkring status --refresh --json +``` + +- `--json` writes one result to stdout; progress stays on stderr and in the + log. Exit codes: 0 success or plan, 3 missing input, 2 failure. +- `needs_input` names the required choice, such as profile, approval, storage + or checkpoint. `driver` means a four-Spark ConnectX driver restart cannot + run; its details list what to stop or what did not complete. +- `--yes` approves, without a terminal, model replacement, first-use setup + and, on an idle four-Spark ring, the ConnectX driver restarts. It does not + trust unknown SSH host keys or authorize stopping unrelated workloads. +- `--plan` lists a needed four-Spark ConnectX step as `apply-hairpin-setting`. +- A configured ring is inspected without changing links; review cable or + network changes separately with `sparkring setup`. +- With a [download limit](install-storage.md#limit-the-download-rate), the result holds it in + `download_limit_bps`, in bits per second. +- A `complete` result also holds the card's fields: `dashboard_url`, the + model's status page that the card prints as `Model status:` (null when the + image has no status page), `sparkring_dashboard_url`, the + [SparkRing dashboard](dashboard.md#every-model-on-one-page) on Node A that + the card prints as `Ring dashboard:` (null while its service is off), + `example_request` (a `curl` command for + `/v1/chat/completions` with the served model name) and `commands` with + `start_again` (this installation's saved checkpoint command), `switch_back` + (the previous deployment's command, retained for JSON readers), `stop` and + `remove`. `group.hostnames` follows `group.positions` in deployment order; + `elapsed_seconds` uses a monotonic clock from the start of installation. + `capacity`, when present, contains observed `context_length`, `kv_tokens` + and `max_requests` from the smoke receipt's start checks. Profiles without + these observations omit the values; profile defaults are not substituted. + KV token counts use one decimal below 10M and whole millions from 10M. +- With `--api-address`, `api_url`, `dashboard_url` and `example_request` use + that address, and `check_url` holds the URL that SparkRing's own checks use + ([API endpoint](#api-endpoint)). `serving` lists `api_port` and `api_bind` + with the other serving settings. +- `retention` reports [automatic release](install-storage.md#automatic-release): `state` is + `released`, `nothing`, `off` or `failed` (with `message`); a release lists + the `released` deployments, `freed_bytes` and each Spark's results, with + refusals in `errors`. +- `--events FILE` adds a line-by-line progress stream + ([Event stream](#event-stream)); the result on stdout stays the same. + +### Event stream + +`sudo sparkring install ... --events FILE` writes one JSON object per line to +`FILE` as the installation runs, replacing what `FILE` held. Stdout keeps its +single result and stderr its human progress, so the stream goes to its own +file. A reader follows it with `tail -f FILE`, or reads a named pipe made with +`mkfifo FILE`; the installation then waits until the reader opens the pipe. +The first event starts the run (`phase` `install`); the last carries its +result. + +| Field | Present | Meaning | +|---|---|---| +| `schema` | always | `sparkring-install-event/v1` | +| `time` | always | ISO 8601 time with UTC offset | +| `state` | always | `start`, `working` (every 30 s while a step runs), `done`, `failed` or `error` (a failure's message); in the last event, the result's `complete`, `planned`, `needs_input` or `failed` | +| `label` | always | The progress text, such as `Node 0: Wait for API readiness` | +| `node` | always | The Spark's node number, or null for work that is not one Spark's | +| `phase` | always | A step key, such as `install`, `ready`, `start` or `model-fetch`, or null | +| `elapsed_s` | steps | Seconds since the step started | +| `detail` | `working` | The text appended to the "Still working" line | +| `bytes_done`, `bytes_total`, `percent` | download | Bytes of the Hugging Face download in place so far and in total | +| `rate_bps`, `eta_s` | download | Recent rate in bits per second and seconds left, once bytes move | +| `log_quiet_s` | readiness | Seconds since the model's log last changed | +| `message` | `error`, result | The failure or question text | +| `field` | `needs_input` result | The input the installation needs | +| `api_url` | `complete` result | The model's API address | + +Fields may be added; readers ignore keys they do not know. + +### Logs + +Follow the installation from another terminal: + +```bash +sudo sparkring logs --follow +``` + +- Concise timestamped progress is appended to + `/var/log/sparkring/install.log`; long steps report that they are still + working every 30 seconds. +- A Hugging Face download adds its progress to that line, for example + `121 of 166 GiB, 850 Mb/s, about 7 min left`, measured from the bytes in its + staging directory on Node A. +- While Node 0 waits for the API, the line names the model's startup step from + the last 200 lines of its container log: `loading weights (shard 42/131)`, + `weights loaded`, `compiling kernels`, `tuning kernels`, + `setting up the KV cache`, `capturing CUDA graphs`, `warming up` or + `starting the API server`. Without a recognized line it names none. After 5 + minutes without a new log line it adds, for example, + `no new model log output for 6 min`. The wait ends after 30 minutes, or + sooner when a rank stops ([errors](#a-start-that-does-not-become-ready)). +- Verbose command output goes to `install-details.log`; + `sparkring logs --details --follow` shows it when investigating an error. +- Credentials entered through SSH are not recorded. +- Interactive terminals show colored results and a spinner; saved logs and + piped output stay plain. The follower's spinner means it awaits log lines, + not that the model is ready. The commands a message suggests, such as + `sudo sparkring fabric verify` in a `status` line, print in bold cyan on a + terminal; `install`, `setup`, `up`, `down`, `status`, `recover`, `check`, + `models`, `fabric` and `logs` accept `--color=auto|always|never`, which + overrides the `SPARKRING_COLOR` variable. `always` keeps the colour on a + non-terminal, for `watch -c sudo sparkring status --color=always`. +- `sparkring logs --plain` drops terminal decoration from the follower. For + `sparkring install` itself, set `NO_COLOR` through `sudo`, which does not + pass the caller's environment: `sudo env NO_COLOR=1 sparkring install ...`. +- `install.log` contains plain text without colour markers. `logs` and + `logs --follow` restore the card's command highlights on replay, including + `curl` and package removal only inside a `Model ready` card. `--plain`, + `--details`, automatic colour with `NO_COLOR`, and `--color=never` keep + replay plain. A pipe stays plain unless `--color=always` is selected. +- From Windows PowerShell: `ssh -t NODE_A "sudo sparkring logs --follow"` + (`NODE_A` is Node A's SSH address). + +## Serving image and profiles + +Without `--image`, every installer profile runs on one shared ARM64 serving +image, the image of release 2026.10.5, pinned by its +[installer image lock](../../runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/installer-image.json) +(`sparkring-installer-image/v3`): + +| Item | Identifier | +|---|---| +| Image | `ghcr.io/fujitsupolycom/sparkring@sha256:ac313f040fe3e04238ad8ff152cf7fb427a050f40e0848c2e326c5b6b8717dfd` | +| Tag | `dev-20261016-sparkcache-4a17f1f5198e-status038` | +| Configuration | `sha256:f625053225d4b57bfd7d0bb2e8348fea38e69472b10cef87c4701928abc7c4a8` | +| Parent image | Release 2026.10.4's `dev-20261013-dcp2prefill-status038-sircl-tp6`, configuration `sha256:3cc9a81fd344fe52fe9cc261b46dc051e3c3f494e51b8142846a5f854835c502`; its parent is release 2026.10.2's `dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036` | +| Transports | `sircl` (SIRCL 0.3.2, ABI 9), `prepared` and `libsircl` (libsircl 0.6.0) | +| vLLM build | `sparkring-kraken-bc9ea774-tp2-dcp2-prefill`, which reads the CSF checkpoints and admits GLM-5.3-Flash at TP2/DCP2 | +| vLLM plugins | `glm53full_speedups` 1.1.0, `glm_dcp_decode_comm` 2.0.1, `glm_dsa_indexer_split` 1.1.0 | +| Runtime-status dashboard | 0.3.8 | +| Size recorded in the lock | 15,283,745,437 bytes to download, 31,898,421,029 bytes unpacked | + +The image adds one layer to its parent: SparkCache for GLM-5.3-Flash, +Qwen3.8-Flash-Next and DeepSeek-V4.1-Flash, with the connector logging the +dashboard reads. Its parent added the TP2/DCP2 prefill admission, +runtime-status 0.3.7 and 0.3.8, and a SIRCL layer whose ring sessions admit +GLM-5.3 on six Sparks to release 2026.10.2's image. The +[release record](../../runtime/releases/dev-20261016-sparkcache-4a17f1f5198e-status038/README.md) states its layers, evidence and limitations. +`sparkring install` picks the newest published, unarchived v3 image that +carries SIRCL (`default_row` in +[image_lock.py](../../runtime/common/image_lock.py)); without one it falls +back to `installer_image.DEFAULT_LOCK`, release 2026.10.1's lock, which is +also the image of Compose exports. + +Release 2026.10.2's image, `dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036` (`--image 2026.10.2`), is the rollback +image. It carries the same transports and plugins, the vLLM build +`sparkring-kraken-beta-20261007-bc9ea774` and runtime-status 0.3.6, and +admits every profile of the default image except +`glm53-flash-nvfp4-spark-tp2-dcp2` and `glm53-nvfp4-csf-tp6` +([release record](../../runtime/releases/dev-20261010-kraken-csf-sircl032-libsircl060cd-plugins-status036/README.md)). + +Release 2026.10.1's image, `dev-20261004-kraken-cuda1342-nccl2323-status034` +(`--image 2026.10.1`), carries the prepared transport only. It adds two layers +to `eugr/spark-vllm-b12x` nightly-20261001: SparkRing's merges of Local +Inference Lab's Karmic Kraken beta vLLM and B12X branches (branches +`sparkring/kraken-beta-20261004`) with its transports, features and +runtime-status 0.3.4, then the CUDA 13.4.2 and NCCL 2.32.3 toolchain. The +[composition record](../../runtime/images/compositions/external-kraken-20261004/README.md) +lists the source commits and pinned inputs; the image's +[publication record](../../runtime/releases/dev-20261004-kraken-cuda1342-nccl2323-status034/publication.json) +describes both layers. The image of release 2026.10.0, +`dev-20261001-kraken-cuda1342-nccl2323-status034`, has the same base, +integration assets and toolchain, and the vLLM and B12X sources of branches +`sparkring/kraken-beta-20261001`; `--image 2026.10.0` selects it +([Another image](#another-image)). + +Installer image names read `dev-DATE-CHANGE-statusNNN`: + +| Part | Meaning | +|---|---| +| `dev` | SparkRing's development image series; a GitHub release tag such as `2026.10.1` publishes one | +| DATE | The day the image was composed | +| CHANGE | Where present, what the image adds over its parent, or its image line: `kraken` is the line built on Local Inference Lab's `karmic-kraken-beta` vLLM and B12X branches | +| `status034` | Runtime-status dashboard 0.3.4 | + +Images named before this form also carry their CUDA and NCCL releases after +CHANGE: `cuda1342` (or `cu1342`) is CUDA 13.4.2 and `nccl2323` is NCCL 2.32.3. +Newer names leave them out; the image lock's toolchain receipt records them. + +Older guides name Local Inference Lab's vLLM releases R33, R35 and R37 of its +Jovian Judgement line. `jovian-r33` is SparkRing's ARM64 rebuild of R33. LIL +abbreviates Local Inference Lab, as in the compositions `lil-r37-*` built on +R37 ([image names](../development/releases.md)). + +`sparkring models` lists exact model/version/quantization/topology profiles, +including guide-only ones with their guides, and marks only these as +installer-supported; family names such as `qwen` are ambiguous and rejected: + +| Profiles | Checkpoint | Speculative decoding | +|---|---|---| +| `qwen38-flash-next-tp2` | Qwen3.8-Flash-Next NVFP4-MXFP8 CSF QAD, revision `dc5b8ab2fa14`, on an image whose vLLM reads it, the default image among them; Qwen3.8 Flash Next NVFP4 QAD step 5500, revision `60215d26cf5e` (branch `qad-step5500-ple1000`), on every other image, 2026.10.1's among them | MTP, three tokens, probabilistic drafting | +| `qwen38-flash-next-qad-tp4` | Qwen3.8 Flash Next NVFP4 QAD step 5500, revision `60215d26cf5e` (branch `qad-step5500-ple1000`) | MTP, three tokens, probabilistic drafting | +| `glm53-flash-nvfp4-spark-tp2`, `glm53-flash-nvfp4-spark-tp4` | GLM-5.3-Flash NVFP4-MXFP8 CSF QAD, revision `dec48abd33ef`, on an image whose vLLM reads it, the default image among them; GLM-5.3-Flash NVFP4-Spark, revision `a608241037e4`, on every other image, 2026.10.1's among them | MTP, three tokens (MTP3) | +| `deepseek-v41-flash-sparkcache-tp4` | DeepSeek V4.1 TP4/DCP1 with SparkCache; Experimental (research-only), admitted by the default image, release 2026.10.5's; the [hardware gates](../../profiles/deepseek-v41-flash-sparkcache-tp4/HARDWARE.md) state what remains open; same checkpoints (`original`, `1017`) and API port 8015 as the cache-off profile | DSpark5 | +| `qwen38-flash-next-csf-sparkcache-tp2`, `qwen38-flash-next-step5500-sparkcache-tp4` | Qwen CSF TP2 and QAD step-5500 TP4 with SparkCache; Experimental (research-only), admitted by the default image, release 2026.10.5's; the [hardware plan](../research/qwen38-sparkcache.md) states the gates | MTP3 | +| `glm53-flash-nvfp4-sparkcache-crc32-tp2`, `glm53-flash-nvfp4-sparkcache-crc32-tp4` | GLM-5.3-Flash CSF TP2 and TP4 with SparkCache; Experimental (research-only), admitted by the default image, release 2026.10.5's | MTP3 | +| `glm53-flash-nvfp4-sparkcache-tp2`, `glm53-flash-nvfp4-sparkcache-tp4` | GLM-5.3-Flash NVFP4-MXFP8 CSF QAD, revision `dec48abd33ef`, with SparkCache persistent context; research-only, installs only on an image whose lock lists it (the derived layer of `runtime/images/compositions/installer-sparkcache-gab86b70`) | MTP, three tokens (MTP3) | +| `glm53-flash-nvfp4-spark-tp2-dcp2` | GLM-5.3-Flash NVFP4-MXFP8 CSF QAD, revision `dec48abd33ef`, with decode-context parallelism 2; research-only, installs only on an image whose lock lists it | MTP, three tokens (MTP3) | +| `mimo-v26-flash-mopd-tp2`, `mimo-v26-flash-mopd-tp4` | MiMo-V2.6-Flash-MOPD, revision `2479e2d0029e` | DFlash5 | +| `deepseek-v41-flash-tp4` | DeepSeek-V4.1-Flash, revision `dba1be0a40aa` | DSpark, five tokens, probabilistic drafting, adaptive verification | +| `swift15-qwen38-flash-next-tp2`, `swift15-qwen38-flash-next-tp4` | Swift 1.5 Qwen3.8-Flash-Next NVFP4, revision `3ff0520224f2` | MTP, three tokens, probabilistic drafting | +| `glm53-flash-csf-tp8` | GLM-5.3-Flash NVFP4-MXFP8 CSF QAD, revision `dec48abd33ef` | MTP, three tokens (MTP3) | +| `glm53-nvfp4-tp8` | GLM-5.3 NVFP4, revision `b472e4ee53f6` | MTP, two tokens, probabilistic drafting | +| `glm53-nvfp4-csf-tp8` | GLM-5.3 NVFP4-CSF, revision `a4d406932f2d`, served from its serving directory ([derived checkpoints](install-checkpoints.md#derived-checkpoints)) | MTP, two tokens, probabilistic drafting | +| `deepseek-v41-flash-tp8` | DeepSeek-V4.1-Flash, revision `dba1be0a40aa` | DSpark, five tokens, probabilistic drafting, adaptive verification | +| `qwen38-flash-next-qad-tp8` | Qwen3.8 Flash Next NVFP4 QAD step 5500, revision `60215d26cf5e` | MTP, three tokens, probabilistic drafting | + +- The table names each profile's default checkpoint. The Qwen profiles of + two and four Sparks and the GLM-5.3-Flash profiles of two and four Sparks + also install other checkpoints + ([Another checkpoint of a profile](install-checkpoints.md#another-checkpoint-of-a-profile)). +- The CSF checkpoints of GLM-5.3-Flash and Qwen3.8-Flash-Next need an image + whose vLLM is SIRCL's pinned build `sparkring-kraken-beta-20261007-bc9ea774`, + listed in the lock's `sircl.vllm_pins`, such as the default image of + release 2026.10.2 and the image that the + [`dev-20261007-kraken-csf-sircl-cuda1342-nccl2323-status034` recipe](../../runtime/releases/dev-20261007-kraken-csf-sircl-cuda1342-nccl2323-status034/README.md) + builds. On such an image the GLM-5.3-Flash profiles of two and four Sparks + and `qwen38-flash-next-tp2` install their CSF checkpoint without + `--checkpoint`; on every other image, 2026.10.1's among them, they install + NVFP4-Spark and Qwen step 5500. `glm53-flash-csf-tp8` serves only + the CSF checkpoint, and the installer refuses it on any other image. +- `glm53-flash-tp2` and `glm53-flash-tp4` are other names of + `glm53-flash-nvfp4-spark-tp2` and `glm53-flash-nvfp4-spark-tp4`, whose IDs + name the checkpoint they install where CSF cannot be read. + `qwen38-flash-next-tp4` and `qwen38-flash-next-tp8` are other names of + `qwen38-flash-next-qad-tp4` and `qwen38-flash-next-qad-tp8`, following the + two-Spark profile's ID `qwen38-flash-next-tp2`. `install --profile`, `up`, + `status`, `down` and `images --profile` accept these names; the + deployment, its records and its status keep the profile ID. +- `glm53-flash-nvfp4-sparkcache-tp2` and `glm53-flash-nvfp4-sparkcache-tp4` + are research-only SparkCache variants of the GLM-5.3-Flash profiles of two + and four Sparks. They serve only the CSF checkpoint and enable the + SparkContextCacheConnector against the lease contract of the derived layer + `runtime/images/compositions/installer-sparkcache-gab86b70`; no published + image lock lists them, so `sparkring install` refuses them on every image of + this package except an image whose lock that layer's record step wrote. They + keep no Compose export, and `sudo sparkring check` reports the connector's + state for a deployment that runs one. +- `glm53-flash-nvfp4-spark-tp2-dcp2` is a research-only variant of + `glm53-flash-nvfp4-spark-tp2` that serves the CSF checkpoint with + decode-context parallelism 2: the pair splits the KV cache, which holds + about twice the tokens of the same memory at decode-context parallelism 1 + ([guide](../../profiles/glm53-flash-nvfp4-spark-tp2-dcp2/README.md)). It + installs on an image whose lock lists it, such as the default image of + release 2026.10.5; `sparkring images --profile glm53-flash-nvfp4-spark-tp2-dcp2` + shows which, and `--image NAME` selects another. + That image's vLLM is the pinned TP2/DCP2 prefill build + `sparkring-kraken-bc9ea774-tp2-dcp2-prefill`, which reads CSF; the + installer refuses the profile on any other image. It keeps no Compose + export. `glm53-flash-tp2-dcp2` is its other name. +- `glm53-nvfp4-tp8` loads the vLLM plugins `glm_dsa_indexer_split`, + `glm53full_speedups` and `glm_dcp_decode_comm` (the last with its items + off), which the GLM-5.3 plugin layer + ([derive_glm53_plugins.py](../../runtime/images/derive_glm53_plugins.py)) + adds; it needs an image whose lock lists all three in `vllm_plugins`, and + the installer refuses it on any other image. +- `glm53-nvfp4-csf-tp8` keeps every setting of `glm53-nvfp4-tp8` and serves + the same weights from Local Inference Lab's NVFP4-CSF container + (`--quantization nvfp4_csf --load-format nvfp4_csf`, no `--hf-overrides`). + It needs both that image's plugins and the vLLM build that reads CSF, and + the plan states that its checkpoint is research-only. No image lock this + package carries lists it: it installs with `--image-lock FILE`, a lock + that lists it. +- Installer profiles run with vLLM's native prefix cache on. SparkCache is + enabled only by the explicitly named SparkCache variants. It keeps the + prefix KV cache on disk across restarts. +- The eight-Spark profiles (`-tp8`, research-only) run on every Spark of an + eight-Spark ring and only on SIRCL ring sessions. They install on an image + lock (`sparkring-installer-image/v3`) whose image carries the SIRCL layer + and lists them: the default image's, release 2026.10.5's, lists every one + except `qwen38-flash-next-qad-tp8` and `glm53-nvfp4-csf-tp8`; a + development lock is selected with `--image-lock FILE`. They are listed in the research catalog, + [research-catalog.json](../../profiles/research-catalog.json), outside every + Compose deployment's identity. They have no Compose files + ([Models on part of the fabric](install-fabrics.md#models-on-part-of-the-fabric)). +- Profiles that select other images, such as the `shared-2026.09.3` release, + keep their own guides; `sparkring install` does not install them. +- `--image NAME` runs a profile on another installer image this package + records ([Another image](#another-image)). `--image-lock FILE` replaces the + shared lock for a development rehearsal and must list the selected profile. + +### Another image + +`sparkring images` lists the installer images this package records, the +default first, with the GitHub release that published each and the profiles +each runs. `--image NAME` installs a profile on one of them: + +```bash +sudo sparkring install --profile qwen38-flash-next-tp2 --image statusrows +``` + +`NAME` is an image's full name +(`dev-20261001-statusrows-cuda1342-nccl2323-status034`), the release tag that +published it (`2026.10.0`), or a part of the name that only one image has +(`statusrows`, `portgid`). `sparkring images --profile PROFILE` lists only the +images that run that profile. + +- The image is part of the deployment: another image installs a separate + deployment, and the one it replaces becomes the rollback target, as with + another checkpoint. Running the command without `--image` returns to the + default image; naming the default image is the same as leaving `--image` + out. +- Each profile's measurements name the image they ran on. On an image other + than the default, each Spark checks before the model starts that the image + has what the profile needs, and the installation stops if it does not. +- A Spark downloads an image it does not hold; an image built on one the + Spark holds downloads only its added layers. Compile caches are kept per + image, so a profile's first start on an image compiles its kernels again. +- `sudo sparkring up PROFILE --image NAME` selects an image for a deployment + the same way. + +### Transport and receipts + +A deployment's collectives run on one of these transports: + +| Transport | Where it runs | NCCL | +|---|---|---| +| `sircl`, SIRCL ring sessions | An image whose lock lists `sircl` (image lock v3) on a fabric recorded by `sudo sparkring setup` whose relay table is installed | Off unless `--nccl auto` | +| `prepared`, shown as RoCEnante (b12x): b12x's RoCE all-reduce with SparkRing's adaptive peer paths | Every installer image | The profile's settings | +| `nccl`, vLLM's PyNccl alone | Any installer image, on a recorded fabric, on a group NCCL's cabling rule holds for: a cabled pair or a whole cycle; only with `--transport nccl` | Every collective; on a whole cycle with NCCL's ring settings | +| `libsircl`, vLLM's PyNccl on libsircl (research-only) | An image whose lock lists `libsircl`, on the same fabric as `sircl`; only with `--transport libsircl` | torch's own collectives only ([libsircl](../architecture/libsircl.md#installer-transport)) | + +Status: on `sircl`, SIRCL's one-shot all-reduce and all-gather are +**qualified** on the eight-Spark ring, and serving through vLLM is +**research-only**: every SIRCL serving record in the repository states that +it is not serving-qualified +([status table](../../spark_transport/sircl/STATUS.md#component-status)). +`libsircl` is research-only in every part. + +`sudo sparkring install` chooses `sircl` wherever it can run and says so +before it asks: `Transport: sircl on every collective, NCCL off (...)`, or +`Transport: RoCEnante (b12x), because ...` with the reason; RoCEnante (b12x) +is the `prepared` transport. `sparkring images` lists the transports each +image carries by identifier. + +- `--transport sircl` or `--transport prepared` chooses one. `sircl` stops + with the reason where it cannot run; nothing changes. +- `--transport nccl` runs every collective on vLLM's PyNccl with SIRCL and + the RoCEnante slot off. Each rank's `NCCL_IB_HCA` names the RDMA devices + of its own lanes from the fabric document; a group whose ranks reach each + other through relays, such as four Sparks of a ring of eight, is refused. + It writes no SIRCL receipts, so the transport verdict names the backend + only. +- `--transport libsircl` runs vLLM's PyNccl on libsircl, SIRCL's + NCCL-compatible C library, with SIRCL's adapter and RoCEnante off. It is + research-only and never the default; it runs on pairs, paths and whole + cycles of up to eight Sparks, without decode-context parallelism, on an + image whose libsircl has the fail-stop mode, and stops with the reason + elsewhere. The installer does not judge libsircl's + receipts, so the transport verdict is `unknown` + ([design](../architecture/libsircl.md)). +- `--image REF --transport libsircl --plan`, with a registry reference or + image ID as `REF`, plans a stock vLLM image with libsircl as its NCCL + instead of an installer profile. It checks every Spark read-only and + writes each rank's Compose file; SparkRing does not start or manage that + deployment ([stock-image option](../architecture/libsircl.md#stock-image-option)). +- `--nccl auto` lets NCCL carry the collectives the cabling allows: every + collective on a pair, NCCL's ring algorithm on a whole cycle, none across + relays. `--nccl never` is the default; `topology` is another name for + `auto`. `--nccl` applies to SIRCL deployments only. The plan states the + rule: `NCCL: opt-in only (auto); tables choose among SIRCL options`. +- The transport, the NCCL setting, the fabric and the tuning table are part + of the deployment, so another choice installs a separate deployment. A + deployment made on another fabric does not start; `sudo sparkring install` + makes one on the recorded fabric. + +SIRCL's settings come from a tuning table that chooses only among SIRCL's own +algorithms, schedules, pieces and launch grids. The package carries a default +table, [sircl-tuning-defaults.json](../../runtime/common/sircl-tuning-defaults.json) +(`sparkring-sircl-tuning/v1`), with one row per group shape: `pair`, +`path-4`, `cycle-4`, `cycle-8`, and `path` and `cycle` for other sizes. A row is +`measured`; `design`, settings from the SIRCL install design that no +measurement has confirmed; or `rules`, where SIRCL's sessions derive their own +settings. A row may also state its evidence. The shipped rows are the accepted +defaults until `sudo sparkring fabric tune` measures a fabric; a group size +without a row of its own, such as a cycle of six, runs on SIRCL's own rules +through the `path` or `cycle` row. The `cycle-4` row names a measured SIRCL +table (`runtime/common/sircl-tuning/cycle-4.json`): per collective, per-rank +size and mode, the algorithm, schedule, piece and launch grid that SIRCL's ring +harness measured fastest on two separate cycles of four Sparks, each candidate +judged by the slower cycle, with 8 link slots of 1 MiB; the row adds no setting +of its own ([record](../../performance/records/transport/sircl-cycle4-tune-two-rings-20261009.md)). +Sessions of SIRCL 0.3.2 take the table; sessions of the compatible 0.3.1 take +the row, whose rules then choose. The `pair` and `path-4` rows hold the ring schedules with which +the two- and four-Spark profiles were measured on pairs and paths of four Sparks +of a ring of eight: ring all-reduces, all-gathers and reduce-scatters above a +64 KiB one-shot limit, with 1 MiB link pieces and slot +([record](../../performance/records/images/dev-20261008-kraken-csf-sircl-libsircl-tp2-tp4-matrix-20261009.md)). +The `cycle-8` row holds the settings with which GLM-5.3 served at TP8 with NCCL +off on an eight-Spark ring: a 1 MiB all-reduce capacity and dispatch ceiling, a +28 KiB one-shot limit and 16 link slots of 512 KiB. A table that names +a measured SIRCL tuning table (`sircl-tuning-table/v1`) for a group mounts it +for that group's sessions, and each session's setup agreement carries its +hash, so every rank decides from the same table. With decode-context +parallelism, the sessions of the decode-context-parallel groups take the +table measured for groups of their size, such as `path-4` for the groups of +four in an eight-Spark ring. A SIRCL table records the +session settings its choices ran under (link slots, link slot, chain slot and +large-message piece); the session applies those the row leaves unset, and a +row that sets fewer link slots or a smaller link slot than the table's is +refused. The row's settings reach the tensor-parallel session only. A table's marks of where NCCL measured faster never route a call to +NCCL. Without a table or a row setting, a session takes twice its ranks in link +slots, at least 8. + +A table's rows apply only to sessions of the SIRCL builds it names (`sircl`: +version and ABI). The default table names SIRCL 0.3.2, the version of +`spark_transport/sircl`, and lists SIRCL 0.3.1 under `compatible`, with the +recorded reason: 0.3.2 changes no kernel, schedule, op or launch grid that a +row's settings choose. Sessions of either build, including those of image +`27e9f75c0d09` (SIRCL 0.3.1), take the default rows. On an image whose SIRCL +layer is another version, such as 0.3.0, no default row applies, the sessions +derive their own settings, and the plan says `the default table is for +another SIRCL build`. A measured table names only the build it was measured +with. + +A profile's environment pins at most SIRCL's fused-norm and column-gather +switches (`SIRCL_FUSED_NORM`, `SIRCL_COLUMN_GATHER`); the installer refuses +any other `SIRCL_*` variable in a profile, so session sizes and schedules come +only from the tuning table. The `nccl` and `libsircl` transports drop the +profile's switches, and the prepared transport reads none of them. + +`sudo sparkring fabric tune` measures this fabric and writes +`/var/lib/sparkring/controller/sircl-tuning.json` +([measure the tuning table](install-fabrics.md#measure-the-tuning-table)). While its fabric, +image and drivers hold, it replaces the default table and the installation +says so: `Transport: sircl on every collective, NCCL off (measured on this +fabric DATE, cycle-4)`. When they no longer hold, the installation names the +change in a `Note:` line and uses the default table. + +After the model answers, the installation reads every rank's SIRCL receipts +and the NCCL lines of its model log and judges them: + +- each rank's tensor-parallel group is ready and ran all-reduces on SIRCL; +- with NCCL off, no group built PyNccl or sent a collective to NCCL, and no + log shows an NCCL communicator (the containers log NCCL's initialization for + this check); +- with decode-context parallelism, every rank also has a + decode-context-parallel group with a SIRCL session; +- the sessions decided from the tuning table the deployment recorded, and + report the link slots, link slot, chain slot and large-message piece that + the row or, where it sets none, the table sets; +- each receipt names the deployment's NCCL mode. + +The summary card's `Transport:` line shows the verdict, for example +`sircl, NCCL: absent`. A differing verdict is reported; the model keeps +serving. The receipts and the verdict are kept in the deployment's directory +on Node A under `receipts/