Skip to content

maekawatoshiki/altius

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4f5889d · Feb 28, 2025
May 14, 2023
Oct 25, 2024
Jan 9, 2025
Oct 27, 2024
Oct 5, 2024
Nov 13, 2022
Nov 26, 2022
Feb 28, 2025
Sep 15, 2024
Sep 10, 2021
Sep 8, 2024
Feb 28, 2025

Repository files navigation

Altius

CI Coverage
Small ONNX inference runtime written in Rust.
Feel free to create issues and discussions!

Requirements

  • cargo
  • uv

Run

# Download models.
(cd models && ./download.sh)
# Download minimum models.
# (cd models && ./download.sh CI)

# Run examples.
# {mnist, mobilenet, deit, vit} are available.
# You can specify the number of threads for computation by editing the code.
cargo run --release --example mnist
cargo run --release --example mobilenet
cargo run --release --example deit
cargo run --release --example vit

# Experimental CPU backend (that generates code in C)
cargo run --release --example mnist_cpu     -- --iters 10 
cargo run --release --example mobilenet_cpu -- --iters 10 --profile
cargo run --release --example deit_cpu      -- --iters 10 --threads 8 --profile

Run from WebAssembly

Currently, mobilenet v3 runs on web browsers.

cd wasm
cargo install wasm-pack
wasm-pack build --target web
yarn
yarn serve

Run from Python

cd ./crates/altius_py
uv sync
uv run maturin develop -r
uv run python mobilenet.py