首页 / 术语表 / 量化
什么是量化(Quantization)?
量化通过以更低精度(4 位 / 5 位 / 6 位)而非完整 16 位浮点存储权重,来降低 LLM 的内存占用。osFoundry 支持一键将模型量化为 Q4_K_M、Q5_K_M、Q6_K 或 FP16。
详细说明
Q4 量化模型的内存占用约为 FP16 模型的 25%,在大多数任务上仅有少量质量下降。70B FP16 模型大约需要 140 GB 显存;同一模型在 Q4 下仅需约 35 GB——可放入单张 A100 80 GB。
不同量化方案的取舍各异。Q4_K_M 是常用默认值。代码生成模型通常需要 Q5 及以上才能保持语法保真度。
osFoundry 如何处理量化(Quantization)
osFoundry 的安装流程允许您在安装时选择量化方案。之后无需重新训练即可在量化方案之间切换——相同的模型句柄,不同的底层权重。
常见问题
What does Q4_K_M mean?
A ~4-bit K-type mixed quantization with a medium (M) precision allocation. It is the standard quality/memory trade-off most local-LLM users start with.
Does quantization hurt quality?
Q8 is nearly indistinguishable from FP16, Q4_K_M is the accepted sweet spot, and Q3 and below degrade visibly. Sensitivity is task-dependent — code generation suffers first, summarization holds up longest.
How does quantization affect file size?
Model files shrink roughly in proportion to bit width: Q8 is about half of FP16, Q4 about a quarter — download time and disk usage shrink the same way.
相关术语
相关功能