Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
# Kimi-K3 B300 disaggregated, agentic coding.
#
# Mirrors the 1P3D/c32 point from PR 2814, adapted for AWS EFA. NIXL carries
# P-to-D GPU KV traffic through its LIBFABRIC backend. The ordinary CUDA
# allocator and DMA-BUF are required because cuMem/VMM-backed KV buffers fail
# EFA reads with EINVAL on this stack.
#
# Mooncake is intentionally instantiated only by the prefill worker. Its large
# host store uses TCP locally and is not registered with EFA; decode workers use
# NIXL only and therefore contribute no CPU memory to the Mooncake pool.

name: kimi-k3-vllm-disagg-b300-1p3d-dcp8-dcp8-dspark4-mooncake-c32-agentic
model:
path: moonshotai/Kimi-K3
container: vllm/vllm-openai:nightly-dev-x86_64-cu13-3696c77
precision: fp4
dynamo:
hash: ba83080ecd31c1ce918559e576d3c5bc9e092ff1
install: true
health_check:
max_attempts: 720
interval_seconds: 10
resources:
gpu_type: b300
gpus_per_node: 8
prefill_nodes: 1
decode_nodes: 3
prefill_workers: 1
decode_workers: 3
gpus_per_prefill: 8
gpus_per_decode: 8
infra:
etcd_nats_dedicated_node: false
nats_max_payload_mb: 32
frontend:
type: dynamo
enable_multiple_frontends: false
args:
router-mode: least-loaded
router-session-affinity-ttl-secs: 900
env:
DYN_ROUTER_ACTIVE_REQUEST_EXPIRY_SECS: '3600'
DYN_TOKENIZER_CACHE_BYTES: '8589934592'
PYTHONPYCACHEPREFIX: /tmp/vllm-pycache-kimi-k3
backend:
type: vllm
connector: null
dp_launch_mode: per_node
kv_events_config:
prefill: true
mooncake_kv_store:
master_extra_args:
- --default_kv_lease_ttl=60000
- --eviction_high_watermark_ratio=0.95
- --eviction_ratio=0.10
store_config:
metadata_server: P2PHANDSHAKE
global_segment_size: 281GB
local_buffer_size: 4GB
protocol: tcp
device_name: ''
mode: embedded
enable_offload: false
prefill_environment:
VLLM_USE_DIRECT_DCP_A2A: '1'
VLLM_USE_DIRECT_DCP_Q_GATHER: '1'
VLLM_USE_DIRECT_DCP_KV_GATHER: '1'
VLLM_ALLREDUCE_USE_FLASHINFER: '1'
VLLM_KIMI_K3_SHARD_SP_SHARED_EXPERT: '0'
DYN_REQUEST_PLANE: tcp
ETCD_LEASE_TTL: '600'
VLLM_ENGINE_READY_TIMEOUT_S: '3600'
VLLM_RPC_TIMEOUT: '600000'
TILELANG_CLEANUP_TEMP_FILES: '1'
VLLM_USE_NCCL_SYMM_MEM: '0'
NCCL_CUMEM_ENABLE: '1'
NCCL_MNNVL_ENABLE: '0'
NCCL_NVLS_ENABLE: '1'
VLLM_SERVER_DEV_MODE: '1'
VLLM_USE_V2_MODEL_RUNNER: '1'
VLLM_USE_RUST_FRONTEND: '1'
VLLM_MOONCAKE_LOAD_RECV_THREADS: '4'
MC_SLICE_SIZE: '1048576'
VLLM_CONNECTOR_PREFETCH_DEPTH: '8'
VLLM_CONNECTOR_PREFETCH_KV_CAP: '0.65'
VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS: '1800'
VLLM_PREFIX_CACHE_RETENTION_INTERVAL: '0'
NCCL_P2P_LEVEL: NVL
MC_ENABLE_DEST_DEVICE_AFFINITY: '1'
WITH_NVIDIA_PEERMEM: '0'
NCCL_NET_PLUGIN: none
UCX_MEMTYPE_CACHE: n
UCX_MEMTYPE_REG_WHOLE: n
UCX_RCACHE_MAX_UNRELEASED: '1024'
UCX_TCP_AF_PRIO: inet
FI_PROVIDER: efa
FI_EFA_USE_DEVICE_RDMA: '1'
FI_EFA_ENABLE_SHM_TRANSFER: '0'
FI_EFA_ENABLE_SHM: '0'
FI_EFA_USE_HUGE_PAGE: '0'
FI_HMEM: cuda
FI_HMEM_CUDA_ENABLE_XFER: '1'
FI_HMEM_CUDA_USE_DMABUF: '1'
VLLM_SSM_CONV_STATE_LAYOUT: DS
DG_JIT_CACHE_DIR: /tmp/dg-cache-kimi-k3-gb300-pd-dspark-mooncake-{job_id}
PYTHONHASHSEED: '42'
PYTHONNOUSERSITE: '1'
PYTHONUNBUFFERED: '1'
PYTHONPATH: /nixl_overlay/lib/python3/dist-packages
LD_LIBRARY_PATH: /nixl_overlay/lib/x86_64-linux-gnu:/opt/amazon/efa/lib:/opt/amazon/efa/lib64:/efa_system_libs:/efa_system_libs/libibverbs:/usr/local/cuda/lib64:/usr/local/nvidia/lib64
IBV_DRIVERS_PATH: /efa_system_libs/libibverbs
NIXL_PLUGIN_DIR: /nixl_overlay/lib/x86_64-linux-gnu/plugins
TORCH_CUDA_ARCH_LIST: '10.0'
MC_STORE_CLIENT_METRIC: '1'
MC_STORE_CLIENT_METRIC_INTERVAL: '5'
MC_TE_METRIC: '0'
decode_environment:
VLLM_USE_DIRECT_DCP_A2A: '1'
VLLM_USE_DIRECT_DCP_Q_GATHER: '1'
VLLM_USE_DIRECT_DCP_KV_GATHER: '1'
VLLM_ALLREDUCE_USE_FLASHINFER: '1'
VLLM_KIMI_K3_SHARD_SP_SHARED_EXPERT: '0'
DYN_REQUEST_PLANE: tcp
ETCD_LEASE_TTL: '600'
VLLM_ENGINE_READY_TIMEOUT_S: '3600'
VLLM_RPC_TIMEOUT: '600000'
TILELANG_CLEANUP_TEMP_FILES: '1'
VLLM_USE_NCCL_SYMM_MEM: '0'
NCCL_CUMEM_ENABLE: '1'
NCCL_MNNVL_ENABLE: '0'
NCCL_NVLS_ENABLE: '1'
VLLM_SERVER_DEV_MODE: '1'
VLLM_USE_V2_MODEL_RUNNER: '1'
VLLM_USE_RUST_FRONTEND: '1'
VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS: '1800'
VLLM_PREFIX_CACHE_RETENTION_INTERVAL: '0'
NCCL_P2P_LEVEL: NVL
WITH_NVIDIA_PEERMEM: '0'
NCCL_NET_PLUGIN: none
UCX_MEMTYPE_CACHE: n
UCX_MEMTYPE_REG_WHOLE: n
UCX_RCACHE_MAX_UNRELEASED: '1024'
UCX_TCP_AF_PRIO: inet
FI_PROVIDER: efa
FI_EFA_USE_DEVICE_RDMA: '1'
FI_EFA_ENABLE_SHM_TRANSFER: '0'
FI_EFA_ENABLE_SHM: '0'
FI_EFA_USE_HUGE_PAGE: '0'
FI_HMEM: cuda
FI_HMEM_CUDA_ENABLE_XFER: '1'
FI_HMEM_CUDA_USE_DMABUF: '1'
VLLM_SSM_CONV_STATE_LAYOUT: DS
DG_JIT_CACHE_DIR: /tmp/dg-cache-kimi-k3-gb300-pd-dspark-mooncake-{job_id}
PYTHONHASHSEED: '42'
PYTHONNOUSERSITE: '1'
PYTHONUNBUFFERED: '1'
PYTHONPATH: /nixl_overlay/lib/python3/dist-packages
LD_LIBRARY_PATH: /nixl_overlay/lib/x86_64-linux-gnu:/opt/amazon/efa/lib:/opt/amazon/efa/lib64:/efa_system_libs:/efa_system_libs/libibverbs:/usr/local/cuda/lib64:/usr/local/nvidia/lib64
IBV_DRIVERS_PATH: /efa_system_libs/libibverbs
NIXL_PLUGIN_DIR: /nixl_overlay/lib/x86_64-linux-gnu/plugins
TORCH_CUDA_ARCH_LIST: '10.0'
vllm_config:
prefill:
kv-transfer-config: '{"kv_connector":"MultiConnector","kv_role":"kv_both","kv_load_failure_policy":"recompute","kv_connector_extra_config":{"connectors":[{"kv_connector":"NixlConnector","kv_role":"kv_both","kv_load_failure_policy":"fail","kv_buffer_device":"cuda","kv_connector_extra_config":{"backends":["LIBFABRIC"],"enforce_handshake_compat":false,"enable_cross_layers_blocks":false}},{"kv_connector":"MooncakeStoreConnector","kv_role":"kv_both","kv_load_failure_policy":"recompute","kv_connector_extra_config":{"load_async":true,"lookup_async":true,"compact_group_io":true,"max_load_batch_keys":2,"enable_cross_layers_blocks":false,"enable_offload":false}}]}}'
served-model-name: moonshotai/Kimi-K3
prefix-match-unit: 128
load-format: fastsafetensors
kv-cache-dtype: fp8
gpu-memory-utilization: 0.94
tensor-parallel-size: 8
decode-context-parallel-size: 8
dcp-comm-backend: a2a
enable-cumem-allocator: false
trust-remote-code: true
max-cudagraph-capture-size: 512
stream-interval: 10
language-model-only: true
attention-backend: TOKENSPEED_MLA
attention-config: '{"mla_prefill_backend": "TRTLLM_RAGGED", "use_prefill_query_quantization": true}'
speculative-config: '{"model":"Inferact/Kimi-K3-DSpark","attention_backend":"TOKENSPEED_MLA","method":"dspark","num_speculative_tokens":4,"rejection_sample_method":"block","draft_sample_method":"probabilistic"}'
enable-prefix-caching: true
decode:
kv-transfer-config: '{"kv_connector":"NixlConnector","kv_role":"kv_both","kv_load_failure_policy":"fail","kv_buffer_device":"cuda","kv_connector_extra_config":{"backends":["LIBFABRIC"],"enforce_handshake_compat":false,"enable_cross_layers_blocks":false}}'
served-model-name: moonshotai/Kimi-K3
prefix-match-unit: 128
load-format: fastsafetensors
kv-cache-dtype: fp8
gpu-memory-utilization: 0.94
tensor-parallel-size: 8
decode-context-parallel-size: 8
dcp-comm-backend: a2a
enable-cumem-allocator: false
trust-remote-code: true
max-cudagraph-capture-size: 512
stream-interval: 10
language-model-only: true
attention-backend: TOKENSPEED_MLA
attention-config: '{"mla_prefill_backend": "TRTLLM_RAGGED", "use_prefill_query_quantization": true}'
speculative-config: '{"model":"Inferact/Kimi-K3-DSpark","attention_backend":"TOKENSPEED_MLA","method":"dspark","num_speculative_tokens":4,"rejection_sample_method":"block","draft_sample_method":"probabilistic"}'
enable-prefix-caching: true
sbatch_directives:
cpus-per-task: '72'
mem: '0'
comment: '''{"OccupiedIdleGPUsJobReaper":{"exemptIdleTimeMins":"60","reason":"model_loading","description":"Very large model will take extra loading time."}}'''
srun_options:
mem: '0'
container-remap-root: ''
benchmark:
type: custom
command: bash /infmax-workspace/benchmarks/multi_node/agentic_srt.sh
env:
INFMAX_CONTAINER_WORKSPACE: /infmax-workspace
RESULT_DIR: /logs/agentic
PORT: '8000'
IS_MULTINODE: 'true'
AIPERF_USE_DYNAMO_CONV_AWARE_ROUTING: '0'
AIPERF_HTTP_X_DYNAMO_SESSION_ID_FROM_CORRELATION_ID: 'true'
AIPERF_DYNAMO_SESSION_TIMEOUT_SECONDS: '14400'
AIPERF_DATASET_MMAP_CACHE_DIR: /aiperf_mmap_cache
HF_HUB_CACHE: /hf_hub_cache
WEKA_LOADER_OVERRIDE: semianalysis_cc_traces_weka_062126
identity:
model:
repo: moonshotai/Kimi-K3
container:
image: vllm/vllm-openai:nightly-dev-x86_64-cu13-3696c77
frameworks:
dynamo: ba83080ecd31c1ce918559e576d3c5bc9e092ff1
33 changes: 33 additions & 0 deletions configs/nvidia-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9772,6 +9772,39 @@ kimik3-fp4-gb300-dynamo-vllm-agentic-mooncake-dcp8-agg:
additional-settings:
- "CONFIG_FILE=recipes/vllm/kimi-k3/agentic/agg-gb300-dcp8-nospec-mooncake-agentic.yaml"

