-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[TRTLLM-14815][feat] Enable disaggregated serving for Kimi K3 #17334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5f81eed
d681f2e
b00d33b
dcfbe78
cd5ab68
ce96067
8d566d7
084f8b7
887fa86
29da01d
8f670a5
9660f97
4b80e74
89bc6e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| # Kimi K3 KDA-payload cache-transceiver micro-benchmark. | ||
| # Run from the repository root: | ||
| # python3 examples/disaggregated/slurm/cache_transceiver_test/submit.py \ | ||
| # -c examples/disaggregated/slurm/cache_transceiver_test/configs/kda_payload_kimi_k3.yaml | ||
| # | ||
| # Synthetic KV geometry sized so ONE request's per-rank transfer equals the | ||
| # exact per-request KDA state payload of Kimi K3: 454,459,392 bytes | ||
| # (69 layers x (conv [3*96*128, 4] bf16 + delta [96,128,128] fp32)). | ||
| # Per-rank bytes/token = 69 layers * kvFactor(2) * (24/4 kv heads) * 128 * 2B | ||
| # = 211,968 B -> 2144 tokens == 454,459,392 B exactly. | ||
| # request_lengths 512 / 1024 also match MLA-latent payloads at ~4k / ~8k ISL | ||
| # (bf16) for the KDA-vs-MLA comparison. | ||
| # | ||
| # Fill in the <...> placeholders for your cluster before submitting. | ||
|
|
||
| slurm: | ||
| partition: "<partition>" | ||
| account: "<account>" | ||
| job_time: "00:30:00" | ||
| job_name: "ctt_kda_payload" | ||
| extra_args: "--gpus-per-node=4" | ||
|
|
||
| hardware: | ||
| gpus_per_node: 4 | ||
|
|
||
| environment: | ||
| container_image: "<container_image>" | ||
| # Mount the TRT-LLM checkout into the container. | ||
| container_mount: "<container_mount>" # Format: path1:path1,path2:path2 | ||
| # TRT-LLM comes from the checkout's venv (PATH below) + checkout code | ||
| # (PYTHONPATH below); skip pip install. | ||
| trtllm_repo: "" | ||
| # Output directory (results.json, logs/, csv/); point at any writable | ||
| # scratch location. | ||
| work_dir: "<full_path_to_work_dir>" | ||
| trtllm_wheel_path: "" | ||
| build_wheel: false | ||
| cuda_architectures: "" | ||
|
|
||
| test_matrix: | ||
| combinations: | ||
| # NIXL/PYTHON dropped for now: V2 _exchange_rank_info mpi_allgather can | ||
| # hang under this harness (srun --mpi=pmix). | ||
| - {backend: "NIXL", runtime: "CPP"} | ||
| - {backend: "UCX", runtime: "CPP"} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This cache-transceiver test is intended to sweep UCX environment variables and identify a suitable UCX configuration. It is not a model benchmark framework. adding a model specific yaml config is not appropriate. Also, K3 requires a python runtime cache transceiver ,but this config only involve cpp runtime
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed on both points. The config existed to reproduce the KDA-sized payload measurement, but it is model-specific and only sweeps the CPP runtime, which K3 cannot use. Will remove it from cache_transceiver_test under TRTLLM-15264; the payload-size derivation (the header math) moves into the K3 example docs where the same numbers are already used.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix is up: #17483 (removed the config from |
||
| cache_manager_versions: ["V1"] | ||
| # 512 tok = 108.5 MB/rank (~ MLA bf16 @4k ISL), 1024 = 217.1 MB (~ MLA @8k), | ||
| # 2144 = 454.46 MB = exact K3 per-request KDA payload. | ||
| request_lengths: [512, 1024, 2144] | ||
| num_requests_per_length: 8 | ||
| warmup_requests: 2 | ||
|
|
||
| kv_cache: | ||
| num_layers: 69 | ||
| num_kv_heads: 24 # /tp4 -> 6 heads per rank | ||
| head_dim: 128 | ||
| tokens_per_block: 32 | ||
| dtype: "HALF" | ||
| max_tokens_in_buffer: 4096 | ||
|
|
||
| parallel: | ||
| ctx_tp: 4 | ||
| ctx_pp: 1 | ||
| gen_tp: 4 | ||
| gen_pp: 1 | ||
|
|
||
| ucx_env_sweep: | ||
| # Single sweep. PATH/PYTHONPATH are exported inside the container prelude so | ||
| # python3 resolves to the checkout's venv (system-site-packages=true, | ||
| # so container torch/mpi4py are visible) and the checkout on PYTHONPATH | ||
| # wins. Keep your cluster's SLURM bin dir on PATH so host-side srun works. | ||
| # The UCX_TLS pin (no verbs) is for clusters where verbs transports cannot | ||
| # initialize on the compute nodes; drop the pin where verbs works. | ||
| - name: "venv_no_verbs" | ||
| env: | ||
| UCX_TLS: "tcp,self,sm,cuda_copy,cuda_ipc" | ||
| PATH: "<trtllm_venv_bin_dir>:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:<slurm_bin_dir>" | ||
| PYTHONPATH: "<trtllm_repo>" | ||
|
|
||
| run: | ||
| timeout_per_cell_s: 120 | ||
| max_sweep_s: 900 | ||
| capture_proto_info: true | ||
Uh oh!
There was an error while loading. Please reload this page.