1.2. System Architecture

How the components of Tiny ML ModelZoo work together.

1.2.1. High-Level Architecture

┌─────────────────────────────────────────────────────────────────┐
│                        USER INPUT                               │
│                    (YAML Config File)                           │
└─────────────────────────────────────────────────────────────────┘
                               │
                               ▼
┌─────────────────────────────────────────────────────────────────┐
│                     tinyml-modelzoo                             │
│  • Entry point (run_tinyml_modelzoo.sh / .bat / .ps1)           │
│  • Example configurations                                       │
│  • Model definitions and descriptions                           │
└─────────────────────────────────────────────────────────────────┘
                               │
                               ▼
┌─────────────────────────────────────────────────────────────────┐
│                    tinyml_modelmaker                            │
│  • Orchestrates the workflow                                    │
│  • Calls training, testing, compilation                         │
└─────────────────────────────────────────────────────────────────┘
                               │
           ┌───────────────────┼───────────────────┐
           ▼                   ▼                   ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ tinyml_tinyverse │ │ tinyml_torch     │ │  TI Neural       │
│  • Training      │ │ modelopt         │ │  Network         │
│  • Feature ext.  │ │  • Quantization  │ │  Compiler        │
│  • Testing       │ │  • QAT/PTQ       │ │  (ti_mcu_nnc)    │
└──────────────────┘ └──────────────────┘ └──────────────────┘
                               │
                               ▼
┌─────────────────────────────────────────────────────────────────┐
│                      OUTPUT ARTIFACTS                           │
│  • mod.a (compiled model)                                       │
│  • tvmgen_default.h (API header)                                │
│  • test_vector.c, user_input_config.h (validation data)         │
└─────────────────────────────────────────────────────────────────┘

1.2.2. Packages and How They Are Delivered

Package

Role

How you get it

tinyml_modelzoo

Models, model descriptions, examples, run scripts

The wheel, or a clone of tinyml-modelzoo

tinyml_modelmaker

Workflow orchestration

Dependency of tinyml_modelzoo (prebuilt wheel)

tinyml_tinyverse

Training, datasets, feature extraction

Dependency of ModelMaker (prebuilt wheel)

tinyml_torchmodelopt

Quantization

Dependency of ModelMaker (prebuilt wheel)

ti_mcu_nnc

TI Neural Network Compiler (TVM based)

Dependency of ModelMaker (Python 3.10 only)

Only tinyml-modelzoo is cloned, and only if you want to add or change models (Installation).

1.2.3. Component Details

1.2.3.1. tinyml-modelzoo

Purpose: the user-facing entry point with models and examples.

  • examples/: ready-to-run YAML configurations

  • tinyml_modelzoo/models/: neural network model definitions

  • tinyml_modelzoo/model_descriptions/: model metadata (the model_name values used in configs, supported devices)

  • docs/: guides (config YAML, bring your own model, NPU guidelines)

tinyml_modelzoo/models/
├── classification.py      # time series classification
├── regression.py          # time series regression
├── forecasting.py         # time series forecasting
├── anomalydetection.py    # autoencoder models
├── audio.py               # audio classification
├── image.py               # image classification
├── radar.py               # radar point cloud classification
├── feature_extraction.py  # feature extraction models
└── base.py                # base classes

1.2.3.2. tinyml_modelmaker

Purpose: orchestrates the end-to-end workflow.

  • Parses the config and applies defaults

  • Manages the project directory

  • Calls the training scripts of tinyml_tinyverse

  • Invokes quantization from tinyml_torchmodelopt

  • Runs the TI Neural Network Compiler

  • Its task modules are timeseries, audio, vision and radar

Output folder layout: see Understanding the Run Output.

1.2.3.3. tinyml_tinyverse

Purpose: core training infrastructure.

  • references/: task-specific training scripts

  • common/datasets: dataset loaders

  • common/models: base model classes

  • common/transforms: feature extraction transforms

  • common/augmenters: data augmentation

1.2.3.4. tinyml_torchmodelopt

Purpose: model quantization toolkit.

  • TINPU wrappers for NPU-enabled devices

  • Generic wrappers for devices without an NPU

  • QAT and PTQ support, plus automatic mixed-precision quantization

1.2.4. Which Install Do I Need?

Mode

Use case

Install

BYOD

Bring your own data, use TI models as-is or change model parameters in the config

Wheel install (config only)

BYOM

Add or modify model architectures and train end-to-end

Clone install (edit tinyml_modelzoo/models)

BYOM

Already have a trained ONNX model and need to compile it for a TI device

See Bring Your Own Model (BYOM)

Note

BYOD is Bring Your Own Data and BYOM is Bring Your Own Model. Most users only edit YAML configs. See Understanding Config.

1.2.5. Data Flow

Training pipeline:

(Raw Data + Config) → Data Loading → Augmentation → Feature Extraction → Float Training → Quantization → Compilation
                                                           │                  │               │             │
                                                           ▼                  ▼               ▼             ▼
                                                 user_input_config.h     model.onnx      model.onnx     artifacts/
                                                                           (float)       (quantized)    ├── mod.a
                                                                                                        └── tvmgen_default.h

Inference pipeline on the device:

Raw Data → Feature Extraction → Quantized Model → Output Classes/Values
              ↑                       ↑
    (user_input_config.h)       (mod.a from compilation)

1.2.6. Configuration System

The workflow is driven by one YAML file:

common:
  task_type: generic_timeseries_classification
  target_device: F28P55
dataset:
  dataset_name: my_dataset
  input_data_path: /path/to/data
data_processing_feature_extraction:
  feature_extraction_name: Generic_1024Input_FFTBIN_64Feature_8Frame
training:
  model_name: CLS_1k_NPU
  batch_size: 256
  training_epochs: 20
compilation:
  enable: True

See Understanding Config and How to Create a ModelZoo Config YAML.

1.2.7. Integration Points