DailyGlimpse

Elixir Gains Native Support for GPT2 and Stable Diffusion via Hugging Face Library

AI
April 26, 2026 · 5:13 PM
Elixir Gains Native Support for GPT2 and Stable Diffusion via Hugging Face Library

The Elixir programming community has announced the arrival of several neural network models, including GPT2 and Stable Diffusion, with native support for the language. This is made possible by the newly released Bumblebee library, which implements Hugging Face Transformers in pure Elixir.

To help developers get started, the team behind Livebook created a collection of "Smart cells" that enable scaffolding various neural network tasks in just three clicks. Livebook is a computational notebook platform for Elixir.

Thanks to Elixir's concurrency and distribution support via the Erlang Virtual Machine, developers can embed and serve these models within existing Phoenix web applications, integrate them into data processing pipelines with Broadway, or deploy them on Nerves embedded systems—all without third-party dependencies. Bumblebee models compile to both CPU and GPU.

Background

Efforts to bring machine learning to Elixir began nearly two years ago with the Numerical Elixir (Nx) project. Nx provides multi-dimensional tensors and "numerical definitions" that compile to CPU/GPU, leveraging Google XLA (EXLA) and Libtorch (Torchx).

Other projects emerged from the Nx initiative: Axon offers functional composable neural networks inspired by Flax and PyTorch Ignite, while Explorer borrows from dplyr and Rust's Polars for expressive dataframes.

Bumblebee and Tokenizers are the latest releases. The team expresses gratitude to Hugging Face for enabling collaborative machine learning across communities, which was instrumental in accelerating Elixir's ecosystem.

Next steps include focusing on training and transfer learning of neural networks, allowing developers to fine-tune pre-trained models for their specific needs. The team also plans to publish more on traditional machine learning algorithms.

Get Involved

To try Bumblebee:

  • Download Livebook v0.8 and generate "Neural Networks tasks" from the "+ Smart" cell menu. Support for additional platforms and Spaces is coming soon.
  • Explore single-file Phoenix applications demonstrating Bumblebee models within Phoenix (+ LiveView) apps.
  • Review notebooks for a hands-on approach.

Contributions are welcome, especially pull requests adding more models and architectures to Bumblebee. The future is concurrent, distributed, and fun!