<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Hironsan</author_name>
  <author_url>https://blog.hatena.ne.jp/Hironsan/</author_url>
  <blog_title>Ahogrammer</blog_title>
  <blog_url>https://hironsan.hatenablog.com/</blog_url>
  <categories>
    <anon>機械学習</anon>
    <anon>PyTorch</anon>
  </categories>
  <description>QLoRAについて少し書く機会があったので、その要素技術であるブロックごとの量子化（block-wise quantization）の解説とその実装をしてみました。実際のところ、bitsandbytesなどのライブラリに実装されているので、自前で実装する必要はまったくないのですが、学習用兼サボってたブログのリハビリ用です。 量子化 量子化とは、浮動小数点数を整数による表現に変換する技術です。たとえば、モデルの重みが32ビットの浮動小数点数として格納されているとします。量子化によって、これらの重みは32ビットからたとえば8ビットの整数に変換できます。量子化は計算時間やメモリ使用量を削減できる一方…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhironsan.hatenablog.com%2Fentry%2Fblock-wise-quantization&quot; title=&quot;ブロックごとの量子化を実装する - Ahogrammer&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/H/Hironsan/20250107/20250107202125.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-01-07 20:48:47</published>
  <title>ブロックごとの量子化を実装する</title>
  <type>rich</type>
  <url>https://hironsan.hatenablog.com/entry/block-wise-quantization</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
