
huggingface-zerogpu
AI demos and GPU compute with Gradio Spaces and Hugging Face Spaces ZeroGPU
by huggingfaceFree
Description
huggingface-zerogpu is an agent skill of rules and patterns for building ML demos on Hugging Face Spaces that use ZeroGPU hardware. It applies to Gradio SDK Spaces only, because Docker and static Spaces cannot run on ZeroGPU. The skill explains how to use the @spaces.GPU decorator, how to tune the duration value and why the default of 60 seconds can block short tasks, how quota errors arise, and how process isolation and the CUDA availability model work. It also covers concurrency safety, since handlers run in parallel by default. Reference notes explain cold starts and worker reuse, why warming up a model at module scope does not carry over to requests, and why returning CUDA tensors can hang. A further note covers installing CUDA-dependent packages such as flash-attn and pinning torch helpers. The skill points to the official ZeroGPU documentation for current hardware and tier details, which change over time. It is part of Hugging Face's skills repository and is added to a compatible agent with the skills command. For general Gradio coding, a separate huggingface-gradio skill is recommended.…
Highlights
- Rules for @spaces.GPU in Gradio Spaces
- Duration and quota tuning
- Concurrency and process isolation guidance
- Notes on CUDA builds such as flash-attn
Ratings & Reviews
No ratings yet
Be the first to rate huggingface-zerogpu.
People also visit
huggingface-zerogpu FAQ
What does this skill cover?
Writing and reviewing ZeroGPU code in Gradio Spaces, including the @spaces.GPU decorator, duration and quota, concurrency and CUDA setup.
Which Spaces does it apply to?
Gradio SDK Spaces. Docker and static Spaces cannot be scheduled on ZeroGPU.
Why does a short task get blocked?
The reference on quotas explains that the default duration of 60 seconds can block short tasks, and it shows how to choose a duration value.
Does it cover general Gradio coding?
No. Components, layouts and event listeners are in the separate huggingface-gradio skill.
How do I install it?
Run: npx skills add https://github.com/huggingface/skills --skill huggingface-zerogpu
What security audits has it passed?
Gen Agent Trust Hub, Socket and Snyk all passed.
What are the best huggingface-zerogpu alternatives?
Popular alternatives to huggingface-zerogpu include huggingface/hugging-face-jobs, tao-setup-nvidia-gpu-host and tao-run-platform. See all huggingface-zerogpu alternatives





