data-preparation
Prepare LLM Foundry pretraining, fine-tuning, raw-text, Delta/Databricks, and contrastive-pair data safely.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- data-preparation
- license
- Apache 2.0
- metadata
- { "coverage": "data-preparation", "disco-role": "operating", "repo-skill": "llm-foundry" }
- description
- Prepare LLM Foundry pretraining, fine-tuning, raw-text, Delta/Databricks, and contrastive-pair data safely.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/cli-reference.md15.0 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
03 SKILL.md 正文
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.
- End-to-end prep recipes: read references/workflows.md.
- Exact public CLI/API options: read references/cli-reference.md.
- Errors, validation, and credentials: read references/troubleshooting.md.
- Safe local probe: run
python scripts/llmfoundry_data_prep_smoke.py --helpfrom any directory, then use--fixture PATHfor local JSONL/schema checks.
Scope and boundaries
This sub-skill covers:
- Public
llmfoundry data_prepcommands:convert_dataset_hf,convert_dataset_json,convert_finetuning_dataset,convert_text_to_mds, andconvert_delta_to_json. - MDS/StreamingDataset split layouts,
remote/local/split/streamscache 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, andconvert_*_from_argswrappers.
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
- 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.
- 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.
- Keep generated MDS outputs isolated by split, e.g.
out_root/train/index.jsonplus shard files. Do not overwrite non-empty output folders; choose a new output root or clean intentionally. - Keep
allow_unsafe_types: falsefor MDS reading unless the user understands that Pickle-like shard types can execute code during deserialization. - For supervised fine-tuning, default decoder-only target policy is
target_prompts: none,target_responses: last; for encoder-decoder it must remainnone/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.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).