https://github.com/unifyai/ivy Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} unifyai / ivy Public * Notifications * Fork 492 * Star 1.4k The Unified Machine Learning Framework lets-unify.ai License Apache-2.0 License 1.4k stars 492 forks Star Notifications * Code * Issues 86 * Pull requests 11 * Discussions * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Projects * Wiki * Security * Insights This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 3 branches 9 tags Code Latest commit @djl11 djl11 removed 'Aray API Standardization' section in contributor guie, ... 7f7fa8f Apr 30, 2022 removed 'Aray API Standardization' section in contributor guie, 7f7fa8f Git stats * 2,510 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows Fixing PR action, yet again. Apr 26, 2022 .idea bitwise_left_shift adhering to Array API Standard (#835) Apr 8, 2022 automation_tools Update volunteer_go_to_intern.json Apr 27, 2022 docs removed 'Aray API Standardization' section in contributor guie, Apr 30, 2022 ivy add matrix power- waiting on test suite PR before uncommenting Apr 29, 2022 ivy_tests add matrix power- waiting on test suite PR before uncommenting Apr 29, 2022 .gitignore updated test_array_api.sh so that all untested methods are skipped ex... Feb 26, 2022 .gitmodules added array api tests as submodule. Feb 16, 2022 Dockerfile updated torch to use CPU-only version in the Dockerfile. DockerGPU sh... Feb 20, 2022 DockerfileCopsim updated dockerfile namespace from ivydl to unifyai. Jan 29, 2022 DockerfileGPU fixed failing DockerfileGPU. Feb 22, 2022 LICENSE initial commit. Feb 10, 2021 MANIFEST.in included MANIFEST.in file with requirements.txt included, to fix pypi... Dec 1, 2021 README.rst small fix to readme Apr 14, 2022 deploy_pypi.sh updated pypi github actions workflow, and updated bash script deploy_... Nov 30, 2021 merge_with_upstream.sh updated merge_with_upstream.sh so that it does not fail if upstream h... Mar 15, 2022 optional.txt added hypothesis to optional.txt, in anticipation of ivy test refactor. Apr 14, 2022 project.toml updated pypi github actions workflow, and updated bash script deploy_... Nov 30, 2021 rebuild_all_dockerfiles.sh updated dockerfile namespace from ivydl to unifyai. Jan 29, 2022 requirements.txt colorama init for container Apr 14, 2022 run_tests.sh Update run_tests.sh Mar 28, 2022 setup.py updates to setup.py following changes to README. Mar 31, 2022 test_array_api.sh Added Framework-Specific comments for Array API Tests (#1010) Apr 28, 2022 test_dependencies.py removed version comments from requirements.txt and optional.txt, and ... Nov 27, 2021 test_dependencies.sh updated dockerfile namespace from ivydl to unifyai. Jan 29, 2022 View code [ ] Contents Overview Quick Start Background Design Extensions Roadmap Contributing Citation README.rst https://github.com/unifyai/unifyai.github.io/blob/master/img/ externally_linked/repos/ivy/logo.png?raw=true [6874747073] [6874747073] [6874747073] [6874747073] [6874747073] [6874747073] [6874747073] [6874747073] We're on a mission to unify all ML frameworks + automate code conversions . pip install ivy-core , join our growing community , and lets-unify.ai! [e] [jax_log] [emp] [tensorf] [emp] [mxnet_l] [emp] [pytorch] [emp] [numpy_l] Contents * Overview * Quick Start * Background * Design * Extensions * Roadmap * Contributing Overview Ivy is an ML framework which currently supports JAX, TensorFlow, PyTorch, MXNet and Numpy. We're very excited for you to try it out! Next on our road-map is to support automatic code conversions between any frameworks , and add instant multi-framework support for all open-source libraries with only a few lines of code changed! Read on to learn more The docs are split into a number of sub-pages explaining different aspects of why we created Ivy, how to use it, what we've got planned on our road-map, and how to contribute! Click on the sub-headings to check out these pages! We use to indicate that the feature being discussed is in development. We use to indicate that it is already implemented! Check out the docs for more info, and check out our Google Colabs for some interactive demos! Quick Start Ivy can be installed like so: pip install ivy-core You can immediately use Ivy to train a neural network, using your favourite framework in the background, like so: import ivy class MyModel(ivy.Module): def __init__(self): self.linear0 = ivy.Linear(3, 64) self.linear1 = ivy.Linear(64, 1) ivy.Module.__init__(self) def _forward(self, x): x = ivy.relu(self.linear0(x)) return ivy.sigmoid(self.linear1(x)) ivy.set_framework('torch') # change to any framework! model = MyModel() optimizer = ivy.Adam(1e-4) x_in = ivy.array([1., 2., 3.]) target = ivy.array([0.]) def loss_fn(v): out = model(x_in, v=v) return ivy.reduce_mean((out - target)**2)[0] for step in range(100): loss, grads = ivy.execute_with_gradients(loss_fn, model.v) model.v = optimizer.step(model.v, grads) print('step {} loss {}'.format(step, ivy.to_numpy(loss).item())) print('Finished training!') This example uses PyTorch as a backend framework, but the backend can easily be changed to your favourite framework, such as TensorFlow, JAX or MXNet. Framework Agnostic Functions In the example below we show how Ivy's concatenation function is compatible with tensors from different frameworks. This is the same for ALL Ivy functions. They can accept tensors from any framework and return the correct result. import jax.numpy as jnp import tensorflow as tf import numpy as np import mxnet as mx import torch import ivy jax_concatted = ivy.concat((jnp.ones((1,)), jnp.ones((1,))), -1) tf_concatted = ivy.concat((tf.ones((1,)), tf.ones((1,))), -1) np_concatted = ivy.concat((np.ones((1,)), np.ones((1,))), -1) mx_concatted = ivy.concat((mx.nd.ones((1,)), mx.nd.ones((1,))), -1) torch_concatted = ivy.concat((torch.ones((1,)), torch.ones((1,))), -1) To see a list of all Ivy methods, type ivy. into a python command prompt and press tab. You should then see output like the following: ivy.Container( ivy.general ivy.reduce_min( ivy.abs( ivy.get_device( ivy.reduce_prod( ivy.acos( ivy.get_num_dims( ivy.reduce_sum( ivy.acosh( ivy.gradient_descent_update( ivy.reductions ivy.activations ivy.gradient_image( ivy.relu( ivy.arange( ivy.gradients ivy.reshape( ivy.argmax( ivy.identity( ivy.round( ivy.argmin( ivy.image ivy.scatter_nd( ivy.array( ivy.indices_where( ivy.seed( ivy.asin( ivy.inv( ivy.shape( ivy.asinh( ivy.layers ivy.shuffle( ivy.atan( ivy.leaky_relu( ivy.sigmoid( ivy.atan2( ivy.linalg ivy.sin( ivy.atanh( ivy.linear( ivy.sinh( ivy.bilinear_resample( ivy.linspace( ivy.softmax( ivy.cast( ivy.log( ivy.softplus( ivy.ceil( ivy.logic ivy.split( ivy.clip( ivy.logical_and( ivy.squeeze( ivy.concatenate( ivy.logical_not( ivy.stack( ivy.container ivy.logical_or( ivy.stack_images( ivy.conv2d( ivy.math ivy.stop_gradient( ivy.core ivy.matmul( ivy.svd( ivy.cos( ivy.maximum( ivy.tan( ivy.cosh( ivy.minimum( ivy.tanh( ivy.cross( ivy.neural_net ivy.tile( ivy.cumsum( ivy.nn ivy.to_list( ivy.depthwise_conv2d( ivy.norm( ivy.to_numpy( ivy.dtype( ivy.one_hot( ivy.transpose( ivy.execute_with_gradients( ivy.ones( ivy.unstack( ivy.exp( ivy.ones_like( ivy.variable( ivy.expand_dims( ivy.pinv( ivy.vector_to_skew_symmetric_matrix( ivy.flip( ivy.randint( ivy.verbosity ivy.floor( ivy.random ivy.where( ivy.floormod( ivy.random_uniform( ivy.zero_pad( ivy.framework_handler ivy.reduce_max( ivy.zeros( ivy.gather_nd( ivy.reduce_mean( ivy.zeros_like( Background (a) ML Explosion A huge number of ML tools have exploded onto the scene! (b) Why Unify? Why should we try to unify them? (c) Standardization We're collaborating with The Consortium for Python Data API Standards Design Ivy can fulfill two distinct purposes: 1. Serve as a transpiler between frameworks 2. Serve as a new ML framework with multi-framework support The Ivy codebase can then be split into three categories, and can be further split into 8 distinct submodules, each of which fall into one of these three categories as follows: https://github.com/unifyai/unifyai.github.io/blob/master/img/ externally_linked/submodule_dependency_graph.png?raw=true (a) Building Blocks Back-end functional APIs Ivy functional API Framework Handler Ivy Compiler (b) Ivy as a Transpiler Front-end functional APIs (c) Ivy as a Framework Ivy stateful API Ivy Container Ivy Array Extensions (a) Applied Libraries Ivy libraries in mechanics, vision, robotics, memory and other areas (b) Builder [page coming soon!] ivy.Trainer, ivy.Dataset, ivy.Dataloader and other helpful classes and functions for creating training workflows in only a few lines of code Roadmap We strongly welcome and encourage contributions from the community as we take on this important journey towards ML framework unification. These posts will explain exactly how you can get involved (a) Standardize [page coming soon!] Align Ivy with the Consortium for Python Data API Standards (b) Front-Ends [page coming soon!] Create framework-specific front-ends for each supported ML framework (c) Transpiler [page coming soon!] Verify code conversions work for each back-end and front-end combo (d) Ecosystem [page coming soon!] Add multi-framework support to popular repos with a few lines changed Contributing Join our community as a code contributor, and help accelerate our journey to unify all ML frameworks! Find out more in our Contributing guide! 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} } About The Unified Machine Learning Framework lets-unify.ai Topics python template machine-learning deep-learning neural-network mxnet tensorflow gpu numpy pytorch autograd abstraction ivy jax Resources Readme License Apache-2.0 License Stars 1.4k stars Watchers 13 watching Forks 492 forks Releases 9 Ivy v1.1.9 Latest Dec 1, 2021 + 8 releases Packages 0 No packages published Used by 10 * @Ishticode * @unifyai * @unifyai * @kavindrakimt * @unifyai * @unifyai * @unifyai * @unifyai + 2 Contributors 123 * @ivy-seed * @djl11 * @mattbarrett98 * @Ishticode * @saeedashrraf * @1Doomdie1 * @sherry30 * @HotzingTone * @bicycleman15 * @kevinxue1126 * @kirodev + 112 contributors Languages * Python 99.8% * Other 0.2% * (c) 2022 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.