Build pure frontend ONNX WebGPU tools for large browser-hosted models. Use when implementing or documenting ONNX Runtime Web, WebGPU, OPFS model caching, HTTP Range downloads, Hugging Face model loading, progress UI, and browser-only inference workflows.
설치
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Build pure frontend ONNX WebGPU tools for large browser-hosted models. Use when implementing or documenting ONNX Runtime Web, WebGPU, OPFS model caching, HTTP Range downloads, Hugging Face model loading, progress UI, and browser-only inference workflows.
Frontend ONNX WebGPU
使用時機
當任務需要在純瀏覽器環境建置、移植、除錯或文件化大型 ONNX 模型工具時,使用本 skill。
適用情境:
建置純前端 ONNX 推理工具。
使用 ONNX Runtime Web 與 WebGPU 執行模型。
從 Hugging Face 或其他遠端來源下載大型模型。
需要 OPFS、Cache API 或 HTTP Range Request 處理大型檔案快取。
需要設計模型下載、快取、session 建立與推理狀態 UI。
需要讓工具不依賴後端推理服務。
目標
目標是讓大型 ONNX 模型能在純瀏覽器環境中穩定下載、快取、載入與執行。
技術面
技術
簡單描述
純前端 Web App
所有下載、快取、推理、輸出都在瀏覽器內完成,不依賴後端推理服務。
ONNX Runtime Web
在瀏覽器中執行 ONNX 模型,統一管理模型 session 與 tensor 推理。
WebGPU
使用 GPU 加速模型推理,作為主要運算後端。
WASM fallback
當部分運算無法走 WebGPU 時,保留 WASM 作為備援後端。
Hugging Face 模型來源
從 Hugging Face repo 取得模型與相關資源,方便版本管理與公開部署。
OPFS
使用瀏覽器 Origin Private File System 快取大型模型檔,降低重複下載與記憶體壓力。