huggingface-zerogpu
使用Gradio Spaces和Hugging Face Spaces ZeroGPU进行AI演示与GPU计算。当编写或审查使用`@spaces.GPU`的代码、为ZeroGPU Space配置`python_version`或`requirements.txt`,或处理ZeroGPU特有的代码约束时使用——基于pickle的进程隔离、跨工作进程边界的`gr.State`语义、不支持`torch.compile`(改用AoTI)、仅CUDA wheel构建(构建或运行时均无`nvcc`)、large与xlarge规格选择,以及动态时长可调用对象。只要用户提到ZeroGPU、`@spaces.GPU`或`spaces` Python包,或遇到ZeroGPU特有的代码错误(如跨工作进程边界的`PicklingError`、`illegal duration`或`flash-attn` wheel构建失败),务必使用此技能——即使用户未明确要求ZeroGPU编码指导。当代码中出现`import spaces`或`@spaces.GPU`时触发。
机器翻译查看英文原文
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 `requirements.txt` for a ZeroGPU Space, or handling ZeroGPU-specific code constraints — pickle-based process isolation, `gr.State` semantics across the worker boundary, no `torch.compile` (use AoTI instead), CUDA wheel-only builds (no `nvcc` at build or runtime), large vs xlarge sizing, and dynamic duration callables. Make sure to use this skill whenever the user mentions ZeroGPU, `@spaces.GPU`, or the `spaces` Python package, or hits ZeroGPU-specific code errors like `PicklingError` across the worker boundary, `illegal duration`, or `flash-attn` wheel-build failures — even when the user does not explicitly ask for ZeroGPU coding guidance. Trigger on `import spaces` or `@spaces.GPU` in code.
适用对象:软件开发与测试。自动收录 · 待核查。
在 Claude Code 中使用
该组合的专门教程待补充,尚未核实适配。
准备条件
- 本条仅收录原作者的技能元数据;请阅读完整说明,确认依赖、许可与使用条件。
选择已有说明的 AI 工具,或在页面加载后保存待办及提出教程请求。
查看原作者说明 ↗