█

AI/TLDR

Invítame a un café
Invítame un café

distilabel

Crea pipelines de datos sintéticos y de feedback con IA que funcionan con cualquier LLM

Synthetic DataCódigo abierto
Idioma
Python
Licencia
Apache-2.0
$pip install "distilabel[hf-inference-endpoints]" --upgrade
EN BREVE

What is distilabel?

distilabel is Crea pipelines de datos sintéticos y de feedback con IA que funcionan con cualquier LLM. It sits in the Synthetic Data category of the Data & Labeling tools and is open-source, written in Python and licensed Apache-2.0. To get started: instalar distilabel.

Resumen

distilabel es un framework de Python para generar datos sintéticos y feedback con IA. Escribes pipelines en código que llaman a grandes modelos de lenguaje para crear ejemplos nuevos, etiquetar los existentes y evaluar su calidad, y luego exportas el resultado como un dataset que puedes usar para fine-tuning o evaluación.

Está pensado para ingenieros e investigadores que necesitan crear datasets de entrenamiento y de preferencias sin etiquetar todo a mano. Sirve para tareas clásicas de PLN, como clasificación y extracción, así como para tareas generativas, como el seguimiento de instrucciones, el diálogo y la puntuación con LLM como juez.

Como herramienta de datos sintéticos y etiquetado, distilabel se sitúa entre tus datos de entrada sin procesar y el entrenamiento de tu modelo. Usa una API unificada para muchos proveedores de LLM (OpenAI, Anthropic, Mistral, Hugging Face, Ollama, vLLM y otros), así que puedes cambiar de modelo sin reescribir tu pipeline.

Qué hace

  • API de pipelines que encadena pasos y tareas como TextGeneration para generar y procesar datos
  • Una interfaz unificada para muchos backends de LLM, incluidos OpenAI, Anthropic, Mistral, Cohere, Groq, Ollama, vLLM y los Hugging Face Inference Endpoints
  • Tareas integradas para la generación de datos sintéticos, el etiquetado y el feedback con IA (LLM como juez)
  • Extras opcionales que te permiten instalar solo las integraciones de LLM que necesites (por ejemplo, hf-inference-endpoints, openai, vllm)
  • Se integra con el ecosistema de datasets de Hugging Face para cargar entradas y subir resultados al Hub
  • Diseñado para pipelines escalables con tolerancia a fallos, basado en métodos publicados en investigaciones

Primeros pasos

Instala distilabel con la integración de LLM que quieras y luego define un Pipeline y ejecútalo sobre un dataset. El ejemplo siguiente usa Hugging Face Inference Endpoints.

Instalar distilabel

Requiere Python 3.9 o una versión más reciente. Añade un extra entre corchetes para incluir una integración de LLM concreta, como hf-inference-endpoints.

bashbash
pip install "distilabel[hf-inference-endpoints]" --upgrade

Definir y ejecutar un pipeline

Envuelve tus pasos en un contexto Pipeline, asocia un LLM a una tarea como TextGeneration, luego llama a pipeline.run sobre un dataset y sube el resultado al Hub.

pythonpython
from datasets import load_dataset

from distilabel.models import InferenceEndpointsLLM
from distilabel.pipeline import Pipeline
from distilabel.steps.tasks import TextGeneration

with Pipeline() as pipeline:
    TextGeneration(
        llm=InferenceEndpointsLLM(
            model_id="meta-llama/Meta-Llama-3.1-8B-Instruct",
            generation_kwargs={"temperature": 0.7, "max_new_tokens": 512},
        ),
    )

if __name__ == "__main__":
    dataset = load_dataset("distilabel-internal-testing/instructions", split="test")
    distiset = pipeline.run(dataset=dataset)
    distiset.push_to_hub(repo_id="distilabel-example")

Commands and code are distilled from the project's own documentation — always check the repositorio oficial para lo último.

Cuándo usarlo

  • Generar datasets sintéticos de instrucciones o diálogos para hacer fine-tuning de tu propio LLM
  • Crear datasets de preferencias (DPO) haciendo que un LLM juzgue y ordene las respuestas candidatas
  • Etiquetar o filtrar datos existentes a escala con feedback de IA en lugar de anotación manual
  • Crear conjuntos de evaluación específicos para cada tarea que sigan métodos de artículos de investigación recientes

How distilabel compares

distilabel alongside other open-source synthetic data tools AI/TLDR tracks, ranked by GitHub stars.

HerramientaEstrellasQué hace
Easy Dataset★ 15.2kAn application that parses your documents and converts them into structured question-answer datasets for fine-tuning, RAG, and model evaluation.
SDV (Synthetic Data Vault)★ 3.6kA Python library that learns patterns from real tabular data and generates realistic synthetic tables.
distilabel★ 3.5kCrea pipelines de datos sintéticos y de feedback con IA que funcionan con cualquier LLM
NeMo Data Designer★ 2.4kAn NVIDIA library for orchestrating LLM-based synthetic-data pipelines with validation and quality scoring.
NeMo Curator★ 1.9kAn NVIDIA toolkit for cleaning, deduplicating, and curating large text datasets used to train LLMs.
Augmentoolkit★ 1.9kA tool that turns raw documents into synthetic instruction and conversation datasets for fine-tuning models.
Curator★ 1.8kA Python library for generating and curating large synthetic datasets to train and post-train language models.
ydata-synthetic★ 1.7kA collection of generators for creating synthetic tabular and time-series data from real datasets.