بنقرة واحدة
quant-tuning-quantize
执行模型量化。通过 msmodelslim quant 依据 Practice YAML 对模型进行量化。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
执行模型量化。通过 msmodelslim quant 依据 Practice YAML 对模型进行量化。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
当用户需要部署 msmodeling optix 服务化自动寻优工具时使用。负责安装与验证。
当首次使用 msmodeling optix 的用户需要根据硬件、模型、负载和优化目标推荐 MindIE/vLLM 寻优参数、搜索范围、benchmark 侧字段或 config.toml 片段时使用。
指导并自动化完成昇腾 NPU 上 MindSpeed-LLM 训练的 Profiling 数据采集。支持配置并运行带 Profiling 的模型训练,包括 CPU 采集、内存采集、不同采集级别(level0/level1/level2)和自定义 step 范围。生成的 Profiling 数据可用 MindStudio Insight 进行性能分析。当用户需要在模型训练中采集 Profiling 数据、进行训练性能分析、或执行 性能数据采集/Profiling采集 时触发。触发关键词:profiling、性能分析、性能数据采集、Profiling采集、训练框架profiling、MindSpeed-LLM profiling。
指导并自动化完成昇腾 NPU 上 MindSpeed-MM 模型训练的 Profiling 数据采集。通过识别训练脚本,自动找到配置文件并启用内置 Profiler,支持静态采集(指定起止 step)和动态采集(运行时动态开关),支持 Megatron 引擎(tools.json)和独立 FSDP2 引擎(YAML)两种配置方式。生成的 Profiling 数据可用 MindStudio Insight 进行性能分析。当用户需要在多模态模型训练中采集 Profiling 数据、进行训练性能分析、或执行 性能数据采集/Profiling采集 时触发。触发关键词:profiling、性能分析、性能数据采集、Profiling采集、多模态训练profiling、MindSpeed-MM profiling。
Skill for analyzing communication performance bottlenecks and detecting slow/fast rank issues in Ascend NPU systems. Use this skill whenever you need to analyze communication efficiency, data transfer bottlenecks, or identify slow/fast rank problems using profiling data.
用于分析Ascend NPU系统中计算性能瓶颈的技能,专注于算子效率和计算优化
استنادا إلى تصنيف SOC المهني
| name | quant-tuning-quantize |
| description | 执行模型量化。通过 msmodelslim quant 依据 Practice YAML 对模型进行量化。 |
| license | Apache-2.0 |
| metadata | {"version":"0.3.0","domain":"quantization","framework":"msmodelslim","protocol":"cli","skill_class":"tool","aliases":["quantizer","quantization-run"],"trigger_intents":["执行量化","运行 quantization_run","量化模型"],"keywords":["msmodelslim quant","quantize","practice.yaml"]} |
解决什么:依据 Practice YAML 配置,调用 msmodelslim quant 执行模型量化。
不解决什么:
quant-tuning-practice-generator Agentquant-tuning-evaluator Agentquantization-accuracy-tuning-orchestrator Skill执行主体:msmodelslim quant(execute 调用,以 exit code 判定成败)
quantization-accuracy-tuning-orchestrator (workflow)
│
▼ 调用
quant-tuning-quantize (tool)
│
▼ CLI
msmodelslim quant
│
▼ 输出
量化后的模型权重
┌─────────────────┐
│ 输入检查 │
│ - practice_path │
│ - model_path │
│ - save_path │
└────────┬────────┘
▼
┌─────────────────┐
│ 参数校验 │
│ 路径存在且可读 │
└────────┬────────┘
▼
┌─────────────────┐
│ execute: │
│ msmodelslim quant│
└────────┬────────┘
▼
┌─────────────────┐
│ 结果处理 │
│ - 检查 exit code │
│ - 记录产物路径 │
│ - 错误上报 │
└─────────────────┘
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
config_path | string | ✅ | Practice YAML 路径 |
model_path | string | ✅ | 原始模型路径 |
save_path | string | ✅ | 量化产物保存路径;须体现调优轮次,推荐 {workdir}/round_{N}/quantized(如 round_1/quantized) |
model_type | string | ✅ | 模型类型名 |
device | string | ✅ | 设备类型,如 npu:0 |
trust_remote_code | bool | ❌ | 是否信任远程代码 |
msmodelslim quant \
--model_path "${MODEL_PATH}" \
--save_path "${WORKDIR}/round_1/quantized" \
--device npu:0 \
--model_type "${MODEL_TYPE}" \
--config_path "${CONFIG_PATH}" \
--trust_remote_code False
save_path 必须包含轮次与产物目录层级,便于 orchestrator 区分各轮权重,例如 {workdir}/round_1/quantized、{workdir}/round_2/quantized。
成功判定:exit code 为 0,且 ${SAVE_PATH} 下出现量化权重产物。
| 错误类型 | 处理 |
|---|---|
| msmodelslim 未安装 | 按 prepare_environment.md 安装后重试 |
| 路径不存在 | 检查路径后重试或中止 |
| 量化失败 | 报 stderr 摘要,等待 orchestrator 决策 |
| 超时 | 按 Agent execution_timeout 处理,不上层续跑 |
向 orchestrator 回显:
量化完成:
- 产物路径: /workspace/output/round_1/quantized (与 `--save_path` 一致,须含 round_N/quantized)
- 耗时: (可选)
立即中止,回显命令名与 stderr 关键摘要,不续跑其它命令。
save_path--config_path,与 --quant_type 互斥{workdir}/round_{N}/quantized,N 为当前调优轮次(如 round_1/quantized)--device npu:0/--device npu:3 这种入参形式| 错误 | 原因 | 解决 |
|---|---|---|
practice.yaml not found | 配置文件不存在 | 检查 config_path |
out of memory | 设备内存不足 | 换设备 |
若错误不在上述常见错误中或者多次解决后依然未解决,依据错误上报,按照错误上报格式返回至 orchestrator。
config_path 指向的 Practice YAML 已通过校验device 格式正确(如 npu:0, npu:0,1,2,3),优先使用单卡save_path 为 {workdir}/round_{N}/quantized 形式且磁盘空间充足msmodelslim quant --help 可正常执行