Skip to content
cccskills
FreePublished on GitHub

quant-tuning-infer-dit

在 W8A8 动态量化后,用 MindIE-SD 冒烟测试 DiT 量化权重是否可加载(可选 skill)。

与 `quant-tuning-evaluate`(DiT 扩展节)的区别:本 skill 仅做"能跑通 + 权重可用"的轻量验证(4~16 条 prompt,几分钟出结果),不算分;后者产出视频集交 `quant-tuning-score-dit`(AISBench-VBench 16 维度)评分,是调优回路一环。

不引入 vLLM-Ascend、不做精度指标评估(FID/CLIP-score 等)。

The English summary is being prepared. Showing the original description.

See how to install

Files included (2)

  • SKILL.md7.1 KB
  • assets/inference.example.yaml2.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Skill: DiT 量化后推理验证(可选)

适用与不适用

  • 适用:已经 quant-tuning-quantize-dit 产出量化权重,需验证"能跑通 + 权重可用"。
  • 不适用:
    • 精度指标评估(FID/CLIP-score 等;本 skill 不计算)
    • 服务化推理(不引入 vLLM-Ascend / Tritonserver 等后端)
    • LLM/VLM 推理验证(走对应 LLM/VLM 子 skill)

协作关系

quantization-accuracy-tuning-orchestrator (workflow)
        │  按 model_family 路由到 dit 分支
        ▼ 调用(可选)
quant-tuning-infer-dit (tool)
        │
        ▼ 后端
  MindIE-SD
        │
        ▼ 输出
  {workdir}/infer_outputs/

输入参数

参数类型必填说明
quantized_pathstring✅quant-tuning-quantize-dit 产出路径(MindIE-SD 格式;对应其 output 字段 quantized_path)
prompt_liststring[]✅文本 prompt 列表;建议 4~16 条
num_inference_stepsint字段名 / 默认值按目标 DiT 推理仓差异较大;详见 inference_config_field_map.md §2 默认值表。
guidance_scalefloat同上;FLUX 字段同名 guidance_scale,HunyuanVideo / Wan 系字段名不同,详见字段表 §1。
output_dirstring✅推理产物目录;推荐 {workdir}/infer_outputs/
inference_repostring✅推理仓路径(pipeline 所在)
model_familystring✅dit

推理后端

后端说明
MindIE-SDNPU 上跑 MindIE-SD;适用 HunyuanVideo、Wan2.2-T2V/I2V/TI2V、FLUX.1-dev(已迁移)、Wan2.1、Sana、SD3、SD1.5/SDXL 等
  • 不依赖 vLLM-Ascend:MindIE-SD 单次调用即可
  • 不在本阶段做服务化:单次调用,不引入额外后端

工作流

┌───────────────────────────┐
│ 1. 入参校验                │
│ - quantized_path          │
│ - prompt_list 非空         │
└──────────┬────────────────┘
           ▼
┌───────────────────────────┐
│ 2. 加载 MindIE-SD 后端     │
└──────────┬────────────────┘
           ▼
┌───────────────────────────┐
│ 3. 加载量化 DiT pipeline  │
│ - 替换 transformer 为      │
│   量化版本                 │
└──────────┬────────────────┘
           ▼
┌───────────────────────────┐
│ 4. 逐 prompt 生成          │
│ - num_inference_steps     │
│ - guidance_scale          │
└──────────┬────────────────┘
           ▼
┌───────────────────────────┐
│ 5. 保存到 output_dir      │
│ - {idx:04d}.png           │
│ - 记录耗时                 │
└──────────┬────────────────┘
           ▼
┌───────────────────────────┐
│ 6. 汇总                    │
│ status=ok                 │
│ 成功数/总请求数             │
│ 平均推理耗时                │
└───────────────────────────┘

输出结果

成功

{
  "protocol": "msagent.subagent_io",
  "subagent_type": "quant-tuning-infer-dit",
  "status": "ok",
  "output": {
    "status": "ok",
    "backend": "mindie-sd",
    "output_dir": "<workdir>/infer_outputs/",
    "success_count": 8,
    "total_count": 8,
    "avg_inference_sec": 12.3,
    "generated_files": [
      "<workdir>/infer_outputs/0000.png",
      "<workdir>/infer_outputs/0001.png"
    ],
    "commands": [
      {"name": "load_pipeline", "command": "MindIE-SD pipeline 加载"},
      {"name": "inference", "command": "pipeline(prompt=...).images[0]"}
    ]
  }
}

失败

立即中止,回传:

