# texasinstruments/tinyml-tensorlab architecture

> Architecture diagram of the GitHub repository texasinstruments/tinyml-tensorlab, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/texasinstruments/tinyml-tensorlab
- Repository: https://github.com/texasinstruments/tinyml-tensorlab

## Overview

Tiny ML Tensorlab is TI’s MCU AI toolchain. The principal workflow starts with a user’s natural-language or configured task, loads and analyzes a modality-specific dataset, trains or selects a model, optionally searches and quantizes it, compiles it for a supported MCU, and deploys or validates the embedded result. The tree confirms task-specific runners, dataset loaders, model zoo metadata, NAS, quantization, compilation, and device deployment. Several cross-package calls are inferred only from documented capabilities and are marked optional or omitted where source excerpts do not show ownership.

Main entry points: [`tinyml-agent-skills/plugins/tinyml-agent-skills/skills/tinyml-workflow-agent/scripts/runner.py`](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-agent-skills/plugins/tinyml-agent-skills/skills/tinyml-workflow-agent/scripts/runner.py) (Workflow Agent), [`tinyml-tinyverse/tinyml_tinyverse/references/common/train_base.py`](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-tinyverse/tinyml_tinyverse/references/common/train_base.py) (Training References), [`tinyml-tinyverse/tinyml_tinyverse/common/datasets/timeseries_dataset.py`](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-tinyverse/tinyml_tinyverse/common/datasets/timeseries_dataset.py) (Dataset Loaders), [`tinyml-modelmaker/tinyml_modelmaker/run_tinyml_modelmaker.py`](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-modelmaker/tinyml_modelmaker/run_tinyml_modelmaker.py) (Modelmaker Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent["Agent Workflow"]
  node_setup["Agent Setup<br/>[runner.py]"]
  node_workflow["Workflow Agent<br/>[runner.py]"]
end

subgraph group_maker["Modelmaker Flows"]
  node_maker_entry["Modelmaker Entry"]
  node_task_runners["Task Runners"]
  node_dataset_analysis["Dataset Analysis"]
end

subgraph group_runtime["Tinyverse Runtime"]
  node_ts_dataset["Dataset Loaders"]
  node_feature_pipeline["Feature Pipeline"]
  node_training["Training References<br/>[train_base.py]"]
  node_ondevice["On Device Learning"]
end

subgraph group_opt["Optimization Deployment"]
  node_nas["Architecture Search"]
  node_quantization["Quantization<br/>[quant_fx.py]"]
  node_compiler["MCU Compilation<br/>[compilation.py]"]
  node_deployment["Device Deployment"]
end

subgraph group_zoo["Model Zoo"]
  node_model_zoo["Model Registry<br/>[classification.py]"]
  node_model_specs["Model Descriptions<br/>[classification.py]"]
  node_device_metrics[("Device Metrics<br/>[run_info.py]")]
end

node_user(("ML User"))
node_mcu["TI MCU"]
node_trained_result["Embedded Model"]

node_user -->|"installs"| node_setup
node_user -->|"requests workflow"| node_workflow
node_workflow -->|"starts modeling"| node_maker_entry
node_workflow -->|"analyzes data"| node_dataset_analysis
node_workflow -->|"dispatches deployment"| node_deployment
node_maker_entry -->|"dispatches tasks"| node_task_runners
node_task_runners -->|"loads datasets"| node_ts_dataset
node_dataset_analysis -->|"profiles data"| node_ts_dataset
node_ts_dataset -->|"provides samples"| node_feature_pipeline
node_training -->|"creates model"| node_model_zoo
node_ts_dataset -->|"feeds loaders"| node_training
node_feature_pipeline -->|"prepares inputs"| node_training
node_workflow -->|"orchestrates training"| node_training
node_training -.->|"optionally searches"| node_nas
node_nas -->|"selects architecture"| node_model_zoo
node_model_zoo -->|"uses specifications"| node_model_specs
node_maker_entry -.->|"optionally quantizes"| node_quantization
node_quantization -->|"passes model"| node_compiler
node_compiler -->|"produces binary"| node_deployment
node_deployment -->|"deploys firmware"| node_mcu
node_mcu -->|"runs inference"| node_trained_result
node_device_metrics -.->|"informs selection"| node_workflow
node_ondevice -.->|"updates model"| node_trained_result

click node_setup "https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-agent-skills/plugins/tinyml-agent-skills/skills/setup/scripts/runner.py"
click node_workflow "https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-agent-skills/plugins/tinyml-agent-skills/skills/tinyml-workflow-agent/scripts/runner.py"
click node_maker_entry "https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-modelmaker/tinyml_modelmaker/run_tinyml_modelmaker.py"
click node_task_runners "https://github.com/texasinstruments/tinyml-tensorlab/tree/main/tinyml-modelmaker/tinyml_modelmaker/ai_modules"
click node_dataset_analysis "https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-agent-skills/plugins/tinyml-agent-skills/skills/tinyml-workflow-agent/scripts/dataset_analysis.py"
click node_ts_dataset "https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-tinyverse/tinyml_tinyverse/common/datasets/timeseries_dataset.py"
click node_feature_pipeline "https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-tinyverse/tinyml_tinyverse/common/transforms/basic_transforms.py"
click node_training "https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-tinyverse/tinyml_tinyverse/references/common/train_base.py"
click node_ondevice "https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-tinyverse/tinyml_tinyverse/common/utils/ondevice_training.py"
click node_model_zoo "https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-modelzoo/tinyml_modelzoo/models/classification.py"
click node_model_specs "https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-modelzoo/tinyml_modelzoo/model_descriptions/classification.py"
click node_device_metrics "https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-modelzoo/tinyml_modelzoo/device_info/run_info.py"
click node_nas "https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-modeloptimization/torchmodelopt/tinyml_torchmodelopt/nas/train_cnn_search.py"
click node_quantization "https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-modeloptimization/torchmodelopt/tinyml_torchmodelopt/quantization/generic/quant_fx.py"
click node_compiler "https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-tinyverse/tinyml_tinyverse/references/common/compilation.py"
click node_deployment "https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-agent-skills/plugins/tinyml-agent-skills/skills/tinyml-workflow-agent/scripts/device_deployment.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_setup,node_workflow,node_user toneBlue
class node_maker_entry,node_task_runners,node_dataset_analysis toneAmber
class node_ts_dataset,node_feature_pipeline,node_training,node_ondevice toneMint
class node_nas,node_quantization,node_compiler,node_deployment toneRose
class node_model_zoo,node_model_specs,node_device_metrics,node_mcu,node_trained_result toneIndigo
```

## Components

### Agent Workflow

- [Agent Setup](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-agent-skills/plugins/tinyml-agent-skills/skills/setup/scripts/runner.py): `tinyml-agent-skills/plugins/tinyml-agent-skills/skills/setup/scripts/runner.py`
- [Workflow Agent](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-agent-skills/plugins/tinyml-agent-skills/skills/tinyml-workflow-agent/scripts/runner.py): `tinyml-agent-skills/plugins/tinyml-agent-skills/skills/tinyml-workflow-agent/scripts/runner.py`

### Modelmaker Flows

- [Modelmaker Entry](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-modelmaker/tinyml_modelmaker/run_tinyml_modelmaker.py): `tinyml-modelmaker/tinyml_modelmaker/run_tinyml_modelmaker.py`
- [Task Runners](https://github.com/texasinstruments/tinyml-tensorlab/tree/main/tinyml-modelmaker/tinyml_modelmaker/ai_modules): `tinyml-modelmaker/tinyml_modelmaker/ai_modules`
- [Dataset Analysis](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-agent-skills/plugins/tinyml-agent-skills/skills/tinyml-workflow-agent/scripts/dataset_analysis.py): `tinyml-agent-skills/plugins/tinyml-agent-skills/skills/tinyml-workflow-agent/scripts/dataset_analysis.py`

### Tinyverse Runtime

- [Dataset Loaders](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-tinyverse/tinyml_tinyverse/common/datasets/timeseries_dataset.py): `tinyml-tinyverse/tinyml_tinyverse/common/datasets/timeseries_dataset.py`
- [Feature Pipeline](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-tinyverse/tinyml_tinyverse/common/transforms/basic_transforms.py): `tinyml-tinyverse/tinyml_tinyverse/common/transforms/basic_transforms.py`
- [Training References](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-tinyverse/tinyml_tinyverse/references/common/train_base.py): `tinyml-tinyverse/tinyml_tinyverse/references/common/train_base.py`
- [On Device Learning](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-tinyverse/tinyml_tinyverse/common/utils/ondevice_training.py): `tinyml-tinyverse/tinyml_tinyverse/common/utils/ondevice_training.py`

### Optimization Deployment

- [Architecture Search](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-modeloptimization/torchmodelopt/tinyml_torchmodelopt/nas/train_cnn_search.py): `tinyml-modeloptimization/torchmodelopt/tinyml_torchmodelopt/nas/train_cnn_search.py`
- [Quantization](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-modeloptimization/torchmodelopt/tinyml_torchmodelopt/quantization/generic/quant_fx.py): `tinyml-modeloptimization/torchmodelopt/tinyml_torchmodelopt/quantization/generic/quant_fx.py`
- [MCU Compilation](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-tinyverse/tinyml_tinyverse/references/common/compilation.py): `tinyml-tinyverse/tinyml_tinyverse/references/common/compilation.py`
- [Device Deployment](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-agent-skills/plugins/tinyml-agent-skills/skills/tinyml-workflow-agent/scripts/device_deployment.py): `tinyml-agent-skills/plugins/tinyml-agent-skills/skills/tinyml-workflow-agent/scripts/device_deployment.py`

### Model Zoo

- [Model Registry](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-modelzoo/tinyml_modelzoo/models/classification.py): `tinyml-modelzoo/tinyml_modelzoo/models/classification.py`
- [Model Descriptions](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-modelzoo/tinyml_modelzoo/model_descriptions/classification.py): `tinyml-modelzoo/tinyml_modelzoo/model_descriptions/classification.py`
- [Device Metrics](https://github.com/texasinstruments/tinyml-tensorlab/blob/main/tinyml-modelzoo/tinyml_modelzoo/device_info/run_info.py): `tinyml-modelzoo/tinyml_modelzoo/device_info/run_info.py`

### Other components

- **ML User**
- **TI MCU**
- **Embedded Model**

## Connections

- ML User → Agent Setup: installs
- ML User → Workflow Agent: requests workflow
- Workflow Agent → Modelmaker Entry: starts modeling
- Workflow Agent → Dataset Analysis: analyzes data
- Workflow Agent → Device Deployment: dispatches deployment
- Modelmaker Entry → Task Runners: dispatches tasks
- Task Runners → Dataset Loaders: loads datasets
- Dataset Analysis → Dataset Loaders: profiles data
- Dataset Loaders → Feature Pipeline: provides samples
- Training References → Model Registry: creates model
- Dataset Loaders → Training References: feeds loaders
- Feature Pipeline → Training References: prepares inputs
- Workflow Agent → Training References: orchestrates training
- Training References → Architecture Search: optionally searches
- Architecture Search → Model Registry: selects architecture
- Model Registry → Model Descriptions: uses specifications
- Modelmaker Entry → Quantization: optionally quantizes
- Quantization → MCU Compilation: passes model
- MCU Compilation → Device Deployment: produces binary
- Device Deployment → TI MCU: deploys firmware
- TI MCU → Embedded Model: runs inference
- Device Metrics → Workflow Agent: informs selection
- On Device Learning → Embedded Model: updates model
