Minimal C++20/CUDA multi-model inference runtime with dynamic model plugins (Sparkles), built for NVIDIA DGX Spark (GB10 / SM121).
Glitter runs any combination of models that fit in unified memory inside one process, one CUDA context, and one shared stream — dynamically dlopen()-ing support only for the model architectures you actually install and load.
- Tiny, model-agnostic core (
libglitter_runtime.so+glitter): Zero model code, zero TensorRT, and zero CUTLASS in the core runtime. Model families compile independently intolibglitter_sparkle_<arch>.soplugins against the versionedGlitterSparkleV1C ABI (include/glitter/sparkle.hpp). - Out-of-tree Sparkle SDK (
find_package(Glitter)): Install Glitter core once (cmake --install), then build any model plugin in its own repository without pulling unrelated model code, weights, or dependencies. - 256-byte-aligned
.glitv1 packs: Standardizes weights (NVFP4_E2M1,FP8_E4M3,BF16,F32) in mmap-friendly.glitbinaries wrapped bysparkle.jsonmanifests for sub-2-second cold starts. - Three-tier shared memory layout:
- Shared
WeightArena: Per-ModelIdcoalescing allocator (alloc_for/free_owner) for N co-resident models and live unload/hot-swap. - Global
KvPagePool: Fixed-size physical byte pages shared across stateful models with prefix pinning, LRU eviction, and per-model purge. - Shared
Scratchpad+ zero-copyTensorBus: Single transient activation arena and direct in-process tensor handoff.
- Shared
- Deadline-aware
QuantumScheduler& cooperative GPU preemption:PriorityGpuLock+GpuYieldHooklet Hard-RT audio/video workloads share one GB10 stream cleanly alongside background LLMs and scorers.
- SparkScore — First public out-of-tree Glitter Sparkle (
sparkle/libglitter_sparkle_sparkscore.so): typed, calibrated System One decisions fromd3-ultra27B NVFP4 + native 27-layer ViT vision + UMA/NVMe FP8 pack store (107 msJevBench p50,1.4 sboot,58+photos/s re-sort on one DGX Spark).
# Host-only CPU build + unit tests (~2 s on macOS/Linux)
make test
# NVIDIA Blackwell SM120/SM121 (DGX Spark GB10) build & install SDK
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release \
-DGLITTER_CUDA=ON -DGLITTER_CUDA_ARCH=sm_121a
cmake --build build --parallel
./build/glitter_tests
cmake --install build --prefix /usr/local| Option | Default | Description |
|---|---|---|
GLITTER_CUDA |
AUTO |
Enable CUDA backend (AUTO, ON, OFF) |
GLITTER_CUDA_ARCH |
120f |
Blackwell target suffix (120f, sm_121a, etc.) |
GLITTER_SPARKLES |
qwen |
In-tree reference Sparkles to compile (qwen, or NONE for core-only) |
GLITTER_TRT |
OFF |
Build optional libglitter_trt.so TensorRT helper (AUTO, ON, OFF) |
GLITTER_BUILD_TESTS |
ON |
Build glitter_tests |
Install Glitter core (cmake --install), then link Glitter::runtime in your plugin repo:
cmake_minimum_required(VERSION 3.22)
project(my_sparkle LANGUAGES CXX CUDA)
find_package(Glitter REQUIRED)
glitter_add_external_sparkle(my_model IEEE_CUDA
my_model.cpp
kernels.cu
)
install(TARGETS glitter_sparkle_my_model
LIBRARY DESTINATION lib/glitter/sparkles
)Export extern "C" const glitter::GlitterSparkleV1* glitter_sparkle_v1() (and optionally extern "C" int glitter_sparkle_serve_main(int argc, char** argv) for glitter serve <arch> / glitter serve-<arch>). Glitter discovers plugins automatically from $GLITTER_SPARKLE_PATH, <exe_dir>/sparkles, <prefix>/lib/glitter/sparkles, and ~/.local/lib/glitter/sparkles.
glitter info # GPU / SM121 capabilities
glitter bench # GB10 memory bandwidth + NVFP4 GEMV rooflines
glitter sparkles # List discovered Sparkle plugins
glitter inspect <pack|file.glit> # Inspect pack manifest, .glit tensors & memory probe
glitter plan <pack1> [pack2 ...] # Dry-run unified memory admission control
glitter run <pack1> [pack2 ...] # Load N Sparkles into one shared process
glitter serve <arch> [args...] # Run a Sparkle's native server (or `glitter serve-<arch>`)Apache License 2.0 (LICENSE). Copyright 2026 Enntity Labs.
