HCIE-AI:大模型压缩和部署

作者:袖梨 2026-07-12

1.概述

本文主要介绍模型部署和压缩和一些大模型开发。

2. 目标

img_6a52fc55b052630.webp

3. AI应用开发流程

img_6a52fc55b052b31.webp

4. 如何降低模型部署成本?

img_6a52fc55b052d32.webp

img_6a52fc55b052f33.webp

5. 模型压缩技术

5.1 小模型压缩方法

img_6a52fc55b053234.webp

5.2 大模型压缩技术

img_6a52fc55b053435.webp

img_6a52fc55b053636.webp

由于Prefill是一次模型的推理,而Decoding则要反复迭代很多次,优化重点在降低带宽需求,而不是降低计算量

① KV Cache压缩技术

img_6a52fc55b053837.webp

img_6a52fc55b053a38.webp

Streaming LLM

img_6a52fc55b053c39.webp

img_6a52fc55b053e310.webp

FastGen -- 自适应KV cache压缩

img_6a52fc55b0540311.webp

img_6a52fc55b0542312.webp

img_6a52fc55b0544313.webp

MQA与GQA

img_6a52fc55b0546314.webp

② 大模型压缩技术

LLM Pruner:高效率大模型剪枝算法

One-shot权重稀疏化:大模型权重稀疏压缩,缓解存储与访存压力

大模型PTQ量化:高效率量化,W8A8、W8A16与W4A16是典型方式

权重低比特量化:INT4量化,模型压缩4倍,提升权重搬运效率

6. 模型压缩工具介绍

img_6a52fc55b0548315.webp

ModelSlim

img_6a52fc55b054a316.webp

img_6a52fc55b054c317.webp

训练加速-模型低秩分解

img_6a52fc55b054d318.webp

训练加速-模型稀疏加速训练

img_6a52fc55b054f319.webp

推理加速-大模型量化

img_6a52fc55b0551320.webp

img_6a52fc55b0553321.webp

img_6a52fc55b0555322.webp

推理加速-大模型稀疏量化和权重压缩

img_6a52fc55b0557323.webp

img_6a52fc55b0559324.webp

推理加速-训练后量化(ONNX)

img_6a52fc55b055b325.webp

img_6a52fc55b055d326.webp

img_6a52fc55b055f327.webp

img_6a52fc55b0561328.webp

推理加速-训练后量化(MindSpore)

img_6a52fc55b0563329.webp

推理加速-模型剪枝

img_6a52fc55b0565330.webp

推理加速-模型蒸馏

img_6a52fc55b0567331.webp

7. 大模型部署框架介绍

img_6a52fc55b0569332.webp

img_6a52fc55b056b333.webp

img_6a52fc55b056c334.webp

img_6a52fc55b056e335.webp

8. 大模型应用开发

8.1 大模型应用开发流程

img_6a52fc55b0570336.webp

8.2 为什么需要RAG?

img_6a52fc55b0572337.webp

img_6a52fc55b0574338.webp

8.3 向量数据库

img_6a52fc55b0576339.webp

工作流程:

img_6a52fc55b0578340.webp

向量数据库解决的问题:

img_6a52fc55b057a341.webp

为什么使用向量数据库?

img_6a52fc55b057b342.webp

向量数据库构建

img_6a52fc55b057d343.webp

9. 总结

本文主要介绍了模型部署和压缩相关内容以及大模型应用开发,笔试占比6%。

相关文章

精彩推荐