MACHINE LEARNING / huggingface
Hugging Face ZeroGPU
Design Gradio GPU handlers around process isolation, serialized state, dynamic duration and concurrent requests.
“AI demos and GPU compute with Gradio Spaces and Hugging Face Spaces ZeroGPU. Use when writing or reviewing code that uses `@spaces.GPU`, configuring `python_version` or”
01 / THE REASONING
Why this made the selection.
- It constrains Gradio Spaces on ZeroGPU: the real GPU exists only inside spaces.GPU, and CUDA tensors must not cross that boundary.
- The image build has no nvcc, and the spaces package must not be pinned in requirements.txt.
- Explains the separation between model registration and actual GPU computation.
- Includes concrete concurrency and unique-output-file patterns to prevent cross-user collisions.
02 / THE REVIEW RECORD
What we actually inspected.
Source review has boundaries.
A clear record is more useful than a “safe” badge.
Material inspected
- skills/huggingface-zerogpu/SKILL.md
- skills/huggingface-zerogpu/references/concurrency.md
- README.md
- LICENSE
Our findings
- The skill applies only to Gradio SDK Spaces; Docker and Static Spaces cannot schedule onto ZeroGPU.
- Actual CUDA work belongs inside @spaces.GPU, and returned tensors must be moved to CPU first.
- The ZeroGPU build image has no nvcc, so a CUDA extension cannot be compiled during the Space build.
- The skill says not to pin spaces in requirements.txt and not to hardcode device cuda.
- Concurrency reference uses unique temporary paths and distinguishes read-only shared models from mutable request state.
- Definition explains pickle round-trips for gr.State and why CUDA results must return to CPU before crossing the boundary.
Not established by this review
- The resource was not executed and its tools were not called.
- No skill execution, authenticated service operation, or outcome benchmark was performed.
The review applies to the material and revision named here. A newer upstream release can change its behavior.
03 / PUT IT TO WORK
Add a skill to your workflow.
DOCUMENTED COMMAND
npx skills add huggingface/skills/skills/huggingface-zerogpu Run in your terminal to choose your AI tools, project or global scope, and installation method. This short command follows the current upstream version; the review covers the revision shown above.
Optional: install the reviewed revision
Keeps the original source and installer version where recorded, while leaving your AI tools and installation scope for you to choose.
npx skills add https://github.com/huggingface/skills/tree/c3ff942be3e07116b475253f0a8fc4f54682c1a8/skills/huggingface-zerogpu - Install the pinned skill directory interactively, retaining its bundled references and scripts.
- Read the concurrency reference alongside the definition and inspect the Space SDK/dependency configuration.
- Keep GPU work inside decorated functions, return CPU-compatible data and test concurrent requests with realistic duration settings.
Before you start
- Gradio Space eligible for ZeroGPU
- spaces package and compatible ML dependencies
04 / FOLLOW THE EVIDENCE
The source trail.
Our notes are separate from the original resource.
Check upstream before adopting a new version.
- Pinned skill definition ↗Checked
https://github.com/huggingface/skills/blob/c3ff942be3e07116b475253f0a8fc4f54682c1a8/skills/huggingface-zerogpu/SKILL.md
Supports: summary, whySelected, bestFor, limitations, install, access, review
https://github.com/huggingface/skills/blob/c3ff942be3e07116b475253f0a8fc4f54682c1a8/README.md
Supports: install
- Apache-2.0 licence ↗Checked
https://github.com/huggingface/skills/blob/c3ff942be3e07116b475253f0a8fc4f54682c1a8/LICENSE
Supports: license
https://github.com/huggingface/skills/blob/c3ff942be3e07116b475253f0a8fc4f54682c1a8/skills/huggingface-zerogpu/references/concurrency.md
Supports: review, limitations, access, install