musicgpt

App Listed Dormant

Generate music based on natural language prompts using LLMs running locally

Checked · Sources

Downloads
7,531
Dependents
Not applicable
Stars
1,471
Forks
172
Contributors
3
Commits
313
Latest release
0.3.27 ·

About

From the project README ·

Generate music based on natural language prompts using LLMs running locally.

https://github.com/gabotechs/MusicGPT/assets/45515538/f0276e7c-70e5-42fc-817a-4d9ee9095b4c

☝️ Turn up the volume!

Overview

MusicGPT is an application that allows running the latest music generation AI models locally in a performant way, in any platform and without installing heavy dependencies like Python or machine learning frameworks.

Right now it only supports MusicGen by Meta, but the plan is to support different music generation models transparently to the user.

The main milestones for the project are:

  • [x] Text conditioned music generation
  • [ ] Melody conditioned music generation
  • [ ] Indeterminately long / infinite music streams

Install

Mac and Linux

MusicGPT can be installed on Mac and Linux using brew:

brew install gabotechs/taps/musicgpt
Windows

Download and install MusicGPT's executable file following this link.

All platforms

Precompiled binaries are available for the following platforms:

Just downloading them and executing them should be enough.

Read the full README
Docker (Recommend for running with CUDA)

If you want to run MusicGPT with a CUDA enabled GPU, this is the best way, as you only need to have the basic NVIDIA drivers installed in your system.

docker pull gabotechs/musicgpt

Once the image is downloaded, you can run it with:

docker run -it --gpus all -p 8642:8642 -v ~/.musicgpt:/root/.local/share/musicgpt gabotechs/musicgpt --gpu --ui-expose
With cargo

If you have the Rust toolchain installed in your system, you can install it with cargo.

cargo install musicgpt

Usage

There are two ways of interacting with MusicGPT: the UI mode and the CLI mode.

UI mode

This mode will display a chat-like web application for exchanging prompts with the LLM. It will:

  • store your chat history
  • allow you to play the generated music samples whenever you want
  • generate music samples in the background
  • allow you to use the UI in a device different from the one executing the LLMs

You can run the UI by just executing the following command:

musicgpt

You can also choose different models for running inference, and whether to use a GPU or not, for example:

musicgpt --gpu --model medium

[!WARNING]
Most models require really powerful hardware for running inference

If you want to use a CUDA enabled GPU, it's recommended that you run MusicGPT with Docker:

docker run -it --gpus all -p 8642:8642 -v ~/.musicgpt:/root/.local/share/musicgpt gabotechs/musicgpt --ui-expose --gpu

CLI mode

This mode will generate and play music directly in the terminal, allowing you to provide multiple prompts and playing audio as soon as it's generated. You can generate audio based on a prompt with the following command:

musicgpt "Create a relaxing LoFi song"

By default, it produces a sample of 10s, which can be configured up to 30s:

musicgpt "Create a relaxing LoFi song" --secs 30

There's multiple models available, it will use the smallest one by default, but you can opt into a bigger model:

musicgpt "Create a relaxing LoFi song" --model medium

[!WARNING]
Most models require really powerful hardware for running inference

If you want to use a CUDA enabled GPU, it's recommended that you run MusicGPT with Docker:

docker run -it --gpus all -v ~/.musicgpt:/root/.local/share/musicgpt gabotechs/musicgpt --gpu "Create a relaxing LoFi song"

You can review all the options available running:

musicgpt --help

Benchmarks

The following graph shows the inference time taken for generating 10 seconds of audio using different models on a Mac M1 Pro. For comparison, it's Python equivalent using https://github.com/huggingface/transformers is shown.

The command used for generating the 10 seconds of audio was:

musicgpt '80s pop track with bassy drums and synth'

This is the Python script used for generating the 10 seconds of audio

import scipy
import time
from transformers import AutoProcessor, MusicgenForConditionalGeneration

processor = AutoProcessor.from_pretrained("facebook/musicgen-small")
model = MusicgenForConditionalGeneration.from_pretrained("facebook/musicgen-small")

inputs = processor(
    text=["80s pop track with bassy drums and synth"],
    padding=True,
    return_tensors="pt",
)

start = time.time()
audio_values = model.generate(**inputs, max_new_tokens=500)
print(time.time() - start) # Log time taken in generation

sampling_rate = model.config.audio_encoder.sampling_rate
scipy.io.wavfile.write("musicgen_out.wav", rate=sampling_rate, data=audio_values[0, 0].numpy())

Storage

MusicGPT needs access to your storage in order to save downloaded models and generated audios along with some metadata needed for the application to work properly. Assuming your username is foo, it will store the data in the following locations:

  • Windows: C:\Users\foo\AppData\Roaming\gabotechs\musicgpt
  • MacOS: /Users/foo/Library/Application\ Support/com.gabotechs.musicgpt
  • Linux: /home/foo/.config/musicgpt

License

