Helper to configure ML dependencies and settings for Dala apps.
Usage:
# In your app's mix.exs:
defp deps do
[
{:dala, "~> 0.3"},
{:nx, "~> 0.10"},
{:axon, "~> 0.8.0"},
{:scholar, "~> 0.4.0"},
{:nx_signal, "~> 0.3.0"},
{:polaris, "~> 0.1"}
# Optional: Apple Silicon GPU
{:emlx, github: "elixir-nx/emlx", branch: "main"}
]
endQuantized Models:
# Download pre-trained quantized models:
# - dalaileNetV2: https://huggingface.co/onnx/models/tree/main/vision/classification/dalailenet/model/unknown/1
# - YOLO Nano: https://github.com/ultralytics/yolov5/releases
# Configure in your app:
config = Dala.ML.ConfigHelper.quantized_model_config()
# => %{models: [...], note: "Download from HuggingFace..."}
Summary
Functions
Returns environment variables for iOS builds.
Prints a copy-pasteable config.exs snippet.
Prints a copy-pasteable mix.exs snippet.
Returns quantized model configuration for iOS.
Returns the recommended config for EMLX on iOS.
Returns the recommended deps for ML on Dala.
Functions
Returns environment variables for iOS builds.
Add these to your build script or mix.exs make_env.
Prints a copy-pasteable config.exs snippet.
Prints a copy-pasteable mix.exs snippet.
Returns quantized model configuration for iOS.
Available Models:
- dalaileNetV2 Quantized: 224x224, 1000 classes, int8, 14MB
- YOLO Nano Quantized: 416x416, [batch, grid, grid, 3*(5+classes)], int4, 6MB
Download:
Pre-trained models are available from HuggingFace or TensorFlow Hub.
Returns the recommended config for EMLX on iOS.
Add this to your app's config/config.exs.
Returns the recommended deps for ML on Dala.
Add these to your app's mix.exs deps/0 function.
Optional deps
{:emlx, github: "elixir-nx/emlx", branch: "main"}— Apple Silicon GPU (iOS/macOS){:axon_onnx, "~> 0.5"}— ONNX model loading for Axon