Vendor-agnostic ML inference on production edge devices [R]
Mirrored from r/MachineLearning for archival readability. Support the source by reading on the original site.
I work on PostSlate, a video editing tool, and this comes out of our own work.
We run ML models on-device, face detection and embedding among other things, which means we can't assume anything about the user's GPU. NVIDIA discrete, AMD, Intel integrated, Apple Silicon, all of it. That rules out CUDA immediately, we needed one backend that runs everywhere.
We landed on ncnn's Vulkan backend. Numbers on a 4070, fp16:
- ArcFace R50 (face embedding): 30 ms on ONNX CPU → 3 ms on ncnn Vulkan
- SCRFD (face detection): 25 ms → 2.5 ms
- Model size: ArcFace 174 MB (ONNX fp32) → 87 MB (ncnn fp16 weight storage)
Of course the real speedup comes from offloading compute to the GPU, but this wouldn't be possible without the power of Vulkan.
The speed wasn't even the deciding factor, it's that Vulkan drivers already exist on every machine we ship to. This means that we don't have to force the user to download a specific runtime and no vendor-specific installs.
Full writeup with the rest of the numbers: https://getpostslate.com/blog/faster-local-inference
[link] [comments]
More from r/MachineLearning
-
A collision-entropy floor for watermark/retrieval AI-text detection. Looking for a sanity check before I take this further [D]
Aug 14
-
Are supervised and unsupervised learning still relevant today? [D]
Aug 14
-
TMLR Relevance and Prestige [D]
Aug 13
-
Reproducible canvas-aligned low-level patterns in somerandomllm-generated images and their possible relation to iterative editing artifacts [D]
Aug 13
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.