gitmyhub

ludwig

Python ★ 12k updated 5d ago

Low-code framework for building custom LLMs, neural networks, and other AI models

Ludwig is a Python framework that trains and fine-tunes AI models from a YAML config file, no training code required, covering language model fine-tuning, classifiers, time-series forecasting, and image tasks.

PythonPyTorchRayYAMLsetup: moderatecomplexity 4/5

Ludwig is a Python framework for training and fine-tuning AI models without writing a lot of code. Instead of programming a model from scratch, you describe what you want in a YAML configuration file, which is a plain text file of settings, and Ludwig handles the rest. This approach is aimed at teams and individuals who want to build AI models but do not want to write and debug the underlying training machinery.

The framework covers a wide range of tasks: fine-tuning large language models like Llama on custom datasets, training classifiers that combine text with numbers and images, forecasting time-series data, and image segmentation. For each task, you list your input data columns and what you want to predict, set training options, and run a command. Ludwig reads your data file, trains the model, and saves the result.

For language model fine-tuning specifically, Ludwig supports techniques like LoRA, which is a method of updating only a small part of a large model rather than the whole thing, making training feasible on hardware that could not handle full retraining. It also supports running fine-tuning with reduced memory usage through quantization, where model weights are stored in a compressed format. These options are all configured through the same YAML file rather than requiring custom Python code.

Once a model is trained, Ludwig provides commands for making predictions on new data and for launching a REST API so other applications can send requests to the model and receive predictions back. Distributed training across multiple machines is supported through integration with Ray.

Ludwig is hosted by the Linux Foundation AI and Data organization and is available under the Apache 2.0 license.

Where it fits