| |
| library(ggplot2) |
| library(ggrepel) |
|
|
| |
| years <- 2017:2025 |
|
|
| |
| gpu_data <- data.frame( |
| Year = years, |
| Category = "GPU", |
| |
| |
| |
| Name = c("Titan Xp", "Tesla V100", "Quadro RTX 8000", "Nvidia A100", |
| "Nvidia A100", "Nvidia H100", "Nvidia H100", "Nvidia H200", "Nvidia B200"), |
| Value = c(12, 32, 48, 80, 80, 80, 96, 141, 192) |
| ) |
|
|
| |
| model_data <- data.frame( |
| Year = years, |
| Category = "Model", |
| |
| |
| |
| Name = c("Transformer", "BERT-large", "GPT-2", "GPT-3", |
| "OPT", "PaLM", "GPT-4", "GPT-4o", "Grok 3 Ultra"), |
| Value = c(0.07, 0.34, 1.5, 175, 530, 540, 1000, 1800, 3000) |
| ) |
|
|
| |
| data <- rbind(gpu_data, model_data) |
| data$Category <- factor(data$Category, levels = c("GPU", "Model")) |
|
|
| |
| |
| data$Label <- ifelse(data$Category == "GPU", |
| paste0(data$Name, " (", data$Value, "GB)"), |
| paste0(data$Name, " (", data$Value, "B)")) |
|
|
| |
| p <- ggplot(data, aes(x = Year, y = Value, color = Category)) + |
| |
| geom_point(size = 3) + |
| |
| geom_line(aes(group = Category), linetype = "dashed") + |
| |
| geom_text_repel(aes(label = Label), size = 3, show.legend = FALSE) + |
| |
| |
| scale_y_log10( |
| name = "Model Size (Billion Parameters) / GPU Memory (GiB)", |
| breaks = scales::trans_breaks("log10", function(x) 10^x), |
| labels = scales::trans_format("log10", scales::math_format(10^.x)) |
| ) + |
| scale_x_continuous( |
| breaks = seq(2017, 2025, 1) |
| ) + |
| |
| scale_color_manual(values = c("GPU" = "#1b9e77", "Model" = "#d95f02")) + |
| labs(x = "Year", |
| y = "Size (GB for GPUs; Billions of Parameters for Models)" |
| |
| |
| |
| ) + |
| theme_bw() + |
| theme(plot.title = element_text(size = 14, face = "bold"), |
| plot.subtitle = element_text(size = 12), |
| axis.title.x = element_blank(), |
| legend.position = "bottom", |
| legend.title = element_blank() |
| ) |
|
|
| |
| print(p) |
|
|
| ggsave("pdfs/gpu-mem-lag.pdf", plot = p, width = 10, height = 6) |
|
|