Repository navigation
Releases
Narwhal v0.50.0
Adds narwhal deploy, which takes SSH hosts, a Kubernetes cluster or a workstation from a fleet file to a serving fleet, and narwhal fleet to operate it. Replaces tools/deployment/, the .env deployment variables, the fleet control service and the narwhal dev lifecycle subcommands. See Upgrading from 0.13.0.
Deployment
A NarwhalFleet file describes the fleet on every target. Secrets go in narwhal-fleet-secrets.yaml.
narwhal deploy initdiscovers the hosts over SSH and writes both files.--router-pairadds a standby router, HAProxy and a witness on a third host.--interfacesets the serving interface.narwhal deploy planreports what a later stage would refuse without changing the hosts: port conflicts, UCX port ranges, the checkpoint directory, GPU passthrough, the first-token budget, router–witness clock skew and malformed addresses.narwhal deploy runruns the stages: discover, install, validate engines, qualify fabric, attest, profile and preflight, serve and measure. An interrupted run resumes at its stage. After a fleet file edit, it reruns only the affected stages.status,downandtunnelinspect, stop and forward to a deployed fleet.- Hosts need Docker and a GPU runtime, not Python.
--target localruns a fleet on one Linux or WSL2 workstation, fornarwhal dev ask,watchanddemo.
Kubernetes
The narwhal Helm chart (oci://ghcr.io/athrael-soju/charts/narwhal) installs the NarwhalFleet CRD, a controller, RBAC, an admission policy, ServiceMonitors and optionally Prometheus and Grafana.
- The controller runs the stages as Jobs from
kubectl applyornarwhal deploy --target kubernetes, pins each engine pod to its measured node and reports progress in the fleet's status. - The admission policy requires images pinned by digest.
spec.engines.tolerationsandspec.engines.gpusPerEnginesupport tainted GPU pools and multi-GPU engines.- Traffic enters through HAProxy, a Gateway API
HTTPRouteor anInferencePool. - The API,
narwhal-inference.com/v1alpha1, is experimental. Requires Kubernetes 1.35 or later.
Operating a fleet
narwhal fleet status,drain,readmitandreseton every target.narwhal fleet watchshows engine roles, load, TTFT and TPOT at p50 and p95, throughput and role switches live, for fleets on SSH hosts.- In a router pair, the standby takes over through the witness's lease. A router that loses its lease fences itself (
/health503, exit 3) and restarts as standby. The handoff is signed. - An engine that refuses a connection leaves placement until it attests again.
Security
- A cosign-signed
narwhal-release-manifest.jsonpins every image by digest. Images carry SBOMs and SLSA provenance. On SSH hosts,narwhal deployverifies the manifest before contacting a host. - The router, sidecar,
narwhal-checkandnarwhal-profilecheck the engine's process identity on each new connection and send the engine key only to the attested process. - The router token and engine key need at least 32 random bytes. Kubernetes refuses a weak engine key before any stage.
- Engine and container output is redacted.
- Anonymous Grafana access is loopback only.
Monitoring
- Every fleet runs Prometheus and Grafana. Engines that require the key for
/metricsare scraped through their sidecar. - The dashboard leads with SLO attainment, router state and per-engine load.
- Metrics contract version 4. New alerts:
NarwhalNoRouterReady,NarwhalWatchdog.
Upgrading from 0.13.0
- Install 0.50.0 and cosign v3.
- Run
narwhal deploy initagainst your hosts.planandrunrefuse.envand theNARWHAL_*deployment variables, and name the fleet file field that replaces each. - Run
narwhal deploy plan, thennarwhal deploy run.
The handoff format changed: stop both routers of a 0.13.0 pair before starting 0.50.0. Upgrade and rollback covers fleets deployed by hand. #529 and #675 list each breaking change with its upgrade step.
⚠ Breaking changes
- Removed:
tools/deployment/,tools/measurement/load_trial.py, the fleet control service and its console, the.envfile and theNARWHAL_*deployment variables. narwhal dev setup,init,up,verify,statusanddownare replaced bynarwhal deploy --target local.--instanceis now--run, and results reportdata.run.init,planandrunon SSH hosts needcosignand the manifest's signature bundle, or--skip-signature-check.- Hosts need rootful Docker. Unknown SSH host keys are refused.
- The router requires
NARWHAL_ROUTER_TOKEN. Handoff format version 2./healthreturns 503 when fenced. Control bodies over 64 KiB get 413. Drain returns 409 without a complete engine contract. launch.jsonaddsserved_model_name: prepare 0.13.0 launch directories again.ucx_rdmarefusestransfer.gpu_tls: cuda.- Keyed engines are scraped through their sidecar, so their
instancelabel is the sidecar's address. narwhal_slo_secondsadds anoriginlabel. Grafana's admin password is random.planrefuses more inputs. Deploy errors name the subcommand. A refuseddown --deleteexits 2. An unreachable host reportsfailed_gate.
Known limitations
- The Kubernetes operator is experimental. A new release redeploys from the
imagesstage, with no rolling upgrade. - After a host reboot, engines stay down until
narwhal deploy runruns again. plandoes not check free disk space or GPU memory.- The router pair, the witness and engine restarts under load are not yet qualified live on this release (#677).
Narwhal v0.13.0
Features
- dev:
narwhal dev demostarts the fleet when it is not up, then sends long replies and long prompts for 30 seconds each while the live view shows the engines change roles, and reports the requests, role switches and final split. (#480) (3afd653) - dev:
narwhal dev watchdraws each engine's role history across the terminal's width with a mark at each role switch, shows the Narwhal logo when the terminal is tall enough, and names the role controller's last decision and its reason. The--onceframe gains acontrollerfield. (#476) (6c92325)
Fixes
- dev:
narwhal dev askwith one prompt decodes greedily unless the template sets a temperature, so the same prompt gets the same reply. (#480) (3afd653) - dev:
narwhal devsizes llama.cpp engine threads by a container's CPU quota, so engines underdocker run --cpusor a Kubernetes CPU limit no longer oversubscribe it. (#479) (c5c64a0)
Documentation
- The README opens with a recording of
narwhal dev, an "Open in GitHub Codespaces" button and the evaluation's results. The repository's dev container runsmake setup, so a codespace runsnarwhal devon the CPU without installing anything. (#477) (32b33c3) - The README's recording and "Trying it" commands go step by step:
up,ask, thendemo. (#480) (3afd653)
Narwhal v0.12.0
⚠ BREAKING CHANGES
- serving: A client that matched type
standbyduring a hold on the lease holder now receivesnot_ready. - lifecycle: The router refuses an engine whose model files differ from the rest of the fleet. Engines from earlier releases do not report their model files, so they cannot share a fleet with 0.12.0 engines. Upgrading therefore takes the whole fleet out of service at once (docs/operate/04-Upgrade-and-Validate.md, "Upgrading to model file digests").
- profiling: SGLang
narwhal-profile --onlysweeps require--router-url, or--no-routerwhen no router serves the engines. - serving: A router without the lease answers
GET /narwhal/engines,/lifecycle,/state,/handoffand/targetswith HTTP 503 instead of its own snapshot. A request withX-Narwhal-Diagnostic: truestill gets a standby's state and lifecycle. - observability: Metrics contract 3: each
/metricscounter covers one router process and restarts at 0 when that process restarts, including on--resume. Deployment totals stay in/narwhal/state.make observefor a router pair requiresNARWHAL_TARGETS_URL.
Features
- calibration:
narwhal-check --calibrate-first-token --pairs-with MEMBER --router-url URLcalibrates a joining engine one member at a time while the other members serve clients. (#475) (0b29dfc) - deployment: The deploy path can deploy a vLLM fleet from a GGUF model file. (#454) (b9712fe)
- dev:
narwhal dev init --gpusruns each engine on its own GPU, so a dev fleet can join and remove engines. (#454) (b9712fe) - fleet-control: Join and Leave actions. Restore baseline returns engines that left and removes engines that joined. (#454) (b9712fe)
- lifecycle: A drain with
restart: falseholds a running engine out of placement and readmits the same process. (#475) (0b29dfc) - lifecycle: Join, readmission,
finalize-fleetand preflight refuse an engine whose model files differ from the fleet's. (#454) (b9712fe) - observability: Request outcomes draws not-ready refusals as
rejected (not ready), apart fromrejected (capacity). (#475) (0b29dfc) - observability: The router exports the membership generation and join and leave outcomes. The dashboard marks membership changes and keeps a departed engine's history.
make observescrapes both routers of a pair. (#454) (b9712fe) - profiling:
narwhal-profile --copy-from MEMBER --only NEWgives a new engine the measured profile of a member without a sweep, when the engine's launch, model files and KV capacity match the member's. (#475) (0b29dfc) - serving: A lease holder that is not ready answers HTTP 503 with type and code
not_readyand the cause inreason. (#475) (0b29dfc) - serving: The router adds and removes engines while it runs, through
GET,POSTandDELETE /narwhal/engines. A joining engine receives work only after it passes the contract, profile, calibration and readmission checks. A leaving engine drains before the router removes it. (#454) (b9712fe) - sglang: On SGLang 0.5.23 and later, engines launch with the overlap scheduler and FlashInfer decode attention. (#440) (5af93bc)
Fixes
- calibration: First-token calibration asks for at least two output tokens per request, so it completes at the longest input length. (#454) (b9712fe)
- dev:
narwhal dev initreads the interface address without theipcommand, so the TensorRT-LLM container no longer needsiproute2. (#454) (b9712fe) - ha: A lease holder stopped with SIGTERM keeps serving for
--shutdown-drainseconds, 0.5 by default, after its readiness fails, so HAProxy no longer returns 502 during a takeover. (#475) (0b29dfc) - ha: The shipped HAProxy configuration holds requests through a router takeover instead of returning 503, also when the stopped router restarts at once as standby. (#454) (b9712fe)
- profiling: An SGLang profiling sweep refuses to run until the router confirms that the peer it switches is out of service. (#454) (b9712fe)
Documentation
- deploy: Fabric qualification shows how to send KV between engines of one host over their HCAs. (#475) (0b29dfc)
- membership: New pages for the engine membership HTTP API and for joining and removing engines. (#454) (b9712fe)
- The
narwhal devcommand reference is linked from the dev pages andnarwhal dev --help. (#443) (c9ff72f)
Narwhal v0.11.0
Features
- observability: show the NVIDIA logo mark for TensorRT-LLM engines (#437) (40e2c33)
- TensorRT-LLM engine backend (milestone 25) (#425) (28cba69)
Fixes
- serving: release the router lease when shutdown starts (#436) (8980147)
- SGLang role-switch transfers, profiler role restore and decode spread (#434) (8ae03b0)
Documentation
Narwhal v0.10.0
Features
controller.reactive.decode_recoveryschedules an early evaluation of a move to decode after aslot_waitrefusal (5b8d174)serving.prefill_on_decodelets placement borrow a decode-role engine for a prefill leg when every prefill-role engine misses the TTFT budget, and the journal recordsprefill_role(5b8d174)tools/measurement/trace_convert.pywrites public timestamped traces asmooncake_tracefiles (5b8d174)- a queued request whose decode-slot wait would pass its TTFT budget is refused with reason
slot_wait, and the journal's admission price records the wait (2bbe619) - decode profiles reach each engine's sequence limit, and preflight warns when a profile stops short of it (2bbe619)
Fixes
- a concurrent decode leg holds its decode seat from placement until its prefill completes plus its decode time, and refused or queued decode work counts as decode demand (2bbe619)
- observability: recreate Prometheus when make observe stages a new config (#428) (9b649f8)
- role control sees a decode shortfall on the confirmation span as well as the window, and prices arriving prefill work by each prompt's share of a batch (2bbe619)
Narwhal v0.9.0
Features
narwhal dev asksends prompts through the fleet and reports latency, throughput and the engines that served each request (7de19ff)narwhal dev upsets up and starts a llama.cpp fleet on one Linux or WSL2 workstation, on an NVIDIA GPU or the CPU alone, andnarwhal dev down --removestops it and deletes its files (7de19ff)narwhal dev watchshows each engine's role and load, latency, throughput and role switches in a live terminal view (7de19ff)- llama.cpp engine backend: prefill and decode run on separate llama-server processes, each request's KV cache moves between them through slot files, and the router switches engine roles under load (7de19ff)
- the small vLLM and SGLang dev templates state GPU memory in MiB and run on GPUs with about 8 GiB and 10 GiB free (7de19ff)
Fixes
- a native engine's identity holds when the host clock is corrected, as under WSL2 (7de19ff)
Documentation
- quick start, live view and llama.cpp engine pages (7de19ff)
Narwhal v0.8.0
Narwhal v0.7.0
Narwhal v0.6.0
Narwhal v0.5.0
⚠ BREAKING CHANGES
-
engine-role environments drop NARWHAL_ENGINE_LAUNCHER and NARWHAL_ENGINE_LAUNCHER_SHA256; run engine actions with narwhal-engine. The attestation contract tool runs as python -m narwhal.deployment.attestation_contract.cli.
-
concurrent first-token calibration with measured and reused reporting (#242)
-
split oversized modules by concern (#252) (e29cadc), closes #239
Features
- colour dashboard series by meaning (#270) (9212382)
- concurrent first-token calibration with measured and reused reporting (#242) (683b83b)
- enhance reactive policy to manage unsettled evaluations and departure leads (#251) (4712899)
- faster role changes and slot-aware decode admission (#234) (55f7854)
- make AIPerf 0.13.0 the documented benchmark client (#280) (cadcc87), closes #271
- router data-plane throughput (#267) (1be680b)
Fixes
- check idle engine connections with poll() (#281) (714adb7)
- keep a departure leading through one evaluation below the margin (#250) (551fa2f)
- pin Narwhal dev to vLLM 0.30.0 (#269) (25f5383)
- use one red across the dashboard (#279) (37b5f5b)