Skip to content

Coding Assistant on Rebel100™

Overview

This reference design describes a serving stack for coding agents on Rebel100™: MiniMax-M2.7 served by RBLN vLLM and deployed on Kubernetes with llm-d, using prefill/decode (P/D) disaggregation, prefix-cache-aware routing, KV offload to Rebellions Direct Storage (RDS), and speculative decoding. It fixes one configuration end to end, from the hardware and software versions to the Kubernetes resources and serving arguments, and explains why each value was chosen, so that you can reproduce the design and use it as the starting point for your own deployment. It states what was validated and what was not, and describes how the Target Configuration was validated (see Validation approach).

Target audience

Customer problem

A coding agent does not use a model the way a chat client does. It sends prompts of tens of thousands of tokens built from the same repository context, receives short answers, and calls the model again after every tool call, so a single task becomes a chain of requests whose latencies add up. A modelserver behind a plain load balancer serves this pattern poorly: long prefills delay token generation for the other requests on the same server, the load balancer does not know which server already holds a prompt's prefix, and KV cache that could be reused is evicted from device memory.

The workload characteristics below drive the choices in this design.

Characteristic Value Effect on the serving design
Input length Very long (tens of thousands of tokens) Prefill dominates, and TTFT determines what the user perceives.
Output length Short (around 1K tokens) Per-token latency matters more than the batch size of decode.
Output shape Output such as code repeats earlier text The output is relatively easy to predict, which suits speculative decoding, n-gram and suffix decoding in particular.
Prompt reuse High (the same repository and system prompt repeat) Automatic Prefix Caching and prefix-cache-aware routing suit this pattern.
Call pattern An agent loop in which tool call round trips repeat One task is split across several requests, so per-request latency accumulates.

Design goals

  • Latency first. Keep per-request latency low instead of raising the batch size for aggregate throughput.
  • Isolate prefill from decode. Run the two phases on separate instances so that long prompts do not interrupt token generation, and move the KV between them over RDMA.
  • Reuse the prompt prefix. Route each request to an instance that already holds its prefix, and keep KV beyond device memory in tier 2 (RDS).
  • Speed up generation. Use EAGLE-3 speculative decoding by default, with a published draft head for this model; suffix decoding and n-gram need no draft model and are validated alternatives.
  • Deploy with one chart on standard Kubernetes APIs. Bring up the gateway, the router, and the modelservers with a single Helm chart, using DRA for devices and the Gateway API for routing.
  • State the validation boundary. Validate on the four-node Target Configuration itself, and give each component a status that says whether it was exercised there.

Authentication and authorization of the endpoint are outside the scope of this design and belong in front of the gateway (see Client Integration).

Architecture

A request passes through the gateway to the Endpoint Picker (EPP) of the llm-d router, which picks a prefill and a decode instance by prefix-cache affinity and load. The prefill instance computes the KV of the prompt, and the decode instance pulls that KV and generates the output tokens.

flowchart TB
  C["Client or coding agent"] --> GW["Gateway"]
  GW --> EPP["Router (EPP)<br/>picks prefill and decode"]
  EPP --> SC
  subgraph DPOD["Decode pod"]
    SC["Routing sidecar"]
    D["Decode instance<br/>DP4 + expert parallel, 4 NPUs"]
  end
  SC -->|"1. prefill"| P["Prefill instance<br/>PP4, 4 NPUs"]
  D -->|"2. pulls KV over NIXL (RDMA)"| P
  SC -->|"3. decode"| D
  P <-->|"KV tier 2 (LMCache)"| RDS[("RDS on NVMe")]
  1. The routing sidecar in front of the decode instance first sends the request to the selected prefill instance.
  2. The decode instance pulls the prompt's KV from the prefill instance over NIXL with RDMA. Prefill also stores KV in RDS through LMCache and looks it up on later requests.
  3. The decode instance generates the output tokens, and the response returns through the routing sidecar and the gateway.

The router predicts prefix-cache hits from the requests it has already sent to each Pod. In the Target Configuration (4P4D) each node runs one prefill and one decode instance, and any prefill instance can pair with any decode instance across nodes (see Hardware › Network). For the Kubernetes resources behind each box, see Deployment on Kubernetes.

Model

MiniMaxAI/MiniMax-M2.7 is an MoE model with 229B total parameters and roughly 10B active parameters.

