Skip to content

fabianostermann/llm-guided-music-evolution

Repository files navigation

DOI

LLM guided music evolution

This code was used for the AIMC'25 paper "Using Large Language Models as Fitness Functions in Evolutionary Algorithms for Music Generation".

The code was tested on Ubuntu 20.04, 22.04, and 24.04 and Debian 11, and 12.
For the most stable python environment, we recommend cloning ours by using conda as shown below.

Recommended setup and test run (under linux with conda)

Setup the project:

bash setup.sh
conda env create -f environment.yml

Test the program:

bash run.sh --help
bash run.sh --test-mode

Pre-trained musical LLM models

In the current stage of development, this project uses the CLaMP model (v1) as fitness function for the evolutionary algorithm:
https://github.com/microsoft/muzic/tree/main/clamp

The evolutionary algorithm

Schematic visualization of our implemention:

Further details can be found in the paper (see link above).

Citation

If you use this code, please cite the accompanying paper:

@inproceedings{ostermann2025llm4musicevo,
  title     = {Using Large Language Models as Fitness Functions
               in Evolutionary Algorithms for Music Generation},
  author    = {Ostermann, Fabian and Kramer, Jonas and Rudolph, G{\"u}nter},
  booktitle = {Proceedings of the AI Music Creativity Conference (AIMC)},
  year      = {2025},
  doi       = {10.5281/zenodo.16946592}
}

About

Code for "Using Large Language Models as Fitness Functions in Evolutionary Algorithms for Music Generation" (AIMC'25).

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors