Hub documentation

データデザイナー

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

データデザイナー

Data Designerは、LLMを使用して高品質な合成データセットを生成するためのNVIDIA NeMoのフレームワークです。統計的サンプラー、LLM、または既存のシードデータセットを使用して、多様なデータを作成できます。

前提条件

pip install data-designer

Hubからシードとしてデータセットをダウンロード

HuggingFaceSeedSource を使用して、Hub から直接データセットを読み込み、生成用のシードデータとして利用します。

import data_designer.config as dd
from data_designer.interface import DataDesigner

data_designer = DataDesigner()
config_builder = dd.DataDesignerConfigBuilder()

# Load seed data from HuggingFace
seed_source = dd.HuggingFaceSeedSource(
    path="datasets/gretelai/symptom_to_diagnosis/data/train.parquet",
    token="hf_...",  # Optional, for private datasets
)
config_builder.with_seed_dataset(seed_source)

# Reference seed columns in prompts
config_builder.add_column(
    dd.LLMTextColumnConfig(
        name="physician_notes",
        model_alias="openai-gpt-5",
        prompt="Write notes for a patient with {{ diagnosis }}. Symptoms: {{ patient_summary }}",
    )
)

preview = data_designer.preview(config_builder, num_records=5)

生成されたデータセットをHubにプッシュする

組み込みのpush_to_hubメソッドを使用して、生成されたデータセットをHubにアップロードします。

# Generate dataset
results = data_designer.create(config_builder, num_records=1000, dataset_name="my-dataset")

# Push to Hub
url = results.push_to_hub(
    repo_id="username/my-synthetic-dataset",
    description="Synthetic dataset generated with Data Designer.",
    tags=["medical", "notes"],
    private=False,
)

リソース

Update on GitHub