# Kimi-K3 1P3D AgentX point from PR 2814, adapted to the B300 DSXE EFA
# fabric. Decode workers use NIXL only; Mooncake host storage is prefill-only.
kimik3-fp4-b300-dynamo-vllm-agentic-dspark-mooncake-dcp8-disagg-1p3d-efa-prefill-store:
image: vllm/vllm-openai:nightly-dev-x86_64-cu13-3696c77
model: moonshotai/Kimi-K3
model-prefix: kimik3
runner: cluster:b300-dsxe
precision: fp4
framework: dynamo-vllm
router: { name: dynamo-router, version: "ba83080ecd31c1ce918559e576d3c5bc9e092ff1" }
kv-p2p-transfer: nixl
multinode: true
disagg: true
scenarios:
agentic-coding:
- dram-utilization: 0.75
search-space:
- spec-decoding: mtp
kv-offloading: dram
kv-offload-backend: { name: mooncake, version: "0.3.11.post1" }
conc-list: [32]
prefill:
num-worker: 1
tp: 8
dcp-size: 8
ep: 1
dp-attn: false
additional-settings:
- "SYNTHETIC_ACCEPTANCE=true"
- "SYNTHETIC_ACCEPTANCE_LENGTH=3.36"
- "CONFIG_FILE=recipes/vllm/kimi-k3/agentic/disagg-b300-1p3d-dcp8-dcp8-dspark4-mooncake-c32-agentic.yaml"
decode: { num-worker: 3, tp: 8, dcp-size: 8, ep: 1, dp-attn: false }


