Skip to content

Commit

Permalink
Update auto_device.R
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexChristensen committed Jan 29, 2024
1 parent f6d7a7b commit 2e1f5d0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions R/auto_device.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ auto_device <- function(device, transformer)

}

#' @noRd
# GPU memory calculate
# Based on https://www.substratus.ai/blog/calculating-gpu-memory-for-llm
# Updated 28.01.2024
calculate_gpu_memory <- function(parameters, bits = 32)
{
return(((parameters * 4) / (32 / bits)) * 1.2)
}

#' @noRd
# Get GPU memory
# Updated 28.01.2024
Expand Down

0 comments on commit 2e1f5d0

Please sign in to comment.