计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
optimize-models【效率与协作】Guide coremltools model compression and optimization with Core ML package APIs and optional PyTorch optimization APIs.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is to compress or optimize an already-converted Core ML model, or to choose an optional PyTorch-side optimization flow before Core ML export. It covers weight quantization, activation quantization with calibration data, palettization, pruning, decompression, metadata discovery, and joint compression choices.
MLModel.predict() on an artifact? Route to model-io-and-prediction.mlprogram and want data-free package compression? Stay here and prefer coremltools.optimize.coreml.coremltools.optimize.torch APIs import in the user's environment.coremltools.optimize.coreml functions directly on an MLModel package.coremltools.optimize.torch optimizers on the PyTorch model, then convert with convert-models.get_weights_metadata, compress only large weight tensors, and set op_name_configs or op_type_configs to skip fragile layers.coremltools.optimize.torch works until importing the relevant submodule succeeds with PyTorch installed and version-compatible.mlprogram MLModel objects; if the user has a non-mlprogram or original model object, route to conversion first.decompress_weights and metadata/spec inspection to isolate compression-induced failures before changing the original conversion settings.