# Kimi-K3 MXFP4 B200 aggregated vLLM (TP8 x PP2, 2 nodes / 16 GPUs), agentic
# coding. The native MXFP4 checkpoint (2.8T total params, ~1.4TB weights) does
Expand Down
9 changes: 9 additions & 0 deletions perf-changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6902,3 +6902,12 @@
- "Lower mem-fraction-static from 0.89 to 0.86 on every arm: TP4, TP8 and TP8 with DP attention. swa-full-tokens-ratio becomes per-arm: 0.10 on the tensor-parallel arms as before, 0.15 under DP attention."
- "Drop concurrency 2 and 10 from the TP4 arm, leaving [1, 4, 8], and drop concurrency 16 from the TP8 hicache arm, leaving [32, 48]. Concurrency 16 remains on the TP8 no-offload arm."
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2800

- config-keys:
- kimik3-fp4-b300-dynamo-vllm-agentic-dspark-mooncake-dcp8-disagg-1p3d-efa-prefill-store
scenario-type:
- agentic-coding
description:
- "Add the Kimi-K3 B300 1P3D AgentX configuration from PR 2814 with NIXL LIBFABRIC transfers over AWS EFA."
- "Disable vLLM cuMem KV allocation, use DMA-BUF for EFA, and keep the Mooncake host-memory pool on prefill only."
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2848
25 changes: 21 additions & 4 deletions runners/launch_b300-dsxe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,17 @@ NGINX_SQUASH_FILE="$SQUASH_DIR/$(echo "$NGINX_IMAGE" | sed 's/[\/:@#]/_/g').sqsh
import_squash_image "$IMAGE" "$SQUASH_FILE"
import_squash_image "$NGINX_IMAGE" "$NGINX_SQUASH_FILE"

