Model Size Calculator
Calculate the memory footprint of a machine learning model based on number of parameters and numeric precision. Plan GPU memory requirements for inference.
How to Use the Model Size Calculator
- Enter the number of model parameters in millions.
- Select the numeric precision (FP32, FP16, or INT8).
- Click Calculate to get model size and inference memory.
使用例
- •Planning GPU requirements for model deployment.
- •Comparing model sizes before purchasing hardware.
- •Evaluating quantization benefits for edge deployment.
- •Estimating costs for cloud-based model serving.
計算式
Model size (MB) = Parameters × bytes_per_param / 1,048,576. Inference memory ≈ model size × 1.5 (activations overhead).
よくある質問
What is FP16 vs INT8?
FP16 uses 2 bytes per parameter (half precision); INT8 uses 1 byte (quantized). Both reduce memory vs FP32's 4 bytes.
Why is inference memory larger than model size?
Activation tensors during forward pass require additional memory, typically 30–50% overhead.
How many parameters does GPT-2 have?
GPT-2 large has 774 million parameters, requiring about 1.5 GB in FP16.