Repository navigation
This is the first tagged release of NTransformer, a C++/CUDA LLM inference engine with no dependencies beyond the GPU toolkit. It runs models much larger than VRAM on a single consumer GPU.
Highlights
- Llama with tiered layer streaming. Each layer is placed automatically in VRAM, pinned RAM, or NVMe/mmap. Llama 3.1 8B Q8_0 decodes at 48.9 tok/s fully resident. Llama 3.1 70B runs at 0.2–0.5 tok/s on one RTX 3090 with 48 GB of RAM: 0.5 tok/s comes from Q4_K_M plus layer skip, and the tiered path is 83× faster than the mmap baseline. Also included are self-speculative decoding, layer skip, and a second-GPU peer VRAM cache.
- GLM-5.3-Flash (320B MoE, Q8_0, 341 GB) on an RTX 3090. It decodes at 0.24–0.26 tok/s on Windows. On Linux, the GPU reads experts directly from a raw NVMe drive through gpu-nvme-direct, which brings it to 0.45–0.5 tok/s, the limit of the disk. Greedy output is bit-exact against llama.cpp.
- DeepSeek-V4.1-Flash. A CPU reference engine with GPU offload runs at 18.2–23.5 tok/s on 2× H100 SXM5. llama.cpp on the same setup reaches 31.4–33.9 tok/s, and the gap is tracked in
docs/DEEPSEEK_PERFORMANCE_GAP.md. - AMD GPUs via ROCm/HIP (#15) for the Llama path. With
-DUSE_HIP=ON, the kernels build for both wave32 and wave64 GPUs. The DS41/GLM5 MoE engines are CUDA-only for now. - Native Windows build with MSVC, CUDA 13.2, and Ninja.
- NTRPU, a functional simulator and HLS/RTL track for a custom FPGA inference accelerator. It is research and is not part of the binaries.
Prebuilt binaries
| File | Platform | Requirements |
|---|---|---|
ntransformer-linux-x86_64-cuda13.tar.gz |
Linux x86_64, NVIDIA sm_80/86/89/90 (PTX embedded for newer GPUs) | NVIDIA driver for CUDA 13; glibc 2.39+ (Ubuntu 24.04 or newer) |
ntransformer-windows-x86_64-cuda13.zip |
Windows x86_64, NVIDIA sm_80/86/89/90 | NVIDIA driver for CUDA 13, Visual C++ 2015–2022 Redistributable |
ntransformer-linux-x86_64-rocm7.tar.gz |
Linux x86_64, AMD gfx90a/gfx942/gfx1100/gfx1101/gfx1151/gfx1201 | ROCm 7.x runtime; Llama models only |
- The CUDA builds link the runtime statically. The host code targets x86-64-v3 (AVX2).
- The binaries were compiled in CI on runners without GPUs, so they have not been tested there on a GPU.
- gpu-nvme-direct (Linux, VFIO) and the training library are not included. Build from source for those; see the README.
./ntransformer -m llama-8b-q8_0.gguf -p "Hello" -n 128 # resident
./ntransformer -m llama-70b-q4_k_m.gguf -p "Hello" -n 32 --streaming --skip-threshold 0.98
GLM5_GPU=1 ./ntransformer -m GLM-5.3-Flash-Q8_0-00001-of-00008.gguf \
--token-ids 785,6722,315,9621,374 -n 12 -t 0 --repeat-penalty 1.0 -c 512
# → Paris. In French, Paris is spelled "Paris", butGLM-5.3-Flash and DeepSeek-V4.1 are configured with GLM5_* / DS41_* environment variables, not CLI flags. For long prompts use GLM5_CHUNK=3, the configuration verified for parity. See docs/GLM5_PROJECT.md and the "MoE Models" section of the README.
What's Changed
- [ROCm] Add HIP build support for AMD GPUs on Linux and Windows by @jeffdaily in #15
New Contributors
- @jeffdaily made their first contribution in #15
Full Changelog: https://github.com/xaskasdf/ntransformer/commits/v0.1.0