{"slug": "promising-inference-software-written-in-zig", "title": "Promising inference software, written in Zig", "summary": "ZML released ZML/LLMD, an inference server written in Zig that runs LLaMa, Gemma, Qwen, and Mistral LLMs on five architectures including NVIDIA CUDA, AMD ROCm, Google TPU, Intel oneAPI, and Apple Metal. The server features continuous batching, paged attention, tensor parallel sharding, prefix caching, tool calling, and DFlash speculative decoding for up to 10x speedup, with native HuggingFace, S3, and GCS support.", "body_md": "Today we’re releasing ZML/LLMD. It’s a self-contained inference server that runs LLaMa, Gemma, Qwen and Mistral LLMs\ntransparently on **5 architectures**: **NVIDIA CUDA**, **AMD ROCm**, **Google TPU**, **Intel oneAPI** and **Apple\nMetal**.\n\n## Modern serving features\n\nZML/LLMD supports modern serving features: **continuous batching**, **paged attention**, **tensor parallel sharding**,\n**prefix caching**, **tool calling** and does so on **all platforms**.\n\nMetrics are also exposed in the Prometheus format via the `/metrics`\n\nendpoint.\n\n## Supported models\n\nZML/LLMD alpha ships with support for the following models:\n\n- Qwen 2, 3, 3.5 and 3.6 series (dense and MoE)\n- Gemma 3 and 4 series (dense and MoE)\n- LFM2.5 series\n- Mistral 3 and Ministral series\n- LLaMa 2 and 3 series\n\nDeepSeek, Kimi, GLM, MiniMax and StepFun models are coming soon.\n\n## Native HuggingFace, S3 and GCS support\n\nBuilt on ZML, ZML/LLMD has native support for ZML’s VFS subsystem, which allows for zero-copy loading of models from\nHuggingFace (`hf://`\n\n), S3 (`s3://`\n\n), and GCS (`gs://`\n\n). This means that you can load models directly from these sources\nwithout having to download them first, saving time and storage space. Authentication is handled with the standard\nenvironment or paths for each backend.\n\nFor instance, loading from HuggingFace is as simple as using the `hf://`\n\nprefix on any flag that expects a path:\n\n``` bash\n$ docker run -p 8000:8000 --shm-size=256GB --gpus=all -e HF_TOKEN -it zmlai/llmd:cuda \\\n    --model=hf://Qwen/Qwen3-8B\n```\n\nNotice we’re also passing the `HF_TOKEN`\n\nenvironment variable to authenticate.\n\n## DFlash speculative decoding\n\nZML/LLMD alpha ships with native support for DFlash on Gemma 4 series and soon Qwen series models. DFlash is a new\nspeculative decoding algorithm that can speed up tok/s/user by **up to 10x** on supported models.\n\nTo use it, just pass the `--dflash-model`\n\nflag when launching LLMD:\n\n``` bash\n$ docker run -p 8000:8000 --shm-size=256GB --gpus=all -e HF_TOKEN -it zmlai/llmd:cuda \\\n    --model=hf://google/gemma-4-31B-it \\\n    --dflash-model=hf://z-lab/gemma-4-31B-it-DFlash\n```\n\nOne nice benefit of ZML’s programming model is the compounding of features across platforms. For instance, DFlash transparently runs very well on Intel and Apple GPUs.\n\nRead about DFlash [on the Z-Lab blog](https://z-lab.ai/projects/dflash/) and the\n[currently released DFlash drafters](https://huggingface.co/collections/z-lab/dflash).\n\n## Optimized Docker image\n\nOn each platform, ZML/LLMD ships the platform runtime as part of the image in a sandboxed manner. Per file optimization\nreduces image sizes by 5-10x. On top of that careful ordering of layers and custom compression improves\n`docker pull`\n\ntime by using download/extraction overlapping.\n\nThe result is a small image that can be pulled and run in seconds:\n\n``` bash\n$ time docker pull zmlai/llmd:cuda\ncuda: Pulling from zmlai/llmd\n...\nStatus: Downloaded newer image for zmlai/llmd:cuda\ndocker.io/zmlai/llmd:cuda\n\nreal    0m13.766s\nuser    0m0.021s\nsys     0m0.022s\n```\n\n| Platform | Image | Size |\n|---|---|---|\nCUDA |\n`zmlai/llmd:cuda` |\n1.7 GB |\nROCm |\n`zmlai/llmd:rocm` |\n3.9 GB |\nTPU |\n`zmlai/llmd:tpu` |\n280 MB |\nOneAPI |\n`zmlai/llmd:oneapi` |\n350 MB |\nMetal |\n`brew install zml/zml/llmd` |\n140 MB |\n\nEach image ships with everything it needs to run. For instance on Metal the Apple Metal compiler is shipped in the archive, or ROCm itself in the AMD image.\n\n### Built-in CUDA Compatibility\n\nOn the CUDA platform, ZML/LLMD ships with the [CUDA Compatibility layer](https://docs.nvidia.com/deploy/cuda-compatibility/latest/why-cuda-compatibility.html)\ntransparently built-in that enables ZML/LLMD to run on a wide range of driver versions without intervention.\n\nThis feature doesn’t require any special configuration as the probe is done automatically at runtime. It is also fully sandboxed and doesn’t require any system libraries to be installed.\n\n## Automatic sharding support\n\nZML/LLMD supports tensor parallel inference on all platforms. It automatically shards the model across multiple devices and handles the communication between them transparently.\n\nCurrently only tensor or expert parallel sharding is supported. More control will be added in the near future, for instance pipeline parallelism.\n\n## Python-free Execution Path\n\nZML/LLMD runs on ZML’s own ML framework, ZML, built with Zig, MLIR, OpenXLA. It compiles binaries and runtimes ahead of time into a single, hermetic artifact. Since the ZML programming model is explicit compilation passes, once compiled, there are no hidden compilation happening in the hot path. Latencies are flat and predictable.\n\n## Performance\n\n### google/gemma-4-26B-A4B-it (bs=16)\n\n| NVIDIA H100x2 | Avg | Min | Max | P50 | P75 | P90 | P95 | P99 | P99.9 |\n|---|---|---|---|---|---|---|---|---|---|\n| TTFT (ms) | 127.64 | 70.39 | 162.08 | 141.91 | 142.04 | 142.1 | 143.1 | 158.28 | 161.7 |\n| ITL (ms) | 12.03 | 0.01 | 85.58 | 11.67 | 12.28 | 13.14 | 16.35 | 68.24 | 74.42 |\n| Total tok/s | 1317.93 |\n\n| Intel B70x2 | Avg | Min | Max | P50 | P75 | P90 | P95 | P99 | P99.9 |\n|---|---|---|---|---|---|---|---|---|---|\n| TTFT (ms) | 426.05 | 117.36 | 1027.4 | 375.38 | 375.4 | 612.75 | 850.48 | 992.01 | 1023.86 |\n| ITL (ms) | 81.83 | 0.03 | 499.75 | 81.62 | 82.72 | 83.7 | 84.17 | 84.6 | 279.99 |\n| Total tok/s | 179.31 |\n\n| AMD MI300X | Avg | Min | Max | P50 | P75 | P90 | P95 | P99 | P99.9 |\n|---|---|---|---|---|---|---|---|---|---|\n| TTFT (ms) | 101.86 | 36.3 | 145.35 | 109.7 | 109.76 | 110.39 | 116.76 | 139.63 | 144.77 |\n| ITL (ms) | 18.52 | 0.02 | 69.33 | 18.4 | 18.82 | 19.12 | 19.26 | 40.41 | 47.75 |\n| Total tok/s | 858.8 |\n\n| M3 Max | Avg | Min | Max | P50 | P75 | P90 | P95 | P99 | P99.9 |\n|---|---|---|---|---|---|---|---|---|---|\n| TTFT (ms) | 2364.71 | 1840.79 | 2608.73 | 2411.42 | 2411.5 | 2470.67 | 2539.7 | 2594.92 | 2607.35 |\n| ITL (ms) | 67.01 | 25.81 | 196.99 | 67.02 | 70.63 | 74.5 | 77.41 | 85.19 | 104.45 |\n| Total tok/s | 109.59 |\n\n### google/gemma-4-31B-it + z-lab/gemma-4-31B-it-DFlash (bs=16)\n\n| TPU v6ex4 | Avg | Min | Max | P50 | P75 | P90 | P95 | P99 | P99.9 |\n|---|---|---|---|---|---|---|---|---|---|\n| TTFT (ms) | 137.64 | 25.36 | 187.67 | 137.79 | 137.82 | 158.75 | 187.17 | 187.57 | 187.66 |\n| ITL (ms) | 16.73 | 0.01 | 345.35 | 0.02 | 0.08 | 71.85 | 73.76 | 75.63 | 323.83 |\n| Total tok/s | 943.7 |\n\n| AMD MI300X | Avg | Min | Max | P50 | P75 | P90 | P95 | P99 | P99.9 |\n|---|---|---|---|---|---|---|---|---|---|\n| TTFT (ms) | 254.95 | 57.23 | 368.84 | 268.09 | 268.14 | 268.23 | 283.34 | 351.74 | 367.13 |\n| ITL (ms) | 21.51 | 0.01 | 140.15 | 0.02 | 0.03 | 91.55 | 93.82 | 109.29 | 139.67 |\n| Total tok/s | 731.8 |\n\n### Qwen/Qwen3.6-27B (bs=8)\n\n| M3 Max | Avg | Min | Max | P50 | P75 | P90 | P95 | P99 | P99.9 |\n|---|---|---|---|---|---|---|---|---|---|\n| TTFT (ms) | 6052.4 | 2684.92 | 7285.46 | 6408.14 | 6408.16 | 6671.36 | 6978.41 | 7224.05 | 7279.32 |\n| ITL (ms) | 183.96 | 3.33 | 876.88 | 183.83 | 185.05 | 186.34 | 187.62 | 196.88 | 208.71 |\n| Total tok/s | 33.5 |\n\n| AMD MI300X | Avg | Min | Max | P50 | P75 | P90 | P95 | P99 | P99.9 |\n|---|---|---|---|---|---|---|---|---|---|\n| TTFT (ms) | 259.71 | 68.5 | 357.55 | 241.55 | 270.58 | 357.51 | 357.54 | 357.55 | 357.55 |\n| ITL (ms) | 30.97 | 0.01 | 115.9 | 31.02 | 31.15 | 31.24 | 31.29 | 31.42 | 34.38 |\n| Total tok/s | 511.6 |\n\n### Fast cold start\n\nZML/LLMD has been designed from the ground up to have fast cold start times, as shown here with Qwen 3.6-27B BF16:\n\n## Give it a try\n\nRun ZML/LLMD and point your favorite harness to it.\n\n**NVIDIA**\n\n```\ndocker run -p 8000:8000 --shm-size=256GB --gpus=all -e HF_TOKEN -it zmlai/llmd:cuda \\\n    --model=hf://Qwen/Qwen3.6-27B\n```\n\n**AMD**\n\n```\ndocker run -p 8000:8000 --device=/dev/kfd --device=/dev/dri -e HF_TOKEN -it zmlai/llmd:rocm \\\n    --model=hf://Qwen/Qwen3.6-27B\n```\n\n**Intel**\n\n```\ndocker run -p 8000:8000 --device=/dev/dri -e HF_TOKEN -it zmlai/llmd:oneapi \\\n    --model=hf://Qwen/Qwen3.6-27B\n```\n\n**Google TPU**\n\n```\ndocker run --net=host --privileged -e HF_TOKEN -it zmlai/llmd:tpu \\\n    --model=hf://Qwen/Qwen3.6-27B\n```\n\n**Apple Metal**\n\n```\nbrew install zml/zml/llmd\nllmd --model=hf://Qwen/Qwen3.6-27B\n```\n\n", "url": "https://wpnews.pro/news/promising-inference-software-written-in-zig", "canonical_source": "https://zml.ai/posts/llmd/", "published_at": "2026-07-10 05:56:47+00:00", "updated_at": "2026-07-10 06:35:29.725897+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-infrastructure", "ai-tools", "ai-products"], "entities": ["ZML", "LLMD", "NVIDIA", "AMD", "Google", "Intel", "Apple", "HuggingFace"], "alternates": {"html": "https://wpnews.pro/news/promising-inference-software-written-in-zig", "markdown": "https://wpnews.pro/news/promising-inference-software-written-in-zig.md", "text": "https://wpnews.pro/news/promising-inference-software-written-in-zig.txt", "jsonld": "https://wpnews.pro/news/promising-inference-software-written-in-zig.jsonld"}}