← All VM Families
G2
Accelerator OptimizedPurpose-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
| Category | Metric | Result | Source |
|---|---|---|---|
| gpu | GPU Count (L4) | 8 GPUs | GCP Documentation |
| gpu | GPU Memory (Total) | 192 GB GDDR6 | GCP Documentation |
| gpu | FP8 Performance | 1.98 PFLOPS | NVIDIA L4 Specs |
| gpu | Inference Latency (Llama 2 7B) | 23.8 ms/token | Community Benchmarks |
| gpu | Training Throughput (ResNet-50) | 2,400 images/s | Community Benchmarks |
| cpu | Geekbench 6 Single-Core | 1,540 points | Geekbench Browser |
| cpu | Geekbench 6 Multi-Core | 9,800 points | Geekbench Browser |
| network | Max Bandwidth | 100 Gbps | GCP Documentation |
Workload Performance
Workload Performance Summary
Best result per workload category (mixed units -- see table below for details)
| Workload | Metric | Machine Type | Result | Notes |
|---|---|---|---|---|
| ML Inference | Llama 2 7B Tokens/sec | g2-standard-8 | 42 tokens/s | Llama 2 7B, FP16, single L4 GPU, vLLM |
| ML Inference | ResNet-50 Images/sec | g2-standard-8 | 850 images/s | ResNet-50, batch size 64, FP16, single L4 GPU |
| ML Inference | Stable Diffusion Images/min | g2-standard-8 | 8.5 images/min | Stable Diffusion XL, 1024x1024, 30 steps, single L4 GPU |
| ML Training | GPT-2 Training Throughput | g2-standard-96 | 5,400 tokens/s | GPT-2 medium, 8x L4, DeepSpeed ZeRO-2, FP16 |
| ML Training | ResNet-50 Training Images/sec | g2-standard-96 | 2,400 images/s | ResNet-50, 8x L4, mixed precision, PyTorch DDP |
| Video Encoding | FFmpeg H.265 Encoding (NVENC) | g2-standard-8 | 240 fps | 1080p source, NVENC hardware encoding, single L4 GPU |
Pricing
On-demand pricing in us-central1. Spot and committed-use discounts shown for comparison.
| Machine Type | vCPUs | Memory | On-Demand/hr | Spot/hr | 1yr CUD/hr | 3yr CUD/hr |
|---|---|---|---|---|---|---|
| g2-standard-4 | 4 | 16 GB | $0.784 | $0.235 | $0.494 | $0.353 |
| g2-standard-8 | 8 | 32 GB | $0.918 | $0.275 | $0.578 | $0.413 |
| g2-standard-24 | 24 | 96 GB | $1.853 | $0.556 | $1.167 | $0.834 |
| g2-standard-96 | 96 | 384 GB | $10.416 | $3.125 | $6.562 | $4.687 |