{"id":29261427,"url":"https://github.com/huggingface/kernels","last_synced_at":"2026-03-04T12:01:19.999Z","repository":{"id":275697915,"uuid":"896126443","full_name":"huggingface/kernels","owner":"huggingface","description":"Load compute kernels from the Hub","archived":false,"fork":false,"pushed_at":"2026-02-25T05:04:53.000Z","size":2035,"stargazers_count":445,"open_issues_count":11,"forks_count":44,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-02-25T10:00:15.480Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/huggingface.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-29T15:46:13.000Z","updated_at":"2026-02-25T03:57:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"8d861cf3-0da1-428b-84da-868bdb4aa066","html_url":"https://github.com/huggingface/kernels","commit_stats":null,"previous_names":["huggingface/hf-kernels","huggingface/kernels"],"tags_count":44,"template":false,"template_full_name":null,"purl":"pkg:github/huggingface/kernels","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huggingface%2Fkernels","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huggingface%2Fkernels/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huggingface%2Fkernels/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huggingface%2Fkernels/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huggingface","download_url":"https://codeload.github.com/huggingface/kernels/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huggingface%2Fkernels/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30079565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T11:57:42.557Z","status":"ssl_error","status_checked_at":"2026-03-04T11:56:10.793Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-04T09:00:45.578Z","updated_at":"2026-03-04T12:01:19.991Z","avatar_url":"https://github.com/huggingface.png","language":"Python","funding_links":[],"categories":["General"],"sub_categories":[],"readme":"# kernels\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/4b5175f3-1d60-455b-8664-43b2495ee1c3\" width=\"450\" height=\"450\" alt=\"kernel-builder logo\"\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pypi.org/project/kernels\"\u003e\u003cimg alt=\"PyPI - Version\" src=\"https://img.shields.io/pypi/v/kernels\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/huggingface/kernels/tags\"\u003e\u003cimg alt=\"GitHub tag\" src=\"https://img.shields.io/github/v/tag/huggingface/kernels\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/huggingface/kernels/actions/workflows/test_kernels.yaml\"\u003e\u003cimg alt=\"Test kernels\" src=\"https://img.shields.io/github/actions/workflow/status/huggingface/kernels/test_kernels.yaml?label=test\"\u003e\u003c/a\u003e\n  \n\u003c/p\u003e\n\u003c/div\u003e\n\u003chr/\u003e\n\nThe Kernel Hub allows Python libraries and applications to load compute\nkernels directly from the [Hub](https://hf.co/). To support this kind\nof dynamic loading, Hub kernels differ from traditional Python kernel\npackages in that they are made to be:\n\n- Portable: a kernel can be loaded from paths outside `PYTHONPATH`.\n- Unique: multiple versions of the same kernel can be loaded in the\n  same Python process.\n- Compatible: kernels must support all recent versions of Python and\n  the different PyTorch build configurations (various CUDA versions\n  and C++ ABIs). Furthermore, older C library versions must be supported.\n\n## Components\n\n- You can load kernels from the Hub using the [`kernels`](kernels/) Python package.\n- If you are a kernel author, you can build your kernels with [kernel-builder](builder/).\n- Hugging Face maintains a set of kernels in [kernels-community](https://huggingface.co/kernels-community).\n\n## 🚀 Quick Start\n\nInstall the `kernels` Python package with `pip` (requires `torch\u003e=2.5` and CUDA):\n\n```bash\npip install kernels\n```\n\nHere is how you would use the [activation](https://huggingface.co/kernels-community/activation) kernels from the Hugging Face Hub:\n\n```python\nimport torch\n\nfrom kernels import get_kernel\n\n# Download optimized kernels from the Hugging Face hub\nactivation = get_kernel(\"kernels-community/activation\", version=1)\n\n# Random tensor\nx = torch.randn((10, 10), dtype=torch.float16, device=\"cuda\")\n\n# Run the kernel\ny = torch.empty_like(x)\nactivation.gelu_fast(y, x)\n\nprint(y)\n```\n\nYou can [search for kernels](https://huggingface.co/models?other=kernels) on\nthe Hub.\n\n## 📚 Documentation\n\nRead the [documentation of kernels and kernel-builder](https://huggingface.co/docs/kernels/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuggingface%2Fkernels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuggingface%2Fkernels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuggingface%2Fkernels/lists"}