[AUTOMATED] Model Memory Requirements
Model Memory Requirements
You will need about {'dtype': 'float16/bfloat16', 'Largest Layer or Residual Group': '500.0 MB', 'Total Size': '11.35 GB', 'Training using Adam': '45.41 GB'} VRAM to load this model for inference, and {'dtype': 'int4', 'Largest Layer or Residual Group': '125.0 MB', 'Total Size': '2.84 GB', 'Training using Adam': '11.35 GB'} 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 | 1000.0 MB | 22.7 GB | 90.82 GB |
float16/bfloat16 | 500.0 MB | 11.35 GB | 45.41 GB |
int8 | 250.0 MB | 5.68 GB | 22.7 GB |
int4 | 125.0 MB | 2.84 GB | 11.35 GB |