When deploying large language models (LLMs) or other deep learning models in production, a critical planning step is estimating how many GPUs are needed to host the model. The model's parameters must fit in GPU memory along with runtime overhead for activations, KV cache, and framework buffers.
Write a function estimate_min_gpus that calculates the minimum number of GPUs required to deploy a model given:
The function should return a dictionary with three keys:
model_memory_gb: The memory required for model weights alone (rounded to 2 decimal places)total_memory_gb: The total memory required including overhead (rounded to 2 decimal places)min_gpus: The minimum number of GPUs needed (integer, rounded up since you cannot use a fraction of a GPU)