Skip to content
cccskills
FreePublished on GitHub

quant-tuning-history-append-dit

Append a DiT-tuning round to history.yaml. DiT-side counterpart of the LLM-path accuracy_append.py; records practice.md5, inference_outputs, fp_baseline_outputs, and the scoring fields (scores / overall_score / loss_vs_baseline / is_satisfied) populated by quant-tuning-score-dit. Idempotent on practice_id.

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

See how to install

Files included (3)

  • SKILL.md6.0 KB
  • scripts/append.py7.5 KB
  • scripts/README.md1.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Skill: DiT 调优历史追加

1. 概述

每轮 DiT 调优结束后,orchestrator 调用本 Skill 把本轮记录追加到 {workdir}/history/history.yaml。

2. 适用与不适用

  • 适用:model_family=dit 调优回路;每轮 inference 跑完即追加
  • 不适用:
    • LLM/VLM 路径(用既有 accuracy_append.py)
    • 评分字段本身由 quant-tuning-score-dit 填充;本 skill 仅负责把这些字段透传到 history.yaml(若 quant-tuning-score-dit 未触发则保持 null)

3. 协作关系

quant-tuning-evaluate DiT 扩展节 (产出 infer_outputs/round_N/...)
   │
   ▼
quant-tuning-history-append-dit (本 skill)
   │  scripts/append.py
   ▼
{workdir}/history/history.yaml  ←  dit_records 段

4. 输入参数

参数类型必填说明
history_pathstr✅{workdir}/history/history.yaml
practice_idstr✅唯一 ID(如 dit-round-2)
practice_pathstr✅{workdir}/round_{N}/practice.yaml(自动算 md5)
inference_outputslist✅本轮推理产物路径列表
fp_baseline_outputslist⛏️FP baseline 产物路径(quant-tuning-evaluate DiT 扩展节跑 FP baseline 模式时填)
scoresobject⛏️每维度 score dict;来自 quant-tuning-score-dit 的 scores 字段
overall_scorefloat⛏️加权总分;来自 quant-tuning-score-dit 的 overall_score 字段
loss_vs_baselinefloat⛏️量化 vs FP 的 overall 差;启用 --baseline-outputs 时存在
is_satisfiedbool⛏️loss_vs_baseline >= -tolerance;orchestrator 据此决定是否退出回路
append_asstrYAML 段名,默认 dit_records

5. 工作流

┌──────────────────────────────────────┐
│ 1. 入参校验                            │
│ - history_path / practice_path 存在   │
│ - inference_outputs 非空             │
└──────────────┬───────────────────────┘
               ▼
┌──────────────────────────────────────�
│ 2. 计算 practice.yaml md5            │
└──────────────┬───────────────────────┘
               ▼
┌──────────────────────────────────────┐
│ 3. 读现有 history.yaml(若有)         │
│ - 找 dit_records 段                   │
│ - 按 practice_id upsert(替换/追加)  │
└──────────────┬───────────────────────┘
               ▼
┌──────────────────────────────────────┐
│ 4. 写回 history.yaml(保留 LLM 记录) │
└──────────────────────────────────────┘

6. CLI 调用

python msagent/skills/quantizer/quant-tuning-history-append-dit/scripts/append.py \
    --history-path output/wan22-t2v-a14b-w8a8/history/history.yaml \
    --practice-id dit-round-2 \
    --practice-path output/wan22-t2v-a14b-w8a8/round_2/practice.yaml \
    --inference-outputs \
        "output/wan22-t2v-a14b-w8a8/infer_outputs/round_2/overall_consistency/0000.mp4,output/wan22-t2v-a14b-w8a8/infer_outputs/round_2/subject_consistency/0001.mp4"

7. 输出结果

{
  "protocol": "msagent.subagent_io",
  "subagent_type": "quant-tuning-history-append-dit",
  "status": "ok",
  "output": {
    "ok": true,
    "record": {
      "practice_id": "dit-round-2",
      "quant_config_md5": "44c42e68...",
      "time": "2026-08-08 12:34:56",
      "practice_path": "/abs/path/to/round_2/practice.yaml",
      "inference_outputs": [
        "/abs/path/to/infer_outputs/round_2/overall_consistency/0000.mp4",
        "/abs/path/to/infer_outputs/round_2/subject_consistency/0001.mp4"
      ],
      "fp_baseline_outputs": null,
      "scores": null,
      "overall_score": null,
      "loss_vs_baseline": null,
      "is_satisfied": null
    }
  }
}

8. 错误处理

错误处理
history_path parent not writable立即中止
practice_path not found立即中止
inference_outputs 为空立即中止(防止无效 history 记录)
YAML 解析失败报 stderr 摘要,立即中止

9. 约束

  • 幂等:同一 practice_id 重复调用覆盖旧记录而非重复追加
  • 不破坏 LLM 记录:仅在 dit_records 段追加,与 LLM records 段平行
  • 不修改既有字段名:practice_id / quant_config_md5 / time 与既有 LLM schema 对齐
  • 错误即停

10. 参考

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 21, 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 21, 2026

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

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

kali20gakki/msAgent32Updated Oct 21, 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 21, 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 21, 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 21, 2026

See all skills by kali20gakki

Report a problem with this skill