HuggingFace

Loads a dataset from the HuggingFace dataset hub. Use it to evaluate against public benchmarks and community datasets.

Requirements

The huggingface source requires the datasets library (uv pip install datasets). Use load_dataset_kwargs to pass any additional arguments accepted by datasets.load_dataset().

Examples

Example: HuggingFace benchmark. Loads a split from a hub dataset and filters it down to the relevant rows.

HuggingFace Dataset Source
# ...
source:
  type: "huggingface"
  path: "allenai/tulu-3-harmbench-eval"
  split: "test"
  filters:
    - op: "equals"
      expression: "{{ sample.SemanticCategory }}"
      value: "illegal"

Configuration

Properties


type Literal “huggingface required

HuggingFace dataset source.


path string required

HuggingFace dataset path (e.g., ‘squad’, ‘glue’).


split string required

Dataset split to load (e.g., ‘train’, ‘test’, ‘validation’).


load_dataset_kwargs object

Additional keyword arguments to pass to datasets.load_dataset().


filters array[FilterComparison, FilterMembership, FilterUnary]

Optional list of filters to apply after loading (AND-combined).