Deploy Audiocraft Musicgen on Amazon SageMaker using SageMaker Endpoints for Async Inference.
This solution demonstrates deploying AudioCraft MusicGen models from HuggingFace on Amazon SageMaker. MusicGen models take natural language text as input prompt and generate music as output.
AudioCraft consists of three models: MusicGen, AudioGen, and EnCodec. This repo aims to deploy MusicGen models on Amazon SageMaker for Asynchronous inferencing.
Asynchronous Inference Sequence flow for huggingface model facebook/musicgen-large on Amazon SageMaker
The deployment notebooks used in this repo uses Huggingface as model provider for the musicgen models. The corresponding deployment and inference noteboks for the respective models are tablulated below.
Huggingace Model ID | Deploy Notebook | Inference Notebook |
---|---|---|
facebook/musicgen-large | Deploy | Inference |
facebook/musicgen-medium | Deploy | Inference |
facebook/musicgen-small | Deploy | Inference |
- Open sourcing AudioCraft: Generative AI for audio made simple and available to all
- https://huggingface.co/facebook/musicgen-large
- https://huggingface.co/docs/transformers/model_doc/musicgen#generation
- https://github.com/facebookresearch/audiocraft/blob/main/README.md
- https://sagemaker.readthedocs.io/en/stable/frameworks/huggingface/sagemaker.huggingface.html#hugging-face-model
- https://sagemaker.readthedocs.io/en/stable/api/inference/predictors.html#sagemaker.predictor.Predictor.predict
- https://github.com/aws/amazon-sagemaker-examples/blob/main/async-inference/Transcription_on_SM_endpoint.ipynb
See CONTRIBUTING for more information.
@inproceedings{copet2023simple,
title={Simple and Controllable Music Generation},
author={Jade Copet and Felix Kreuk and Itai Gat and Tal Remez and David Kant and Gabriel Synnaeve and Yossi Adi and Alexandre Défossez},
booktitle={Thirty-seventh Conference on Neural Information Processing Systems},
year={2023},
}
This library is licensed under the MIT-0 License. See the LICENSE file.