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,339 @@
schema: 2

base:
name: kimik3.1-fp4-gb300-llmd-vllm-agentx-disagg-dep16
identity:
model: {}
container: {}
frameworks:
vllm: "0.23.1rc1.dev7347+gc92eaa62c"

dynamo:
install: false

environment:
HF_HUB_CACHE: /hf_hub_cache

slurm:
time_limit: "04:00:00"

health_check:
max_attempts: 720
interval_seconds: 10

resources:
gpu_type: "gb300"
gpus_per_node: 4

services:
- name: mooncake-master
type: mooncake-master
args:
- "--default_kv_lease_ttl=60000"
- "--eviction_high_watermark_ratio=0.95"
- "--eviction_ratio=0.10"
options:
store_config:
metadata_server: "P2PHANDSHAKE"
global_segment_size: "160GB"
local_buffer_size: "4GB"
protocol: "rdma"
device_name: "@fabric.rdma-devices"
mode: "embedded"
enable_offload: false
- name: llm-d-sidecar
type: llm-d-sidecar
placement:
node: decode
per: worker
args:
- "--zap-log-level=1"
- "--max-idle-conns-per-host=1024"
env:
OTEL_SDK_DISABLED: "true"
GOGC: "400"
GOMEMLIMIT: "6GiB"

frontend:
type: llm-d
enable_multiple_frontends: false
container_image: "ghcr.io/llm-d/llm-d-router-consolidated:v1.0.0@sha256:644be0359dfb462527b7cb9a4e535b42fe8cc900ed382bd62bc06d6ba26a1810"
env:
GOGC: "400"
GOMEMLIMIT: "20GiB"
args:
v: 1
allow-experimental-plugins: true
grpc-max-recv-msg-size: "32MiB"
grpc-max-send-msg-size: "32MiB"
tracing: false
metrics-endpoint-auth: false
epp_config:
plugins:
- type: metrics-data-source
parameters:
scheme: http
path: /metrics
insecureSkipVerify: true
- type: core-metrics-extractor
parameters:
engineConfigs:
- name: vllm
queuedRequestsSpec: "vllm:num_requests_waiting"
runningRequestsSpec: "vllm:num_requests_running"
kvUsageSpec: "vllm:kv_cache_usage_perc"
loraSpec: ""
cacheInfoSpec: ""
- type: always-disagg-pd-decider
- type: disagg-profile-handler
parameters:
deciders:
prefill: always-disagg-pd-decider
- type: prefill-filter
- type: decode-filter
- type: inflight-load-producer
parameters:
addEstimatedOutputTokens: false
syncCrossReplicaState: false
- type: session-affinity-scorer
parameters:
profileName: prefill
strategy: session_id
sessionIdConfig:
sources:
- header: x-session-id
evictionTtlSeconds: 1
evictionSweepSeconds: 1
- type: active-request-scorer
parameters:
idleThreshold: 0
inFlightLoadProducerName: inflight-load-producer
- type: queue-scorer
- type: kv-cache-utilization-scorer
- type: max-score-picker
- type: utilization-detector
parameters:
queueDepthThreshold: 100000
kvCacheUtilThreshold: 1.0
headroom: 1.0
metricsStalenessThreshold: "3600s"
dataLayer:
injectDefaults: false
sources:
- pluginRef: metrics-data-source
extractors:
- pluginRef: core-metrics-extractor
schedulingProfiles:
- name: prefill
plugins:
- pluginRef: prefill-filter
- pluginRef: utilization-detector
- pluginRef: active-request-scorer
weight: 16
- pluginRef: queue-scorer
weight: 8
- pluginRef: session-affinity-scorer
weight: 4
- pluginRef: max-score-picker
- name: decode
plugins:
- pluginRef: decode-filter
- pluginRef: utilization-detector
- pluginRef: active-request-scorer
weight: 5
- pluginRef: queue-scorer
weight: 3
- pluginRef: kv-cache-utilization-scorer
weight: 3
- pluginRef: max-score-picker

engine:
type: vllm
connector:
dp_launch_mode: per_node
# Lets vLLM bind each spawned worker to its GPU's NUMA node.
set_visible_devices: true

