文件最后提交记录最后更新时间
【msmodelslim】【docs】支持量化格式资料 Co-authored-by: anreywmh<18845895998@163.com> # message auto-generated for no-merge-commit merge: !458 merge quantFormatRefactor/docs into master 【msmodelslim】【docs】支持量化格式资料 Created-by: anreywmh Commit-by: anreywmh Merged-by: ascend-robot Description: 感谢您贡献的Pull Request! 在提交之前,请务必阅读 [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md)。 Thanks for sending a pull request! BEFORE SUBMITTING, PLEASE READ [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md). ## PR描述 (What this PR does / why we need it?) - 请明确说明您提交PR的变更内容。本部分旨在概述所做的变更,以及此PR是如何解决该问题的。请尽可能地提供有助于评审人员更高效、更快速完成检视审查的实用说明。 新增「量化格式」文档目录(docs/zh/quantization_formats/) README.md(格式支持矩阵) 对比 AscendV1、MindIE-SD、compressed-tensors 等格式的 YAML 配置、目标推理框架、支持量化模式、分布式能力 说明新/旧两套导出架构(IFormat vs Legacy Saver)及扩展方式 提供各格式 YAML 配置示例,并区分「量化格式」与「量化算法」 2)ascendv1.md(AscendV1 格式说明) 描述 ascendv1_saver 导出产物(quant_model_description.json、quant_model_weights.safetensors 等) 说明 quant_model_description.json 全局字段与量化类型优先级 逐模式列出参数结构,补充 W8A8 静态量化的公式推导(deq_scale、quant_bias 等) 提供参数对照总表,并与 compressed-tensors 做差异对比 3)compressed_tensors.md(compressed-tensors 格式说明) 对齐 vllm-project/compressed-tensors schema v0.13.0 说明 YAML 配置、config.json → quantization_config 结构 文档化 QuantizationScheme / QuantizationArgs 及当前支持的 W8A8 Static/Dynamic preset 列出 safetensors 张量命名与当前限制(仅线性层、无 KV Cache、无分布式等) 4)iformat_integration_guide.md(量化格式接入指南) 面向外部开发者,以 compressed_tensors 为 1-shot 示例 说明 IFormat 协议、QuantFormatBase 及 build_module_handler_map / on_float_module 等实现要点 给出五步接入流程(Config → 实现 → 注册 → 联合类型 → YAML 启用)及测试参考 更新站点导航(mkdocs.yml) 在「四、功能指南」与「五、开发者指南」之间新增 「量化格式」 章节,挂载上述 4 篇文档 更新一键量化现有文档 usage.md 在 save 章节说明 modelslim_v1 支持 ascendv1_saver 与 compressed_tensors 新增 compressed_tensors 保存器 小节:配置示例、字段说明、适用场景、使用限制、W8A8 静态量化完整 YAML 示例 quantization_result.md 在「权重类型详解」处增加 Tip,链接至 ascendv1.md 明确分工:本文档侧重输出文件概览与参数速查,完整公式与规范见 AscendV1 格式说明 4. 文档体系关系 以 格式支持矩阵 为入口,串联各格式说明与接入指南 AscendV1 格式说明 与 一键量化生成结果 分工:前者为完整协议规范,后者保留文件列表与 QuaRot/debug 等内容 usage.md 与 格式文档 交叉引用,便于用户从配置侧跳转到格式协议说明 - 请说明为何需要这些更改,例如具体的使用场景或bug描述。 - 关联issue号(如果有)。 - Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. If possible, please consider writing useful notes for better and faster reviews in your PR. - Please clarify why the changes are needed. For instance, the use case and bug description. - Related issue number (if any) ## 面向用户的变更 (Does this PR introduce _any_ user-facing change)? - 请注意,这里指的是**任何**面向用户的变更,包括但不限于API、用户界面或其他使用方式上的变更。 - Note that it means *any* user-facing change including all aspects such as API, interface or other behavior changes. ## 功能验证 (How was this patch tested?) 请确认CI已通过增量及存量的单元测试用例。 如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤(最好提供完整的可复现的操作路径及关键截图),以便Committer能够快速复现验证,也便于后续的维护。 如果未添加测试,请说明未添加的原因,以及为何难添加测试。 - [_] 功能自验 - [_] 本地自验截图(涉及个人标识符等敏感信息请注意脱敏) - [_] 新增/变更内容是否已新增/适配UT测试用例看护 CI passed with new added/existing test. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. - [_] Self-verification of the feature. - [_] Screenshot of local self-verification (please anonymize any sensitive information such as personal identifiers) - [_] Have new or modified unit test (UT) cases been added or adapted to cover the newly added or changed content? See merge request: Ascend/msmodelslim!4581 天前
【msmodelslim】【docs】支持量化格式资料 Co-authored-by: anreywmh<18845895998@163.com> # message auto-generated for no-merge-commit merge: !458 merge quantFormatRefactor/docs into master 【msmodelslim】【docs】支持量化格式资料 Created-by: anreywmh Commit-by: anreywmh Merged-by: ascend-robot Description: 感谢您贡献的Pull Request! 在提交之前,请务必阅读 [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md)。 Thanks for sending a pull request! BEFORE SUBMITTING, PLEASE READ [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md). ## PR描述 (What this PR does / why we need it?) - 请明确说明您提交PR的变更内容。本部分旨在概述所做的变更,以及此PR是如何解决该问题的。请尽可能地提供有助于评审人员更高效、更快速完成检视审查的实用说明。 新增「量化格式」文档目录(docs/zh/quantization_formats/) README.md(格式支持矩阵) 对比 AscendV1、MindIE-SD、compressed-tensors 等格式的 YAML 配置、目标推理框架、支持量化模式、分布式能力 说明新/旧两套导出架构(IFormat vs Legacy Saver)及扩展方式 提供各格式 YAML 配置示例,并区分「量化格式」与「量化算法」 2)ascendv1.md(AscendV1 格式说明) 描述 ascendv1_saver 导出产物(quant_model_description.json、quant_model_weights.safetensors 等) 说明 quant_model_description.json 全局字段与量化类型优先级 逐模式列出参数结构,补充 W8A8 静态量化的公式推导(deq_scale、quant_bias 等) 提供参数对照总表,并与 compressed-tensors 做差异对比 3)compressed_tensors.md(compressed-tensors 格式说明) 对齐 vllm-project/compressed-tensors schema v0.13.0 说明 YAML 配置、config.json → quantization_config 结构 文档化 QuantizationScheme / QuantizationArgs 及当前支持的 W8A8 Static/Dynamic preset 列出 safetensors 张量命名与当前限制(仅线性层、无 KV Cache、无分布式等) 4)iformat_integration_guide.md(量化格式接入指南) 面向外部开发者,以 compressed_tensors 为 1-shot 示例 说明 IFormat 协议、QuantFormatBase 及 build_module_handler_map / on_float_module 等实现要点 给出五步接入流程(Config → 实现 → 注册 → 联合类型 → YAML 启用)及测试参考 更新站点导航(mkdocs.yml) 在「四、功能指南」与「五、开发者指南」之间新增 「量化格式」 章节,挂载上述 4 篇文档 更新一键量化现有文档 usage.md 在 save 章节说明 modelslim_v1 支持 ascendv1_saver 与 compressed_tensors 新增 compressed_tensors 保存器 小节:配置示例、字段说明、适用场景、使用限制、W8A8 静态量化完整 YAML 示例 quantization_result.md 在「权重类型详解」处增加 Tip,链接至 ascendv1.md 明确分工:本文档侧重输出文件概览与参数速查,完整公式与规范见 AscendV1 格式说明 4. 文档体系关系 以 格式支持矩阵 为入口,串联各格式说明与接入指南 AscendV1 格式说明 与 一键量化生成结果 分工:前者为完整协议规范,后者保留文件列表与 QuaRot/debug 等内容 usage.md 与 格式文档 交叉引用,便于用户从配置侧跳转到格式协议说明 - 请说明为何需要这些更改,例如具体的使用场景或bug描述。 - 关联issue号(如果有)。 - Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. If possible, please consider writing useful notes for better and faster reviews in your PR. - Please clarify why the changes are needed. For instance, the use case and bug description. - Related issue number (if any) ## 面向用户的变更 (Does this PR introduce _any_ user-facing change)? - 请注意,这里指的是**任何**面向用户的变更,包括但不限于API、用户界面或其他使用方式上的变更。 - Note that it means *any* user-facing change including all aspects such as API, interface or other behavior changes. ## 功能验证 (How was this patch tested?) 请确认CI已通过增量及存量的单元测试用例。 如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤(最好提供完整的可复现的操作路径及关键截图),以便Committer能够快速复现验证,也便于后续的维护。 如果未添加测试,请说明未添加的原因,以及为何难添加测试。 - [_] 功能自验 - [_] 本地自验截图(涉及个人标识符等敏感信息请注意脱敏) - [_] 新增/变更内容是否已新增/适配UT测试用例看护 CI passed with new added/existing test. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. - [_] Self-verification of the feature. - [_] Screenshot of local self-verification (please anonymize any sensitive information such as personal identifiers) - [_] Have new or modified unit test (UT) cases been added or adapted to cover the newly added or changed content? See merge request: Ascend/msmodelslim!4581 天前
【msmodelslim】【docs】支持量化格式资料 Co-authored-by: anreywmh<18845895998@163.com> # message auto-generated for no-merge-commit merge: !458 merge quantFormatRefactor/docs into master 【msmodelslim】【docs】支持量化格式资料 Created-by: anreywmh Commit-by: anreywmh Merged-by: ascend-robot Description: 感谢您贡献的Pull Request! 在提交之前,请务必阅读 [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md)。 Thanks for sending a pull request! BEFORE SUBMITTING, PLEASE READ [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md). ## PR描述 (What this PR does / why we need it?) - 请明确说明您提交PR的变更内容。本部分旨在概述所做的变更,以及此PR是如何解决该问题的。请尽可能地提供有助于评审人员更高效、更快速完成检视审查的实用说明。 新增「量化格式」文档目录(docs/zh/quantization_formats/) README.md(格式支持矩阵) 对比 AscendV1、MindIE-SD、compressed-tensors 等格式的 YAML 配置、目标推理框架、支持量化模式、分布式能力 说明新/旧两套导出架构(IFormat vs Legacy Saver)及扩展方式 提供各格式 YAML 配置示例,并区分「量化格式」与「量化算法」 2)ascendv1.md(AscendV1 格式说明) 描述 ascendv1_saver 导出产物(quant_model_description.json、quant_model_weights.safetensors 等) 说明 quant_model_description.json 全局字段与量化类型优先级 逐模式列出参数结构,补充 W8A8 静态量化的公式推导(deq_scale、quant_bias 等) 提供参数对照总表,并与 compressed-tensors 做差异对比 3)compressed_tensors.md(compressed-tensors 格式说明) 对齐 vllm-project/compressed-tensors schema v0.13.0 说明 YAML 配置、config.json → quantization_config 结构 文档化 QuantizationScheme / QuantizationArgs 及当前支持的 W8A8 Static/Dynamic preset 列出 safetensors 张量命名与当前限制(仅线性层、无 KV Cache、无分布式等) 4)iformat_integration_guide.md(量化格式接入指南) 面向外部开发者,以 compressed_tensors 为 1-shot 示例 说明 IFormat 协议、QuantFormatBase 及 build_module_handler_map / on_float_module 等实现要点 给出五步接入流程(Config → 实现 → 注册 → 联合类型 → YAML 启用)及测试参考 更新站点导航(mkdocs.yml) 在「四、功能指南」与「五、开发者指南」之间新增 「量化格式」 章节,挂载上述 4 篇文档 更新一键量化现有文档 usage.md 在 save 章节说明 modelslim_v1 支持 ascendv1_saver 与 compressed_tensors 新增 compressed_tensors 保存器 小节:配置示例、字段说明、适用场景、使用限制、W8A8 静态量化完整 YAML 示例 quantization_result.md 在「权重类型详解」处增加 Tip,链接至 ascendv1.md 明确分工:本文档侧重输出文件概览与参数速查,完整公式与规范见 AscendV1 格式说明 4. 文档体系关系 以 格式支持矩阵 为入口,串联各格式说明与接入指南 AscendV1 格式说明 与 一键量化生成结果 分工:前者为完整协议规范,后者保留文件列表与 QuaRot/debug 等内容 usage.md 与 格式文档 交叉引用,便于用户从配置侧跳转到格式协议说明 - 请说明为何需要这些更改,例如具体的使用场景或bug描述。 - 关联issue号(如果有)。 - Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. If possible, please consider writing useful notes for better and faster reviews in your PR. - Please clarify why the changes are needed. For instance, the use case and bug description. - Related issue number (if any) ## 面向用户的变更 (Does this PR introduce _any_ user-facing change)? - 请注意,这里指的是**任何**面向用户的变更,包括但不限于API、用户界面或其他使用方式上的变更。 - Note that it means *any* user-facing change including all aspects such as API, interface or other behavior changes. ## 功能验证 (How was this patch tested?) 请确认CI已通过增量及存量的单元测试用例。 如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤(最好提供完整的可复现的操作路径及关键截图),以便Committer能够快速复现验证,也便于后续的维护。 如果未添加测试,请说明未添加的原因,以及为何难添加测试。 - [_] 功能自验 - [_] 本地自验截图(涉及个人标识符等敏感信息请注意脱敏) - [_] 新增/变更内容是否已新增/适配UT测试用例看护 CI passed with new added/existing test. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. - [_] Self-verification of the feature. - [_] Screenshot of local self-verification (please anonymize any sensitive information such as personal identifiers) - [_] Have new or modified unit test (UT) cases been added or adapted to cover the newly added or changed content? See merge request: Ascend/msmodelslim!4581 天前
README.md

