{"id":13545148,"url":"https://github.com/ivy-llc/ivy","last_synced_at":"2025-09-09T19:53:41.543Z","repository":{"id":36952500,"uuid":"330914717","full_name":"ivy-llc/ivy","owner":"ivy-llc","description":"Convert Machine Learning Code Between Frameworks","archived":false,"fork":false,"pushed_at":"2025-04-29T04:07:51.000Z","size":174274,"stargazers_count":14197,"open_issues_count":974,"forks_count":5665,"subscribers_count":68,"default_branch":"main","last_synced_at":"2025-05-04T11:55:22.141Z","etag":null,"topics":["converter","deep-learning","ivy","jax","machine-learning","neural-network","numpy","python","pytorch","tensorflow","translation","transpilation"],"latest_commit_sha":null,"homepage":"https://ivy.dev","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivy-llc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-01-19T08:37:25.000Z","updated_at":"2025-05-04T08:24:19.000Z","dependencies_parsed_at":"2023-09-28T12:40:48.703Z","dependency_job_id":"a9394e04-7519-4c94-a23b-52bd5346dc70","html_url":"https://github.com/ivy-llc/ivy","commit_stats":{"total_commits":17707,"total_committers":1514,"mean_commits":11.69550858652576,"dds":0.8779578697690179,"last_synced_commit":"0a992c4dda195de5df9632af51c26e2b12576f6a"},"previous_names":["ivy-dl/ivy","transpile-ai/ivy","ivy-llc/ivy"],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivy-llc%2Fivy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivy-llc%2Fivy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivy-llc%2Fivy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivy-llc%2Fivy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivy-llc","download_url":"https://codeload.github.com/ivy-llc/ivy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252330683,"owners_count":21730688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["converter","deep-learning","ivy","jax","machine-learning","neural-network","numpy","python","pytorch","tensorflow","translation","transpilation"],"created_at":"2024-08-01T11:00:58.291Z","updated_at":"2025-09-09T19:53:41.513Z","avatar_url":"https://github.com/ivy-llc.png","language":"Python","funding_links":[],"categories":["Python","📚 Project Purpose","Coding \u0026 Development"],"sub_categories":["Machine Learning (Interview-Level"],"readme":"\u003cdiv style=\"display: block;\" align=\"center\"\u003e\r\n    \u003ca href=\"https://ivy.dev/\"\u003e\r\n        \u003cimg class=\"dark-light\" width=\"50%\" src=\"https://raw.githubusercontent.com/ivy-llc/assets/refs/heads/main/assets/logos/ivy-long.svg\"/\u003e\r\n    \u003c/a\u003e\r\n\u003c/div\u003e\r\n\u003cbr clear=\"all\" /\u003e\r\n\r\n\u003cdiv style=\"margin-top: 10px; margin-bottom: 10px; display: block;\" align=\"center\"\u003e\r\n    \u003ca href=\"https://github.com/ivy-llc/ivy/stargazers\"\u003e\r\n        \u003cimg class=\"dark-light\" style=\"padding-right: 4px; padding-bottom: 4px;\" src=\"https://img.shields.io/github/stars/ivy-llc/ivy\"\u003e\r\n    \u003c/a\u003e\r\n    \u003ca href=\"https://discord.gg/uYRmyPxMQq\"\u003e\r\n        \u003cimg class=\"dark-light\" style=\"padding-right: 4px; padding-bottom: 4px;\" src=\"https://img.shields.io/discord/1220325004013604945?color=blue\u0026label=%20\u0026logo=discord\u0026logoColor=white\"\u003e\r\n    \u003c/a\u003e\r\n    \u003ca href=\"https://ivy-llc.github.io/docs/\"\u003e\r\n        \u003cimg class=\"dark-light\" style=\"padding-right: 4px; padding-bottom: 4px;\" src=\"https://img.shields.io/badge/docs-purple\"\u003e\r\n    \u003c/a\u003e\r\n    \u003ca href=\"https://github.com/ivy-llc/ivy/actions/workflows/test-transpiler.yml\"\u003e\r\n        \u003cimg class=\"dark-light\" style=\"padding-right: 4px; padding-bottom: 4px;\" src=\"https://github.com/ivy-llc/ivy/actions/workflows/test-transpiler.yml/badge.svg\"\u003e\r\n    \u003c/a\u003e\r\n    \u003ca href=\"https://github.com/ivy-llc/ivy/actions/workflows/integration-tests.yml\"\u003e\r\n        \u003cimg class=\"dark-light\" style=\"padding-right: 4px; padding-bottom: 4px;\" src=\"https://github.com/ivy-llc/ivy/actions/workflows/integration-tests.yml/badge.svg\"\u003e\r\n    \u003c/a\u003e\r\n\u003c/div\u003e\r\n\u003cbr clear=\"all\" /\u003e\r\n\r\n\r\n# Convert Machine Learning Code Between Frameworks\r\n\r\nIvy enables you to convert ML models, tools and libraries between frameworks using `ivy.transpile`\r\n\r\n\u003cdiv style=\"display: block;\" align=\"center\"\u003e\r\n    \u003cdiv\u003e\r\n    \u003ca href=\"https://jax.readthedocs.io\"\u003e\r\n        \u003cimg class=\"dark-light\" width=\"100\" height=\"100\" src=\"https://raw.githubusercontent.com/ivy-llc/assets/refs/heads/main/assets/logos/jax.svg\"\u003e\r\n    \u003c/a\u003e\r\n    \u003cimg class=\"dark-light\" width=\"5%\" src=\"https://github.com/ivy-llc/assets/blob/main/assets/empty.png?raw=true\"\u003e\r\n    \u003cimg class=\"dark-light\" width=\"5%\" src=\"https://github.com/ivy-llc/assets/blob/main/assets/empty.png?raw=true\"\u003e\r\n    \u003ca href=\"https://www.tensorflow.org\"\u003e\r\n        \u003cimg class=\"dark-light\" width=\"100\" height=\"100\" src=\"https://raw.githubusercontent.com/ivy-llc/assets/refs/heads/main/assets/logos/tensorflow.svg\"\u003e\r\n    \u003c/a\u003e\r\n    \u003cimg class=\"dark-light\" width=\"5%\" src=\"https://github.com/ivy-llc/assets/blob/main/assets/empty.png?raw=true\"\u003e\r\n    \u003cimg class=\"dark-light\" width=\"5%\" src=\"https://github.com/ivy-llc/assets/blob/main/assets/empty.png?raw=true\"\u003e\r\n    \u003ca href=\"https://pytorch.org\"\u003e\r\n        \u003cimg class=\"dark-light\" width=\"100\" height=\"100\" src=\"https://raw.githubusercontent.com/ivy-llc/assets/refs/heads/main/assets/logos/pytorch.svg\"\u003e\r\n    \u003c/a\u003e\r\n    \u003cimg class=\"dark-light\" width=\"5%\" src=\"https://github.com/ivy-llc/assets/blob/main/assets/empty.png?raw=true\"\u003e\r\n    \u003cimg class=\"dark-light\" width=\"5%\" src=\"https://github.com/ivy-llc/assets/blob/main/assets/empty.png?raw=true\"\u003e\r\n    \u003ca href=\"https://numpy.org\"\u003e\r\n        \u003cimg class=\"dark-light\" width=\"100\" height=\"100\" src=\"https://raw.githubusercontent.com/ivy-llc/assets/refs/heads/main/assets/logos/numpy.svg\"\u003e\r\n    \u003c/a\u003e\r\n    \u003c/div\u003e\r\n\u003c/div\u003e\r\n\r\n\u003cbr clear=\"all\" /\u003e\r\n\r\n# Installation\r\n\r\nThe easiest way to install Ivy is using **pip**:\r\n\r\n``` bash\r\npip install ivy\r\n```\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cb\u003eFrom Source\u003c/b\u003e\u003c/summary\u003e\r\n\u003cbr clear=\"all\" /\u003e\r\n\r\nYou can also install Ivy from source if you want to take advantage of\r\nthe latest changes:\r\n\r\n``` bash\r\ngit clone https://github.com/ivy-llc/ivy.git\r\ncd ivy\r\npip install --user -e .\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n\u003cbr clear=\"all\" /\u003e\r\n\r\n# Supported Frameworks\r\n\r\nThese are the frameworks that `ivy.transpile` currently supports conversions from and to.\r\n\r\n| Framework  | Source | Target |\r\n|------------|:------:|:------:|\r\n| PyTorch    |   ✅   |   🚧   |\r\n| TensorFlow |   🚧   |   ✅   |\r\n| JAX        |   🚧   |   ✅   |\r\n| NumPy      |   🚧   |   ✅   |\r\n\r\n\u003cbr clear=\"all\" /\u003e\r\n\r\n# Using ivy\r\n\r\nHere's some examples, to help you get started using Ivy! The [examples page](https://www.docs.ivy.dev/demos/examples_and_demos.html) also features a wide range of\r\ndemos and tutorials showcasing some more use cases for Ivy.\r\n\r\n  \u003cdetails\u003e\r\n    \u003csummary\u003e\u003cb\u003eTranspiling any code from one framework to another\u003c/b\u003e\u003c/summary\u003e\r\n    \u003cbr clear=\"all\" /\u003e\r\n\r\n   ``` python\r\n   import ivy\r\n   import torch\r\n   import tensorflow as tf\r\n\r\n   def torch_fn(x):\r\n       a = torch.mul(x, x)\r\n       b = torch.mean(x)\r\n       return x * a + b\r\n\r\n   tf_fn = ivy.transpile(torch_fn, source=\"torch\", target=\"tensorflow\")\r\n\r\n   tf_x = tf.convert_to_tensor([1., 2., 3.])\r\n   ret = tf_fn(tf_x)\r\n   ```\r\n\r\n  \u003c/details\u003e\r\n\r\n  \u003cdetails\u003e\r\n    \u003csummary\u003e\u003cb\u003eTracing a computational graph of any code\u003c/b\u003e\u003c/summary\u003e\r\n    \u003cbr clear=\"all\" /\u003e\r\n\r\n   ``` python\r\n   import ivy\r\n   import torch\r\n\r\n   def torch_fn(x):\r\n       a = torch.mul(x, x)\r\n       b = torch.mean(x)\r\n       return x * a + b\r\n\r\n   torch_x = torch.tensor([1., 2., 3.])\r\n   graph = ivy.trace_graph(jax_fn, to=\"torch\", args=(torch_x,))\r\n   ret = graph(torch_x)\r\n   ```\r\n\r\n   \u003c/details\u003e\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cb\u003eHow does ivy work?\u003c/b\u003e\u003c/summary\u003e\r\n\u003cbr clear=\"all\" /\u003e\r\n\r\nIvy\\'s transpiler allows you to use code from any other framework in your own code.\r\nFeel free to head over to the docs for the full API\r\nreference, but the functions you\\'d most likely want to use are:\r\n\r\n``` python\r\n# Converts framework-specific code to a target framework of choice. See usage in the documentation\r\nivy.transpile()\r\n\r\n# Traces an efficient fully-functional graph from a function, removing all wrapping and redundant code. See usage in the documentation\r\nivy.trace_graph()\r\n```\r\n\r\n#### `ivy.transpile` will eagerly transpile if a class or function is provided\r\n\r\n``` python\r\nimport ivy\r\nimport torch\r\nimport tensorflow as tf\r\n\r\ndef torch_fn(x):\r\n    x = torch.abs(x)\r\n    return torch.sum(x)\r\n\r\nx1 = torch.tensor([1., 2.])\r\nx1 = tf.convert_to_tensor([1., 2.])\r\n\r\n# Transpilation happens eagerly\r\ntf_fn = ivy.transpile(test_fn, source=\"torch\", target=\"tensorflow\")\r\n\r\n# tf_fn is now tensorflow code and runs efficiently\r\nret = tf_fn(x1)\r\n```\r\n\r\n#### `ivy.transpile` will lazily transpile if a module (library) is provided\r\n\r\n``` python\r\nimport ivy\r\nimport kornia\r\nimport tensorflow as tf\r\n\r\nx2 = tf.random.normal((5, 3, 4, 4))\r\n\r\n# Module is provided -\u003e transpilation happens lazily\r\ntf_kornia = ivy.transpile(kornia, source=\"torch\", target=\"tensorflow\")\r\n\r\n# The transpilation is initialized here, and this function is converted to tensorflow\r\nret = tf_kornia.color.rgb_to_grayscale(x2)\r\n\r\n# Transpilation has already occurred, the tensorflow function runs efficiently\r\nret = tf_kornia.color.rgb_to_grayscale(x2)\r\n```\r\n\u003c/details\u003e\r\n\r\n\u003cbr clear=\"all\" /\u003e\r\n\r\n# Contributing\r\n\r\nWe believe that everyone can contribute and make a difference. Whether\r\nit\\'s writing code, fixing bugs, or simply sharing feedback,\r\nyour contributions are definitely welcome and appreciated\"\r\n\r\nCheck out all of our [Open Tasks](https://docs.ivy.dev/overview/contributing/open_tasks.html),\r\nand find out more info in our [Contributing Guide](https://docs.ivy.dev/overview/contributing.html)\r\nin the docs.\r\n\r\n\u003cbr clear=\"all\" /\u003e\r\n\r\n\u003ca href=\"https://github.com/ivy-llc/ivy/graphs/contributors\"\u003e\r\n  \u003cimg class=\"dark-light\" src=\"https://contrib.rocks/image?repo=ivy-llc/ivy\u0026anon=0\u0026columns=20\u0026max=100\u0026r=true\" /\u003e\r\n\u003c/a\u003e\r\n\r\n\u003cbr clear=\"all\" /\u003e\r\n\u003cbr clear=\"all\" /\u003e\r\n\r\n# Citation\r\n\r\n    @article{lenton2021ivy,\r\n      title={Ivy: Templated deep learning for inter-framework portability},\r\n      author={Lenton, Daniel and Pardo, Fabio and Falck, Fabian and James, Stephen and Clark, Ronald},\r\n      journal={arXiv preprint arXiv:2102.02886},\r\n      year={2021}\r\n    }\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivy-llc%2Fivy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivy-llc%2Fivy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivy-llc%2Fivy/lists"}