# The Kimi-K3 EFA recipe uses NIXL's optional LIBFABRIC backend, which is not
# present in its pinned vLLM image. Build a version-matched overlay once and
# share it across runs and compute nodes.
USES_EFA_NIXL=0
if [[ -n "${_RECIPE_SRC:-}" ]] && grep -q '"LIBFABRIC"' "$_RECIPE_SRC"; then
USES_EFA_NIXL=1
EFA_NIXL_CACHE_ROOT="${B300_EFA_NIXL_CACHE_ROOT:-/data/home/sa-gha-runner/efa-nixl-1.3.2-efa-1.47.0}"
"$GITHUB_WORKSPACE/runners/setup_b300_efa_nixl.sh" \
"$SQUASH_FILE" "$EFA_NIXL_CACHE_ROOT" "$SLURM_ACCOUNT" "$SLURM_PARTITION"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overlay setup failure is ignored

High Severity

The new EFA/NIXL overlay setup is invoked without checking its exit status, and this launcher never enables set -e. A failed first-time build still leaves USES_EFA_NIXL=1 and continues into srtctl apply, so the job mounts an incomplete overlay and a 4-node B300 allocation starts without the LIBFABRIC backend it needs.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ce0e5b7. Configure here.

Comment on lines +212 to +216

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 The new call to setup_b300_efa_nixl.sh has no || exit 1, unlike every other build/import step in this file (import_squash_image, patch_srt_eval_dispatch.py, inject_synthetic_acceptance.py). Since the script has no global set -e, a failed EFA/NIXL overlay build (apt-get, EFA installer, or meson build failure) is silently ignored, USES_EFA_NIXL stays 1, and the job launches with a broken/empty overlay mounted at /nixl_overlay, failing deep inside the multi-node SLURM job instead of at build time. Fix: append || exit 1 to the setup_b300_efa_nixl.sh invocation so build failures abort the launcher immediately, matching the other invocations in this file.

