foundation-models-and-customization
Navigate Time-Series-Library model files, optional Mamba and large time-series model dependencies, augmentation flags, and custom model or script additions.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- foundation-models-and-customization
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Navigate Time-Series-Library model files, optional Mamba and large time-series model dependencies, augmentation flags, and custom model or script additions.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/customization.md3.0 KB
- 参考文档references/model-catalog-and-dependencies.md3.2 KB
- 参考文档references/troubleshooting.md2.8 KB
- 脚本scripts/inspect_tslib_models.py3.1 KB
03 SKILL.md 正文
TSLib Models and Customization
Use this sub-skill when the task is about choosing a TSLib model, diagnosing optional model dependencies, using zero-shot foundation models or Mamba variants, adding a new models/<Name>.py, adapting benchmark scripts, or using the built-in augmentation flags.
Route Here
- Explain how
Exp_Basicdiscovers model files and how--model <Name>maps tomodels/<Name>.py. - Choose a core smoke-test model versus an optional dependency-heavy model.
- Diagnose missing imports for
mamba_ssm,chronos,timesfm,uni2ts,tirex, ortransformers. - Add or adapt a custom TSLib model file and create matching benchmark/smoke commands.
- Use augmentation flags such as
--jitter,--scaling,--permutation,--timewarp,--wdba, or DTW-guided variants. - Follow contribution expectations for new published-paper model additions.
Reroute
- Forecast command construction, TimeXer recipes, or zero-shot task commands: use
../forecasting/SKILL.md. - Data layouts,
run.pyflag basics, GPU flags, and output folders: use../data-and-cli/SKILL.md. - Imputation/anomaly/classification task-specific recipes: use
../imputation-anomaly-classification/SKILL.md.
Start Fast
Inventory safe core and optional model imports before recommending a model:
python scripts/inspect_tslib_models.py --repo-root . --models DLinear TimesNet TimeXer PatchTST --optional-models
For smoke tests, prefer DLinear, TimesNet, TimeXer, PatchTST, or Transformer before Mamba/LTSM files. Optional model import failures should be treated as routing information, not as a broken core TSLib install.
Custom Model Contract
A model file normally lives at models/<Name>.py and exposes either Model or a class named <Name>. Most task models implement:
class Model(nn.Module):
def __init__(self, configs): ...
def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): ...
Exp_Basic scans models/ dynamically at runtime, so adding a Python file is enough for discovery if imports and the class contract are valid.
References and Helpers
references/model-catalog-and-dependencies.mdmaps model families to dependency and backend surfaces.references/customization.mdcovers custom model/script addition and augmentation usage.references/troubleshooting.mdcovers optional dependency, model import, shape, and source-tree problems.scripts/inspect_tslib_models.pyprobes model imports and class availability without downloading data or training.../../references/model-catalog.mdis the shared catalog used by the root skill.
Avoid
- Do not install all optional model stacks just because one import failed. First confirm the requested model family.
- Do not claim zero-shot, Mamba, or remote-code model execution is verified unless that exact package, model cache, and device path has been run.
- Do not add a model file without a small CPU-compatible shape/import smoke when possible.
- Do not copy upstream benchmark shell scripts without adjusting GPU ids, data paths, and epochs for the user's environment.
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).