Skip to content

Files

Failed to load latest commit information.

Latest commit

 Cannot retrieve latest commit at this time.

History

History
 
 

huggingface

README.md

DeepSpeed Huggingface Inference Examples

Contents

Setup

The Python dependencies for each example are captured in requirements.txt in the corresponding ML task directory (e.g. ./text-generation).

Python dependencies can be installed using:

pip install -r requirements.txt

For the ./automatic-speech-recognition/test-wav2vec.py speech model example, you may also need to install the libsndfile1-dev generic library:

sudo apt-get install libsndfile1-dev

Usage

The DeepSpeed huggingface inference examples are organized into their corresponding ML task directories (e.g. ./text-generation). Each ML task directory contains a README.md and a requirements.txt.

Task README requirements
automatic-speech-recognition README requirements
fill-mask README requirements
text-generation README requirements
text-generation/run-generation-script README requirements
text2text-generation README requirements
translation README requirements

Most examples can be run as follows:

deepspeed --num_gpus [number of GPUs] test-[model].py

Additional Resources

Information about DeepSpeed can be found at the deepspeed.ai website.

DeepSpeed Inference

Additional information on DeepSpeed inference can be found here:

Benchmarking

DeepSpeed inference benchmarking can be found in the DeepSpeed repository: