Instructions to use google/gemma-4-12B-it-qat-w4a16-ct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/gemma-4-12B-it-qat-w4a16-ct with Transformers:
# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("google/gemma-4-12B-it-qat-w4a16-ct") model = AutoModelForMultimodalLM.from_pretrained("google/gemma-4-12B-it-qat-w4a16-ct", device_map="auto") - Notebooks
- Google Colab
- Kaggle
unable to save AOT compiled function
#1
by mohamedemam - opened
unable to save AOT compiled function to /root/.cache/vllm/torch_compile_cache/torch_aot_compile/58149929561eb15272d8ce6245f1e07e5d9a413fd0c51d06ed7555b8fed32ff4/rank_0_0/model: Can't pickle <function Gemma4UnifiedTextModel.forward at 0x712b3f926520>: it's not the same object as transformers.models.gemma4_unified.modeling_gemma4_unified.Gemma4UnifiedTextModel.forward
[core.py:1165] RuntimeError: Shape mismatch: a.size(1) = 4096, size_k = 8192
Hi @mohamedemam
Thanks for reporting this. Are you by any chance using vLLM v0.22.0 version ? If yes there is a similar bug filed here . https://github.com/vllm-project/vllm/issues/44796.
Can you check this once . Thanks