Extended reasoning...

setup_b300_efa_nixl.sh runs set -euo pipefail and will exit non-zero if e.g. the EFA installer or the srun container job fails (network hiccup, apt-get transient failure, meson compile error). Because the call site at lines 213-216 lacks || exit 1 and the file has no top-level set -e (only set -x/set +x for tracing and a set -euo pipefail inside an unrelated nested subshell at line 98), the launcher proceeds past the failed call with USES_EFA_NIXL=1. It then writes default_mounts pointing at $EFA_NIXL_CACHE_ROOT/{nixl,efa,efa-system-libs}, which may be empty or partially populated, and submits the multi-node job, which fails later inside the SLURM allocation (NIXL LIBFABRIC plugin missing) instead of failing fast in the launcher with a clear error.

Verification: normal. The setup_b300_efa_nixl.sh call at runners/launch_b300-dsxe.sh:215-216 has no || exit 1 and the launcher has no top-level set -e (grep of the file shows only set -x at line 70, set +x/set -x at 316/356, and a set -euo pipefail at line 98 that is inside the srun ... bash -c "..." heredoc string of import_squash_image, not the launcher itself). So a non-zero exit from…

fi

if [[ "$USES_DCGM_POWER" == "1" ]]; then
DCGM_EXPORTER_IMAGE="nvcr.io/nvidia/k8s/dcgm-exporter:4.6.0-4.8.3-distroless"
# enroot resolves bare paths against Docker Hub; nvcr.io pulls need the registry# form
Expand Down Expand Up @@ -247,6 +258,14 @@ EOF
if [[ "$USES_DCGM_POWER" == "1" ]]; then
printf ' dcgm-exporter: "%s"\n' "$DCGM_EXPORTER_SQSH"
fi
if [[ "$USES_EFA_NIXL" == "1" ]]; then
cat <<EOF
default_mounts:
"${EFA_NIXL_CACHE_ROOT}/nixl": /nixl_overlay
"${EFA_NIXL_CACHE_ROOT}/efa": /opt/amazon/efa
"${EFA_NIXL_CACHE_ROOT}/efa-system-libs": /efa_system_libs
EOF
fi
echo "use_exclusive_sbatch_directive: true"
} > srtslurm.yaml

Expand Down Expand Up @@ -277,10 +296,8 @@ fi

# Override the job name in the recipe with the runner name.
sed -i "s/^name:.*/name: \"${RUNNER_NAME}\"/" "$CONFIG_PATH"
if [[ "${EVAL_ONLY:-false}" == "true" ]]; then
python3 "$GITHUB_WORKSPACE/runners/inject_synthetic_acceptance.py" \
"$CONFIG_PATH" "$FRAMEWORK" || exit 1
fi
python3 "$GITHUB_WORKSPACE/runners/inject_synthetic_acceptance.py" \
"$CONFIG_PATH" "$FRAMEWORK" || exit 1

# Weights live on node-local MODEL_ROOT, which this login host cannot stat, so
# srtctl's preflight model.path check is always skipped. Runtime loading still
Expand Down
Loading
Loading