On-Device Training

Introduction

Mirai is pioneering the field of on-device AI, focusing on training and fine-tuning neural networks directly on user devices. Our goal is to provide a flexible, powerful solution that reduces reliance on expensive server-side GPUs and brings AI capabilities closer to the end-user.

We aim to create a comprehensive ecosystem for on-device AI that includes:

  1. Pre-installed models for immediate use

  2. Tools for creating and converting custom models

  3. A flexible SDK for on-device training and fine-tuning

While our current focus is on iOS and macOS, we plan to expand to other platforms in the future.


Mirai vs. Existing Solutions

CoreML and MLX

While solutions like CoreML and MLX exist, they have limitations:

  • CoreML is primarily for inference and optimizing pre-trained networks

  • MLX allows training but is largely limited to macOS

Mirai aims to overcome these limitations by offering a more flexible solution that works across all iOS and macOS devices.


Core Components

Our on-device AI solution consists of two main parts:

  1. Model Registry

  2. On-Device NN SDK

Model Registry

The Model Registry contains pre-installed models ready for on-device use:

  1. Preinstalled-mirai: Models created by the Mirai Team

    • Currently focused on text processing

    • Future plans include image, video, and user behavior models

  2. Preinstalled-community: State-of-the-art models and community contributions

On-Device NN SDK

Our SDK provides tools for creating, training, and fine-tuning neural networks on-device:

  1. Data Tools:

    • Focus on textual data processing

    • Includes tokenizers, lemmatizers, embedding models, and text analysis tools

  2. Operators:

    • Library of neural network building blocks (e.g., fully connected layers, normalization, activation functions)

    • Optimized for on-device execution

    • Supports various data types and parallel processing

  3. Optimizers:

    • Implements backpropagation algorithm

    • Includes popular loss functions and gradient descent methods

  4. Pipelines:

    • Framework for building data processing and training pipelines

    • Similar to Hugging Face pipelines

  5. Metrics:

    • Includes essential evaluation metrics (e.g., Accuracy, Precision, Recall)

  6. Converters:

    • Tools for converting PyTorch and TensorFlow models

    • Integrates existing tools (CoreML, TFLite) and custom converters


Future Plans

  • Expand device and OS support beyond iOS/macOS

  • Broaden model types to include image, video, and user behavior

  • Integrate with Hugging Face ecosystem

  • Continuously improve and expand SDK capabilities

By leveraging Mirai's on-device AI solutions, developers can create more responsive, private, and efficient AI-powered applications that run directly on users' devices.

Last updated