# ivy (djl11/ivy)

> Ivy is an open-source Python library that converts machine learning code between frameworks — you can transpile ML models, tools and libraries from one framework to another with ivy.transpile.

- GitHub: https://github.com/djl11/ivy
- GitHub.Locker page: https://github.locker/djl11/ivy
- Stars: 14.2K
- Language: Python
- Last push: 2026-11-10

## Questions and answers

Written by GitHub.Locker from the README and the repository; check the README below for details.

**Is this a library I call in my own code, or a standalone converter app?**

It's a Python library: you call ivy.transpile inside your own code to use code written for any other framework. Transpiling is eager for a class or function, and lazy for a whole module or library.

**Which ML frameworks can it convert between?**

Out of the box it transpiles from PyTorch into TensorFlow, JAX or NumPy — the README's table marks PyTorch as the supported source and TensorFlow, JAX and NumPy as supported targets.

**Can it also convert code into PyTorch?**

Not yet: PyTorch is currently supported only as a source. Targets are TensorFlow, JAX and NumPy, while PyTorch as a target is marked as work in progress.

**Is the project still actively developed?**

No — the GitHub repository is archived, so it's read-only and won't receive further development, though the published package remains installable and usable.

**Are there demos and tutorials to see what Ivy can do?**

Yes — the examples page features a wide range of demos and tutorials showcasing more use cases, and the docs contain the full API reference.

**Is there an academic paper behind Ivy?**

Yes — 'Ivy: Templated deep learning for inter-framework portability' by Lenton, Pardo, Falck, James and Clark, published as arXiv preprint 2102.02886 in 2021.


---

## README (checked against GitHub 2026-11-18)

Source: https://github.com/djl11/ivy/blob/main/README.md

<p align="center">
  <a href="https://ivy-llc.github.io/docs/">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/unifyai/ivy/main/assets/brand/ivy-docs-banner-dark.png">
      <img src="https://raw.githubusercontent.com/unifyai/ivy/main/assets/brand/ivy-docs-banner-light.png" alt="ivy, a unify project. Convert machine learning code between frameworks." width="100%">
    </picture>
  </a>
</p>

<p align="center">
  <a href="https://ivy-llc.github.io/docs/">Docs</a> · <a href="https://discord.gg/uYRmyPxMQq">Discord</a> · <a href="LICENSE">License</a>
</p>

# Convert Machine Learning Code Between Frameworks

ivy enables you to convert ML models, tools and libraries between frameworks using `ivy.transpile`

<p align="center">
  <img src="https://raw.githubusercontent.com/unifyai/ivy/main/assets/ivy-frameworks.png" alt="ONNX, PyTorch, NumPy, TensorFlow, JAX and MXNet, frameworks ivy works with" width="100%">
</p>

<br clear="all" />

# Installation

The easiest way to install ivy is using **pip**:

``` bash
pip install ivy
```

<details>
<summary><b>From Source</b></summary>
<br clear="all" />

You can also install ivy from source if you want to take advantage of
the latest changes:

``` bash
git clone https://github.com/ivy-llc/ivy.git
cd ivy
pip install --user -e .
```

</details>

<br clear="all" />

# Supported Frameworks

These are the frameworks that `ivy.transpile` currently supports conversions from and to.

| Framework  | Source | Target |
|------------|:------:|:------:|
| PyTorch    |   ✓   |   planned   |
| TensorFlow |   planned   |   ✓   |
| JAX        |   planned   |   ✓   |
| NumPy      |   planned   |   ✓   |

<br clear="all" />

# Using ivy

Here's some examples, to help you get started using ivy! The [examples page](https://ivy-llc.github.io/docs/demos/examples_and_demos.html) also features a wide range of
demos and tutorials showcasing some more use cases for ivy.

  <details>
    <summary><b>Transpiling any code from one framework to another</b></summary>
    <br clear="all" />

   ``` python
   import ivy
   import torch
   import tensorflow as tf

   def torch_fn(x):
       a = torch.mul(x, x)
       b = torch.mean(x)
       return x * a + b

   tf_fn = ivy.transpile(torch_fn, source="torch", target="tensorflow")

   tf_x = tf.convert_to_tensor([1., 2., 3.])
   ret = tf_fn(tf_x)
   ```

  </details>

  <details>
    <summary><b>Tracing a computational graph of any code</b></summary>
    <br clear="all" />

   ``` python
   import ivy
   import torch

   def torch_fn(x):
       a = torch.mul(x, x)
       b = torch.mean(x)
       return x * a + b

   torch_x = torch.tensor([1., 2., 3.])
   graph = ivy.trace_graph(jax_fn, to="torch", args=(torch_x,))
   ret = graph(torch_x)
   ```

   </details>

<details>
<summary><b>How does ivy work?</b></summary>
<br clear="all" />

ivy\'s transpiler allows you to use code from any other framework in your own code.
Feel free to head over to the docs for the full API
reference, but the functions you\'d most likely want to use are:

``` python
# Converts framework-specific code to a target framework of choice. See usage in the documentation
ivy.transpile()

# Traces an efficient fully-functional graph from a function, removing all wrapping and redundant code. See usage in the documentation
ivy.trace_graph()
```

#### `ivy.transpile` will eagerly transpile if a class or function is provided

``` python
import ivy
import torch
import tensorflow as tf

def torch_fn(x):
    x = torch.abs(x)
    return torch.sum(x)

x1 = torch.tensor([1., 2.])
x1 = tf.convert_to_tensor([1., 2.])

# Transpilation happens eagerly
tf_fn = ivy.transpile(test_fn, source="torch", target="tensorflow")

# tf_fn is now tensorflow code and runs efficiently
ret = tf_fn(x1)
```

#### `ivy.transpile` will lazily transpile if a module (library) is provided

``` python
import ivy
import kornia
import tensorflow as tf

x2 = tf.random.normal((5, 3, 4, 4))

# Module is provided -> transpilation happens lazily
tf_kornia = ivy.transpile(kornia, source="torch", target="tensorflow")

# The transpilation is initialized here, and this function is converted to tensorflow
ret = tf_kornia.color.rgb_to_grayscale(x2)

# Transpilation has already occurred, the tensorflow function runs efficiently
ret = tf_kornia.color.rgb_to_grayscale(x2)
```
</details>

<br clear="all" />

# Contributing

We believe that everyone can contribute and make a difference. Whether
it\'s writing code, fixing bugs, or simply sharing feedback,
your contributions are definitely welcome and appreciated"

Check out all of our [Open Tasks](https://ivy-llc.github.io/docs/overview/contributing/open_tasks.html),
and find out more info in our [Contributing Guide](https://ivy-llc.github.io/docs/overview/contributing.html)
in the docs.

<br clear="all" />

<a href="https://github.com/ivy-llc/ivy/graphs/contributors">
  <img class="dark-light" src="https://contrib.rocks/image?repo=ivy-llc/ivy&anon=0&columns=20&max=100&r=true" />
</a>

<br clear="all" />
<br clear="all" />

# Citation

    @article{lenton2021ivy,
      title={Ivy: Templated deep learning for inter-framework portability},
      author={Lenton, Daniel and Pardo, Fabio and Falck, Fabian and James, Stephen and Clark, Ronald},
      journal={arXiv preprint arXiv:2102.02886},
      year={2021}
    }

