بنقرة واحدة
quant-tuning-evaluate
执行模型测评。通过 scripts/run_evaluation.py 依据 Evaluation YAML 对量化模型进行评测。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
执行模型测评。通过 scripts/run_evaluation.py 依据 Evaluation YAML 对量化模型进行评测。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
当用户需要部署 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系统中计算性能瓶颈的技能,专注于算子效率和计算优化
| name | quant-tuning-evaluate |
| description | 执行模型测评。通过 scripts/run_evaluation.py 依据 Evaluation YAML 对量化模型进行评测。 |
| license | Apache-2.0 |
| metadata | {"version":"0.3.0","domain":"quantization","framework":"msmodelslim","protocol":"script","skill_class":"tool","aliases":["evaluator","evaluation-run"],"trigger_intents":["执行测评","运行 run_evaluation","评测模型"],"keywords":["run_evaluation","evaluate","aisbench","service_oriented"]} |
解决什么:依据 Evaluation YAML 配置,通过 scripts/run_evaluation.py 对量化模型进行评测。
不解决什么:
quant-tuning-evaluation-generator Agentquant-tuning-quantizer Agentquantization-accuracy-tuning-orchestrator Skill执行主体:scripts/run_evaluation.py
quantization-accuracy-tuning-orchestrator (workflow)
│
▼ 调用
quant-tuning-evaluate (tool)
│
▼ Script
run_evaluation.py
│
▼ 输出
评测结果 (精度分数)
┌─────────────────┐
│ 输入检查 │
│ - config_path │
│ (Evaluation YAML)│
└────────┬────────┘
▼
┌─────────────────┐
│ 服务启动检查 │
│ - 检查 vLLM │
│ 是否就绪 │
└────────┬────────┘
▼
┌─────────────────┐
│ execute: │
│ run_evaluation │
│ .py │
│ (启动推理服务 │
│ + 执行评测) │
└────────┬────────┘
▼
┌─────────────────┐
│ 结果处理 │
│ - 解析精度分数 │
│ - 检查是否达标 │
│ - 错误上报 │
└─────────────────┘
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
quant_model_path | string | ✅ | 量化后模型路径 |
evaluate_id | string | ✅ | 本轮评测 ID |
evaluate_config_path | string | ✅ | Evaluation YAML 路径(编排层常称 config_path) |
save_path | string | ✅ | 评测工作目录 |
device | string | ❌ | 设备类型,默认 npu |
device_indices | list[int] | ❌ | 设备索引列表,如 [0,1] |
python skills/quant-tuning-evaluate/scripts/run_evaluation.py \
--quant-model-path /path/to/quantized \
--evaluate-id eval-round-1 \
--evaluate-config-path /path/to/evaluate.yaml \
--save-path /path/to/workdir \
--device npu \
--device-indices 0,1
| 错误类型 | 处理 |
|---|---|
| msmodelslim 未安装 | 按 prepare_environment.md 安装 |
| 推理服务启动失败 | 检查端口占用、设备可用性 |
| 评测超时 | 检查 aisbench.timeout 配置 |
| 精度不达标 | 正常返回结果,由 orchestrator 决策 |
注意:device_indices 与 inference_engine.args.tensor-parallel-size 对齐。
{
"ok": true,
"results": {
"gsm8k": {
"score": 83.5,
"target": 83.0,
"passed": true
},
"aime25": {
"score": 52.0,
"target": 50.0,
"passed": true
}
},
"overall_passed": true,
"duration": 1800.5
}
{
"ok": false,
"error": "推理服务启动失败",
"error_code": "INFERENCE_ERROR",
"partial_results": {}
}
调用 scripts/run_evaluation.py(execute)
返回每个数据集的分数:
| 字段 | 说明 |
|---|---|
score | 实际精度(百分比) |
target | 目标精度 |
passed | 是否达标(score >= target - tolerance) |
overall_passed | 所有数据集是否都达标 |
python skills/quant-tuning-evaluate/scripts/run_evaluation.py \
--quant-model-path /workspace/output/round_1/quantized \
--evaluate-id round-1 \
--evaluate-config-path /workspace/output/evaluate.yaml \
--save-path /workspace/output \
--device npu \
--device-indices 0,1
评测完成:
- gsm8k: 83.5% (目标: 83.0%) ✅
- aime25: 52.0% (目标: 50.0%) ✅
- 总体: 达标
- 耗时: 1800.5s
run_evaluation.pydevice_indices 与 tensor-parallel-size 对齐| 错误 | 原因 | 解决 |
|---|---|---|
port already in use | 端口被占用 | 更换端口或等待释放 |
HCCL init failed | NPU 通信失败 | 检查 device_indices 和设备状态 |
evaluate.yaml not found | 配置文件不存在 | 检查 config_path |
out of memory | 设备内存不足 | 换设备 |
若错误不在上述常见错误中或者多次解决后依然未解决,依据错误上报,按照错误上报格式返回至quant-tuning-evaluator Agent
config_path 指向的 Evaluation YAML 格式正确device 与 device_indices 匹配device_indices 长度与 tensor-parallel-size 对齐