AGENT SKILL

inference-conversion

Use LLM Foundry inference helpers for Hugging Face generation, chat, Composer-to-HF conversion, ONNX export, and optional backend routing without owning training or evaluation.

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

01 前言 Front Matter

name
inference-conversion
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Use LLM Foundry inference helpers for Hugging Face generation, chat, Composer-to-HF conversion, ONNX export, and optional backend routing without owning training or evaluation.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

Inference and Conversion

Use this sub-skill when a task needs to run or prepare LLM Foundry models for inference-time use:

  • generate completions or chat interactively with a local or Hub Hugging Face causal LM;
  • convert a Composer Trainer checkpoint into a Hugging Face save_pretrained folder;
  • export a Hugging Face checkpoint to ONNX;
  • reason about advanced FasterTransformer or endpoint-generation prerequisites without running those backends;
  • diagnose authentication, object-store, dtype/device, memory, ONNX, or backend-load failures in these workflows.

Operating checklist

  1. Identify the artifact the user has now: Hugging Face folder or Hub id, Composer checkpoint, ONNX target folder, FT checkpoint, or endpoint URL.

  2. Confirm side effects before taking them: model download, checkpoint conversion, object-store upload, Hugging Face Hub upload, endpoint call, or FT runtime execution.

  3. Prefer local, already-available model/checkpoint paths for verification. Do not download private models or upload checkpoints unless the user explicitly provides credentials and asks for it.

  4. Run the bundled safe smoke probe first when requirements are unclear:

    python scripts/llmfoundry_inference_smoke.py --help
    
  5. Route tasks outside this boundary:

    • training or producing Composer checkpoints -> training-finetuning;
    • MPT internals, registry, or deep config editing -> package-apis-configuration;
    • ICL or benchmark evaluation -> evaluation;
    • dataset/tokenization preparation -> data-preparation.

References

Guardrails

  • Treat FasterTransformer and endpoint generation as advanced reference-only unless the user explicitly asks to run them and the required external service or library is present.
  • Never test Hugging Face Hub upload with --test_uploaded_model unless the user accepts a network download/reload and has a valid Hub token.
  • trust_remote_code is powerful: enable it only for model repos or local folders the user trusts.
  • --device and --device_map are mutually exclusive in the HF generation/chat helpers; choose one loading strategy before execution.
  • Keep full training, eval, and model-internal configuration explanations in their owning sub-skills and link back here only for inference/export decisions.

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