<?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>Bf16 on k4i's blog</title><link>https://k4i.top/tags/bf16/</link><description>Recent content in Bf16 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>Tue, 23 Jun 2026 10:30:00 +0800</lastBuildDate><atom:link href="https://k4i.top/tags/bf16/index.xml" rel="self" type="application/rss+xml"/><item><title>Numeric Types in Neural Networks: FP32, BF16, FP8, INT8, and INT4</title><link>https://k4i.top/posts/model-numeric-types/</link><pubDate>Tue, 23 Jun 2026 10:30:00 +0800</pubDate><author>sky_io@outlook.com (K4i)</author><atom:modified>Tue, 23 Jun 2026 10:30:00 +0800</atom:modified><guid>https://k4i.top/posts/model-numeric-types/</guid><description>&lt;h2 id="quick-answer"&gt;The Short Answer&lt;/h2&gt;
&lt;p&gt;Models do not use only floating-point types. Integers appear too. The useful distinction is not simply &amp;ldquo;float versus int&amp;rdquo;, but where the type is used.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Location&lt;/th&gt;
&lt;th&gt;Common types&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Training compute&lt;/td&gt;
&lt;td&gt;FP32, TF32, FP16, BF16&lt;/td&gt;
&lt;td&gt;Keep gradients and activations stable while using Tensor Cores&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Inference compute&lt;/td&gt;
&lt;td&gt;BF16, FP16, FP8, INT8&lt;/td&gt;
&lt;td&gt;Reduce bandwidth and compute cost&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Weight storage&lt;/td&gt;
&lt;td&gt;BF16, FP16, FP8, INT8, INT4, NF4&lt;/td&gt;
&lt;td&gt;Shrink model files and GPU memory&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;KV cache / activation&lt;/td&gt;
&lt;td&gt;BF16, FP16, FP8, INT8&lt;/td&gt;
&lt;td&gt;Save memory for long context and high concurrency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;token ids / masks / indices&lt;/td&gt;
&lt;td&gt;INT32, INT64, bool&lt;/td&gt;
&lt;td&gt;Represent discrete structure, not quantized parameters&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;One sentence is enough for the main idea: &lt;strong&gt;training is usually dominated by floating-point compute; inference and storage often use low-precision floating point and integers; when integers represent model values, they usually need a scale, zero point, or codebook to become approximate real numbers again.&lt;/strong&gt;&lt;/p&gt;</description><dc:creator>K4i</dc:creator><media:content url="https://k4i.top//images/posts/model-numeric-types/numeric-types-cover.svg" medium="image"><media:title type="html">featured image</media:title></media:content><category>llm</category><category>numeric-types</category><category>bf16</category><category>fp8</category><category>int8</category><category>quantization</category><category>AI</category><category>LLM Quantization and Low-Precision Serving</category></item></channel></rss>