AGENT SKILL

package-apis-configuration

Inspect and use LLM Foundry package APIs, registries, MPT/HF model classes, tokenizers, callbacks, optimizers, metrics, loggers, config transforms, optional backends, and MCLI adaptation patterns.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
package-apis-configuration
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Inspect and use LLM Foundry package APIs, registries, MPT/HF model classes, tokenizers, callbacks, optimizers, metrics, loggers, config transforms, optional backends, and MCLI adaptation patterns.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

Package APIs and Configuration

Use this sub-skill when the task is about LLM Foundry's installed Python package surface: package import health, registry entries, custom registry extensions, MPT/Hugging Face model constructors, tokenizers, callbacks, optimizers, schedulers, metrics, loggers, configuration transforms, optional dependency gates, or MosaicML platform YAML adaptation.

Start here:

Operating rules:

  1. Prefer registry and signature inspection before instantiating models. build_tokenizer and Hugging Face model wrappers can download remote assets; do not call them unless the task explicitly allows network/model access.
  2. For CPU-only or quick API checks, override MPT attention to attn_impl: torch and ComposerMPT loss to loss_fn: torch_crossentropy; defaults favor GPU/flash-attention paths.
  3. Treat registry names as exact keys. If a key is unknown, first confirm the package import completed, then check llmfoundry registry get <group> or direct registry.<group>.get_all().
  4. For custom code, prefer a bounded code_paths import file for one run and Python entry points for reusable packages. The imported code must register into the appropriate llmfoundry.registry object before builders run.
  5. Preserve constructor keyword boundaries: remove name before passing kwargs to constructors, do not pass optimizer params through YAML, and only pass callback train_config through build_callback's train_config argument.
  6. Route full data preparation, training, evaluation, generation, and checkpoint conversion workflows to their owning sub-skills. This sub-skill only covers package APIs/configuration and platform adaptation surfaces.
  7. Exclude maintenance-only CI, lint, release, and packaging-policy tasks unless they directly affect runtime package import or registry behavior.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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).

★ 351