[Community Contributions] examples on distributed inference using 🤗 Accelerate
The inference/distributed directory houses examples on running distributed inference with accelerate:
- Phi2 for language generation
- Stable Diffusion for image generation
The strategy followed there is to load an entire model onto each GPU and sending chunks of a batch through each GPU’s model copy at a time. Synthetic data generation has become an essential toolkit for every ML Engineer. So, it'd be beneficial to extend these examples to include some more use cases:
- Image captioning
- Speech data generation
Some nice to haves:
- Include artifact serialization as done in this
- Keep the artifact serialization code under a thread to not block GPU execution
How can you help?
You could help us contribute an example on any of the above-mentioned use cases or you can come up with your own 🤗 Help us make the art of synthetic data generation scalable, easy, and accessible.
For image recaptioning, I have a quick and dirty PoC here that assumes streaming from webdataset and uses multiprocessing from torch: https://gist.github.com/sayakpaul/dfb26d6562b62ba8c2f613dc912a28a8#file-generate_captions_multigpu-py. Would be nice to make it more efficient and leverage accelerate to make things cleaner and simpler.
Hey @sayakpaul @muellerzr! If it is still actual, I am going to add one more example for Video captioning using LLaVA-NeXT-Video-7B-hf
Of course it's up, that would be so cool! Cc: @a-r-r-o-w
Hi! I'd like to add an image captioning example using BLIP-2. Is this still open for contributions?
is it still open?
hey @muellerzr @sayakpaul ! Is it still open,if yes,i would like to work on it
Hi @sayakpaul @muellerzr! Is this still available for people to contribute? I want to create a distributed batch inference example script using Qwen2.5 or Whisper for audio or Gemma 2. Let me know if you have a model that would be most useful!
I'd like to take this one ([Community Contributions] examples on distributed inference ). I'll dig into the root cause and follow up with a PR shortly. (claiming via @LeonxLJX)
I'd like to take this one ([Community Contributions] examples on distributed inference ). I'll look into the root cause and follow up with a PR. (claiming via @LeonxLJX)
Hi! I'd like to add examples on distributed inference using Accelerate. Plan: write a tutorial with multi-GPU inference, include code and expected output. May I be assigned?
Hi @sayakpaul and @muellerzr! Is this issue still active for contributions?
If so, I would love to contribute a distributed batch inference example script using Whisper for scalable speech data generation / audio transcription, or alternatively using Qwen2.5-VL / Gemma 2 if there's a specific multimodal/text model the team is prioritizing right now.
Let me know if either of these directions sounds good, and I'd be happy to open a PR!