Machine Learning WG updates - Sep 2021
Welcome to another update from the Machine Learning WG! This time we are glad to announce many improvements to our on-going efforts and welcome new projects into the fold!
Nx updates
Nx is a multi-dimensional tensors library for Elixir with multi-staged compilation to the CPU/GPU.
-
Refactored Nx’ core to support TPUs (https://github.com/elixir-nx/nx/pull/423)
-
Many new index-based operations were added, such as
Nx.take/3
,Nx.take_along_axis/3
,Nx.gather/2
, andNx.scatter_add/3
-
The EXLA backend (which uses Google’s XLA) has been updated to Tensorflow 2.6 and now supports NVIDIA’s Jeton and macOS aarch64
-
We now precompile Google’s XLA to multiple OSes and architectures. This brings the getting started experience down from several minutes to a couple seconds
Explorer updates
We are glad to welcome Explorer, led by Chris Grainger, into the Machine Learning WG and into the elixir-nx organization. Explorer is a dataframe library for Elixir. It is an API for data manipulation with high-level features such as:
-
Simply typed series: float, integer, boolean, string, date, and datetime
-
A powerful but constrained and opinionated API, so you spend less time looking for the right function and more time doing data manipulation
-
Pluggable backends, providing a uniform API whether you’re working in-memory or (forthcoming) on remote databases or even Spark dataframes
-
The first (and default) backend is based on NIF bindings to the blazing-fast polars library
Learn more about it in its README or in its introductory notebook.
Livebook updates
Livebook is a collaborative and interactive code notebook in Elixir developed by Jonatan Kłosko.
-
Add an explore section with many introductory notebooks on Livebook, Elixir, VM instrumentation, etc (https://github.com/livebook-dev/livebook/pull/310)
-
Introduce the Kino library: a Livebook client for building interactive charts, tables and more (https://github.com/livebook-dev/livebook/pull/306)
-
Make notebooks more interactive with the addition of inputs (https://github.com/livebook-dev/livebook/pull/328), which can be made reactive (https://github.com/livebook-dev/livebook/pull/389), and allow for multiple input types (colors, text area, urls, passwords, etc)
-
Introduce branching sections to perform asynchronous work (https://github.com/livebook-dev/livebook/pull/449)
-
Support relative links within notebooks (https://github.com/livebook-dev/livebook/pull/441)
-
Hovering modules and function calls in the Elixir code editor now shows their documentation (https://github.com/livebook-dev/livebook/pull/453)
-
Allow notebooks to be exported to Elixir code (https://github.com/livebook-dev/livebook/pull/476) and Live Markdown, optionally with output (https://github.com/livebook-dev/livebook/pull/483)
-
Support for pluggable file-systems with S3 support out of the box: (https://github.com/livebook-dev/livebook/pull/492)
Livebook has been moved to its own organization and it will launch their own website soon. The organization also hosts Nerves Livebook, led by Frank Hunleth, which provides a straightforward way to run Livebook on embedded devices and ships with many additions to teach Nerves to new developers through Livebook.
Axon updates
Axon is a library led by Sean Moriarity that brings deep learning to Elixir. It is powered by Nx and runs on the CPU/GPU.
-
Axon now global pooling layers (https://github.com/elixir-nx/axon/pull/86)
-
Axon handles mixed precision policies (https://github.com/elixir-nx/axon/pull/74)
-
Axon supports callbacks (https://github.com/elixir-nx/axon/pull/71) and metrics (https://github.com/elixir-nx/axon/pull/67)
-
Added constant, bilinear, and adaptive_lp_pool (adaptive power average pool) layers
Other bits
-
Benjamin Moss wrote an article on Predicting fuel efficiency with Elixir, Nx, and Axon: a gentle introduction to Machine Learning
-
Dmitry Rubinstein has implemented a Jupyter backend for Elixir during this year’s Spawnfest
-
Robert Bates has shared a presentation about AI packages for Elixir currently available on Hex.pm
Are you also interested in Machine Learning and the Erlang Ecosystem? Join us and come chat on our Slack.