fengshenbang-lm
Operate the Fengshenbang-LM Fengshen package for pipelines, model families, data/training utilities, examples, and conversion planning.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- fengshenbang-lm
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Operate the Fengshenbang-LM Fengshen package for pipelines, model families, data/training utilities, examples, and conversion planning.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/installation.md3.0 KB
- 参考文档references/repo-provenance.md1.8 KB
- 参考文档references/repo-routing-metadata.json548 B
- 参考文档references/troubleshooting.md3.6 KB
- 脚本scripts/check_fengshen_install.py2.4 KB
03 SKILL.md 正文
Fengshenbang-LM repo skill
Use this skill when the task involves the Fengshenbang-LM / fengshen Python package: Chinese NLP model families, fengshen-pipeline, Fengshen pipeline APIs, dataloaders, PyTorch Lightning training helpers, Deepspeed/Megatron planning, model-family examples, Taiyi/Ziya recipes, or checkpoint conversion planning.
First checks
-
Read references/installation.md before installing or repairing the package. This repo is sensitive to the age of the Transformers, Lightning, Torchmetrics, NumPy, and Setuptools stack.
-
Run the safe install check when an environment is available:
python scripts/check_fengshen_install.py --check-cli-helpThis imports package modules and inspects CLI help only; it does not download models or launch training.
-
If imports, CLI help, optional CUDA, model downloads, submodules, or hard-coded example paths fail, read references/troubleshooting.md.
-
Use references/repo-provenance.md to decide whether this skill matches the current package checkout or should be refreshed.
Route by task
| User task | Read |
|---|---|
Use fengshen-pipeline, inspect pipeline CLI flags, create tiny classification/NER fixtures, adapt text classification or sequence-tagging data, use UniMC/UniEX/Ubert/TCBert APIs |
sub-skills/pipelines-cli/SKILL.md |
| Choose or import Fengshen model/config/tokenizer families, understand top-level exports, custom auto/config keys, model compatibility, or model import failures | sub-skills/model-zoo/SKILL.md |
Prepare/validate data, inspect UniversalDataModule, metrics, checkpoints, optimizer/scheduler/Trainer flags, pretraining data, Deepspeed/Megatron/fused-kernel planning |
sub-skills/data-training/SKILL.md |
| Plan CLUE/classification recipes, NLG/NLT examples, Taiyi Stable Diffusion, Ziya inference/fine-tuning/conversion, delta/TF/diffusers/LLaMA conversion utilities | sub-skills/examples-conversion/SKILL.md |
Package facts to remember
- Distribution/import package:
fengshen. - Version in package metadata:
0.0.1. - Console entry point:
fengshen-pipeline = fengshen.cli.fengshen_pipeline:main. - CLI pattern:
fengshen-pipeline <pipeline_module_name> predict|train ...; source CLI supports onlypredictandtrainmethods. - Public top-level exports include Longformer, RoFormer, Megatron-T5, and Ubert classes/pipelines.
- Many examples are real but heavy: they may require model/data downloads, CUDA/Deepspeed, multi-GPU launchers, large memory, checkpoint mutation, or maintainer-local paths. Treat them as planning evidence unless the user explicitly authorizes backend verification and execution.
Non-goals and safety
- Do not run original repo examples, pretraining scripts, stable-diffusion scripts, Ziya conversion scripts, or fused-kernel tests by default.
- Do not tell the user to open files in the original repository checkout as runtime instructions. Use this skill's bundled references and scripts.
- Do not claim CUDA/Deepspeed/large-model execution is verified from CPU import checks.
- Ask before network downloads, large model/dataset cache use, GPU allocation, multi-node jobs, checkpoint conversion, or overwriting output directories.
- If a task is about editing or refreshing this generated skill after the source repo changes, use the repo-skill refresh workflow rather than relying on stale guidance.
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).