Distilabel
Distilabel is a framework for synthetic data and AI feedback for engineers who need fast, reliable and scalable pipelines based on verified research papers.
Last verified:
What is Distilabel?
Distilabel is an AI Feedback (AIF) framework for building datasets with and for LLMs. It is a framework for synthetic data and AI feedback designed for engineers who need fast, reliable and scalable pipelines based on verified research papers. The tool enables users to synthesize text data and add AI feedback on the fly for a wide variety of projects including traditional predictive NLP (classification, extraction) and generative LLM scenarios (instruction following, dialogue generation, judging).
Key features include integrations with popular libraries and APIs for LLMs such as HF Transformers, OpenAI, vLLM, Anthropic, Cohere, Mistral AI, Groq, Ollama, and more through a unified API. It supports multiple tasks for Self-Instruct, Preference datasets, structured data generation (JSON, function calls), model pooling for diverse generations, caching of intermediary results, Ray integration for scaling to millions of rows, and export to Argilla for data exploration and annotation. Pipelines are built using Steps as building blocks and Tasks that rely on LLMs, organized as Directed Acyclic Graphs (DAG).
Distilabel is for AI engineers, ML engineers, and domain experts who need to create high-quality synthetic datasets for fine-tuning their own LLMs, researchers who want to implement latest research papers for data generation, and teams building preference datasets, DPO data, instruction-following data, or AI feedback/judging systems. The framework helps users focus on data quality to improve AI output quality while taking control of their data and models.
Distilabel pricing
Pricing model: Freemium
Distilabel is completely free and open-source under the Apache-2.0 license. It is available on PyPI via pip install distilabel. Optional extras for specific LLM providers (anthropic, cohere, openai, mistralai, groq, vertexai, hf-inference-endpoints, etc.) are installed separately but the framework itself is free. Users only pay for the LLM API calls they make when using cloud-based LLM providers. Local models like Ollama, vLLM, and Transformers are free to use.
Distilabel pros
- Open-source with Apache-2.0 license
- Integrates with 15+ LLM providers through unified API
- Based on verified research papers for methodologies
- Ray integration for scaling to millions of rows
- Caching of intermediary results prevents data loss
- Fault-tolerant pipelines can recover from failures
- Export generated datasets to Argilla for annotation
- Supports structured generation with outlines and instructor
- Model pooling creates diverse generations from multiple models
- CLI for exploring and re-running existing pipelines
- Serializable and shareable pipelines on Hugging Face Hub
- Supports local models (vLLM, Transformers, Ollama, llama-cpp)
- Creates preference datasets for DPO/RLHF training
- Self-Instruct task generation for instruction-following data
- Python 3.9+ compatible with easy pip installation
Distilabel cons
- Only supports text data generation currently
- Requires Python 3.9 or higher
- Python 3.12 support still work in progress
- Learning curve for defining pipelines and tasks
- LLM API calls can be expensive at scale
- Some LLM integrations require separate extras installation
- Original authors moved on to other projects
- Active maintenance now community-driven
Frequently asked questions about Distilabel
What is Distilabel used for?
Distilabel is used for generating synthetic data and AI feedback for NLP projects including traditional predictive tasks (classification, extraction) and generative LLM scenarios (instruction following, dialogue generation, judging). It helps engineers build scalable pipelines for data generation and AI feedback based on verified research methodologies.
How do I install Distilabel?
Install Distilabel using pip with the command: pip install distilabel --upgrade. It requires Python 3.9 or higher. For specific LLM providers, install extras like pip install 'distilabel[openai]' or pip install 'distilabel[hf-inference-endpoints]'.
What LLM providers does Distilabel support?
Distilabel supports 15+ LLM providers including OpenAI, Anthropic, Cohere, Mistral AI, Groq, Google Vertex AI, Hugging Face Inference Endpoints, Hugging Face Transformers, vLLM, Ollama, llama-cpp, LiteLLM, Together AI, Azure OpenAI, Anyscale, and MLX models through dedicated integrations.
What is a Pipeline in Distilabel?
A Pipeline is where you put all your Steps and Tasks together to create a workflow. Steps are the building blocks that can generate data, evaluate models, manipulate data, or perform general tasks. Tasks are a specific type of step that rely on LLMs to generate data.
Can I scale Distilabel to large datasets?
Yes, Distilabel has Ray integration to scale and distribute pipelines to millions of rows. The programmatic approach allows building scalable pipelines for data generation and AI feedback.
What is AI Feedback (AIF) in Distilabel?
AI Feedback (AIF) is the core framework concept where LLMs provide feedback on data. This includes judging, scoring, critique, and preference labeling. You can integrate AI feedback from any LLM provider using one unified API to filter and improve dataset quality.
How do I export data from Distilabel?
You can export generated datasets to Argilla, a platform for storing, searching, and applying feedback to datasets. This enables easy data exploration and further human annotation. Install the argilla extra with pip install 'distilabel[argilla]'.
Can I use local models with Distilabel?
Yes, Distilabel supports local models through multiple integrations including TransformersLLM for HF Transformers, vLLM for vllm serving engine, OllamaLLM for Ollama, LlamaCppLLM for llama-cpp-python, and MLX for Apple MLX models.
What types of datasets can I create with Distilabel?
Distilabel can create Self-Instruct datasets, Preference datasets for DPO/RLHF, instruction-following data, dialogue generation data, and task-specific datasets. Examples include the 1M OpenHermesPreference dataset (~1 million AI preferences) and distilabeled Intel Orca DPO dataset.
Is Distilabel fault-tolerant?
Yes, Distilabel pipelines have fault tolerance with caching of intermediary results. If a pipeline fails, you can continue where you left off without losing data or precious LLM calls. Everything is serializable and shareable.