GuitarLSTM for anira
GuitarML's GuitarLSTM guitar amplifier model (convolutions and an LSTM), for LibTorch, ONNX Runtime, LiteRT (256-sample input) and ExecuTorch. anira's hybrid network example.
Files
| File | Engine | Size | SHA256 |
|---|---|---|---|
onnx/GuitarLSTM-libtorch-dynamic.onnx |
ONNX Runtime | 50,450 | 4789254a3bf75e0e012fbf248db431ecb71f57c7ccea10850ee85cf67bb6937f |
litert/GuitarLSTM.tflite |
LiteRT, TensorFlow Lite | 205,632 | 8950b4d51b64263cdf72a4ed1b637acf569dd57d9695c54c72692d84fca9d945 |
libtorch/GuitarLSTM-dynamic.pt |
LibTorch | 60,766 | 7fc4deca50fa192c8b99e8688788e96cc0336656337fa46529925a18bc704f7a |
executorch/GuitarLSTM-executorch.pte |
ExecuTorch 1.3.1, CPU | 62,724 | f8172e5a88e93bce2149f296cbd07d1e21df7b395f0f88a022cfffb0bf200190 |
executorch/GuitarLSTM_coreml.pte |
ExecuTorch 1.3.1, Core ML (Apple) | 290,570 | 1c37e6b986c3cfafe717fbc0f4cff72bbf79ab582e91728421f97c8d9cf098fa |
executorch/GuitarLSTM_vulkan.pte |
ExecuTorch 1.3.1, Vulkan (GPUs) | 59,268 | 96971ef5a9f02d3d10c0465914c2cb2fa6776aacba98d35bcbb178c28b394017 |
coreml/GuitarLSTM.mlpackage |
Core ML (native) | 89,490 | per file in the catalog |
Source
faressc/GuitarLSTM @ 08c7418 (a fork of GuitarML/GuitarLSTM), pytorch-version/models/model_0/ and tensorflow-version/models/model_0/; the export code is in that repository.
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 |
|---|---|---|
| LiteRT, TensorFlow Lite (re-exported) | litert/*.tflite |
8.4e-08 |
| ExecuTorch, Core ML (Apple, float32) | executorch/*_coreml.pte |
7.1e-08 |
| 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 |
7.8e-08 |
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), or for GuitarLSTM its rebuild from the TorchScript model (--guitar-lstm, export/sources.py), since onnx2torch does not convert an LSTM; 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).
upstream/ keeps anira's original LiteRT file (upstream/litert/GuitarLSTM-256.tflite), which the descriptions no longer name: it computes something else than the other formats, 12 to 16 % off from the first call. litert/GuitarLSTM.tflite is exported from the same PyTorch module as the other formats.
This repository holds the weights, the export scripts and the licence. The anira model descriptions live with
the code in anira foundation models (models/guitar-lstm), versioned with git. Pin a revision and check
each file's SHA256 when you download:
https://huggingface.co/anira-project/guitar-lstm/resolve/<revision>/onnx/GuitarLSTM-libtorch-dynamic.onnx
Licence
GPL-3.0: LICENSE, copied from the source repository. Software that ships these weights may have to meet the GPL's terms; check before you do.
- Downloads last month
- 61