Google Gemma-4 Models Successfully Ported to AWS Inferentia2 After Compiler Hurdles
A developer has published a field report detailing the successful porting of Google's Gemma-4 language models — in 2B, 4B, and 12B sizes — to AWS Inferentia2 hardware using Neuron SDK 2.23. The standard AWS vendor toolchain, including optimum-neuron and the Neuron vLLM backend, failed to support Gemma-4's architecture due to unsupported features like cross-layer KV-sharing and mixed attention head configurations. The developer worked around these limitations by directly tracing the Hugging Face model graph and manually handling tensor parallelism, bypassing the broken framework paths. Achieved throughput figures are approximately 44 tokens per second for the 2B model on a single core, 33–39 tokens per second for the 4B with tensor parallelism, and 15 tokens per second for the 12B. Compiled model artifacts and Docker images have been made publicly available on Hugging Face and Docker Hub for others to use.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in