ludwig-ai

ludwig: Configure and Train AI Models with YAML

Ludwig is a Python framework for configuring, training, evaluating, and deploying AI models through declarative YAML rather than custom training loops. It suits teams that want one workflow for LLM fine-tuning, tabular prediction, and multimodal modeling.

Stars
11.8k
Forks
1.2k
Stars, last 15 days
+1

Our take

Health score

62/100

How it is scored
Activity
63
Community
91
Issues
47
Pull requests
47

+1 stars in the last 15 days

  • Releases more often than 77% of the projects we track
  • More contributors than 77% of the projects we track

Overview

Ludwig turns model and training choices into declarative configuration. Instead of building a training loop and data pipeline for each task, users describe features, model components, and training settings in YAML, then use Ludwig's commands and APIs to train, predict, and serve models.

It covers LLM fine-tuning as well as tabular, multimodal, vision, and time-series tasks. The framework is most useful when a team wants repeatable experiments and configurable model workflows without implementing every step from scratch. It is less suited to projects that need a fully custom training loop or only require a minimal wrapper around a single model.

Key Features

  • YAML configurations for model inputs, outputs, architecture components, and training settings.
  • LLM supervised fine-tuning and alignment workflows, with parameter-efficient adapters and quantization options.
  • Support for tabular, text, image, audio, and time-series features in single or multi-task models.
  • Training backends for local and distributed workflows, including Ray and Hugging Face Accelerate integrations.
  • Hyperparameter optimization through Ray Tune or Optuna.
  • Prediction and REST serving commands, plus integrations for Ray Serve and KServe.
  • Experiment tracking, model export, and utilities for dataset checks and model inspection.

Use Cases

  • ML practitioners can fine-tune an LLM on instruction data with a configuration-driven workflow, especially when they want to compare training settings without writing a new loop.
  • Data science teams can build tabular classification or regression models from structured datasets while keeping preprocessing and model choices in a reproducible configuration.
  • Teams combining text, images, or other modalities can train a single model when a task depends on multiple kinds of input.
  • Researchers can run multi-task experiments or hyperparameter searches using shared configurations and experiment tracking integrations.
  • Application teams can expose trained models for prediction through Ludwig's REST server or deployment integrations when they want a path from training to serving.

Getting Started

Install the core package with pip install ludwig. The README and official documentation cover optional dependencies, configuration examples, and training workflows. See the repository README for details.

Alternatives

  • axolotl: Axolotl focuses on configurable language-model fine-tuning and post-training, while Ludwig also supports tabular and multimodal modeling.
  • LlamaFactory: LlamaFactory centers on fine-tuning and serving language and vision models, while Ludwig offers a broader declarative workflow across model types.
ProjectLanguageLicenseStarsStatus
ludwigPythonApache-2.011.8kNot checked yet
axolotlPythonApache-2.012.5kActive
LlamaFactoryPythonApache-2.075.3kActive

Considerations

  • The README lists Python 3.12+ and a stack including PyTorch, Pydantic, Transformers, and Ray. Check the project's dependency guidance before choosing an environment.
  • Optional capabilities such as LLM fine-tuning, distributed training, and deployment integrations may require extra dependencies and suitable compute resources. Model size and hardware needs depend on the chosen workload.
  • The declarative approach reduces boilerplate, but users still need to understand their data, model configuration, and training settings to get appropriate results.
  • Access to some pretrained models may require credentials or acceptance of the model provider's terms; the README's LLM example uses a Hugging Face Hub token.

Found this useful?

Share it with someone who would like ludwig.

Comparisons