Skip to content
cccskills
FreePublished on GitHub

msmodelslim-quick-quant

提供 msModelSlim 的通用快速量化指引,包含安装、最简 YAML 配置与基础执行校验。适用于用户询问 msmodelslim 安装、快速量化、配置 yaml、linear_quant 或 minmax 基础参数时。

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

See how to install

Files included (2)

  • SKILL.md2.1 KB
  • reference/linear_quant.md1.7 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

msModelSlim Quick Quant Skill

适用场景

  • 需要安装 msmodelslim
  • 需要用 YAML 启动基础量化流程
  • 仅需基础量化器配置(不涉及复杂策略)

执行规则

  • 禁止使用绝对路径或仓库私有路径。
  • 统一使用占位符:${MODEL_PATH}、${SAVE_PATH}、${MODEL_TYPE}、${CONFIG_PATH}。
  • YAML 仅介绍 linear_quant 基础配置。
  • 复杂配置(多阶段流程、MoE 混合策略、复杂 outlier 组合)不在本 Skill 覆盖范围。
  • MoE 结构中路由器 gate 模块一般不量化,默认应排除。
  • 回答保持简洁,只解释必要参数与命令。

最小流程

1) 安装与校验

  • 检查 Python 版本(>=3.8)与依赖环境(如 CANN)。
  • 按安装文档执行在线/离线/源码安装。
  • 安装后验证:
    • msmodelslim quant --help
    • python -c "import msmodelslim"

2) 生成最简 YAML

apiversion: "modelslim_v1"
spec:
  process:
    - type: "linear_quant"
      qconfig:
        act:
          scope: "per_token"
          dtype: "int8"
          symmetric: false
          method: "minmax"
        weight:
          scope: "per_channel"
          dtype: "int8"
          symmetric: true
          method: "minmax"
      include: ["*"]
      exclude: ["*.gate"]
  save:
    - type: "ascendv1_saver"
      part_file_size: 4

linear_quant 参数说明见 reference/linear_quant.md。

3) 执行量化

msmodelslim quant \
  --model_path ${MODEL_PATH} \
  --save_path ${SAVE_PATH} \
  --device npu \
  --model_type ${MODEL_TYPE} \
  --config_path ${CONFIG_PATH} \
  --trust_remote_code True

4) 最小验证

  • 命令执行无报错退出。
  • save_path 下生成量化结果文件。
  • 日志中可看到 linear_quant 处理过程。

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