# Augmentoolkit

> Turn raw documents into synthetic datasets that train domain-expert LLMs

- Category: Data & Labeling / Synthetic Data
- Language: Python
- Licence: MIT
- Repository: https://github.com/e-p-armstrong/augmentoolkit
- Canonical page: https://ai-tldr.dev/tools/augmentoolkit/

## In short

Augmentoolkit is an open-source tool that takes your raw documents and generates synthetic instruction and conversation datasets you can use to fine-tune a language model. The goal is to teach a model the information inside your text so it becomes an expert in a chosen area, rather than relying only on retrieval at query time. It sits in the Synthetic Data category of the Data & Labeling tools and is open-source, written in Python and licensed MIT.

## Overview

Augmentoolkit is an open-source tool that takes your raw documents and generates synthetic instruction and conversation datasets you can use to fine-tune a language model. The goal is to teach a model the information inside your text so it becomes an expert in a chosen area, rather than relying only on retrieval at query time.

It is built for people who want a custom LLM trained on their own sources: researchers feeding in papers, hobbyists encoding the lore of a fictional universe, or teams building an internal expert. You upload documents, run a pipeline, and get a dataset (and optionally a trained model). It can also produce a RAG-ready dataset if you want traditional grounding alongside fine-tuning.

As a synthetic-data and labeling tool, Augmentoolkit can run offline on your own hardware with no external API key for data generation, or use an open-source LLM API to generate data faster. Pipelines are Python functions, so the workflow is meant to be forked and customized.

## What it does

- Converts uploaded documents into synthetic instruction and conversation datasets for fine-tuning
- Optionally runs offline on your own machine with no external API key for data generation
- Works with open-source models such as Deepseek and Llama, and ships its own dataset generation model
- Can produce a RAG-ready dataset and start an inference server for traditional grounding
- Offers both a guided interface and a CLI, with platform setup scripts for macOS and Linux
- Pipelines are plain Python functions, so you can fork and build custom dataset generators

## Getting started

Augmentoolkit is installed by cloning the repo and running the setup script for your platform with Python 3.11. The interface then guides you through generating your first dataset.

1. Install on macOS

   Clone the repo and run the macOS setup script. It will attempt to install Valkey via brew if it isn't found. Use local_macos.sh instead if you plan to generate datasets locally.

```bash
git clone https://github.com/e-p-armstrong/augmentoolkit.git
cd augmentoolkit # Python == 3.11
bash macos.sh
```

2. Install on Linux

   Clone the repo and run the Linux setup script. It builds Valkey from source if no Redis/Valkey server is already running.

```bash
git clone https://github.com/e-p-armstrong/augmentoolkit.git
cd augmentoolkit # Python == 3.11
bash linux.sh
```

3. Run local inference on Linux

   To generate datasets locally, use the local script. Pass "small" or a custom model name to serve a quantized model for consumer hardware, and add --tensor-parallelism N if you have multiple GPUs.

```bash
bash local_linux.sh normal
```

4. Windows

   On Windows the recommended path is to run Augmentoolkit under WSL, or to use the CLI, which the project notes is easier to get running on Windows.

## When to use it

- Fine-tune a model on the latest research papers so it answers as an expert in your field
- Build an internal LLM that has learned your team's documents and reference material
- Create a lore expert trained on the sources of a niche or fictional universe
- Generate a RAG-ready dataset and spin up an inference server for grounded answers
