-
Notifications
You must be signed in to change notification settings - Fork 8
Example Models
The models/ directory contains example QONNX models, including all models from the original finn-examples repository.
These serve as input to our regression test CI infrastructure, which is documented here.
To download these models, run dvc pull within the cloned finn-plus repository.
Build flows for these models are defined and configured using the "benchmarking" system in FINN+. Users can run this locally via the finn bench command:
finn bench --bench_config PATH_TO_CONFIG.YML
This will launch the build(s) defined in the YAML file within the bench_work/ directory. Output artifacts will be saved under a timestamp in the bench_output/ directory, with additional debug artifacts saved in bench_save/.
To see how each build flow is configured, start by looking at the CI regression test configs, for example: regression_basic.yml.
The dut entry defines which included flow to execute. These are defined in src/finn/benchmarking/dut either as a simple YAML config or python script for more complex flows. The experiment-specific config passed to finn bench extends/overwrites this model-/topology-specific build config.
The models themselves (.onnx) and golden I/O pairs for verification (.npy) are tracked via DVC, while corresponding build config files (folding_config.json and specialize_layers.json) are tracked directly via Git.
Models are tracked either
- as a single .onnx file (passed as
model_pathto the benchmarking system) - as a directory containing a model.onnx file & the inp.npy/out.npy files (passed as
model_dir)
| Model | Dataset | File names |
|---|---|---|
| VGG-10* | RadioML 2018 | vgg10/radioml_w4a4_small_tidy.onnx |
| MNv1* | ImageNet 2012 | mobilenetv1/mobilenetv1-w4a4_pre_post_tidy_opset-11.onnx |
| Cybersecurity (MLP)* | UNSW-NB15 | cybsec/unsw_nb15-mlp-w2a2.onnx |
| BNN-PYNQ tfc* (3 variants) |
MNIST | bnn-pynq/cnv-w1a1_qonnx.onnx bnn-pynq/cnv-w1a2_qonnx.onnx bnn-pynq/cnv-w2a2_qonnx.onnx |
| BNN-PYNQ cnv* (3 variants) |
CIFAR-10 | bnn-pynq/tfc-w1a1_qonnx.onnx bnn-pynq/tfc-w1a2_qonnx.onnx bnn-pynq/tfc-w2a2_qonnx.onnx |
| GTSRB (cnv-w1a1)* | GTSRB | gtsrb/cnv_1w1a_gtsrb.onnx |
| KWS (MLP)* | Google Speech Commands v2 | kws/MLP_W3A3_python_speech_features_pre-processing_QONNX_opset-11.onnx |
| RN-50* | ImageNet 2012 | resnet50/resnet50_w1a2_exported.onnx |
| Transformer GPT (4 variants) |
TinyStories | transformer/gpt_a_6b_gpt2-s256-t2048-l2-h4-e256 transformer/gpt_b_4b_gpt2-s256-t2048-l2-h4-e256 transformer/gpt_c_gpt2-s512-t2048-l2-h4-e512 transformer/gpt_d_gpt2-s256-t2048-l1-h2-e256 |
| Transformer RadioML (5 variants) |
RadioML 2018 | transformer/rml_transformer_0 transformer/rml_transformer_a transformer/rml_transformer_b transformer/rml_transformer_c transformer/rml_transformer_d |
| Conformer RadioML (1 variant) |
RadioML 2018 | transformer/rml_conformer |
| Models imported from finn-transformers repo | N/A | DVC cross-repo import at transformer/finn-transformers |
* based on finn-examples
π Home
- Migration Guide
- Building an Accelerator
- DataflowBuildConfig Documentation
- Example Models
- Build Guides:
- Brevitas - Quantization library
- FINN+ Repository
- Custom Steps Library