Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<img src="https://raw.githubusercontent.com/patrickfleith/datafast/main/assets/Datafast%20Logo.png" alt="Datafast logo" width="160">

<h3>Generate diverse synthetic datasets with LLMs, from a pipeline you can read.</h3>
<h3>Generate high-quality and diverse synthetic data with LLMs.</h3>

[![PyPI version](https://img.shields.io/pypi/v/datafast?color=f5c518)](https://pypi.org/project/datafast/)
[![Python versions](https://img.shields.io/pypi/pyversions/datafast)](https://pypi.org/project/datafast/)
Expand All @@ -18,25 +18,23 @@

</div>

Datafast is a Python library for developers and ML engineers who need a dataset for an
LLM project and do not have one yet.
Datafast is a Python library for generating synthetic datasets with LLMs.

A plain script that loops over prompts gets hard to control. You must write the
nested loops that cover each combination of inputs. Without checkpoints, a crash
halfway means you pay for the same LLM calls again. Without metadata, you cannot tell
which input and which model made each record.
You assemble building blocks for data operations into a custom pipeline that generates
a synthetic dataset matching your project's needs. It works with open-weight and
proprietary models.

With datafast, you declare the dimensions that your dataset must cover, connect steps
into a pipeline, and run it. The pipeline writes the dataset to JSONL, CSV, Parquet or
the Hugging Face Hub.
Start with seeds or the dimensions your dataset must cover. Connect LLMs and data
processing steps for filtering, transformations, and annotations, then run the pipeline.
Save the dataset locally or push it to the Hugging Face Hub.

## Install

```bash
pip install datafast
```

Datafast needs Python 3.10 or newer. Extras add Parquet, the Hugging Face Hub and
Datafast needs Python 3.11 or newer. Extras add Parquet, the Hugging Face Hub and
Langfuse tracing: see [Installation](https://patrickfleith.github.io/datafast/installation/).

## Quick example
Expand Down
12 changes: 10 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ hide:
# Datafast
Generate high-quality and diverse synthetic data with LLMs.

In datafast, you assemble building blocks of data operations that would otherwise be done manually. It is designed to be flexible and modular, and you get a custom pipeline that generates a dataset matching your project needs. It works with open-weights and proprietary models.
Datafast is a Python library for generating synthetic datasets with LLMs.

You assemble building blocks for data operations into a custom pipeline that generates
a synthetic dataset matching your project's needs. It works with open-weight and
proprietary models.

Start with seeds or the dimensions your dataset must cover. Connect LLMs and data
processing steps for filtering, transformations, and annotations, then run the pipeline.
Save the dataset locally or push it to the Hugging Face Hub.

### Intended Use Cases

Expand Down Expand Up @@ -71,4 +79,4 @@ AI projects all need something special in their datasets. Whether this is for tr

- An `llms.txt` so you can ask questions about of docs to your favorite AI.
- A `datafast` SKILL so your coding agent can build the pipeline the right way under your supervision.
- Integration with llama.cpp, vLLM
- Integration with llama.cpp, vLLM
39 changes: 39 additions & 0 deletions tests/test_homepage_intro.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"""Keep the README and documentation home page on the approved introduction."""

from pathlib import Path

import pytest

ROOT = Path(__file__).parent.parent
TAGLINE = "Generate high-quality and diverse synthetic data with LLMs."
INTRO = """
Datafast is a Python library for generating synthetic datasets with LLMs.

You assemble building blocks for data operations into a custom pipeline that generates
a synthetic dataset matching your project's needs. It works with open-weight and
proprietary models.

Start with seeds or the dimensions your dataset must cover. Connect LLMs and data
processing steps for filtering, transformations, and annotations, then run the pipeline.
Save the dataset locally or push it to the Hugging Face Hub.
"""


@pytest.mark.parametrize(
"path, start, end, tagline",
[
("README.md", "</div>", "## Install", f"<h3>{TAGLINE}</h3>"),
("docs/index.md", TAGLINE, "### Intended Use Cases", TAGLINE),
],
)
def test_homepage_intro_stays_as_approved(path, start, end, tagline):
page = (ROOT / path).read_text(encoding="utf-8")
assert tagline in page, f"{path} changed the approved tagline"
_, separator, rest = page.partition(start)
assert separator, f"{path} is missing {start!r}"
intro, separator, _ = rest.partition(end)
assert separator, f"{path} is missing {end!r}"
# Keep paragraph breaks, but allow editors to rewrap lines.
paragraphs = [" ".join(p.split()) for p in intro.strip().split("\n\n")]
expected = [" ".join(p.split()) for p in INTRO.strip().split("\n\n")]
assert paragraphs == expected, f"{path} changed the approved introduction"
Loading