技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
data-preparation【数据与研究】Prepares and inspects Multi30k and WMT-style BPE data for the attention-is-all-you-need-pytorch Transformer workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a task asks how to preprocess translation data for this repo, inspect a saved preprocessing pickle, reason about the legacy torchtext schemas consumed by training or translation, or try the repository's BPE logic without downloading WMT corpora.
*.pkl preprocessing artifact: run
scripts/inspect_preprocessed_pickle.py
and then read references/data-formats.md to map
the reported schema to training/translation consumers.learn_bpe/apply_bpe behavior for tiny local
corpora.main_wo_bpe flow. It creates a
single pickle containing settings, source/target torchtext Field objects,
and train/valid/test example lists.main flow, downloads WMT-style archives, writes encoded
*.src/*.trg files, and saves only a shared torchtext Field plus settings
in the pickle.<blank>, unknown <unk>, BOS <s>, and
EOS </s>. These must exist in the relevant field vocabularies before
training or translation.-data_src/-data_trg files are rejected by the default non-BPE path;
do not promise arbitrary local text preprocessing unless a new conversion path
is intentionally implemented outside the stock command.# Refuses to unpickle until the caller explicitly acknowledges pickle trust.
python sub-skills/data-preparation/scripts/inspect_preprocessed_pickle.py --help
python sub-skills/data-preparation/scripts/inspect_preprocessed_pickle.py --pickle m30k_deen_shr.pkl --trust-pickle
# Safe BPE demonstration with built-in tiny corpus; no downloads or repo imports.
python sub-skills/data-preparation/scripts/bpe_tiny_demo.py --help
python sub-skills/data-preparation/scripts/bpe_tiny_demo.py --symbols 12 --min-frequency 2
Both scripts are deterministic, runnable from arbitrary current directories, and avoid importing the original repository source. If a task needs model training, checkpoint handling, or translation output, route to the sibling training or translation sub-skill instead.