Model reference · open weights
musicgen-melody is an open-weight audio or speech model from facebook, listed in the AxForge catalogue. AxForge can bring it up on EU-owned hardware for you on request — with the licence handled where one is required.
About
MusicGen - Melody - 1.5B Audiocraft provides the code and models for MusicGen, a simple and controllable model for music generation. MusicGen is a single stage auto-regressive Transformer model trained over a 32kHz EnCodec tokenizer with 4 codebooks sampled at 50 Hz. Unlike existing methods like MusicLM, MusicGen doesn't not require a self-supervised semantic representation, and it generates all 4 codebooks in one pass. By introducing a small delay between the codebooks, we show we can predict them in parallel, thus having only 50 auto-regressive steps per second of audio. MusicGen was published in Simple and Controllable Music Generation by Jade Copet, Felix Kreuk, Itai Gat, Tal Remez, David Kant, Gabriel Synnaeve, Yossi Adi, Alexandre Défossez. Four checkpoints are released: - small - medium - large - melody (this checkpoint) Example Try out MusicGen yourself! - <a target="blank" href="https://colab.research.google.com/drive/1fxGqfg96RBUvGxZ1XXN07s3DthrKUl4-?usp=sharing" - <a target="blank" href="https://huggingface.co/spaces/facebook/MusicGen" - You can run MusicGen locally as well: 1. First install the audiocraft library 2. Make sure to have ffmpeg installed: 3. Run the following Python code: Model details Organization developing the model: The FAIR team of Meta AI. Model date: MusicGen was trained between April 2023 and May 2023. Model version: This is the version 1 of the model. Model type: MusicGen consists of an EnCodec model for audio tokenization, an auto-regressive language model based on the transformer architecture for music modeling. The model comes in different sizes: 300M, 1.5B and 3.3B parameters ; and two variants: a model trained for text-to-music generation task and a model trained for melody-guided music generation. Paper or resources for more information: More information can be found in the paper Simple and Controllable Music Generation. Citation details: License: Code is released under MIT, model weights are released under CC-BY-NC 4.0. Where to send questions or comments about the model: Questions and comments about MusicGen can be sent via the Github repository of the project, or by opening an issue. Intended use Primary intended use: T
Summarised from the published model card. Read the full card on the HuggingFace links below.
Specifications
| Maker | |
|---|---|
| Type | Audio & music |
| Parameters (lead) | 1.6B |
| Variants | 1 |
| Runs with | transformers |
| Released | 2023-06-08 |
| Popularity | 22k downloads / month |
| Likes | 257 |
| Licence | Commercial licence needed |
How it works
Variants
Open weights ship in several sizes and precisions. One page, all the variants — pick the one that fits your GPU. VRAM figures are estimates from model size.
| Variant | Params | Precision | VRAM | Fits 16 GB | Weights |
|---|---|---|---|---|---|
| musicgen-melody | 1.6B | BF16 | ~3.6 GB | ✓ | Weights ↗ |
Using it via the API
Once AxForge deploys musicgen-melody for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (musicgen-melody below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/audio/transcriptions \ -H "Authorization: Bearer $AXFORGE_API_KEY" \ -F model="musicgen-melody" -F file=@audio.mp3
Licence
The weights are open but cc-by-nc-4.0 needs a commercial agreement for business use. AxForge can arrange that licence and host the model for you — you pay AxForge, we settle with the model’s maker. Ask us for a quote. Read the licence ↗