█

AI/TLDR

Buy me a coffee
Buy me a coffee

Ludwig

Declarative deep learning: train and fine-tune AI models from a YAML config

AutoML & Low-Code TrainingOpen source
Language
Python
License
Apache-2.0
$pip install ludwig # core
IN SHORT

What is Ludwig?

Ludwig is a declarative deep learning framework that lets you train, fine-tune, and deploy AI models with a YAML config file instead of hand-written training code. You describe your input and output features and the kind of model you want, and Ludwig handles the rest. It sits in the AutoML & Low-Code Training category of the Training & Fine-Tuning tools and is open-source, written in Python and licensed Apache-2.0.

Overview

Ludwig is a declarative deep learning framework that lets you train, fine-tune, and deploy AI models with a YAML config file instead of hand-written training code. You describe your input and output features and the kind of model you want, and Ludwig handles the rest.

It covers a wide range of tasks in one tool, from LLM instruction tuning to multimodal classifiers that mix text, numbers, and images, all the way to tabular prediction. Because the model is defined as configuration, you can swap encoders, adapters, and trainers by editing a few lines rather than rewriting code.

Ludwig is hosted by the Linux Foundation AI & Data and builds on PyTorch, Transformers, and Ray, so the same config can run locally or scale out to distributed training and deployment.

What it does

  • Define an entire model, its features, encoders, and trainer, in a single declarative YAML config
  • Fine-tune LLMs with LoRA, DoRA, QLoRA, and other PEFT adapters, plus 4-bit and 8-bit quantization
  • Alignment training without a separate reward model via DPO, KTO, ORPO, and GRPO
  • Build multimodal and tabular models that mix text, numbers, categories, images, audio, and timeseries inputs
  • Generate a starting config from a plain-English description with the generate_config command
  • Run predictions in batch or serve a model behind a REST API with a single command

Getting started

Ludwig requires Python 3.12+. Install it with pip, write a YAML config for your task, then train and serve with the command-line tool.

Install Ludwig

Install the core package, or add an extra for all dependencies or for LLM fine-tuning only.

bashbash
pip install ludwig           # core
pip install ludwig[full]     # all optional dependencies
pip install ludwig[llm]      # LLM fine-tuning only

Write a config

Describe the model in a YAML file. This example fine-tunes Llama-3.1 with a LoRA adapter on instruction and response text.

yamlyaml
model_type: llm
base_model: meta-llama/Llama-3.1-8B
adapter:
  type: lora
trainer:
  type: finetune
  epochs: 3
input_features:
  - name: instruction
    type: text
output_features:
  - name: response
    type: text

Train your model

Point the train command at your config and dataset to start training.

bashbash
ludwig train --config model.yaml --dataset my_data.csv

Predict or serve

Run batch predictions against a trained model, or launch a REST API to serve it.

bashbash
ludwig predict --model_path results/experiment_run/model --dataset new_data.csv
ludwig serve --model_path results/experiment_run/model

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Fine-tuning open LLMs like Llama-3.1 with LoRA or QLoRA on your own instruction data
  • Aligning a model with DPO, KTO, ORPO, or GRPO without standing up a separate reward model
  • Building multimodal classifiers that combine text reviews, numeric ratings, and product images
  • Training tabular prediction models, such as loan default scoring, from a CSV without writing training code
  • Serving a trained model behind a REST API for downstream applications

How Ludwig compares

Ludwig alongside other open-source automl & low-code training tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Ludwig★ 11.8kDeclarative deep learning: train and fine-tune AI models from a YAML config
AutoGluon★ 10.9kAn AutoML library that trains and ensembles models for tabular, time-series and multimodal data from three lines of Python, choosing the algorithms and hyperparameters itself.
PaddleX★ 6.3kA low-code toolkit that bundles PaddlePaddle's pre-trained models into ready-made pipelines for OCR, document parsing, detection, classification and time-series, callable from one CLI or Python API.
H2O LLM Studio★ 5.2kFramework and no-code graphical interface for fine-tuning open LLMs, with LoRA, 8-bit training, DPO/IPO/KTO and visual experiment comparison.
AIDE ML★ 1.6kWeco AI’s open-source reference build of the AIDE agent: point it at a dataset, a goal and a metric and it tree-searches LLM-written Python solutions, keeping the code that scores best.
Deep Researcher Agent★ 1.1kAn LLM agent that edits training code, launches GPU runs, monitors them without LLM calls and decides the next experiment, around the clock.