Hugging Face Spaces Launches ZeroGPU: Dynamic GPU Allocation for Enhanced AI Model Efficiency

2024-12-15

Hugging Face Spaces has introduced ZeroGPU, a shared infrastructure that dynamically allocates NVIDIA A100 GPUs to optimize GPU usage for AI models and demos. ZeroGPU offers free GPU access, multi-GPU support, and lowers the barrier to entry for deploying AI models. Users simply select ZeroGPU hardware when creating a Gradio Space and use the `@spaces.GPU` decorator for GPU-dependent functions. ZeroGPU is compatible with PyTorch and optimized for Hugging Face's transformers and diffusers libraries, but currently only works with the Gradio SDK. Personal accounts (PRO users) can create up to 10 ZeroGPU Spaces, while organization accounts (Enterprise Hub) can create up to 50.