Model reference · open weights
bark-small is an open-weight audio or speech model from suno, 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
Bark Bark is a transformer-based text-to-audio model created by Suno. Bark can generate highly realistic, multilingual speech as well as other audio - including music, background noise and simple sound effects. The model can also produce nonverbal communications like laughing, sighing and crying. To support the research community, we are providing access to pretrained model checkpoints ready for inference. The original github repo and model card can be found here. This model is meant for research purposes only. The model output is not censored and the authors do not endorse the opinions in the generated content. Use at your own risk. Two checkpoints are released: - small (this checkpoint) - large Example Try out Bark yourself! Bark Colab: Hugging Face Colab: Hugging Face Demo: 🤗 Transformers Usage You can run Bark locally with the 🤗 Transformers library from version 4.31.0 onwards. 1. First install the 🤗 Transformers library and scipy: 2. Run inference via the Text-to-Speech (TTS) pipeline. You can infer the bark model via the TTS pipeline in just a few lines of code! 3. Run inference via the Transformers modelling code. You can use the processor + generate code to convert text into a mono 24 kHz speech waveform for more fine-grained control. 4. Listen to the speech samples either in an ipynb notebook: Or save them as a .wav file using a third-party library, e.g. scipy: For more details on using the Bark model for inference using the 🤗 Transformers library, refer to the Bark docs. Optimization tips Refers to this blog post to find out more about the following methods and a benchmark of their benefits. Get significant speed-ups: Using 🤗 Better Transformer Better Transformer is an 🤗 Optimum feature that performs kernel fusion under the hood. You can gain 20% to 30% in speed with zero performance degradation. It only requires one line of code to export the model to 🤗 Better Transformer: Note that 🤗 Optimum must be installed before using this feature. Here's how to install it. Using Flash Attention 2 Flash Attention 2 is an even faster, optimized version of the previous optimization. Make sure to load your model in half-precision (e.g. torch.float16) and to install
Summarised from the published model card. Read the full card on the HuggingFace links below.
Specifications
| Maker | suno |
|---|---|
| Type | Audio & music |
| Variants | 1 |
| Runs with | transformers |
| Released | 2023-07-18 |
| Popularity | 29k downloads / month |
| Likes | 262 |
| Licence | Open weights |
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 |
|---|---|---|---|---|---|
| bark-small | — | BF16 | — | — | Weights ↗ |
Using it via the API
Once AxForge deploys bark-small for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (bark-small 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="bark-small" -F file=@audio.mp3
Details
Languages
Tags
Licence
Open weights under mit — commercial use is permitted. Deploy it on AxForge EU hardware on request. Read the licence ↗