Skip to content

Kimi K2.5 / K2.6 ​

Use this recipe to serve Kimi K2.5 or K2.6 with remote code, long context, reasoning and tool parsers, and explicit MLA and MoE backends. You can also add a compatible DFlash draft to Kimi K2.6.

Prerequisites ​

  • A working TokenSpeed installation that supports your checkpoint, quantization, and backend choices. For installation and setup instructions, see Getting started.
  • Four NVIDIA GPUs for --tensor-parallel-size 4, with support for NVFP4 quantization and the selected MLA and MoE backends.
  • Access to nvidia/Kimi-K2.5-NVFP4 or nvidia/Kimi-K2.6-NVFP4, and permission to run the checkpoint's remote code. The commands pass --trust-remote-code.
  • curl for the verification requests.

Validate exact model IDs, checkpoint formats, and backend choices against the build you deploy.

Start the target model ​

The K2.5 command uses a 262144-token context, an FP8 KV cache, NVFP4 quantization, expert parallelism, and the kimi_k25 reasoning and kimik2 tool-call parsers. It serves the model as kimi-k2.5 on all interfaces at TCP port 8000.

For K2.6, keep the same parameter shape and change the checkpoint and parser only if the model card requires a different value.

  1. Start the server:

    bash
    tokenspeed serve nvidia/Kimi-K2.5-NVFP4 \
      --served-model-name kimi-k2.5 \
      --trust-remote-code \
      --max-model-len 262144 \
      --kv-cache-dtype fp8 \
      --quantization nvfp4 \
      --tensor-parallel-size 4 \
      --enable-expert-parallel \
      --chunked-prefill-size 8192 \
      --max-num-seqs 256 \
      --attention-backend trtllm_mla \
      --moe-backend flashinfer_trtllm \
      --reasoning-parser kimi_k25 \
      --tool-call-parser kimik2 \
      --host 0.0.0.0 \
      --port 8000
  2. After startup completes, verify the server.

Optional: Add a DFlash draft to Kimi K2.6 ​

To enable a compatible DFlash draft model, keep the target launch shape and add the draft model path plus DFlash speculative decoding options. This example uses tokenspeed_mla for target attention and fa4 for drafter attention.

  1. Replace /path/to/kimi-k2.6-dflash with the path to your compatible DFlash draft model, and then start the server:

    bash
    tokenspeed serve nvidia/Kimi-K2.6-NVFP4 \
      --served-model-name kimi-k2.6 \
      --trust-remote-code \
      --max-model-len 262144 \
      --kv-cache-dtype fp8 \
      --quantization nvfp4 \
      --tensor-parallel-size 4 \
      --enable-expert-parallel \
      --chunked-prefill-size 8192 \
      --max-num-seqs 256 \
      --attention-backend tokenspeed_mla \
      --moe-backend flashinfer_trtllm \
      --reasoning-parser kimi_k25 \
      --tool-call-parser kimik2 \
      --speculative-algorithm DFLASH \
      --speculative-draft-model-path /path/to/kimi-k2.6-dflash \
      --speculative-num-draft-tokens 8 \
      --speculative-num-steps 7 \
      --drafter-attention-backend fa4 \
      --host 0.0.0.0 \
      --port 8000
  2. After startup completes, verify the server.

DFlash2 execution and sampling behavior ​

Official DFlash2 checkpoints that declare DFlash2DraftModel use the same --speculative-algorithm DFLASH launch. TokenSpeed enables their grouped dynamic convolutions and candidate selector automatically from the draft architecture. On GPU each convolution runs as a single fused Triton kernel. The torch node graph stays as the CPU reference. An MLA DFlash2 draft also writes its context KV through one stacked projection plus one fused norm/RoPE/scatter launch, which lets that write overlap the draft forward and accumulate as the target produces each captured layer.

Inspect the server's INFO logs to confirm which of those paths it selected. The logs also explain why the server declined a path.

Draft proposals greedily follow the selector's transition-conditioned path. Candidate selection takes each vocabulary shard's local top-k and gathers only those, instead of gathering whole logits rows, whenever the head's shards carry no padding or added tokens.

The target's verification step applies a request's temperature, top_k, and top_p, never the proposal, so the served distribution is the target's whatever the drafter proposed.

Verify the server ​

The verification requests use 127.0.0.1 to reach the server that listens on 0.0.0.0 at port 8000.

  1. Check whether the server is ready:

    bash
    curl --fail http://127.0.0.1:8000/readiness

    A successful request returns an HTTP 200 OK status.

  2. Send a chat completion request to confirm that the model generates a response. Replace <served-model-name> with kimi-k2.5 or kimi-k2.6, matching your launch command:

    bash
    curl --fail http://127.0.0.1:8000/v1/chat/completions \
      -H 'Content-Type: application/json' \
      -d '{
        "model": "<served-model-name>",
        "messages": [
          {
            "role": "user",
            "content": "Write a concise deployment checklist."
          }
        ],
        "max_tokens": 256
      }'

    A successful request returns an HTTP 200 OK status and a choices array containing an assistant message.

TokenSpeed documentation