--- license: mit tags: - small audio-language model - ALM - audio - music - sound events - audio reasoning - audio captioning - audio question answering - zero-shot - audio-text --- # Mellow [[`Paper`]()] [[`GitHub`](https://github.com/soham97/Mellow)] [[`🤗Checkpoint`](https://huggingface.co/soham97/Mellow)] [[`Zenodo`](https://huggingface.co/soham97/Mellow)] Mellow is a small Audio-Language Model that takes in two audios and a text prompt as input and produces free-form text as output. It is a 167M parameter model and trained on ~155 hours of audio (AudioCaps and Clotho), and achieves SoTA performance on different tasks with 50x fewer parameters. ![alt text](resource/image.png) ## Index * [Setup](#setup) * [Usage](#usage) * [Examples](#example) * [ReasonAQA](#reasonaqa) * [Limitation](#limitation) ## Setup 1. Install the required dependencies: `pip install -r requirements.txt`. For [conda](https://www.anaconda.com), run the following: ```shell cd Mellow && \ conda create -n mellow python=3.10.14 && \ conda activate mellow && \ pip install -r requirements.txt ``` 2. To test the setup is complete, run: ```shell python example.py ``` ## Usage The MellowWrapper class allows easy interaction with the model. To use the wrapper, inputs required are: - `config`: The option supported is "v0" - `model`: The option supported is "v0" - `examples`: List of examples. Each example is a list containing three entries: audiopath1, audiopath2, prompt Supported functions: - `generate`: Produces text response for the given audio inputs and text prompt ## Example Mellow supports open-ended questions-answering and can produce response based on the user's prompt. Below, we provide some example questions for testing Mellow on different tasks. ```python import torch from pathlib import Path import os from mellow import MellowWrapper # setup cuda and device cuda = torch.cuda.is_available() device = 0 if cuda else "cpu" mellow = Mellow(config="", model_path="