unifyai/ivy

Convert Machine Learning Code Between Frameworks

What it solves

Ivy addresses the challenge of framework lock-in in machine learning. It allows developers to convert ML models, tools, and libraries from one framework (such as PyTorch) to another (such as TensorFlow, JAX, or NumPy) without having to rewrite the code manually.

How it works

Ivy uses a transpiler (ivy.transpile) that can convert framework-specific code into a target framework of choice. It supports both eager transpilation for specific functions or classes and lazy transpilation for entire modules or libraries. Additionally, it provides a ivy.trace_graph function to trace an efficient, fully-functional computational graph from a given function, removing redundant code.

Who it’s for

It is designed for ML engineers and researchers who need to move their models or libraries between different deep learning frameworks to leverage specific ecosystem advantages or deployment requirements.

Highlights

  • Multi-framework support: Converts code between PyTorch, TensorFlow, JAX, and NumPy.
  • Flexible transpilation: Supports both eager (immediate) and lazy (on-demand) conversion of code.
  • Graph tracing: Ability to extract a clean computational graph from existing framework code.
  • Library portability: Can transpile entire third-party libraries to a different target framework.

Related

  • Project
  • Project
  • Project
  • Project
  • Project