[AUTOMATED] Model Memory Requirements

#10
by model-sizer-bot - opened

Model Memory Requirements

You will need about {'dtype': 'float16/bfloat16', 'Largest Layer or Residual Group': '74.39 MB', 'Total Size': '237.75 MB', 'Training using Adam': '950.99 MB'} VRAM to load this model for inference, and {'dtype': 'int4', 'Largest Layer or Residual Group': '18.6 MB', 'Total Size': '59.44 MB', 'Training using Adam': '237.75 MB'} VRAM to train it using Adam.

These calculations were measured from the Model Memory Utility Space on the Hub.

The minimum recommended vRAM needed for this model assumes using Accelerate or device_map="auto" and is denoted by the size of the "largest layer".
When performing inference, expect to add up to an additional 20% to this, as found by EleutherAI. More tests will be performed in the future to get a more accurate benchmark for each model.

When training with Adam, you can expect roughly 4x the reported results to be used. (1x for the model, 1x for the gradients, and 2x for the optimizer).

Results:

dtype Largest Layer or Residual Group Total Size Training using Adam
float32 148.78 MB 475.49 MB 1.86 GB
float16/bfloat16 74.39 MB 237.75 MB 950.99 MB
int8 37.2 MB 118.87 MB 475.49 MB
int4 18.6 MB 59.44 MB 237.75 MB

Sign up or log in to comment