The code is licensed under a MIT License, but the AI model weights that get downloaded at application startup are licensed under the CC-BY-NC-4.0 License as they are generated based on the following repositories:

  • https://huggingface.co/facebook/musicgen-small
  • https://huggingface.co/facebook/musicgen-medium
  • https://huggingface.co/facebook/musicgen-large
  • https://huggingface.co/facebook/musicgen-melody
Runs on
CUDA
What shows it
  • CUDA: musicgpt feature cuda
Native code
Required
  • Binds native code: alsa-sys, openssl-sys, ort-sys
Python bindings
No Python binding crate found
License
MIT

Compare with similar projects

Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.

musicgpt beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
musicgpt This page App Listed Dormant

Generate music based on natural language prompts using LLMs running locally

7,531 binary downloads per release Not applicable 1,471 0.3.27 CUDA Binds native code: alsa-sys, openssl-sys, ort-sys MIT
llm-samplers Listed Dormant

Token samplers for large language models

4,242 downloads over 30 days 6 18 0.0.7 GPU support unknown No native code found MIT
LlamaEdge App Listed

The easiest & fastest way to run customized and fine-tuned LLMs locally or on the edge

841 binary downloads per release Not applicable 1,663 Not measured Not measured Apache-2.0
lele Listed

Bare-metal machine learning inference library in Rust

132 downloads over 30 days 1 183 0.2.0 GPU support unknown No native code found MIT
nobodywho App Listed

NobodyWho is an inference engine that lets you run LLMs locally and efficiently on any device.

34 binary downloads per release Not applicable 1,672 Not measured Not measured EUPL-1.2
blazr App Listed

Inference server for LLMs, speech and embeddings: OpenAI-compatible routes with streaming, plus speech synthesis (TTS) and transcription (ASR). Serves Llama, Mistral, Qwen, Mamba2, MLA+MoE and hybrid models from SafeTensors, AWQ, GPTQ and GGUF.

8 binary downloads per release Not applicable 7 0.7.1 CUDA, WebGPU Binds native code: ring (feature distributed) Apache-2.0
Why ListedNo archive, New or Featured rule places it, so it is Listed.

What it lacks for Featured

What else the check found

  • The last activity is on 9 Feb 2025, 638 days ago. That reaches the 365 days the rules expect, so the project is dormant. Dormancy rule

Not measured: Unpatched vulnerabilities past the grace window.

Exact rules: Listed, Featured app. The check on applied thresholds version 9.

Every rule outcome, as the check records it
  • expected-interval: app: E = 365 days
  • dormancy: last activity 2025-02-09, 638 days ago, E = 365: dormant
  • featured: not featured: dormant and not stable
  • listed: listed: no archive, new or featured rule applies

Measurements and sources

Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.

Sources6 sources
Adoption7,531 binary downloads per release4 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependentsNot measuredYes
New dependents (365 days)Not measuredYes
Peak active dependentsNot measuredYes
Active dependents as a share of the peakNot measuredYes
Binary downloads per release7531GitHub releasesYes
MaintenanceLatest human commit: 21 months ago4 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2025-02-09GitHub repositoryYes
Latest release2025-02-09GitHub releasesYes
First release2024-05-04crates.io database dumpYes
Latest version0.3.27crates.io database dumpNo
Days the oldest outside issue waits for a reply892GitHub repositoryYes
Maintainer replies over 365 days3GitHub repositoryYes
Repository archivedfalseGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repotruecrates.io packageNo
Published docsNot measuredYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityNot measured
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windowNot measuredYes
RustSec unmaintained advisoryNot measuredYes
Deprecation noticeNot measuredYes
Deprecated requirementNot measuredYes
Distribution34 releases, 10 downloads over 30 days6 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases34crates.io database dumpNo
Downloads over 30 days10crates.io database dumpNo
Binary downloads over the last 3 releases22595GitHub releasesYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleasefalsecrates.io database dumpYes
Every version 0.0.xfalsecrates.io database dumpYes
Every version yankedNot measuredYes
Crate deleted from crates.ioNot measuredYes
Repository1,471 stars, 172 forks, 3 contributors, 313 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars1471GitHub repositoryYes — one part of the repository route
GitHub forks172GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account3GitHub contributorsYes — one part of the repository route
Commits on the default branch313GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseMITcrates.io database dumpNo
Runs on, from listed crates and their direct dependenciesCUDAcrates.io database dumpNo
What shows each backendCUDA: musicgpt feature cudacrates.io database dumpNo
Native code, from listed crates and their dependenciesBinds native code: alsa-sys, openssl-sys, ort-syscrates.io database dumpNo
Python bindings, from direct dependencies of listed cratesNo Python binding crate foundcrates.io database dumpNo
Crates that depend on a listed crate directlyNot measuredNo

Corrections and review history

Report a correction

No correction applies to this entry.

Judgments

A judgment enters only through an approved issue and a merged pull request.

No judgment applies to this entry.