量化格式支持矩阵

简介

msModelSlim 支持多种量化权重落盘格式。格式决定量化结果的文件结构、张量命名与元数据组织方式;量化算法决定量化过程(校准、离群值抑制等)。本文档帮助您根据目标推理框架选择合适的导出格式。

如需接入新的量化格式,请参见《量化格式接入指南》。

格式对比矩阵

格式 YAML 配置 目标推理框架 支持量化模式(概要) 分布式导出 详细说明
AscendV1 - type: "ascendv1_saver"
part_file_size: 4
MindIE、vLLM Ascend W8A8 / W8A16 / W4A8 / W4A4 / MXFP / KV Cache / FA 等 20+ 支持 AscendV1 格式说明
MindIE-SD - type: "mindie_format_saver"
part_file_size: 0
MindIE(多模态生成) 多模态生成模型专用 支持 MindIE 保存器配置
compressed-tensors - type: "compressed_tensors"
part_file_size: 4
vLLM W8A8 Static / W8A8 Dynamic 不支持 compressed-tensors 格式说明

YAML 配置示例

AscendV1(默认,昇腾推理)

spec:
  save:
    - type: "ascendv1_saver"
      part_file_size: 4

compressed-tensors(vLLM 等)

spec:
  save:
    - type: "compressed_tensors"
      part_file_size: 4

MindIE-SD(多模态生成)

spec:
  save:
    - type: "mindie_format_saver"
      part_file_size: 0

格式 vs 量化算法

概念 说明 文档位置
量化格式 量化权重的落盘结构与加载协议 本章节
量化算法 校准、离群值抑制、自动调优等计算过程 算法总览
量化模式 如 w8a8、w4a8 等比特组合策略 大模型支持矩阵

相关文档