{"_id":"@huggingface/kernels","name":"@huggingface/kernels","dist-tags":{"preview":"0.0.1-preview.1","latest":"0.0.1-preview.1"},"versions":{"0.0.1-preview.1":{"name":"@huggingface/kernels","version":"0.0.1-preview.1","description":"Load and run WebGPU compute kernels from the Hugging Face Hub.","license":"Apache-2.0","type":"module","main":"./index.js","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"}},"sideEffects":false,"keywords":["webgpu","kernels","gpu","inference","onnx","huggingface"],"homepage":"https://huggingface.co/webgpu-kernels","publishConfig":{"access":"public","tag":"preview"},"_id":"@huggingface/kernels@0.0.1-preview.1","gitHead":"c928d21e6cc1310861cba3bafb75f5f679ecf5f3","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Yj37YHjW/iEjLleopKoKOEOKhsmPn9frIQAW1THc/VmPDG3GPYXc7h4w956qiNmOh2UHgYXuF1/Bpk9OIdf0fg==","shasum":"360cb612745c76eea5331701fe2193ef448b4b76","tarball":"https://registry.npmjs.org/@huggingface/kernels/-/kernels-0.0.1-preview.1.tgz","fileCount":6,"unpackedSize":259359,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCM1OePawA8lMM9pfgvHNdNy1cjjivOEtUdZd7EM2VTUAIgXeM5RbHMMJL4S43vVDfhqBrIZ5QKBmftrD+rl71k/lM="}]},"_npmUser":{"name":"xenova","email":"admin@xenova.com"},"directories":{},"maintainers":[{"name":"julien-c","email":"chaumond@gmail.com"},{"name":"pierric","email":"pierric.gh@gmail.com"},{"name":"coyotte508","email":"coyotte508@protonmail.com"},{"name":"xenova","email":"admin@xenova.com"},{"name":"gary149","email":"v@huggingface.co"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/kernels_0.0.1-preview.1_1788272743486_0.22032383562042934"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-01T14:25:43.172Z","0.0.1-preview.1":"2026-09-01T14:25:43.698Z","modified":"2026-09-01T14:25:43.969Z"},"maintainers":[{"name":"julien-c","email":"chaumond@gmail.com"},{"name":"pierric","email":"pierric.gh@gmail.com"},{"name":"coyotte508","email":"coyotte508@protonmail.com"},{"name":"xenova","email":"admin@xenova.com"},{"name":"gary149","email":"v@huggingface.co"}],"description":"Load and run WebGPU compute kernels from the Hugging Face Hub.","homepage":"https://huggingface.co/webgpu-kernels","keywords":["webgpu","kernels","gpu","inference","onnx","huggingface"],"license":"Apache-2.0","readme":"# @huggingface/kernels\n\nLoad and run WebGPU compute kernels from the Hugging Face Hub.\n\n> **Early preview** — the API may still change and kernel coverage is growing.\n> Updates will follow regularly.\n\n## Install\n\n```sh\nnpm install @huggingface/kernels@preview\n```\n\n## Usage\n\n```js\nimport { getKernel } from \"@huggingface/kernels\";\n\nconst relu = await getKernel(\"webgpu-kernels/ai.onnx.Relu\", { version: 1 });\nconst { y } = await relu({ x: { data: new Float32Array(100), shape: [10, 10] } });\nconsole.log(y.data, y.shape, y.dtype);\n```\n\nEvery load names what it wants: `version: 1` follows the repository's `v1` branch,\nwhich moves as fixes land. Pass a 40-character commit `revision` instead to pin bytes\nthat can never change. Each kernel's own README shows the call for that kernel.\n\nInputs take the natural typed array — `Float32Array`, `Uint8Array`, `Float16Array`\nand the rest are widened to their WebGPU storage form for you. Results come back the\nsame way: float16 as a `Float16Array` where the browser provides one, otherwise as\nraw binary16 words in a `Uint16Array`. Pass\n`{ output: \"gpu\" }` to keep results on the device and feed them straight into the\nnext call; you own those and release them with `destroy()`.\n\nKernels load from the [`webgpu-kernels`](https://huggingface.co/webgpu-kernels)\norganization by default. A kernel is code that runs on your GPU, so loading one from\nanother publisher is opt-in — pass `{ trustRemoteCode: true }` if you trust them.\n\nRuns in the browser, and needs WebGPU (`navigator.gpu`).\n\n## License\n\nApache-2.0. Bundled third-party code is listed in `THIRD-PARTY-NOTICES.md`.\n","readmeFilename":"README.md","_rev":"1-c8185ec4b1a64e4bd677fa9f00c7930e"}