Skip to content

ioteai/axon-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AXON AI

Run PyTorch models on Nordic's AXON NPU — showcase models, Jupyter notebooks, and deployment tools for ExecuTorch on the nRF54LM20B.

Prerequisites

  • Docker
  • Nordic sdk-edge-ai library (proprietary — not redistributed here; mount it from your own install path)
  • nRF54LM20DK development kit (for on-device testing)

Quick Start

1. Build the image

# x86_64 Linux
docker build -t axon-ai:latest docker/

# Apple Silicon Mac
docker build --platform linux/arm64 -t axon-ai:latest docker/

First build is slow — it downloads the NCS toolchain, Zephyr modules, and builds ExecuTorch's C++ extensions. Layers cache for subsequent rebuilds.

2. Start Jupyter Lab

docker run --rm -it \
  -v ~/sdk-edge-ai:/opt/sdk-edge-ai:ro \
  -v $(pwd):/workspace/axon-ai \
  -p 8888:8888 \
  axon-ai:latest

Open the http://127.0.0.1:8888/lab?token=... URL printed to the terminal. Try the notebooks in order — 01_getting_started.ipynb through 04_deploy_and_verify.ipynb.

3. Run end-to-end on hardware (Linux)

To flash firmware from inside the container, pass your DK's serial devices and the USB bus:

docker run --rm -it \
  -v ~/sdk-edge-ai:/opt/sdk-edge-ai:ro \
  -v $(pwd):/workspace/axon-ai \
  --device=/dev/ttyACM0 --device=/dev/ttyACM1 \
  -v /dev/bus/usb:/dev/bus/usb \
  --device-cgroup-rule='c 189:* rmw' \
  -p 8888:8888 \
  axon-ai:latest

Then run notebooks/04_deploy_and_verify.ipynb for the full flash + inference round-trip.

macOS

Docker Desktop on macOS has no USB passthrough. Export + build inside the container, then flash from the host. The build output is in the mounted volume, so the .hex file is accessible from both.

Showcase Models

All models are hardware-verified on the nRF54LM20DK. Trained on synthetic data for demonstration — see each model's README for how to use your own dataset.

Model Task Inference Parameters
Anomaly Detection Vibration fault detection ~230 us 428
Image Classifier Shape recognition (8x8) ~680 us 1,508
Keyword Spotting Audio keyword classification ~1,600 us 16,332

How It Works

PyTorch Model
    |  train + quantize to INT8
    v
AxonPartitioner --- delegates supported ops to AXON NPU
    |
    v
TOSA Lowering (shared with ARM Ethos-U backend)
    |
    v
AXON Compiler --- produces command buffers
    |
    v
.pte + headers --- embed in Zephyr firmware
    |
    v
nRF54LM20DK --- AXON NPU executes inference

Read more:

Repository Structure

axon-ai/
├── models/                   # Three showcase models, each with export + firmware
├── notebooks/                # Jupyter tutorials (start here)
├── docker/                   # Dockerfile
├── guides/                   # Architecture + supported ops
└── scripts/                  # Flash + monitor helper

Related

Repository Description
ioteai/executorch ExecuTorch fork with backends/nordic/
pytorch/executorch#18863 Upstream PR

Third-party dependencies

This repository contains only iote.ai's own code. It composes with several third-party projects, none of which are redistributed here — they are fetched, installed, or mounted at build/run time and keep their own licenses.

Dependency License How it's used
ExecuTorch BSD 3-Clause Cloned at Docker build time (ioteai fork)
Zephyr RTOS Apache 2.0 Fetched via west as part of NCS
nRF Connect SDK Mixed (BSD-5-Clause Nordic + Apache 2.0) Installed by nrfutil sdk-manager
PyTorch, torchao, tosa-tools BSD 3-Clause uv pip install
Nordic sdk-edge-ai (AXON compiler library) Proprietary — Nordic Semiconductor terms Mounted by the user at runtime; not redistributed
SEGGER J-Link software SEGGER EULA Downloaded at Docker build with user-accepted license

License

Apache 2.0 — see LICENSE.

Copyright (c) 2026 iote.ai. Built by iote.aiinfo@iote.ai

About

Run PyTorch models on Nordic's AXON NPU — tutorials, notebooks, Docker, and CI for ExecuTorch on nRF54LM20B

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors