mgwidmann

mgwidmann

Recently, I am investigating the possibility of building out a LLaMa2 70B system which needs to be able to scale to thousands of requests per minute. This will require a lot of hardware, I realize, but for now I’m just exploring. I’ve tried using HuggingFace’s Text Generation Interface (aka TGI) to serve the model requests and been able to get decent performance with the right kind of hardware due to its continuous batching of requests, as well as been able to test on smaller machines by using Quantization (even though this seems to be not recommended for inference as its much slower).

I am wondering, since I don’t see issues on the Bumblebee GitHub regarding the kinds of features offered by TGI, are any of them implemented or planned to be implemented? Features I’d be looking for are things like:

  • FlashAttention v2 & PagedAttention
  • Continuous Batching
  • Token Streaming
  • Sharding a single model across multiple GPUs (this is probably an Nx thing, though I haven’t tried it)
  • Quantization for running on smaller machines (i.e. a dev environment)

Some of these concepts are mentioned here for example:

https://vilsonrodrigues.medium.com/serving-falcon-models-with-text-generation-inference-tgi-5f32005c663b

Showing Posts 1 to 2

jonatanklosko

jonatanklosko

Creator of Livebook

Hey @mgwidmann! Many deployment considerations are built into Nx, specifically Nx.Serving. A couple thins it does for you:

  • batching inference requests
  • if you have multiple hosts in a connected cluster, the work is load balanced transparently
  • if you have multiple GPUs on the given host, you can easily load balance the work between them too
  • it supports streaming (for example, Bumblebee.Text.generation builds a serving instance and all you need to do is pass stream: true)
  • encapsulates model pre/post processing (so it can be treated as an end-to-end pipeline in a way)

You can look at https://hexdocs.pm/bumblebee/llama.html for an example of using LLM with Bumblebee.

As for the other points:

  • optimised attentions - we don’t have it yet, but that’s something we plan on supporting in Bumblebee
  • sharding a single model across GPUs - for that we don’t have an abstraction yet
  • quantization - there is an ongoing work in the EXLA compiler to use MLIR, which should enable quantization
mgwidmann

mgwidmann OP

Thanks a lot, the use case I was looking to compare with would be something like LLaMa2 70B sharded across 8 A100 GPUs since that model cannot fit within a single GPU, especially unquantized.

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews