SuperAPI AI Directory

Gemma 3 QAT - Google's latest open-source model, the quantized version of Gemma 3

Author: AI小集 · Original source: AI工具集

What is Gemma 3 QAT

Gemma 3 QAT (Quantization-Aware Training) is Google's latest generation open-source model, a quantized optimized version ofGemma 3 . Through quantization-aware training technology, Gemma 3 QAT significantly reduces memory requirements while maintaining high-quality performance. The VRAM requirement for Gemma 3 27B is reduced from 54GB to 14.1GB, enabling local operation on consumer-grade GPUs (such as NVIDIA RTX 3090). The VRAM requirement for Gemma 3 12B is reduced from 24GB to 6.6GB, enabling efficient operation on laptop NVIDIA RTX 4060 GPUs. This allows more users to experience powerful AI capabilities on ordinary hardware.

Gemma 3 QAT

Main features of Gemma 3 QAT

  • Significantly reduced VRAM requirements: Through quantization-aware training technology, Gemma 3 QAT greatly reduces the model's VRAM usage.
    • Gemma 3 27B: VRAM requirement reduced from 54GB (BF16) to 14.1GB (int4), enabling operation on consumer-grade GPUs such as NVIDIA RTX 3090 (24GB VRAM).
    • Gemma 3 12B: VRAM requirement reduced from 24GB (BF16) to 6.6GB (int4), enabling efficient operation on laptop NVIDIA RTX 4060 (8GB VRAM).
    • Smaller versions (4B, 1B): Can even run on resource-constrained devices such as mobile phones.
  • Maintains high performance: Gemma 3 QAT still maintains performance close to the native BF16 model: in Chatbot Arena Elo scores, the quantized version of Gemma 3 QAT remains competitive, not inferior to top language models. Using QAT technology, Google reduced the perplexity degradation by 54% over approximately 5000 training steps, ensuring the model maintains high accuracy after quantization.
  • Multimodal capabilities: Supports processing image input and text generation, suitable for tasks such as visual question answering (VQA) and document analysis.
  • Long context support: Features a 128,000-token context window, optimized through hybrid attention mechanisms (local sliding window attention and global attention), reducing KV cache memory usage.
  • Hardware support: Gemma 3 QAT can run on a variety of consumer-grade hardware, including desktop GPUs, laptop GPUs, and edge devices.
  • Framework support: Supports mainstream inference frameworks such as Ollama, LM Studio, llama.cpp, MLX, allowing users to easily deploy on different platforms.

Technical principles of Gemma 3 QAT

  • Pseudo-quantization operation: In the forward pass of training, the model simulates low-precision computation through 'pseudo-quantization' nodes, rounding weights and activations to quantized values.
  • High-precision backpropagation: During backpropagation, the model still uses high-precision floating-point numbers to compute gradients, ensuring the accuracy of weight updates.
  • Combination of training and quantization: In this way, the model learns during the training phase how to maintain performance in a low-precision environment, and after actual quantization, the precision loss is minimal.
  • KV cache optimization: Through sparse caching and dynamic compression techniques, further reduces memory usage in long-context tasks.
  • Hardware acceleration: Supports SIMD instruction set optimization, such as AVX512 and NEON, improving inference speed by 3 times.

Project address of Gemma 3 QAT

Application scenarios of Gemma 3 QAT

  • Visual question answering (VQA): Gemma 3 QAT performs excellently in multimodal tasks, and the quantized version achieves performance close to FP16 on tasks such as DocVQA.
  • Document Analysis: Supports a long context window (128K tokens), making it suitable for tasks that require processing large amounts of text, such as document analysis.
  • Long Text Generation: Through KV cache optimization and grouped query attention (GQA), Gemma 3 QAT reduces memory usage by 40% and improves inference speed by 1.8x under a 128K context window.
  • Long Sequence Inference: Suitable for tasks that require processing long sequences, such as long document analysis and complex language model inference.
  • Edge Device Deployment: The 1B version of Gemma 3 QAT (529MB) can run offline on Android or the Web, with latency as low as 10ms, making it suitable for privacy-sensitive scenarios (such as healthcare and finance).