Gemma 4 QAT モデル:モバイルおよびラップトップの効率化のためのモデル圧縮最適化(4 分読了)
本文の状態
日本語全文を表示中
詳細モードで約6分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
TLDR AI
Google は、モバイルやラップトップでの効率を高めるため、量子化学習(QAT)で最適化した Gemma 4 チェックポイントを公開した。この更新により、メモリ要件が大幅に削減されつつもモデルの品質は維持される専用モバイル量子化フォーマットが含まれている。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
お使いのブラウザは音声再生要素をサポートしていません。
記事の聴読
このコンテンツは Google AI によって生成されています。生成 AI は実験的な技術です。
[[duration]]分
Gemma 4 を2ヶ月前にリリースして以来、その機能を拡大し続けるために継続的に取り組んできました。まず、推論を加速させるため Multi-Token Prediction (MTP) を導入しました。そして数日前には、E4B モデルと 26B MOE モデルの間のギャップを埋めるため 12B モデル をリリースしました。
本日、Gemma 4 のさらなる効率化を実現するため、Quantization-Aware Training (QAT) で最適化された新しいチェックポイントをリリースします。これにより、一般的なエッジデバイスやコンシューマー向け GPU でもモデルをローカルで実行できるようになります。
トレーニング中に量子化をシミュレーションすることで、QAT はモデル圧縮時の品質低下を最小限に抑えます。今回のリリースでは、人気の高い Q4_0 量子化フォーマットに対応する QAT チェックポイントに加え、モバイルユースケースに特化した新しい量子化フォーマットも含まれています。このモバイル向けフォーマットを使用することで、Gemma 4 E2B のメモリフットプリントを 1GB に削減しました。これらにより、Gemma 4 から期待される機能と品質を維持しつつ、必要なメモリ量を劇的に減らすことに成功しています。
モデルの小型化に伴い品質を維持する
量子化は、モデルのメモリフットプリントを削減し、デコード速度を加速することで、コンシューマー向けハードウェア上でモデルを実行するための重要な技術です。しかし、標準的なトレーニング後量子化(PTQ: Post-Training Quantization)では、性能低下が生じることがよくあります。トレーニング後に単純にモデルを量子化するのではなく、QAT は量子化プロセスをトレーニングに直接統合します。PTQ も品質の維持においてすでに効果的ですが、私たちの QAT による結果は、標準的な PTQ ベースラインと比較してさらに高い全体的な品質をもたらします。
この QAT のレシピを、すべてのモデルでパフォーマンスを最大化するために人気の高い Q4_0 フォーマットに適用しました。エッジ向けモデル(E2B および E4B)については、量子化へのアプローチ方法を再考し、モバイル特化型の量子化スキーマを採用しました。
VRAM とストレージの節約
以下は、モデルを読み込むために必要な VRAM の量を示す概算メモリ要件です:
Optimizing for mobile devices under the hood
標準的な圧縮フォーマットは、モバイルプロセッサが効率的に実行するのが難しい場合があります。Gemma 4 がモバイルデバイス上でスムーズに動作することを保証するため、エッジハードウェア向けに設計されたカスタムモバイル量子化スキーマを構築しました:
- 静的活性化(Static activations): 通常、モデルはデータをその場でスケーリングする方法を計算するために処理能力を浪費します。私たちはこれらの設定をトレーニング中に事前に計算することで、モバイルチップ上の負荷を軽減し、応答速度を向上させました。
- チャネルごとの量子化(Channel-wise quantization): 圧縮されたデータがモバイルアクセラレータの設計に適合するように構成しました。これにより、スマートフォンは遅い回避策を必要とせず、ネイティブで計算を実行できます。
- ターゲット型 2 ビット量子化(Targeted 2-bit quantization): トークンを生成するモデルの特定の部分を強く圧縮(2 ビット化)し、コアとなる推論層は高い精度のまま維持しました。これにより、ストレージを節約しつつ、モデルの知能が低下することはありません。
- エンベディングおよび KV キャッシュ最適化(Embedding and KV cache optimization): 圧縮に焦点を当てたのは、モデルの語彙リストとその短期記憶です。これによりアクティブなメモリフットプリントが劇的に削減され、スペース不足にならずに長いチャットが可能になります。
音声およびビジョンエンコーダーは多くのユースケースで不要であるため、必要なモダリティのみを展開することで、さらにメモリフットプリントを最適化できます。例えば、Gemma 4 E2B テキスト専用モデル(Per-Layer Embeddings なし)は、1 GB 未満のメモリしか必要としません。
今日から始めよう
これらのモデルを、お好みのワークフローですぐに利用できるようにするため、エコシステム全体で人気の開発ツールと連携し、今日より Gemma 4 QAT チェックポイントのシームレスなサポートを開始しました:
- ウエイトのダウンロード: Hugging Face で Q4_0 モデルおよびモバイルモデルのウエイトを今すぐ入手できます。ワークフローに適合するようフォーマットを調整しており、llama.cpp と共に使用可能な GGUF フォーマットや、vLLM 向けの圧縮テンソルを提供しています。それ以外の用途については、Q4_0 をサポートする形式に変換・量子化可能な非量子化チェックポイントを共有しています。
- 統合と学習: QAT チェックポイントの最適なデプロイ方法について詳しくは、当社のドキュメントをご覧ください。
- デスクトップで試す: llama.cpp、Ollama、LM Studio などの使いやすいインターフェースを使用して、Gemma 4 QAT モデルをデスクトップ上で簡単にダウンロード、管理、実行できます。
- デバイス上でのデプロイ: Google の軽量な LiteRT-LM ランタイムを使用すればエッジ向けに最適化されたデプロイが可能で、Transformers.js を使えば Web ブラウザ上で直接モデルを実行することもできます。
- お気に入りの開発ツールの活用: SGLang や vLLM で大規模モデルを効率的にサーブし、MLX で Apple Silicon 向けに最適化します。MTP QAT チェックポイントを使用すれば、モデルの量子化を行いながら MTP の高速化効果を維持できます。Hugging Face Transformers や Unsloth を使って直接ウエイトのファインチューニングも可能です。
ローカルで稼働する Gemma 4 で何を作り出すか、今から楽しみです!
原文を表示
Your browser does not support the audio element.
Listen to article
This content is generated by Google AI. Generative AI is experimental
[[duration]] minutes
Since releasing Gemma 4 two months ago, we've been continuously working to expand its capabilities. First, we introduced Multi-Token Prediction (MTP) to accelerate inference, and just a couple of days ago, we released a 12B model to bridge the gap between our E4B and 26B MOE models.
Today, we are releasing new checkpoints optimized with Quantization-Aware Training (QAT) to make Gemma 4 even more efficient, so you can run models locally on everyday edge devices and consumer GPUs.
By simulating quantization during training, QAT minimizes quality loss when the model is compressed. This release includes QAT checkpoints for the popular Q4_0 quantization format as well as a novel quantization format specialized for mobile use cases. Using this mobile format, we’ve reduced the memory footprint of Gemma 4 E2B to 1GB. Together, these dramatically reduce memory requirements while preserving the capabilities and quality you expect from Gemma 4.
Keeping model quality while making them smaller
Quantization is a key technology to run models on consumer hardware by reducing their memory footprint while also accelerating decode speed. However, standard Post-Training Quantization (PTQ) often leads to performance degradation. Instead of simply quantizing the model after training, QAT integrates the quantization process directly into training. While PTQ is already effective at preserving quality, our QAT results yield even higher overall quality compared to standard PTQ baselines.
We applied this QAT recipe to the popular Q4_0 format to maximize performance for all the models. For the edge models (E2B and E4B), we rethought how we approach quantization with a special mobile-specialized quantization schema.
Saving on VRAM and Storage
Below are the approximate memory requirements indicating how much VRAM is required to load the models:
Optimizing for mobile devices under the hood
Standard compression formats are often hard for mobile processors to run efficiently. To ensure Gemma 4 performs smoothly on mobile, we engineered a custom mobile-quantization schema designed for edge hardware:
- Static activations: Normally, models waste processing power calculating how to scale data on the fly. We pre-calculate these settings during training, which reduces workload on mobile chips and makes responses faster.
- Channel-wise quantization: We structured the compressed data to fit the design of mobile accelerators. This allows the phone to run calculations natively without needing slow workarounds.
- Targeted 2-bit quantization: We heavily compressed (to 2-bit) the specific parts of the model that generate tokens, while keeping the core reasoning layers at higher precision. This saves storage without making the model less smart.
- Embedding and KV cache optimization: We focused compression on the model’s vocabulary list and its short-term memory. This drastically reduces the active memory footprint, letting you have long chats without running out of space.
Because our audio and vision encoders are not needed in many use cases, you can optimize your memory footprint even further by deploying only the modalities you need. For example, the Gemma 4 E2B text-only model (without Per-Layer Embeddings) requires less than 1 GB of memory.
Get started today
To make those models easily usable with your preferred workflow, we’ve partnered with popular developer tools across the ecosystem to seamlessly support the Gemma 4 QAT checkpoints starting today:
- Download the weights: Access the Q4_0 and mobile model weights right now on Hugging Face. We've tailored the formats to fit your workflow: GGUF formats are ready for use with llama.cpp, and compressed tensors are provided for vLLM. For everything else, we share unquantized checkpoints that can be converted and quantized into formats supporting Q4_0.
- Integrate & learn: Explore our documentation to learn how to best deploy the QAT checkpoints.
- Try on your desktop: Easily download, manage, and run Gemma 4 QAT models locally on your desktop using user-friendly interfaces like llama.cpp, Ollama and LM Studio.
- Deploy on-device: Use Google's lightweight LiteRT-LM runtime for optimized edge deployment or run the models directly on the web with Transformers.js
- Use your favorite development tools: Serve larger models efficiently with SGLang and vLLM, optimize for Apple Silicon with MLX. Use the MTP QAT checkpoints to preserve the speedup of MTP while quantizing the models. Fine-tune weights directly using Hugging Face Transformers and Unsloth.
We can't wait to see what you build with Gemma 4 running locally!
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み