#onnx #benchmark #session #decoder #rtf #sweep #half-precision-float

app snac-sweep

Sweep batch size, chunk size, and session count to benchmark ONNX decoder latency and RTF

4 releases

Uses new Rust 2024

0.1.3 Oct 17, 2025
0.1.2 Oct 17, 2025
0.1.1 Oct 17, 2025
0.1.0 Oct 17, 2025

#586 in Machine learning

MIT license

22KB
218 lines

snac-sweep

Benchmark sweep for SNAC's ONNX decoder inference: varies sessions (parallel sessions), chunk size (sequence length without context), and batch size to find the largest throughput (sessions × batch) under real-time factor (RTF) < 1.

Install

cargo install snac-sweep

Usage

snac-sweep --context-size <N> --max-chunk-size <M> --model <onnx-file>

RTF calculation is based on 24kHz sample rate (each chunk is 2048 samples).

Example

snac-sweep --context-size 3 --max-chunk-size 5 --model decoder_model_fp16.onnx

Dependencies

~14–21MB
~284K SLoC