DataDreamer: A Tool for Synthetic Data Generation and Reproducible LLM Workflows

Ajay Patel,Colin Raffel,Chris Callison-Burch
2024-05-28
Abstract:Large language models (LLMs) have become a dominant and important tool for NLP researchers in a wide range of tasks. Today, many researchers use LLMs in synthetic data generation, task evaluation, fine-tuning, distillation, and other model-in-the-loop research workflows. However, challenges arise when using these models that stem from their scale, their closed source nature, and the lack of standardized tooling for these new and emerging workflows. The rapid rise to prominence of these models and these unique challenges has had immediate adverse impacts on open science and on the reproducibility of work that uses them. In this paper, we introduce DataDreamer, an open source Python library that allows researchers to write simple code to implement powerful LLM workflows. DataDreamer also helps researchers adhere to best practices that we propose to encourage open science and reproducibility. The library and documentation are available at <a class="link-external link-https" href="https://github.com/datadreamer-dev/DataDreamer" rel="external noopener nofollow">this https URL</a> .
Computation and Language,Machine Learning
What problem does this paper attempt to address?
The paper aims to address the challenges faced when applying large language models (LLMs) in natural language processing (NLP) research, particularly concerning reproducibility and open science issues related to synthetic data generation, task evaluation, fine-tuning, and alignment processes. Specifically: 1. **Simplifying Complex Workflows**: Many popular LLMs like GPT-4 are closed-source and require access via remote APIs, making local execution technically complex and costly. Additionally, existing prompt paradigms perform inconsistently across different models, configurations, and environments, making it difficult for researchers to share, reproduce, extend, and compare research results. 2. **Supporting Multiple Workflows**: The paper introduces DataDreamer, an open-source Python library designed to implement advanced LLM workflows, including synthetic data generation, fine-tuning, instruction tuning, and model alignment tasks. It simplifies the implementation of these tasks through standardized interfaces, reducing the technical complexity of switching between different models. 3. **Improving Reproducibility**: DataDreamer aims to promote open science and the reproducibility of research results by providing features such as automatic caching, interruptibility, and recovery, making the implementation of multi-stage workflows simpler and capable of automatically generating fingerprint information that helps verify experimental consistency. 4. **Integrating Optimization Techniques**: The tool also integrates techniques such as quantization, adapter optimization, and multi-GPU training, thereby improving the efficiency of large-scale data and model processing. In summary, DataDreamer is dedicated to simplifying the implementation process of LLM-related research tasks and ensuring that these studies can be easily reproduced and extended, thereby advancing the field of NLP.