What is Narwhal?
Narwhal is an adaptive, disaggregated inference framework that automatically hot-swaps prefill and decode roles as demand changes, and without having to reload model weights. It can scale from a single GPU to multi-node deployments.
How engines change roles
The role controller scores the current role split and each adjacent split, one engine move away. It uses measured engine profiles, offered demand, and resident work, and moves one engine only when the worst projected SLO ratio improves and every role, lifecycle, and resident-work guard passes. New requests follow the revised split; resident requests finish on their assigned engines.
Evaluation
Read the full evaluation: Evaluating Narwhal
Getting the commands
Install on Linux with Python 3.11 or newer:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install narwhal-inference
narwhal-serve --version
narwhal --help
The wheel installs these commands:
narwhal, narwhal-engine, narwhal-serve, narwhal-attest, narwhal-profile, and narwhal-check. See Installing from PyPI and the CLI reference for their options.
Trying it on one GPU
Narwhal dev runs a local NVIDIA CUDA fleet on Ubuntu, either directly or under WSL2.
narwhal dev init
narwhal dev up
narwhal dev verify
narwhal dev status
narwhal dev down
The default template starts two vLLM engines and the SGLang template starts two SGLang engines, each on an NVIDIA GPU whose free VRAM is at least 80% of its total plus 512 MiB. The RTX 5090 reference template starts four vLLM engines on an RTX 5090.
Bringing up a fleet
Run the deployment gates in Deploying a fleet from a management workstation.
Documentation
The MkDocs site routes installation, deployment, operation, measurement, and reference tasks.
Contributing
Built on Arrow
Narwhal's scheduling algorithms derive from Arrow: Adaptive Scheduling Mechanisms for Disaggregated LLM Inference Architecture by Wu et al. (2025).
Metadata
Release files for narwhal-inference 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| narwhal_inference-0.7.0.tar.gz | 4.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| narwhal_inference-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.6 MB
Release files / narwhal_inference-0.7.0.tar.gz
| Download URL | narwhal_inference-0.7.0.tar.gz |
|---|---|
| Size | 4.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1735ace58e95b4dee8ce44d2e847cca8b7a42dfb6a7fc7459bc06c0274cc335
|
|
BLAKE2b-256 checksum How to use checksums |
0b1c1686d6a70a879ee83db9322e80ae0937d236b3ff7db15ff9d2201a0ceda6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logRelease files / narwhal_inference-0.7.0-py3-none-any.whl
| Download URL | narwhal_inference-0.7.0-py3-none-any.whl |
|---|---|
| Size | 419.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ebd2b6202f337274d6cbda6a108697a1235c5f96b8af65fff44a50800818338d
|
|
BLAKE2b-256 checksum How to use checksums |
4bee4ff0c05992d8b3a1ba18710e1b4b6f05fe0b78949142c649c5091d5bd2b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency log