Repolode
ludwig-ai

ludwig-ai/ludwig

Declarative deep learning framework that trains, fine-tunes and deploys LLMs, multimodal and tabular models from YAML configs.

Stars
11,793
Forks
1,213
Open issues
3
Last commit
4 days ago

What is it?

Ludwig lets you build AI models by writing a declarative YAML config instead of a custom training loop, data pipeline and evaluation code. You list input and output features with their types (text, image, number, audio, timeseries and more), and the framework assembles encoders, combiners and decoders, then runs training, evaluation and prediction from the command line.

For language models, Ludwig covers supervised fine-tuning, DPO, KTO, ORPO and GRPO alignment, LoRA, DoRA and other PEFT adapters, 4-bit QLoRA and torchao quantization, plus vision-language model fine-tuning. Tabular and multimodal models can use any HuggingFace text encoder or timm image encoder, with hyperparameter search via Ray Tune or Optuna.

Trained models can be served through a FastAPI REST endpoint, vLLM, Ray Serve or KServe, exported to SafeTensors, ONNX or torch.export bundles, or pushed to the HuggingFace Hub. The project is built on PyTorch, Transformers and Ray and runs from a laptop to multi-GPU or Ray clusters by changing the backend setting.

Key features

  • 01Define models and training runs entirely in YAML, with no custom training loop.
  • 02Fine-tune LLMs with SFT, DPO, KTO, ORPO and GRPO, including LoRA and QLoRA.
  • 03Combine text, image, numeric, audio and timeseries inputs in one model.
  • 04Run hyperparameter search with Ray Tune or Optuna.
  • 05Serve models via REST, vLLM, Ray Serve or KServe, and export to ONNX or SafeTensors.

Use cases

  • Fine-tuning an open-weight LLM on instruction data with LoRA on limited GPU memory.
  • Building a tabular classifier or regressor without writing training code.
  • Training a model that combines product images, review text and numeric fields.
  • Forecasting timeseries with PatchTST or N-BEATS encoders.

Quick start

  1. 1

    Install Ludwig from PyPI (Python 3.12+)

    pip install ludwig
  2. 2

    Write a YAML config describing your model's input and output features

  3. 3

    Train the model on your dataset

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

    Run predictions with the trained model

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

Things to know

  • Requires Python 3.12 or newer.
  • Fine-tuning large LLMs needs substantial GPU resources and may need a Hugging Face token for gated models.

In collections

Topics

FAQ

What is ludwig?
Declarative deep learning framework that trains, fine-tunes and deploys LLMs, multimodal and tabular models from YAML configs. Ludwig lets you build AI models by writing a declarative YAML config instead of a custom training loop, data pipeline and evaluation code. You list input and output features with their types (text, image, number, audio, timeseries and more), and the framework assembles encoders, combiners and decoders, then runs training, evaluation and prediction from the command line.
Is ludwig free to use? What license does it have?
ludwig is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is ludwig still maintained?
Actively maintained. The last commit to ludwig was on Nov 2, 2026.
What can I use ludwig for?
Fine-tuning an open-weight LLM on instruction data with LoRA on limited GPU memory. Building a tabular classifier or regressor without writing training code. Training a model that combines product images, review text and numeric fields. Forecasting timeseries with PatchTST or N-BEATS encoders.
How do I install ludwig?
Install Ludwig from PyPI (Python 3.12+): pip install ludwig Write a YAML config describing your model's input and output features Train the model on your dataset: ludwig train --config model.yaml --dataset my_data.csv Run predictions with the trained model: ludwig predict --model_path results/experiment_run/model --dataset new_data.csv
Where can I get ludwig?
The source code and installation instructions are on GitHub: https://github.com/ludwig-ai/ludwig

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects