Skip to content
Back to skills

Data Preparation

ASecurity

"Prepare LLM Foundry pretraining, fine-tuning, raw-text,

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
testingpythonapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill data-preparation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Data Preparation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Data Preparation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-data-preparation-1cd5edc8/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-data-preparation-1cd5edc8)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: data-preparation
description: "Prepare LLM Foundry pretraining, fine-tuning, raw-text,
  Delta/Databricks, and contrastive-pair data safely."
disable-model-invocation: true
metadata:
  disco-role: operating
  repo-skill: llm-foundry
  coverage: data-preparation
license: Apache 2.0
---

# LLM Foundry data preparation

Use this sub-skill when the user needs to create, validate, inspect, or troubleshoot data for LLM Foundry pretraining, supervised fine-tuning, raw text conversion, Delta/Databricks export, StreamingDataset/MDS consumption, or contrastive-pair dataloaders.

## Route first

- **Data conversion and schemas:** read [references/data-formats.md](references/data-formats.md).
- **End-to-end prep recipes:** read [references/workflows.md](references/workflows.md).
- **Exact public CLI/API options:** read [references/cli-reference.md](references/cli-reference.md).
- **Errors, validation, and credentials:** read [references/troubleshooting.md](references/troubleshooting.md).
- **Safe local probe:** run `python scripts/llmfoundry_data_prep_smoke.py --help` from any directory, then use `--fixture PATH` for local JSONL/schema checks.

## Scope and boundaries

This sub-skill covers:

- Public `llmfoundry data_prep` commands: `convert_dataset_hf`, `convert_dataset_json`, `convert_finetuning_dataset`, `convert_text_to_mds`, and `convert_delta_to_json`.
- MDS/StreamingDataset split layouts, `remote`/`local`/`split`/`streams` cache fields, `max_seq_len`, tokenizer/concat choices, safe type handling, and split/cache validation.
- Pretraining text JSON/JSONL, local JSON, supervised fine-tuning prompt/response and chat schemas, target loss policies, raw text folders, Delta-export JSONL, and contrastive-pair formats.
- Data-prep API facts for `StreamingTextDataset`, `StreamingFinetuningDataset`, `build_text_dataloader`, `build_finetuning_dataloader`, and `convert_*_from_args` wrappers.

Route elsewhere:

- Training YAML launch details, optimizers, schedulers, callbacks, and checkpointing → `training-finetuning`.
- ICL/evaluation task datasets and Eval Gauntlet schemas → `evaluation`.
- Model registries, model internals, tokenizer registry extension, and package-wide API details → `package-apis-configuration`.

## Safe operating defaults

1. Prefer local schema validation before conversion. Use the bundled smoke script to inspect imports/signatures and to validate JSONL keys without downloading models or datasets.
2. Treat Hugging Face dataset loads, tokenizer loads, remote object stores, and Databricks queries as network/credential operations. Ask before running them unless the user explicitly authorized them.
3. Keep generated MDS outputs isolated by split, e.g. `out_root/train/index.json` plus shard files. Do not overwrite non-empty output folders; choose a new output root or clean intentionally.
4. Keep `allow_unsafe_types: false` for MDS reading unless the user understands that Pickle-like shard types can execute code during deserialization.
5. For supervised fine-tuning, default decoder-only target policy is `target_prompts: none`, `target_responses: last`; for encoder-decoder it must remain `none`/`last`.

## Provenance

This sub-skill distills public CLI definitions, data module signatures, data-prep README behavior, installed package facts, and data/tokenizer tests. Runtime instructions are self-contained; no source checkout, review artifact, or local path is required after this skill is loaded.

Files in this skill

  • SKILL.md3.4 KB
  • references/cli-reference.md15 KB
  • references/data-formats.md9.4 KB
  • references/troubleshooting.md11.4 KB
  • references/workflows.md12.9 KB
  • scripts/llmfoundry_data_prep_smoke.py17.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.