Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

AWS g6 vs g5g for Gemma Serving: What the 3.7× Result Shows

One pure-JAX Gemma serving test measured about 3.7× higher decode throughput on AWS g6 than g5g. The result is workload-specific and says nothing by itself about price per token.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In one reported test serving google/gemma-4-E2B-it with a hand-written pure-JAX implementation, an AWS g6.2xlarge delivered 48.4 decode tokens per second, compared with 12.9 on a g5g.2xlarge—about 3.7 times the measured decode throughput. That is a result for this model, code and configuration, not a general speed guarantee for other models or serving stacks.

What the benchmark compared

The test, published by xbill for AWS Community Builders on August 31, 2026, used spot instances and the same byte-identical payload on both machines. It served google/gemma-4-E2B-it through a hand-written pure-JAX port, without PyTorch, vLLM or torch_xla. The build was 51bc52c9e2e9, the configuration was ple4 + int8_lm_head, and each instance used tpu_jax_weight_bytes of 6,155,450,950. The benchmark report gives the setup and measurements.

As an Amazon Associate I earn from qualifying purchases.

Instance Host and GPU reported Decode gauge throughput
g5g.2xlarge Graviton2, aarch64; NVIDIA T4G, Turing, SM 7.5 12.9–13.0 tokens/s across listed prompt sweeps
g6.2xlarge x86_64; NVIDIA L4, Ada, SM 8.9; run in us-east-1d 48.3–48.5 tokens/s across listed prompt sweeps

The headline calculation uses 48.4 divided by 12.9, or approximately 3.7. The author describes it as “3.7x on decode, for the same code and the same weights.” Identical payload and configuration make the comparison informative, but they do not make it a GPU-only experiment: the host architecture and base image differed as well.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Decode speed is not end-to-end speed

The decode gauge isolates token generation throughput; the end-to-end rates in the report were lower and declined as input prompts grew. The report lists these measurements:

Input prompt length g5g end-to-end rate g6 end-to-end rate
41 tokens 12.43 tokens/s 46.23 tokens/s
521 tokens 11.28 tokens/s 42.87 tokens/s
2,057 tokens 8.22 tokens/s 34.57 tokens/s
3,593 tokens 27.55 tokens/s

The author attributes the end-to-end decline to prefill—the work of processing the input prompt—rather than to a comparable drop in the relatively stable decode gauge. The 3.7× headline therefore should not be read as an end-to-end rate for every prompt length.

Why the author says g5g lagged

For this serving implementation, the author’s profiler analysis attributed 87% of g5g decode to dtype conversion and an fp32 path, versus 0% on g6. The report also put g5g at 26% of its memory-bandwidth roofline and g6 at roughly 100%. These are the author’s interpretations of this profile, not universal characteristics of every workload on those instance families.

Rank #2
ST-JY PCIe 4.0 x4 Oculink SFF-8611 4i to SFF-8611 4i High-Speed Data Cable, 64Gbps Bandwidth for AI GPU, Servers, Data Center, External Storage/Graphics Expansion (80cm)
  • Supports PCIe 4.0 protocol, delivering a total bandwidth of up to 64 Gbps (~8 GB/s). Unleashes the full potential of high-end GPUs (like NVIDIA A100, H100, RTX 4090), NVMe SSD arrays, and other PCIe add-in cards, ideal for AI training, scientific computing, and high-speed storage.
  • Features standard Oculink SFF-8611 4i (4-lane) interfaces designed for servers and industrial use. Compatible with server motherboards , GPU expansion enclosures, storage jbod boxes, and PCIe riser boards .
  • Engineered with high-quality coaxial cores and dual-layer shielding (foil + braiding) to effectively resist Electromagnetic Interference (EMI). Ensures exceptional signal integrity and stable data transfer. The 80cm length is optimized for flexible routing without signal degradation.
  • No drivers required for most systems. Recognized instantly upon connection for an out-of-the-box experience that simplifies your hardware expansion process. Get your High-Performance Computing (HPC) or workstation up and running in minutes.

Tensor Core utilization was reported as zero on both systems, which the author said was unexplained. That matters when interpreting the result: the observed gap was not accompanied by reported Tensor Core use on either side, and the profiler explanation is specific to the tested code path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How strong is the evidence?

The report describes one run per instance, with three repeats per prompt-sweep cell and medians. The g5g profile was reproduced on a second instance; the g6 profile was measured once. This is useful benchmark evidence, but limited replication and multiple platform differences mean it does not conclusively isolate the GPU as the sole cause or establish expected performance elsewhere.

The report also says a 4,105-token prompt served on g5g with MAX_MODEL_LEN=4096, while a 5,120-token prompt failed during a prefill transient. Treat this as a behavior of that test setup, not a platform-wide context limit.

What the result does—and does not—tell you about cost

The benchmark author explicitly did not measure or claim instance price or price per token. Higher measured throughput alone cannot establish which option is cheaper for a deployment: that requires current prices and a comparable workload, along with latency and throughput measurements.

A separate AWS SageMaker benchmark illustrates a broader comparison approach by holding model, serving container and workload consistent across its tested configurations and reporting throughput, latency and cost per output token for its own workloads. Those results concern different tests and do not supply a cost figure for this g5g-versus-g6 run. AWS’s SageMaker benchmark is useful as an example of the additional dimensions to measure, not as a direct price comparison here.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to apply the comparison to a deployment

Use the 3.7× result as a reason to benchmark your own workload, not as a capacity-planning multiplier. For a fair decision, keep the model, weights, serving code, precision, prompt and output lengths, concurrency and measurement method consistent. Record both decode and end-to-end throughput, plus latency and current regional instance pricing; verify that the required instance type is available and that your account has the necessary quota.

AWS maintains the current EC2 accelerated-computing instance specifications. Check live regional availability, quotas and prices before deploying: the benchmark’s spot capacity and reported g6 location do not establish what will be available or cost-effective in another region or at another time.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.