data-and-templates
Helps with LMFlow dataset schemas, conversation templates, validation, and dataset conversion workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- data-and-templates
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Helps with LMFlow dataset schemas, conversation templates, validation, and dataset conversion workflows.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/api-reference.md1.4 KB
- 参考文档references/conversation-templates.md1.7 KB
- 参考文档references/data-formats.md2.4 KB
- 参考文档references/troubleshooting.md1.6 KB
- 脚本scripts/list_lmflow_templates.py1.6 KB
- 脚本scripts/validate_lmflow_dataset.py3.5 KB
03 SKILL.md 正文
Data and Templates
Use this sub-skill when the task is about LMFlow JSON datasets, dataset validation, conversation templates, or fixing schema errors before training, inference, or evaluation.
Typical Triggers
conversation_templatetext_only,text2text,conversation,paired_conversation,text_to_textlist,text_to_scored_textlistDataset.create_from_dict,Dataset.save,Dataset.sample,Dataset.train_test_splitformat my data,validate this dataset,template mismatch,custom chat template
What This Sub-Skill Owns
- LMFlow dataset layouts and required fields.
- Conversation template names and customization guidance.
- Safe dataset validation and listing helpers.
- Errors caused by missing fields, mixed types, bad template names, and multimodal dependency gaps.
Read These First
references/data-formats.mdfor the dataset shapes and required keys.references/conversation-templates.mdfor built-in templates and customization rules.references/api-reference.mdforDatasetandDatasetArgumentsbehavior.references/troubleshooting.mdfor predictable schema and template failures.scripts/validate_lmflow_dataset.pyto check a file or directory.scripts/list_lmflow_templates.pyto print the available template names.
Workflow
- Identify the dataset type and whether the user has one JSON file or a directory of files.
- Check the required keys for that type.
- Confirm the template name is a known LMFlow preset or an intentional custom template.
- If the task is about repair, explain the exact missing keys or incompatible file layout.
- Use the validator script before any training or inference command.
Cross-Links
- Training and fine-tuning workflows that consume these datasets live in
../training-and-optimization/SKILL.md. - Inference and evaluation workflows that read the same formats live in
../inference-and-evaluation/SKILL.md. - Alignment workflows that require preference datasets live in
../post-training-alignment/SKILL.md.
Common Decisions
- Use
text_onlyfor raw text samples. - Use
text2textfor paired input/output examples. - Use
conversationfor ShareGPT-style conversations withmessages. - Use
paired_conversation,paired_text_to_text, ortext_to_scored_textlistfor preference data. - Use
emptyorempty_no_special_tokenswhen the dataset already contains conversation markers.
What Not To Do
- Do not keep mixed dataset types in one directory of JSON files.
- Do not guess required keys; validate them.
- Do not ask future agents to open the original repository docs when the bundled references already contain the schema.
- Do not treat multimodal support as available unless the optional dependency is installed.
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).