Skip to content

LLM Evolution

Evolutionary algorithms powered by LLMs

Python 3.12+ · Protocols · Generics2025Alejandro Fernández Camello

A Python library that enables Large Language Models to act as intelligent mutators, crossover operators, and evaluators within evolutionary algorithms.

Evolution has no goal, only a process. We provide the goal; the LLM provides the intelligence.

Evolution in action

Watch a population evolve generation by generation toward the optimal solution.

Generation: 0/200Best fitness: 0%Avg fitness: 0%
Target

Features

Modular components to evolve any type of solution.

LLM-powered mutations

Language models generate intelligent variations instead of random perturbations, accelerating convergence.

Protocol-based design

Clean interfaces built on Python Protocols let you swap strategies without tight coupling.

Generic framework

Evolve anything: from simple integers to CUDA kernels or algorithmic trading strategies.

Modular components

Separate strategies for initialisation, evaluation, selection, crossover, and mutation.

Domain agnostic

Apply it to CUDA, RISC-V assembly, algorithmic trading, or any optimisation problem.

Open source

MIT licensed. Contribute, extend, and adapt the library to your needs.

Explore the code

Open-source library ready to use in your LLM-powered optimisation projects.