ai-edge-torch  by google-ai-edge

Python library for converting PyTorch models to TFLite format

created 1 year ago
728 stars

Top 48.5% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

AI Edge Torch is a Python library designed to convert PyTorch models into the TFLite format, enabling on-device execution for Android, iOS, and IoT applications. It targets developers building mobile and edge AI solutions, offering broad CPU support with initial GPU and NPU capabilities, and a specialized Generative API for LLMs.

How It Works

The library leverages torch.export() to convert PyTorch models, aiming for broad coverage of Core ATen operators. This approach integrates closely with the PyTorch ecosystem. For LLMs, the Generative API facilitates model authoring and quantization for optimized on-device performance, with conversion to TFLite for execution via the TensorFlow Lite runtime or direct integration with the MediaPipe LLM Inference API.

Quick Start & Requirements

Highlighted Details

  • Supports conversion of PyTorch models to TFLite format for on-device inference.
  • Generative API specifically targets LLMs and transformer models for mobile deployment.
  • Offers broad CPU coverage with planned GPU and NPU support.
  • Integrates with MediaPipe LLM Inference API for mobile application development.

Maintenance & Community

  • Users can seek help by creating a GitHub issue.
  • Contribution documentation is available.

Licensing & Compatibility

  • License details are not explicitly stated in the README.

Limitations & Caveats

The PyTorch converter is in Beta, and the Generative API is in Alpha. The Generative API is currently CPU-only, with GPU and NPU support planned.

Health Check
Last commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
29
Issues (30d)
11
Star History
175 stars in the last 90 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n) and Travis Oliphant Travis Oliphant(Author of NumPy, SciPy, Anaconda).

torchchat by pytorch

0.1%
4k
PyTorch-native SDK for local LLM inference across diverse platforms
created 1 year ago
updated 3 weeks ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Zhuohan Li Zhuohan Li(Author of vLLM), and
6 more.

torchtitan by pytorch

0.9%
4k
PyTorch platform for generative AI model training research
created 1 year ago
updated 1 day ago
Starred by Lewis Tunstall Lewis Tunstall(Researcher at Hugging Face), Patrick von Platen Patrick von Platen(Core Contributor to Hugging Face Transformers and Diffusers), and
5 more.

torchtune by pytorch

0.2%
5k
PyTorch library for LLM post-training and experimentation
created 1 year ago
updated 1 day ago
Starred by Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
2 more.

serve by pytorch

0.1%
4k
Serve, optimize, and scale PyTorch models in production
created 5 years ago
updated 3 weeks ago
Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Omar Sanseviero Omar Sanseviero(DevRel at Google DeepMind), and
5 more.

TensorRT-LLM by NVIDIA

0.6%
11k
LLM inference optimization SDK for NVIDIA GPUs
created 1 year ago
updated 1 day ago
Feedback? Help us improve.