Item Value
Layers 62
hidden size 3,072
attention heads 48 (KV heads 8, GQA 6:1), head_dim 128
MoE 256 experts × top-8, intermediate 1,536, no shared expert
hybrid attention Not used (attn_type_list entries are all identical)
Maximum sequence length 204,800
vocab size 200,064
Checkpoint FP8 (E4M3, block 128×128), about 234 GB
MTP modules 3 (num_mtp_modules: 3); their weights are not in the published checkpoint

The recommended sampling parameters are in Client Integration › Recommended sampling parameters.

KV cache size

The KV cache size per token is about 124 KiB with --kv-cache-dtype fp8 (2 × 8 KV heads × 128 head_dim × 62 layers × 1 byte). These sizes are the inputs for the KV capacity and the block size decisions in Serving Configuration.

Unit Size
1 token About 124 KiB
1 block at --block-size 4096 About 0.48 GiB
1 request at ISL 50K About 6 GB

How the router's KV capacity is derived is on Serving Configuration › KV capacity referenced by the router.

Configuration summary

The status badges used below follow the vocabulary defined in Reference Design › Status badges.

Item Target Configuration Status
Scale RebelRack™ (4 servers plus switches and supporting equipment), 32 NPUs Validated
P/D layout 4P4D (default), with 5P3D and 3P5D as alternatives Validated (all three layouts, measured on the same 4 nodes of the Target Configuration)
Devices per instance 4 Validated
Prefill parallelism PP4 (DP1, TP1), expert parallel disabled Validated
Decode parallelism DP4 (PP1, TP1), expert parallel enabled Validated
Software The versions in Software Stack and Versions Validated

The validation exercised the serving arguments on Serving Configuration with two exceptions: KV moved from prefill to decode over NIXL without LMCache and RDS, and the P/D layout comparison spread requests round-robin without the router, which ran only for the agent workload and with a configuration that differs from Serving Configuration › Router (see Target Configuration validation). The parts of the canonical configuration that the validation did not exercise carry Unverified on the page that defines them, and are listed in Validation scope and limits.

Design alternatives

The design fixes one path for each of the choices below. The alternatives are supported, but they change what you have to prepare or what you give up.

Choice This design Alternative When to choose the alternative
Serving topology Prefill/decode disaggregated (4P4D validated) AGG, with the prefill replicas set to 0 Long prefills do not need to be isolated from decode, and AGG is simpler to operate. See Key chart settings
Device allocation DRA, with the 4 NPUs and the 2 NICs of each Pod aligned on one NUMA node (one NIC carries the transfer at a time; the other is the failover spare) Device plugin (devices.npu.mode: devicePlugin) DRA is not available. A device plugin requests a device count only, so NUMA alignment is not guaranteed. See Device allocation
GatewayClass provider Istio agentgateway (examples/gateway-agentgateway.yaml) Choose agentgateway when no shareable Istio is available. The Target Configuration was validated with Istio. See GatewayClass provider
Speculative decoding EAGLE-3 with the draft head published for MiniMax-M2.7 Suffix decoding or n-gram, which need no draft model You want to keep the HBM a draft head takes for the KV cache, or the output of your workload often repeats the prompt or earlier responses. See Speculative decoding
Run mode Non-root, with an unlimited memlock limit set in the container runtime on each node Root (examples/root-privileged.yaml), which requires a privileged namespace Node settings cannot be changed, as on managed Kubernetes. See Permissions and run mode

Validation approach

Evaluate the design on your own workload before sizing a deployment.

The Target Configuration was validated with a synthetic workload based on SWE-bench Verified that reproduces the shape of coding-agent traffic; the workload, the P/D layouts, the concurrency range, the functional checks, and the accuracy results are in Validation and Limits.

Validation scope and limits

The table below lists the main items the Target Configuration validation did not use. It is not exhaustive; each page marks the status of its own items too.

Item Status
KV offload through LMCache/RDS Default configuration (feature and accuracy validation). The Target Configuration validation moved KV over NIXL only, and the effect of offloading was never characterized separately
agentgateway, the alternative GatewayClass provider Unverified on the Target Configuration (the default provider, Istio, is what the validation ran)

Next steps

Document Contents
Hardware Server, NPU, network, and storage requirements and their rationale
Software Stack and Versions Components and pinned versions
Deployment on Kubernetes llm-d based deployment, resources, and the startup procedure
Serving Configuration The canonical serving arguments and the rationale for each value
Client Integration Endpoints, tool call and reasoning handling, and agent integration
Operations Metrics to watch, failure modes, and operating procedures
Validation and Limits Measurement method, accuracy results, and known limits