English · 한국어
Quick start · ai-rm · Routing & scaling · Architecture · Docs · Status
hetero-llm-d (formerly llm-d-setup) holds the bootstrap scripts, manifests and operating notes that join NVIDIA A100, Rebellions
ATOM (RBLN-CA22), Furiosa RNGD and CPU nodes into one Kubernetes 1.31 cluster, served through llm-d
(Gateway → InferencePool → EPP) with a shared model store and Prometheus/Grafana monitoring. It is the
L4 cluster & placement component of ai-rm: the cluster the
other ai-rm components run on, plus the protocol v0.1 pieces they meet in.
The repository is site-oriented and a prototype: it records one lab cluster. Site values (addresses,
CIDRs, shares) live only in an untracked cluster.local.env; tracked files use placeholders such as
<cp-node-ip> and <gateway-host>.
|
Cluster bootstrap kubeadm 1.31, containerd 2.2.2, Cilium 1.16.5 with kube-proxy replacement and Gateway API CRDs v1.2.0, installed by numbered scripts ( scripts/01–05).
|
Heterogeneous accelerators NVIDIA device plugin + DCGM, Rebellions NPU Operator and Furiosa device plugin side by side; workloads land on a vendor through device-plugin resources and nodeSelectors. |
llm-d routing envoy-gateway with path-based HTTPRoutes, one InferencePool + EPP per model pool ( manifests/epp/make-epp.sh), and a mixed A100 · ATOM · RNGD pool test.
|
|
Shared model store One SMB-backed RWX PVC model-store for weights and compiled NPU artifacts, scanned every 10 minutes into the model-inventory ConfigMap that lmd-top reads.
|
Monitoring kube-prometheus-stack with DCGM, Furiosa, RBLN, vLLM, EPP and IPMI wall-power exporters, Grafana dashboards, and a docker-compose stack for a single GPU node without Kubernetes. |
ai-rm protocol v0.1scripts/airm-install.sh installs the AcceleratorProfile CRD pinned from rm-core v0.1.1, the airm_* scrape, the airm-placement ConfigMap and a Grafana dashboard.
|
Configure the site and run the checks that need no cluster or accelerator:
git clone https://github.com/ai-computing/hetero-llm-d.git ~/llm-d-setup && cd ~/llm-d-setup # scripts and notes use this path
cp cluster.example.env cluster.local.env # untracked; fill in site values
python3 scripts/test-model-store-discovery.py # offline regression test for model-store discovery
bash -n scripts/*.sh manifests/epp/make-epp.sh # shell syntax checkScripts read cluster.local.env through scripts/lib/cluster-env.sh. Values already in the environment win,
and a script fails immediately when a value it needs is missing. The placeholders used in the docs are
explained in cluster.example.env.
| Variable | Used by |
|---|---|
LLMD_CP_IP, LLMD_POD_CIDR, LLMD_SVC_CIDR |
scripts/02-cp-init-cluster.sh (kubeadm init) |
LLMD_GATEWAY_HOST |
manifests/epp/make-epp.sh health test (override with GW_ADDR) |
LLMD_PROM_ADDR |
scripts/capture-lmd-top.sh, lmd-top LMD_PROM |
LLMD_MODEL_STORE_SMB |
manifests/model-store.yaml (scripts/render-manifest.sh manifests/model-store.yaml | kubectl apply -f -) |
LLMD_NODE_NPU1, LLMD_NODE_NPU2, LLMD_HOME |
node pinning and home-directory hostPaths in manifests/ (compile-job, ds4-deepseek-v4-flash, hetero-llama8b-mixed, ipmi-exporter, vllm-a100-llama31-8b, vllm-exaone, vllm-rbln-deployment, vllm-v4flash, both furiosa-*-modelservice-values); apply them through scripts/render-manifest.sh (helm: -f <(scripts/render-manifest.sh …)). scripts/hetero-sweep.py reads the node names |
LLMD_KUBE_USER (optional) |
scripts/02-cp-init-cluster.sh: account that gets a kubeconfig (default: the sudo user) |
Bootstrap the cluster (root, manual)
Cluster bootstrap needs root on each node, so there is no automated install step.
1. Control-plane node (sudo):
sudo bash ~/llm-d-setup/scripts/01-cp-install-tooling.sh
sudo bash ~/llm-d-setup/scripts/02-cp-init-cluster.sh02-cp-init-cluster.sh ends by printing kubeadm join <cp-node-ip>:6443 --token ... --discovery-token-ca-cert-hash sha256:....
Copy that line.
2. Each worker node (sudo):
scp ~/llm-d-setup/scripts/03-worker-install.sh <user>@<worker-ip>:/tmp/
ssh <user>@<worker-ip> 'sudo bash /tmp/03-worker-install.sh'
ssh <user>@<worker-ip> 'sudo kubeadm join <cp-node-ip>:6443 --token <...> --discovery-token-ca-cert-hash sha256:<...>'3. Check the join on the control-plane node:
kubectl get nodes -o wide
kubectl get pods -AAccelerator nodes then need their vendor pieces: scripts/04-build-vllm-rbln.sh builds the node-local
vllm-rbln:0.10.2 image on the RBLN node and imports it into containerd (no registry), and
scripts/05-nvidia-setup.sh reloads the NVIDIA modules and installs nvidia-container-toolkit on the A100 node.
What each bootstrap script does
01-cp-install-tooling.sh
- swap off (persistent), kernel modules (
overlay,br_netfilter), three sysctls (br-nf-call-iptables,br-nf-call-ip6tables,ip_forward) - containerd 2.2.2 + runc 1.4.0 + helpers (
conntrack,socat,ethtool,ebtables,jq) - containerd config:
SystemdCgroup=true,sandbox_image=registry.k8s.io/pause:3.10 - pkgs.k8s.io v1.31 apt repo →
kubeadm/kubelet/kubectl 1.31.*+apt-mark hold - crictl endpoint configuration
02-cp-init-cluster.sh
kubeadm init --apiserver-advertise-address=<cp-node-ip> --pod-network-cidr=<pod-cidr> --service-cidr=<svc-cidr> --skip-phases=addon/kube-proxy --node-name=<lower-case hostname>- copies the kubeconfig to
/root/.kube/configand to the admin user's~/.kube/config(USER_HOMEat the top of the script; edit it for your site) - installs the Gateway API CRDs (v1.2.0 standard)
- downloads the Cilium CLI and installs Cilium 1.16.5 (
kubeProxyReplacement=true,gatewayAPI.enabled=true, Hubble UI) - prints the
kubeadm joincommand for workers
03-worker-install.sh
- the same node preparation on the worker, plus kubelet/kubeadm 1.31 only (no kubectl)
- if containerd is already installed, only refreshes its config
- prints the join command at the end (paste the real token from step 2)
Call the models (OpenAI-compatible)
The llm-d Gateway at <gateway-host> is the single entry point; HTTPRoutes branch by path.
# RBLN: EXAONE-3.5-7.8B (Korean-friendly)
curl -X POST http://<gateway-host>/exaone/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"exaone-3.5-7.8b-instruct","messages":[{"role":"user","content":"..."}]}'
# Furiosa: Llama-3.1-8B (precompiled)
curl -X POST http://<gateway-host>/llama31/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"furiosa-ai/Llama-3.1-8B-Instruct","messages":[{"role":"user","content":"..."}]}'
# NVIDIA A100: Llama-3.1-8B (vllm-openai)
curl -X POST http://<gateway-host>/gpu/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"llama-3.1-8b-instruct-gpu","messages":[{"role":"user","content":"..."}]}'| Path | Model | Accelerator | Node |
|---|---|---|---|
/exaone |
EXAONE-3.5-7.8B-Instruct | Rebellions RBLN-CA22 × 4 | NPU node |
/llama31 |
Llama-3.1-8B-Instruct | Furiosa RNGD × 4 | GPU/NPU node |
/gpu |
Llama-3.1-8B-Instruct | NVIDIA A100 80GB × 2 | GPU/NPU node (the NPU node before 2026-10) |
A model server can also be called directly on its NodePort, e.g. with the Python OpenAI SDK:
from openai import OpenAI
client = OpenAI(
base_url="http://<cp-node-ip>:30800/v1",
api_key="dummy" # any value when vLLM runs without auth
)
resp = client.chat.completions.create(
model="exaone-3.5-7.8b-instruct",
messages=[{"role": "user", "content": "What is a Rebellions NPU?"}],
)
print(resp.choices[0].message.content)Which models are up changes over time; most model Deployments are kept at replicas: 0 and scaled up when
needed. See STATUS.md.
Web UIs and NodePorts (2026-06 snapshot)
| UI | URL | Auth |
|---|---|---|
| Headlamp | http://<cp-node-ip>:30502 |
Bearer token: kubectl create token headlamp -n headlamp --duration=24h |
| Cilium Hubble UI | http://<cp-node-ip>:30081 |
none |
| Grafana | http://<cp-node-ip>:30300 |
admin account set at install (not recorded in docs) |
| Prometheus | http://<cp-node-ip>:30090 |
none |
| Rancher | https://<cp-node-ip>:30443 |
admin account (password changed at first login, not recorded in docs) |
| llm-d Gateway | http://<gateway-host>/v1 |
OpenAI-compatible single entry point (path routing) |
| ds4 (DeepSeek V4 Flash) direct | http://<cp-node-ip>:30804/v1 |
model: deepseek-v4-flash |
| vllm-rbln-koni direct | http://<cp-node-ip>:30800/v1 |
model: koni-llama3.1-8b-rbln |
| ollama-cpu direct | http://<cp-node-ip>:30803/v1 |
CPU pool |
NodePorts are exposed on every node. Rancher RBAC, LoadBalancer IP policy and troubleshooting notes: docs/cluster-notes.md (Korean).
This repository is the l4-cluster layer, kind cluster of ai-rm;
its metadata is in ai-rm.yaml. It provides Placement (Gateway → InferencePool → EPP routing,
nodeSelector-based accelerator placement) and Metrics (Prometheus/Grafana and accelerator and node wall-power
exporters), and uses Accelerator (node device plugins) and Workload (the serving and training workloads on top).
It collects airm_* metrics but emits none itself.
The cluster side of rm-core PROTOCOL v0.1 lives in
deploy/airm/ and is applied by scripts/airm-install.sh:
| Piece | Where |
|---|---|
AcceleratorProfile CRD (airm.ai-computing.io/v1alpha1) |
fetched by scripts/airm-install.sh from rm-core tag v0.1.1, sha256-checked (no copy in this repo) |
airm_* metrics scrape |
deploy/airm/scrape-airm.yaml: ScrapeConfig for pods annotated airm.ai-computing.io/scrape: "true" (/metrics, default port 9400) |
airm_* dashboard |
monitoring/grafana-dashboards/airm.json (ConfigMap grafana-dashboard-airm) |
| Placement hand-off | deploy/airm/airm-placement.yaml: ConfigMap llm-serving/airm-placement, installed empty |
| Placement hook | scripts/airm-placement.py, run by scripts/airm-install.sh … placement: node affinity + KEDA cap from decisions.json |
| Umbrella chart cluster values | deploy/helm/cluster-values.yaml |
scripts/airm-install.sh dry-run # server dry-run: CRD + ScrapeConfig + ConfigMap + dashboard
scripts/airm-install.sh apply crd # install the CRD
scripts/airm-install.sh apply manifests # scrape config, airm-placement, dashboard
scripts/airm-install.sh dry-run placement # what the rm-controller decisions would change on the Deployments
scripts/airm-install.sh apply placement # pin them (restarts the pods it moves; never part of `all`)
# rollback (deleting the CRD also deletes every AcceleratorProfile object)
scripts/airm-install.sh delete manifests
scripts/airm-install.sh delete crdThe airm-placement ConfigMap is written by ai-rm's
rm-controller and read by
serving pods and, later, an EPP scorer. It holds one key, decisions.json: a protocol, a generation counter,
the placement policy name and a decisions list of {pool, workload, acceleratorIds, kvTransport, reason}.
Accelerators are referenced by id only, never by address. An empty decisions list (the installed state) means
"behave as if the ConfigMap did not exist". The full format, field table and the EPP scorer slot (documented, not
yet implemented; v0.1 changes no live EPP config) are in deploy/airm/README.md.
Placement hook. A serving Deployment opts in with the label airm.ai-computing.io/pool=<InferencePool>; its
llm-d.ai/role label (prefill, decode, absent = serve) picks the decision. scripts/airm-install.sh apply placement
then sets required node affinity to the decision's nodes (from acceleratorIds, <node>/<vendor>:<index>) and the
node summary label airm.ai-computing.io/<vendor>.<model> that rm-controller filtered on, caps the Deployment's KEDA
maxReplicaCount at the placed cards, and records the document generation so it is applied once. An empty document,
a pool without a decision, or a decision with no cards (nothing fits) changes nothing. Which card index a pod gets
stays with the device plugin. For a Helm install the same decision is a value:
helm upgrade rngd-pd … --set-json "nodeAffinity=$(scripts/airm-placement.py affinity --decisions cm.json --pool llama8b-pd-pool)"
(one value for all roles, so it pins nodes only).
Where other ai-rm components attach
| Component | Layer | How it attaches to this cluster |
|---|---|---|
| rngd-pd | l3-serving | runs prefill/decode pods on the RNGD nodes, creates its own InferencePool + EPP and adds a Gateway path (manifests/epp/make-epp.sh <pool> /<path>) |
| npu-lora | l3-serving | submits training Jobs to the RNGD nodes (privileged, lmd-top --plan train … --apply); models and adapters use the shared model-store PVC (manifests/README-model-store.md), and the A100 vLLM (manifests/vllm-a100-llama31-8b.yaml, --enable-lora) loads adapters at runtime |
| lmd-top | l5-ops | TUI on the control plane that reads only kubectl and Prometheus: LMD_PROM=$LLMD_PROM_ADDR LMD_NS=llm-serving lmd-top |
| rm-bench | l5-ops | drives OpenAI-compatible load at the Gateway (http://$LLMD_GATEWAY_HOST/<path>/v1); same-load energy comparison is scripts/hetero-sweep.py |
monitoring (monitoring/) |
l4-cluster | kube-prometheus-stack + DCGM/Furiosa/RBLN exporters + ServiceMonitors (manifests/*servicemonitor.yaml, ipmi-exporter.yaml) collect metrics, and monitoring/grafana-dashboards/ is loaded into Grafana; monitoring/standalone-compose/ is for a single GPU node without Kubernetes |
KPIs tracked here: heterogeneous resources (A100 · ATOM · RNGD · GB10 · CPU behind one Gateway), power efficiency
(tok/J from DCGM and IPMI wall power, scripts/hetero-sweep.py) and SLO (EPP TTFT/TPOT metrics).
Roadmap gaps W4 (cache reuse) and W5 (control loop), cluster side. The engine side is tracked in
aicomp#45 (vLLM-compatible /metrics on the PD stages) and
aicomp#46 (KV-block events and prefix reuse).
EPP scheduling profiles (manifests/epp/profiles/), checked against
the pinned llm-d-router e194457dc507 by scripts/check-epp-config.py, installed with
EPP_PROFILE=<profile> manifests/epp/make-epp.sh <pool> /<path>:
| Profile | Scores | Engine support needed | Use now on |
|---|---|---|---|
queue-kv |
waiting queue, KV-cache utilization | /metrics (vLLM or furiosa-llm names) |
NPU pools; the rngd-pd path once aicomp#45 lands |
approx-prefix |
+ approximate prefix affinity (EPP-side hashing of routed prompts) | none | any pool; pays off only where the engine caches prefixes |
approx-prefix-gpu |
approx-prefix with prefix weight 3 |
none | the A100 vLLM pool (measured: weight 1 loses the affinity under load) |
precise-prefix (opt-in) |
+ prefix hits from the engines' KV-block events (ZMQ, vLLM format) | KV events + a render sidecar for real token IDs | A100 vLLM today; Optimus Prime after aicomp#46 |
Approximate prefix scoring needs no engine support: the EPP tokenizes with its tokenizer-free estimate backend,
hashes the prompt into blocks and remembers which endpoint got them, so it runs on every pool now. Whether it helps
depends on the engine: the A100 vLLM pool (--enable-prefix-caching) reuses the blocks; vllm-rbln with
--block-size 512 --max-model-len 512 can never reuse a full block; the rngd-pd path prefills every request from
scratch until aicomp#46, so there it only concentrates load. The profile therefore weights prefix (1) below queue and
KV (2 each).
Measured on the A100 pool with two replicas (experiment): prefix affinity
works (20/20 requests of one prefix on one pod; 8 prefixes sequentially: vLLM hit ratio 0.864 vs 0.742 for queue-kv),
but at weight 1 the load scores outvote it once requests are concurrent. Under KV-cache pressure (220 prefixes of 2.9k
tokens, more than one pod's 446k-token cache) the hit ratio was 0.574 against 0.560 for queue-kv; with prefix weight 3
(approx-prefix-gpu) it was 0.639, TTFT p50 -20 %, wall time -16 %. precise-prefix matched that (0.630) only after two
fixes to the engine side: the KV-event topic must be kv@<pod-ip>:<port>@<model> and the engine block size 64.
Autoscaling (manifests/autoscaling/) uses the KEDA 2.19 already installed:
| ScaledObject | Target | Triggers | Replicas | Scale up / down |
|---|---|---|---|---|
vllm-a100-llama31-8b |
A100 vLLM | vllm:num_requests_waiting / 4 per pod; TTFT p90 vs 1 s |
1–2 | 1 pod / 120 s; after 10 min, 1 pod / 5 min |
rngd-pd-prefill |
RNGD prefill | waiting / 2 per pod; TTFT p90 vs 2 s | 1–3 | 1 pod / 120 s; after 10 min, 1 pod / 5 min |
rngd-pd-decode |
ATOM decode | running / 6 per pod (B8), waiting / 1; TPOT p90 vs 100 ms | 1–4 | 1 pod / 60 s; after 10 min, 1 pod / 5 min |
The GPU pool is wired first because vLLM exposes these metrics today. The NPU ScaledObjects read the same names, which
the PD stages expose only after aicomp#45; until then the queries are empty, ignoreNullValues reads 0 and the pools
stay at their minimum. Cold start with pre-compiled graphs is prefill 62 s and decode 18 s
(ai-rm workload traces), so scale-up adds
one pod per 120 s / 60 s (the new pod is Ready before the next step), scale-down waits 10 minutes, and no pool scales to
zero. The A100 vLLM cold start, measured live, is 110-111 s from pod start to Ready (120-121 s when both replicas start
at once; torch.compile and CUDA graph capture are half of it); under load the HPA went 1 → 2 within 21 s.
maxReplicaCount is cards per node (shm keeps prefill and decode on one host) and is lowered to the placed cards by the placement hook.
Live-cluster check (for the operator)
python3 scripts/check-epp-config.py && python3 scripts/test-airm-placement.py
# 1. EPP profile on a pool (render first, then apply)
EPP_PROFILE=approx-prefix-gpu EPP_RENDER_ONLY=1 manifests/epp/make-epp.sh vllm-a100-pool /gpu | kubectl apply --dry-run=server -f -
EPP_PROFILE=approx-prefix-gpu manifests/epp/make-epp.sh vllm-a100-pool /gpu
kubectl -n llm-serving logs deploy/vllm-a100-epp | grep -iE 'error|plugin' # strict config load
# 2. Autoscaling on the GPU pool
kubectl apply --dry-run=server -f manifests/autoscaling/keda-vllm-a100.yaml
kubectl apply -f manifests/autoscaling/keda-vllm-a100.yaml
kubectl -n llm-serving get scaledobject vllm-a100-llama31-8b; kubectl -n llm-serving describe hpa keda-hpa-vllm-a100-llama31-8b
# 3. Placement (after rm-controller wrote decisions and the Deployments carry airm.ai-computing.io/pool)
kubectl -n llm-serving label deploy rngd-pd-prefill rngd-pd-decode airm.ai-computing.io/pool=llama8b-pd-pool
scripts/airm-install.sh dry-run placement && scripts/airm-install.sh apply placement ┌────────────────────────────────────────┐
│ control-plane node (Dell R7525) │
│ ─ management only, no workloads │
│ ─ K8s control plane (kubeadm 1.31) │
│ ─ Cilium CNI + Gateway API │
│ ─ llm-d Router (Envoy + EPP) │
│ ─ Prometheus / Grafana │
└───────────────────┬────────────────────┘
│
┌──────────────────────────┼──────────────────────────┐
│ │ │
┌────────▼─────────┐ ┌─────────▼────────┐ ┌──────────▼─────────┐
│ NPU node │ │ GPU/NPU node │ │ CPU nodes × 3 │
│ RBLN-CA22 × 4 │ │ Furiosa RNGD × 2 │ │ ollama CPU pool │
│ Furiosa RNGD × 3 │ │ A100 80GB × 2 │ │ │
│ Ubuntu 22.04 │ │ Ubuntu 22.04 │ │ │
└──────────────────┘ └──────────────────┘ └────────────────────┘
Request path: client → envoy-gateway (llm-d-gateway) → HTTPRoute path routing (manifests/openai-route.yaml,
manifests/llm-d-gateway.yaml) → InferencePool → EPP (manifests/epp/,
manifests/llmd-router-values.yaml) → model-server pods in namespace llm-serving. manifests/ is not a kustomize
tree: it is a set of files applied one by one with kubectl apply or used as Helm values.
Cluster facts: Kubernetes v1.31 (compatible with the Gateway API Inference Extension), pod and service CIDRs chosen
not to collide with site routing, outbound access to huggingface.co and github.com. Two GB10 nodes are also
configured (cluster.example.env); see STATUS.md for which nodes are currently healthy.
| Goal | Guides |
|---|---|
| 🧭 Get oriented | Environment guide · Status and findings |
| 🧩 What runs where | llm-d features and per-worker matrix · NPU compatibility report · Serving playbook |
| 🔧 Operate | EPP per InferencePool and profiles · Autoscaling · Shared model store · Monitoring · Cluster notes |
| 🔌 ai-rm | deploy/airm · ai-rm.yaml · ai-rm hub |
| 📊 Experiments | Mixed A100 · ATOM · RNGD pool · airm-install hang |
Most guides are written in Korean. External references: llm-d docs ·
Gateway API Inference Extension ·
Cilium Gateway API · vllm-rbln (Rebellions'
vLLM fork, using compiled models from HF Hub rebellions-sw/*).
- Control plane and workers joined (kubeadm 1.31, Cilium 1.16.5, Gateway API); NVIDIA, Rebellions and Furiosa device plugins
- Gateway → InferencePool → EPP routing per model pool; K-EXAONE-236B served on RNGD × 4 through llm-d (2026-07)
- Shared model store with inventory discovery and build provenance
- Monitoring stack with GPU, NPU, vLLM, EPP and IPMI wall-power exporters
- ai-rm v0.1:
AcceleratorProfileCRD installed on the cluster; scrape config,airm-placementand dashboard pass server dry-run - One InferencePool routing Llama-3.1-8B across A100, ATOM and RNGD (experiment); the default EPP scores ignore device speed, so the mixed pool was slower than A100 alone
- Capacity-aware heterogeneous EPP scorer, compared under the same load
- Same-load energy comparison across accelerators (
scripts/hetero-sweep.py; only A100 points measured so far) - EPP profiles
queue-kv,approx-prefix, opt-inprecise-prefix; KEDA ScaledObjects for the A100 pool and the PD stages; placement hook fromairm-placement(offline checks; live rollout pending) - W4/W5 live on the A100 pool (experiment): prefix routing (
approx-prefix-gpu,precise-prefixwith fixed event contract), KEDA 1 → 2 → 1, A100 cold start 110 s - Precise prefix routing on the PD path (needs aicomp#46) and NPU autoscaling on live metrics (needs aicomp#45)
- EPP scorer that reads
airm-placement
Open issues, node outages and the measurements behind each item: STATUS.md.
Note
This repository is public. Keep site configuration, internal addresses and credentials out of tracked files;
site values live only in the untracked cluster.local.env.