量化#
创建日期: 2019年10月09日 | 最后更新日期: 2025年12月01日
我们正在将所有与量化相关的开发集中到 torchao,请查看我们的新文档页面: https://docs.pytorch.ac.cn/ao/stable/index.html
现有量化流程计划: 1. Eager 模式量化 (torch.ao.quantization.quantize, torch.ao.quantization.quantize_dynamic),请迁移至使用 torchao eager 模式的 quantize_ API。
2. FX 图模式量化 (torch.ao.quantization.quantize_fx.prepare_fx torch.ao.quantization.quantize_fx.convert_fx),请迁移至使用 torchao pt2e 量化 API (torchao.quantization.pt2e.quantize_pt2e.prepare_pt2e, torchao.quantization.pt2e.quantize_pt2e.convert_pt2e)
3. pt2e 量化已迁移到 torchao (pytorch/ao),详情请参阅 pytorch/ao#2259
我们计划在 2.10 版本中删除 torch.ao.quantization,除非存在任何阻碍因素,或者在所有阻碍因素清除后的最早 PyTorch 版本中删除。
量化 API 参考 (保留,因为 API 仍然是公共的)#
量化 API 参考 包含量化 API 的文档,例如量化通道、量化张量操作以及支持的量化模块和函数。