Stateful accumulator network for anira

A minimal stateful test model with its state as an explicit input and output (mono and stereo), for LibTorch, ONNX Runtime, LiteRT and ExecuTorch. anira's test model for state pairs.

Files

File Engine Size SHA256
onnx/stateful_accumulator_network_mono.onnx ONNX Runtime 1,470 b170e76012c9c0116923cb5f71459380a279457828e9c139093d103c24d0b7ed
onnx/stateful_accumulator_network_stereo.onnx ONNX Runtime 1,470 2be8eaea68c2a16b9ab49858f50bedcb5219baaeeaf63e084a1afa2dddeedabe
litert/stateful_accumulator_network_mono.tflite LiteRT, TensorFlow Lite 2,748 0a558a85827dd36778d88ee5540f64922502255d05d1924eca6e7db9b0d7a3e6
litert/stateful_accumulator_network_stereo.tflite LiteRT, TensorFlow Lite 2,760 8cab062194313366d013046e0930d18d588b60b61d83ec124c37a7de854ba7a5
libtorch/stateful_accumulator_network_mono.pt LibTorch 4,523 e8db1874b46aa96c4e9cff6545b91a9bc780fe6a9b39450b03ffe2e38f90095b
libtorch/stateful_accumulator_network_stereo.pt LibTorch 4,581 b1b9a55a7212b0f34eb02536fb750cf425860e138ef651c747e0cd577e1a6792
executorch/stateful_accumulator_network_mono.pte ExecuTorch 1.3.1, CPU 2,820 c4497f2a68db0cc75a0800301dff043fb89df9e74aa0633a8073c8038cd60c29
executorch/stateful_accumulator_network_mono_coreml.pte ExecuTorch 1.3.1, Core ML (Apple) 14,419 6768951fa891811582bcd88d60b732a78265dd9e75879cc8bda324783f18edd8
executorch/stateful_accumulator_network_mono_vulkan.pte ExecuTorch 1.3.1, Vulkan (GPUs) 3,332 f215c95f6d865e626dbf36d6ebd0deff63cee0b58f1b3e9e526715402a51ac34
executorch/stateful_accumulator_network_stereo.pte ExecuTorch 1.3.1, CPU 2,820 5f1b05967f97e46bd95347b42afe2f96e533a72368ef8b6564d1415459311e45
executorch/stateful_accumulator_network_stereo_coreml.pte ExecuTorch 1.3.1, Core ML (Apple) 14,419 82cfc20a9dd05bfbacf7f8296a39846f625eec7ad9ade990868b1f0f4324f7ce
executorch/stateful_accumulator_network_stereo_vulkan.pte ExecuTorch 1.3.1, Vulkan (GPUs) 3,332 216fe903405769b025e77268a3a21162efd33723a2f635ba9a6e55f454539558
coreml/stateful_accumulator_network_mono.mlpackage Core ML (native) 3,624 per file in the catalog
coreml/stateful_accumulator_network_stereo.mlpackage Core ML (native) 3,624 per file in the catalog

Source

anira-project/example-models @ d1bc5cf, StatefulAccumulatorNetwork/models/.

Formats and checks

Every model here runs on ONNX Runtime, LiteRT and TensorFlow Lite, LibTorch, ExecuTorch (XNNPACK or portable kernels on the CPU, Core ML on Apple, Vulkan on GPUs) and as a native Core ML ML program, with the ONNX models' tensor names. anira foundation models streams every format of every description over twelve consecutive calls with the state fed back and checks that they agree (tools/check_streaming.py). Deviations below are from ONNX Runtime, per model, in the order of the files.

Format Files Max deviation
ExecuTorch, Core ML (Apple, float32) executorch/*_coreml.pte 1.5e-07, 1.8e-07
ExecuTorch, Vulkan (GPUs) executorch/*_vulkan.pte exported; not run here (no Vulkan runtime)
Core ML ML program (anira's native engine, coming with v3; macOS 13, iOS 16) coreml/*.mlpackage 1.5e-07, 1.8e-07
uv run --no-project export/export_litert.py <model.onnx> <out.tflite> [<description>] [--guitar-lstm <pt>]
uv run --no-project export/export_executorch.py <model.onnx> <out.pte> [<description>] [--guitar-lstm <pt>] [--coreml | --vulkan]
uv run --no-project export/export_coreml.py <model.onnx> <out.mlpackage> [<description>] [--guitar-lstm <pt>]
uv run --no-project export/export_libtorch.py <model.onnx> <out.pt> [<description>] [--guitar-lstm <pt>]

<description> is the model's description in anira foundation models, for the input shapes where the ONNX model's time axis is dynamic. The PyTorch module comes from the ONNX model (export/onnx_to_torch.py: onnxsim to static shapes, onnx2torch with traceable converters); each export is checked against ONNX Runtime over eight consecutive calls of random input with the state fed back, relative to the output's peak (export/check.py).

This repository holds the weights, the export scripts and the licence. The anira model descriptions live with the code in anira foundation models (models/stateful-accumulator), versioned with git. Pin a revision and check each file's SHA256 when you download:

https://huggingface.co/anira-project/stateful-accumulator/resolve/<revision>/onnx/stateful_accumulator_network_mono.onnx

Licence

Apache-2.0: LICENSE, copied from the source repository.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Collection including anira-project/stateful-accumulator