计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
inference【效率与协作】Routes OpenNMT-py translation, decoding, inference-engine, server, and benchmark/evaluation workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when an OpenNMT-py task is about producing translations, scoring outputs, running the REST server, or choosing between PyTorch and CTranslate2 inference paths.
onmt_translate, decoding options, alignments, score output, beam traces, or batch inference.onmt_server, a server model_config file, REST endpoints, tokenizer setup, preprocess/postprocess hooks, or model cloning/unloading.../data-preparation/.../training/.../conversion/.Read references/translation-and-serving.md for the command, config, endpoint, engine, and evaluation contracts.
Run the bundled server-config validator before starting a server:
python scripts/validate_server_config.py --config MODEL_CONFIG.json --root MODEL_ASSET_ROOT
Add --no-check-files when reviewing a template that intentionally omits model/tokenizer files.
For a normal decode run, prefer the packaged CLI:
onmt_translate --model MODEL.pt --src src.txt --output pred.txt
If the job uses a REST server, keep the model_config file self-contained and make model/tokenizer paths resolvable from the working directory used to launch onmt_server.
n_best, replace_unk, alignment output, debugging flags, and batch sizing.scripts/validate_server_config.py is a self-contained JSON validator. It checks the top-level server shape, model entries, model roots, tokenizer shape, optional CT2 fields, timeout fields, and path existence without importing the source checkout.
If the request fails before any actual translation output is produced, read references/troubleshooting.md first. Most failures are server-config shape issues, missing model paths, tokenizer model paths, incompatible release formats, alignment option conflicts, or attempts to use a GPU-only path without the required backend.