# AI GPU Clusters, From Your Laptop, With Livebook

DevFeed: [AI GPU Clusters, From Your Laptop, With Livebook](<https://devfeed.tech/articles/ai-gpu-clusters-from-your-laptop-with-livebook-1688.md>)

Original publisher: [Read original article](<https://fly.io/blog/ai-gpu-clusters-from-your-laptop-livebook/>)

Published: 2024-09-24T00:00:00Z

Content type: article

Language: en

Sources: [The Fly Blog](<https://devfeed.tech/sources/the-fly-blog.md>)

Topics: [Elixir](<https://devfeed.tech/topics/elixir.md>), [fly.io](<https://devfeed.tech/topics/fly-io.md>), [jupyter](<https://devfeed.tech/topics/jupyter.md>), [Cloud](<https://devfeed.tech/topics/cloud.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [Serverless](<https://devfeed.tech/topics/serverless.md>), [GPU](<https://devfeed.tech/topics/gpu.md>), [PyTorch](<https://devfeed.tech/topics/pytorch.md>)

Tags: [access-control](<https://devfeed.tech/tags/access-control.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-and-ml](<https://devfeed.tech/tags/ai-and-ml.md>), [cdn](<https://devfeed.tech/tags/cdn.md>), [close-to-users](<https://devfeed.tech/tags/close-to-users.md>), [deploy-app-servers](<https://devfeed.tech/tags/deploy-app-servers.md>), [docker](<https://devfeed.tech/tags/docker.md>), [elixir](<https://devfeed.tech/tags/elixir.md>), [fly](<https://devfeed.tech/tags/fly.md>), [fly-io](<https://devfeed.tech/tags/fly-io.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [heroku-alternative](<https://devfeed.tech/tags/heroku-alternative.md>), [heroku-competitor](<https://devfeed.tech/tags/heroku-competitor.md>), [hosting](<https://devfeed.tech/tags/hosting.md>), [i](<https://devfeed.tech/tags/i.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [jupyter](<https://devfeed.tech/tags/jupyter.md>), [networking](<https://devfeed.tech/tags/networking.md>), [postgresql-clusters](<https://devfeed.tech/tags/postgresql-clusters.md>), [serverless](<https://devfeed.tech/tags/serverless.md>), [servers](<https://devfeed.tech/tags/servers.md>)

## AI overview

This recap introduces Livebook, FLAME, and the Nx stack as Elixir components for interactive notebooks, elastic code execution, and Elixir-native AI and machine learning. It describes moving computation between a laptop and remote Fly.io infrastructure, including GPU-backed workloads, and discusses private network access to other applications such as databases.

## Source excerpt

Livebook, FLAME, and the Nx stack: three Elixir components that are easy to describe, more powerful than they look, and intricately threaded into the Elixir ecosystem. A few weeks ago, Chris McCord (👋) and Chris Grainger showed them off at ElixirConf 2024. We thought the talk was worth a recap. Let's begin by introducing our cast of characters. Livebook is usually described as Elixir's answer to Jupyter Notebooks. And that's a good way to think about it. But Livebook takes full advantage of the Elixir platform, which makes it sneakily powerful. By linking up directly with Elixir app clusters, Livebook can switch easily between driving compute locally or on remote servers, and makes it easy to bring in any kind of data into reproducible workflows. FLAME is the Elixir's answer to serverless computing. By having the library manage a pool of executors for you, FLAME lets you treat your entire application as if it was elastic and scale-to-zero. You configure FLAME with some basic information about where to run code and how many instances it's allowed to run with, and then mark off any arbitrary section of code with Flame.call. The framework takes care of the rest. It's the upside of serverless without committing yourself to blowing your app apart into tiny, intricately connected pieces. The Nx stack is how you do Elixir-native AI and ML. Nx gives you an Elixir-native notion of tensor computations with GPU backends. Axon builds a common interface for ML models on top of it. Bumblebee makes those models available to any Elixir app that wants to download them, from just a couple lines of code. Here is quick video showing how to transfer a local tensor to a remote GPU, using Livebook, FLAME, and Nx: Let's dive into the keynote. Poking a hole in your infrastructure Any Livebook, including the one running on your laptop, can start a runtime running on a Fly Machine, in Fly.io's public cloud. That Elixir machine will (by default) live in your default Fly.io organization, giving