メインコンテンツへスキップ
Quantization-aware training (QAT) produces low-bit weights that hold quality far better than a plain 4-bit conversion. Instead of shrinking a finished model in one shot, QAT simulates low precision during training, so the weights learn to tolerate rounding before they’re ever cast down. The payoff for running models locally: near-full-quality output at roughly a quarter of the VRAM. 本ページではQATの概要、既にダウンロード済みのGGUFファイルとの関連性、そして現在実行可能なQATチェックポイントについて解説します。量子化の基礎やQ4_K_Mといった名称の読み方については、量子化の解説からご覧ください。

QATとポストトレーニング量子化(PTQ)の比較

ダウンロード可能なほとんどの量子化済みモデルは ポストトレーニング量子化(PTQ) によって作成されている。つまり、完成したBF16モデルの重み値をより少ないビット数に丸めて配布するのだ。この手法は処理が迅速で再学習の必要もないが、モデル側には丸め誤差に適応する機会が与えられていないため、ビット幅を小さくするほど精度の低下が顕著になる。 QAT inserts “fake quantization” into the training or fine-tuning loop. The forward pass rounds and clamps weights to the target bit-width but keeps them in floating point, and gradients (via a straight-through estimator) teach the model to stay accurate under that rounding before it’s actually cast to low precision. Because the weights were optimized to survive quantization, a QAT checkpoint beats a PTQ one at the same bit-width. この差は数値としても確認できます。
  • PyTorch’s own numbers on Llama 3-8B at 4-bit weights: QAT recovered 96% of the accuracy degradation on HellaSwag and 68% of the perplexity degradation on WikiText versus PTQ. (PyTorch blog)
  • Google’s Gemma 3 QAT int4 checkpoints cut the perplexity gap versus the non-quantized model by 54% compared to a naive Q4_0 conversion of the same model. (Google Developers blog)
この回復率は一定の数値ではなく、モデルやビット幅、ベンチマークによって変動します。上記数値は傾向やおおよその規模を示す参考例として捉え、すべてのモデルに当てはまる保証はない点にご留意ください。

QATとは手法の一種であり、ファイル形式ではありません

よくある混同例が「QATとGGUFの違い」です。実際には互いに代替となるものではなく、それぞれ別の問いに答えるものです:
  • QAT and PTQ are how the low-bit weights were produced (the training/quantization method).
  • GGUF is the container the weights ship in for llama.cpp-based runtimes (Ollama, LM Studio, Jan).
QATで作成されたチェックポイントもGGUF形式へエクスポート可能であり、実際にそうされることが多いです。Googleの公開資料でもこの点が明確に示されています:google/gemma-4-12B-it-qat-q4_0-ggufはGGUFファイルであり、その中のQ4_0重みはQATパイプラインから得られたものです。これに対しOllamaが通常のPTQを用いてgemma-4-12b-itからQ4_0へ変換したファイルとは異なります。形式やビット幅は同じでも、内部の重みの忠実度はより高いのです。したがって真の比較対象はQATとPTQであり、GGUFはいずれの手法でもランタイム環境へ重みが届くための手段に過ぎません。

Gemma用のQATチェックポイント:実際に実行可能なファイル群です

この分野ではGoogleが際立っています。同社は各GemmaモデルをQATで微調整し、すぐに実行可能なint4形式のチェックポイントとして公開しています。Ollama上ではこれらに-it-qatタグが付与されています。Gemma 4(現行世代です。詳細はGemmaをご覧ください)については: Sizes are from ollama.com/library/gemma4 — confirm the current tag list there before you standardize on one. Google reports that Gemma 4 QAT yields “higher overall quality compared to standard PTQ baselines.” The well-quantified precedent is Gemma 3, where int4 QAT dropped VRAM roughly 3× — the 27B model from ~54 GB at BF16 to ~14 GB — while staying close to full-precision quality, which is what brought 27B-class models onto a single consumer GPU.
あるモデルにおいてQATタグと同じビット幅のPTQタグの両方が存在する場合は、QATを選ぶべきです。サイズは変わらず品質も向上し、推論時のコスト増加もありません。QATのコストは訓練段階でのみ発生します。

独自のQATモデルのファインチューニング

QAT isn’t only for vendor checkpoints. Unsloth (with PyTorch’s TorchAO team) added QAT to its fine-tuning library: pass a qat_scheme (int4, int8-int4, fp8-int4, or fp8-fp8) so fake-quantization runs during your LoRA/fine-tune loop, then export to a low-bit format. Unsloth reports recovering up to ~70% of the accuracy a naive quantization loses, with no added inference-time overhead and the same on-disk footprint as ordinary quantization. This is the practical path for the popular open models that don’t ship official QAT checkpoints — Qwen, for example, has no first-party QAT release, but its models are a common base for community QAT recipes built on Unsloth and TorchAO. If you fine-tune and serve your own QAT model, serve your fine-tune covers exporting it to a runtime, and Tokios connects it from there.

どこからでもQATモデルを実行可能

QATにより、高品質なモデルを実際に所有しているハードウェア上で動作させることが可能です。Ollama、LM Studio、vLLM、llama.cppなどでローカルにモデルを起動した後は、localhostを公開せずにエージェントやアプリ、チームメンバーからもアクセスできるようにするのが次のステップです。

安定したエンドポイントを設定する

Tokiosはモデルの選定やホスティング、ファインチューニングは行いません。ローカルでQATチェックポイントが動作するようになれば、Tokiosがhttps://api.tokios.comという場所に認証付きの安定したエンドポイントを作成し、どこからでも呼び出せるようにします。

さらに詳しく

量子化の仕組みについて

量子化の動作原理と、GGUFの名称例であるQ4_K_Mの読み方について説明します。

Gemmaをローカル環境で実行する方法

Gemma 4のサイズや対応ハードウェア、そして各種の-it-qat量子化形式について解説します。

量子化とハードウェアの関係

GGUF、NVFP4、MXFP4、AWQ、MLXといったウェイト形式のうち、どれがご使用のハードウェアで動作するかを説明します。

ご自身のGPUに適したモデルサイズはどれか

モデルと量子化形式の組み合わせが利用可能かどうか、ダウンロード前に確認する方法です。