{
  "protocol": "msagent.subagent_io",
  "subagent_type": "quant-tuning-infer-dit",
  "status": "failed",
  "error": {
    "code": "INFERENCE_ERROR",
    "message": "OOM / NaN / pipeline 加载失败摘要",
    "suggestion": "OOM / NaN → 减小 num_inference_steps 或换设备;pipeline 加载失败 → 检查 quantized_path 是否 MindIE-SD 格式;报 stderr 摘要,等待 orchestrator 决策"
  }
}

错误处理

错误类型处理
quantized_path 不存在立即中止,提示用户先跑 quant-tuning-quantize-dit
MindIE-SD pipeline 加载失败检查 quantized_path 中是否含 MindIE-SD 格式
OOM / NaN减小 num_inference_steps 或换设备;本 skill 不重试
prompt list 为空立即中止

约束

  • MindIE-SD only:禁止引入 vLLM-Ascend / Tritonserver 等后端
  • 不做精度指标评估:本 skill 仅验证"能跑通 + 权重可用"
  • 不引入服务化:单次调用,避免重复拉起服务
  • 不修改 LLM/VLM skill 既有行为字段

常见错误

错误原因解决
transformer not found in <quantized_path>量化权重目录结构与 diffusers 不一致检查 quant-tuning-quantize-dit save_path
NaN detected in latents量化精度不足回退到 quant-tuning-quantize-dit 检查 exclude 列表
OOM设备内存不足减小 num_inference_steps 或换设备

检查清单

参考

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

当用户直接要求进行数据集压缩测评,或在量化调优过程中需要使用 AISBench 评测工具输出数据集精度等场景时使用。 本 Skill 负责:使用 AISBench 数据集压缩代码、用 RBF Kernel Herding 算法生成压缩后的数据子集(coreset),并按用户目标交付两种产物之一: ① 接入量化调优主流程:产出独立的 coreset 数据集配置(不覆盖原始数据),回传「全集 config_name + coreset config_name」给编排层,供 evaluation.yaml 切换; ② 仅数据集压缩测评(不做量化调优):基于 example 模板生成「全集测试脚本」和「子集测试脚本」两份 shell 脚本。 暂时支持 AIME 2025 和 GPQA,其他数据集需要再结合 aisbench tools目录下 herding_coreset_selector 源码进行分析。

The English summary is being prepared. Showing the original description.

kali20gakki/msAgent32Updated Oct 19, 2026

Ascend cluster comparison tool. Invoke when user asks to compare two cluster datasets (DB or TEXT), or to generate cluster_analysis_output from raw profiling data via msprof-analyze and then compare.

The English summary is being prepared. Showing the original description.

kali20gakki/msAgent32Updated Oct 19, 2026

专门用于 Ascend 集群 Profiling 性能数据的“快慢卡”诊断专家技能。当用户提供【集群性能数据目录/路径】并要求分析【快慢卡】、【慢节点】、【负载不均衡】或【集群瓶颈】时,必须触发此技能。该技能会自动接收集群路径,调度相关工具输出快慢卡的宏观定性与微观根因(如 Host 下发瓶颈、算子计算劣化)。

The English summary is being prepared. Showing the original description.

kali20gakki/msAgent32Updated Oct 19, 2026

Analyze Ascend NPU collective communication profiling data with a DB-first workflow. Use when the user provides `cluster_analysis_output/cluster_analysis.db`, rank-level `analysis.db`, rank-level `ascend_pytorch_profiler_{rank_id}.db`, together with `profiler_info.json`, and asks about HCCL or hcom communication cost, collective communication TOP ops, wait time, slow rank/straggler, Notify Wait, bandwidth, retry, relay, SDMA/RDMA/HCCS links, communication matrix, or Ascend communication fault patterns.

The English summary is being prepared. Showing the original description.

kali20gakki/msAgent32Updated Oct 19, 2026

Analyze Ascend NPU computation-side profiling data for single-card runs or a selected rank from multi-card runs. Use this skill when the user asks to diagnose computation bottlenecks, AI Core / AI Vector / AICPU hotspots, dynamic shape overhead, block dim issues, redundant TransData/Transpose/Cast, cross-stream waits, frequency/runtime-state issues, or fusion opportunities.

The English summary is being prepared. Showing the original description.

kali20gakki/msAgent32Updated Oct 19, 2026

针对昇腾 NPU 上的 PyTorch 模型,识别可做融合算子替换的代码段、替换为 torch_npu 融合算子并做性能/精度验证。当用户提到融合算子、NPU 算子替换、RMSNorm/SwiGLU/RoPE/Attention 融合、torch_npu 亲和算子等关键词是,使用本 Skill。

The English summary is being prepared. Showing the original description.

kali20gakki/msAgent32Updated Oct 19, 2026

See all skills by kali20gakki

Report a problem with this skill