Skip to main content

MMD Computation Package for Data Preparation Bench

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Data-Preparation-Bench

A benchmark for evaluating the data preparation capabilities of large language models (LLMs). The benchmark is organized into two modules:

Modules

1. Data Synthesis & Augmentation

Given raw metadata, the model is tasked with synthesizing or augmenting datasets to improve downstream model training.

2. Data Quality Assessment

Given raw metadata, the model is tasked with predicting the training data's impact on downstream task performance.

Quick Start

Usage

This project uses uv for dependency management. To get started:

git clone https://github.com/haolpku/Data-Preparation-Bench.git
cd Data-Preparation-Bench
uv sync

To use your own datasets, modify the configuration dictionaries and formatters in compute_mmd.py:

DS1_CONFIG = {
    "name": "oda-math",
    "data_path": "OpenDataArena/ODA-Math-460k",
    "data_size": 5000,
    "split": "train",
    "shuffle_seed": 42,
}
formatter1 = AlpacaFormatter(
    user_key="question",
    assistant_key="response",
)

DS2_CONFIG = {
    "name": "infinity-instruct",
    "data_path": "BAAI/Infinity-Instruct",
    "data_size": 5000,
    "split": "train",
    "shuffle_seed": 42,
}
formatter2 = ShareGptFormatter(
    conversations_key="conversations",
)

Typically, you only need to update data_path with your dataset and define a formatter that converts raw items to the required format. After making these changes, run the MMD computation with:

uv run examples/compute_mmd.py

Development

To set up the development environment locally:

uv sync --extra dev
uv run pre-commit install

Before committing, format and lint the code:

uv run pre-commit run --all-files

Experiment Settings

Please refer to Experiment.md for detailed experiment configurations.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

open_mmd-1.0.1.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

open_mmd-1.0.1-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file open_mmd-1.0.1.tar.gz.

File metadata

  • Download URL: open_mmd-1.0.1.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for open_mmd-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f5fae83721bba8d0cc9c70c87eea78b9d200b25ddd6716b1fe008c58a77b20cb
MD5 392e395e6cedcbf9d5ef64a577c33327
BLAKE2b-256 12792e7b794588168bc4ddca33bee26713c2e2a95d93f8cd6494c3d2d1e585cc

See more details on using hashes here.

File details

Details for the file open_mmd-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: open_mmd-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for open_mmd-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9d54df6cf19ad730f9e1639cef2d2fca92d1e1beb15ada15ba53028f7e0dee62
MD5 913352b94ea4823f238b686656e0923c
BLAKE2b-256 649b7eb73e37d22f14f8122b4a778cf9aa42fa46e825755e009f72f27da2a426

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page