roles:
prefill:
nodes: 4
workers: 1
gpus: 16
env:
<<: &kimi_env
PYTHONHASHSEED: "42"
VLLM_HTTP_TIMEOUT_KEEP_ALIVE: "120"
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"
VLLM_RPC_TIMEOUT: "600000"
TILELANG_CLEANUP_TEMP_FILES: "1"
VLLM_USE_NCCL_SYMM_MEM: "0"
NCCL_CUMEM_ENABLE: "1"
NCCL_MNNVL_ENABLE: "1"
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"
# Lookups lease only the store keys a hit loads.
VLLM_MOONCAKE_STORE_SELECTIVE_LEASE: "1"
MC_SLICE_SIZE: "1048576"
MC_MAX_MR_SIZE: "4294967296"
NCCL_P2P_LEVEL: "NVL"
MC_ENABLE_DEST_DEVICE_AFFINITY: "1"
WITH_NVIDIA_PEERMEM: "0"
NCCL_NET_PLUGIN: "none"
UCX_MEMTYPE_REG_WHOLE: "n"
UCX_TCP_AF_PRIO: "inet"
VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS: "1800"
# NIXL transfers the KDA conv state in the DS layout.
VLLM_SSM_CONV_STATE_LAYOUT: "DS"
TOKENSPEED_MLA_FP16_PARTIALS: "0"
VLLM_ENGINE_READY_TIMEOUT_S: "3600"
VLLM_ENABLE_GEMM_RS: "1"
VLLM_WORKER_MULTIPROC_METHOD: "spawn"
args:
kv-transfer-config: &kv_transfer '{"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":{"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,"enable_cross_layers_blocks":false,"enable_offload":false}}]}}'
served-model-name: "moonshotai/Kimi-K3.1-Pro"
prefix-match-unit: 128
load-format: "fastsafetensors"
kv-cache-dtype: "fp8"
attention-config: '{"indexer_kv_dtype":"mxfp4"}'
mamba-ssm-cache-dtype: "float32"
mamba-cache-dtype: "float32"
gpu-memory-utilization: 0.95
tensor-parallel-size: 1
data-parallel-size: 16
data-parallel-rpc-port: 13355
data-parallel-external-lb: true
# The image does not pick a power-of-two attention block at TP1 by itself; pin the size, the same on prefill and decode.
block-size: 16384
enable-expert-parallel: true
moe-backend: deep_gemm_mega_moe
no-enable-flashinfer-autotune: true
enable-cumem-allocator: true
trust-remote-code: true
max-num-seqs: 32
max-num-batched-tokens: 2048
# Caps each prompt's chunk so one long prompt does not fill a DP rank's step.
long-prefill-token-threshold: 512
long-prefill-token-threshold-adaptive: true
max-cudagraph-capture-size: 2048
compilation-config: '{"cudagraph_mode":"FULL_AND_PIECEWISE","cudagraph_capture_sizes":[4,8,12,16,20,24,32,40,48,64,80,96,128,160,256,384,512,640,768,896,1024,1152,1280,1408,1536,1664,1792,1920,2048]}'
stream-interval: 10
language-model-only: true
enable-prefix-caching: true
speculative-config: &spec '{"model":"Inferact/Kimi-K3.1-Pro-DSpark-preview","method":"dspark","num_speculative_tokens":4,"draft_sample_method":"probabilistic","rejection_sample_method":"block"}'
decode:
nodes: 4
workers: 1
gpus: 16
env:
<<: *kimi_env
VLLM_ENABLE_GEMM_RS: "0"
VLLM_WORKER_MULTIPROC_METHOD: "spawn"
args:
kv-transfer-config: *kv_transfer
served-model-name: "moonshotai/Kimi-K3.1-Pro"
prefix-match-unit: 128
load-format: "fastsafetensors"
kv-cache-dtype: "fp8"
attention-config: '{"indexer_kv_dtype":"mxfp4"}'
mamba-ssm-cache-dtype: "float32"
mamba-cache-dtype: "float32"
gpu-memory-utilization: 0.95
tensor-parallel-size: 1
data-parallel-size: 16
data-parallel-rpc-port: 13345
data-parallel-external-lb: true
# The image does not pick a power-of-two attention block at TP1 by itself; pin the size, the same on prefill and decode.
block-size: 16384
enable-expert-parallel: true
moe-backend: deep_gemm_mega_moe
no-enable-flashinfer-autotune: true
enable-cumem-allocator: true
trust-remote-code: true
stream-interval: 10
language-model-only: true
enable-prefix-caching: true
additional-config: '{"decode_backend":"latency_specialized"}'
use-replayssm: true
max-num-seqs: 32
max-num-batched-tokens: 160
max-cudagraph-capture-size: 160
compilation-config: '{"cudagraph_capture_sizes":[5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160]}'
speculative-config: *spec

sbatch_directives:
mem: "0"
cpus-per-task: "144"
comment: >-
'{"OccupiedIdleGPUsJobReaper":{"exemptIdleTimeMins":"60","reason":"model_loading","description":"Very large model will
take extra loading time."}}'

srun_options:
mem: "0"
container-remap-root: ""

telemetry:
collector_join_timeout_seconds: 12

benchmark:
placement:
node: head
env:
AIPERF_REQUIRED_SERVER_METRIC_PREFIX: "vllm:"
AIPERF_HTTP_X_SESSION_ID_FROM_CORRELATION_ID: "true"

override_1p1d:
roles:
prefill:
nodes: 4
workers: 1

override_1p1d_eval:
roles:
prefill:
nodes: 4
workers: 1
args:
reasoning-parser: kimi_k3
tool-call-parser: kimi_k3
enable-auto-tool-choice: true
decode:
args:
reasoning-parser: kimi_k3
tool-call-parser: kimi_k3
enable-auto-tool-choice: true

# c=352: explicit KV cache size per rank (the size vLLM reports it can fully use, minus 3 GiB).
override_1p1d_kvb:
roles:
prefill:
nodes: 4
workers: 1
args:
kv-cache-memory-bytes: 61926160384
decode:
args:
kv-cache-memory-bytes: 64475268096

override_1p1d_kvb_eval:
roles:
prefill:
nodes: 4
workers: 1
args:
kv-cache-memory-bytes: 61926160384
reasoning-parser: kimi_k3
tool-call-parser: kimi_k3
enable-auto-tool-choice: true
decode:
args:
kv-cache-memory-bytes: 64475268096
reasoning-parser: kimi_k3
tool-call-parser: kimi_k3
enable-auto-tool-choice: true
Loading
Loading