executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
optimumUse Hugging Face Optimum for model export routing, accelerated pipeline dispatch, Torch FX graph workflows, GPTQ quantization planning, and utility/config support.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this skill when the task involves Hugging Face Optimum: optimum-cli, model export task mapping, accelerated pipeline dispatch to partner packages, Torch FX graph transformations, GPTQ quantization planning, dummy inputs, normalized configs, preprocessing processors, or Optimum base save/load support.
Optimum is a namespace-style extension package around Transformers/Diffusers/TIMM/Sentence-Transformers optimization workflows. This base repository supplies shared CLI routing, exporter/task utilities, FX graph utilities, GPTQ integration code, and cross-package support utilities; many hardware-specific implementations live in partner packages such as optimum-onnx, optimum-intel, optimum-habana, optimum-furiosa, and related distributions.
Confirm the installed package and optional dependency surface before deeper work. Prefer the bundled checker over ad-hoc inline Python so the diagnosis matches this skill's optional-dependency policy:
python scripts/check_optimum_install.py
python scripts/check_optimum_install.py --json
If the task names a CLI command, exporter backend, task mapping, or accelerated pipeline, read sub-skills/exporters-and-cli/SKILL.md.
If the task is about Torch FX graph rewrites, reversible transformations, compose, or optional tensor parallelism, read sub-skills/fx-graph-workflows/SKILL.md.
If the task is about GPTQ, GPTQQuantizer, GPT-QModel dependency checks, saving/loading quantized weights, or custom CausalLM quantization planning, read sub-skills/gptq-quantization/SKILL.md.
If the task is about dummy input generators, normalized configs, task processors, run configs, BaseConfig, OptimizedModel, or support utilities, read sub-skills/utilities-and-configs/SKILL.md.
For cross-cutting installation, import, partner package, or backend failures, read references/troubleshooting.md.
Before assuming this skill matches a different checkout, read references/repo-provenance.md.
Base install:
python -m pip install optimum
python - <<'PY'
from importlib.metadata import version
import optimum.version as ov
print(version("optimum"), ov.__version__)
PY
optimum-cli --help
optimum-cli env
Common optional surfaces:
optimum-onnx or optimum[onnx] / optimum[onnxruntime] distribution path documented for the target workflow.optimum-intel[openvino] path for OpenVINO-backed model classes and pipeline dispatch.gptqmodel>=7.0.0 and usually accelerate, then verify GPU/backend readiness before running quantization.torchvision, Pillow, and/or datasets even when the base package import succeeds.| User intent | Read | Safe bundled check |
|---|---|---|
Diagnose optimum-cli, optimum-cli env, missing export onnx, partner CLI registration | sub-skills/exporters-and-cli/ | python sub-skills/exporters-and-cli/scripts/probe_optimum_cli.py --run-env |
| Query task names, synonyms, exporter backend config constructors, or custom backend registration | sub-skills/exporters-and-cli/ | python sub-skills/exporters-and-cli/scripts/tasks_manager_probe.py --json |
Use optimum.pipelines.pipeline(..., accelerator="ort"/"ov") | sub-skills/exporters-and-cli/ | python scripts/check_optimum_install.py --json plus partner-specific imports |
| Apply or write Torch FX transformations | sub-skills/fx-graph-workflows/ | python sub-skills/fx-graph-workflows/scripts/fx_transform_smoke.py --check-compose |
| Plan tensor parallelism | sub-skills/fx-graph-workflows/ | No default native run; first verify Python, CUDA, NCCL, torch.compile, and distributed process groups |
| Plan GPTQ quantization or load saved GPTQ weights | sub-skills/gptq-quantization/ | python sub-skills/gptq-quantization/scripts/gptq_availability_probe.py --json |
| Generate dummy tensors or standardize config fields | sub-skills/utilities-and-configs/ | python sub-skills/utilities-and-configs/scripts/utils_smoke.py |
| Diagnose utility/preprocessing/config issues | sub-skills/utilities-and-configs/ and root troubleshooting | python sub-skills/utilities-and-configs/scripts/utils_smoke.py --check-task-processors |
optimum contains every hardware backend. Missing partner subcommands or model classes are often install/routing issues, not source bugs.