<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Int4 on k4i's blog</title><link>https://k4i.top/tags/int4/</link><description>Recent content in Int4 on k4i's blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>sky_io@outlook.com (K4i)</managingEditor><webMaster>sky_io@outlook.com (K4i)</webMaster><copyright>All content is subject to the license of &lt;a rel="license noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank"&gt;CC BY-NC-SA 4.0&lt;/a&gt; .</copyright><lastBuildDate>Mon, 01 Jun 2026 21:00:00 +0800</lastBuildDate><atom:link href="https://k4i.top/tags/int4/index.xml" rel="self" type="application/rss+xml"/><item><title>A Survey of LLM Quantization: From Linear Quantization to Codebooks</title><link>https://k4i.top/posts/llm-quantization/</link><pubDate>Mon, 01 Jun 2026 21:00:00 +0800</pubDate><author>sky_io@outlook.com (K4i)</author><atom:modified>Wed, 03 Jun 2026 01:10:08 +0800</atom:modified><guid>https://k4i.top/posts/llm-quantization/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;A 7B model stored in FP16 needs this much memory just for parameters:&lt;/p&gt;
&lt;p&gt;$$7 \times 10^9 \times 2\ \text{bytes} \approx 14\ \text{GB}$$&lt;/p&gt;
&lt;p&gt;That does not include the KV cache, activations, temporary workspaces, CUDA graphs, batching overhead, or runtime fragmentation. For a 70B model, FP16 weights alone are about 140 GB, which is already beyond a single commodity GPU.&lt;/p&gt;
&lt;p&gt;Quantization has a simple direct goal: &lt;strong&gt;represent model values with fewer bits&lt;/strong&gt;. FP16 uses 16 bits per weight, INT8 uses 8 bits, and INT4 uses 4 bits. In the ideal case, weight memory drops to roughly \(1/2\) and \(1/4\) of FP16.&lt;/p&gt;</description><dc:creator>K4i</dc:creator><media:content url="https://k4i.top//images/posts/llm-quantization/quantization-buckets-icon.svg" medium="image"><media:title type="html">featured image</media:title></media:content><category>llm</category><category>quantization</category><category>inference</category><category>memory</category><category>int8</category><category>int4</category><category>fp8</category><category>AI</category></item></channel></rss>