← All VM Families

G2

Accelerator Optimized

Purpose-built for machine learning training, inference, and GPU-accelerated workloads. Powered by NVIDIA GPUs with high-bandwidth interconnects.

Specifications

vCPUs

4-96

Memory

16-384 GB

Network

Up to 100 Gbps

Synthetic Benchmarks

CategoryMetricResultSource
gpuGPU Count (L4)8 GPUsGCP Documentation
gpuGPU Memory (Total)192 GB GDDR6GCP Documentation
gpuFP8 Performance1.98 PFLOPSNVIDIA L4 Specs
gpuInference Latency (Llama 2 7B)23.8 ms/tokenCommunity Benchmarks
gpuTraining Throughput (ResNet-50)2,400 images/sCommunity Benchmarks
cpuGeekbench 6 Single-Core1,540 pointsGeekbench Browser
cpuGeekbench 6 Multi-Core9,800 pointsGeekbench Browser
networkMax Bandwidth100 GbpsGCP Documentation

Workload Performance

Workload Performance Summary

Best result per workload category (mixed units -- see table below for details)

WorkloadMetricMachine TypeResultNotes
ML InferenceLlama 2 7B Tokens/secg2-standard-842 tokens/sLlama 2 7B, FP16, single L4 GPU, vLLM
ML InferenceResNet-50 Images/secg2-standard-8850 images/sResNet-50, batch size 64, FP16, single L4 GPU
ML InferenceStable Diffusion Images/ming2-standard-88.5 images/minStable Diffusion XL, 1024x1024, 30 steps, single L4 GPU
ML TrainingGPT-2 Training Throughputg2-standard-965,400 tokens/sGPT-2 medium, 8x L4, DeepSpeed ZeRO-2, FP16
ML TrainingResNet-50 Training Images/secg2-standard-962,400 images/sResNet-50, 8x L4, mixed precision, PyTorch DDP
Video EncodingFFmpeg H.265 Encoding (NVENC)g2-standard-8240 fps1080p source, NVENC hardware encoding, single L4 GPU

Pricing

On-demand pricing in us-central1. Spot and committed-use discounts shown for comparison.

Machine TypevCPUsMemoryOn-Demand/hrSpot/hr1yr CUD/hr3yr CUD/hr
g2-standard-4416 GB$0.784$0.235$0.494$0.353
g2-standard-8832 GB$0.918$0.275$0.578$0.413
g2-standard-242496 GB$1.853$0.556$1.167$0.834
g2-standard-9696384 GB$10.416$3.125$6.562$4.687

Other Accelerator Optimized Series