{"id":20324362,"url":"https://github.com/oniani/miniml","last_synced_at":"2026-06-29T05:31:56.583Z","repository":{"id":112156441,"uuid":"314540506","full_name":"oniani/miniml","owner":"oniani","description":"A minimal ML library with OpenCL GPU support","archived":false,"fork":false,"pushed_at":"2021-06-04T02:15:14.000Z","size":92,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-09T14:27:21.586Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oniani.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}},"created_at":"2020-11-20T11:56:17.000Z","updated_at":"2021-10-28T15:32:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"fe8ea9b6-cec6-4746-8d0d-d95f33b70727","html_url":"https://github.com/oniani/miniml","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oniani/miniml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oniani%2Fminiml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oniani%2Fminiml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oniani%2Fminiml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oniani%2Fminiml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oniani","download_url":"https://codeload.github.com/oniani/miniml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oniani%2Fminiml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34915001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-11-14T19:33:41.773Z","updated_at":"2026-06-29T05:31:56.564Z","avatar_url":"https://github.com/oniani.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"⚠\n\nThe project is under development. Some core features (e.g., GPU array\nbroadcasting) are yet to be implemented.\n\n# miniml\n\nA minimal ML library with OpenCL GPU support.\n\n## Perf\n\n| Category  | CPU   | GPU   | Perf Boost |\n| --------- | ----- | ----- | ---------- |\n| `rand`    | 0.747 | 0.002 | 37X        |\n| `uniform` | 0.820 | 0.002 | 41X        |\n| `normal`  | 1.829 | 0.002 | 91X        |\n\n## Features\n\n### Activation Functions\n\n- [x] ReLU\n- [x] LeakyReLU\n- [x] Tanh\n- [x] Sigmoid\n- [ ] Softmax\n- [ ] LogSoftmax\n\n### Tensor\n\nMost important operations are implemented. They work on both CPU and GPU.\nThe API is very simple:\n\n```python\nimport miniml.tensor as T\n\n# Initialize a CPU tensor\nt1 = T.Tensor([1, 2, 3])\n\n# Initialize a GPU tensor\nt2 = T.Tensor([1, 2, 3], gpu=True)\n\n# Load the GPU tensor onto the CPU\nt2 = t2.to_cpu()\n\n# Load it back onto the GPU\nt2 = t2.to_gpu()\n```\n\nCPU tensors use NumPy operations and the GPU tensors use PyOpenCL\noperations.\n\n## Tests\n\n```console\npython3 -m pytest -sv\n```\n\n---\n\nTODO:\n\n- Implement a reverse-mode automatic differentiation\n- Implement network layers\n- Implement loss function(s?)\n- Implement Adam optimizer\n- More tests (maybe use a monadic test-generator like Hypothesis?)\n\n## References\n\n- [NumPy](https://numpy.org/)\n- [OpenCL](https://www.khronos.org/opencl/)\n- [PyOpenCL](https://documen.tician.de/pyopencl/index.html)\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foniani%2Fminiml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foniani%2Fminiml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foniani%2Fminiml/lists"}