{"id":43667332,"url":"https://github.com/CogitatorTech/infera","last_synced_at":"2026-02-06T15:01:38.117Z","repository":{"id":317088788,"uuid":"1064530227","full_name":"CogitatorTech/infera","owner":"CogitatorTech","description":"A DuckDB extension for in-database inference","archived":false,"fork":false,"pushed_at":"2025-12-10T11:09:58.000Z","size":121,"stargazers_count":103,"open_issues_count":5,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-12-10T15:38:19.111Z","etag":null,"topics":["duckdb","duckdb-extension","inference","machine-learning","onnx","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/CogitatorTech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["habedi"]}},"created_at":"2025-09-26T07:04:17.000Z","updated_at":"2025-12-02T17:14:49.000Z","dependencies_parsed_at":"2025-09-28T20:25:01.868Z","dependency_job_id":"81d06acd-4ccb-4887-b69f-d63e8da3f4e0","html_url":"https://github.com/CogitatorTech/infera","commit_stats":null,"previous_names":["cogitatortech/infera"],"tags_count":2,"template":false,"template_full_name":"habedi/template-rust-project","purl":"pkg:github/CogitatorTech/infera","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CogitatorTech%2Finfera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CogitatorTech%2Finfera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CogitatorTech%2Finfera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CogitatorTech%2Finfera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CogitatorTech","download_url":"https://codeload.github.com/CogitatorTech/infera/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CogitatorTech%2Finfera/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29165673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T14:37:12.680Z","status":"ssl_error","status_checked_at":"2026-02-06T14:36:22.973Z","response_time":59,"last_error":"SSL_read: 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":["duckdb","duckdb-extension","inference","machine-learning","onnx","rust"],"created_at":"2026-02-04T23:00:31.224Z","updated_at":"2026-02-06T15:01:38.112Z","avatar_url":"https://github.com/CogitatorTech.png","language":"Rust","funding_links":["https://github.com/sponsors/habedi"],"categories":["Extensions"],"sub_categories":["[Community Extensions](https://duckdb.org/community_extensions/)"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003cimg alt=\"Infera Logo\" src=\"logo.svg\" height=\"25%\" width=\"25%\"\u003e\n  \u003c/picture\u003e\n\u003cbr\u003e\n\n\u003ch2\u003eInfera\u003c/h2\u003e\n\n[![Tests](https://img.shields.io/github/actions/workflow/status/CogitatorTech/infera/tests.yml?label=tests\u0026style=flat\u0026labelColor=282c34\u0026logo=github)](https://github.com/CogitatorTech/infera/actions/workflows/tests.yml)\n[![Code Quality](https://img.shields.io/codefactor/grade/github/CogitatorTech/infera?label=quality\u0026style=flat\u0026labelColor=282c34\u0026logo=codefactor)](https://www.codefactor.io/repository/github/CogitatorTech/infera)\n[![Examples](https://img.shields.io/badge/examples-view-green?style=flat\u0026labelColor=282c34\u0026logo=github)](https://github.com/CogitatorTech/infera/tree/main/docs/examples)\n[![Docs](https://img.shields.io/badge/docs-view-blue?style=flat\u0026labelColor=282c34\u0026logo=read-the-docs)](https://github.com/CogitatorTech/infera/tree/main/docs)\n[![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-007ec6?style=flat\u0026labelColor=282c34\u0026logo=open-source-initiative)](https://github.com/CogitatorTech/infera)\n\nIn-Database Machine Learning for DuckDB\n\n\u003c/div\u003e\n\n---\n\nInfera is a DuckDB extension that allows you to use machine learning (ML) models directly in SQL queries to perform\ninference on data stored in DuckDB tables.\nIt is developed in Rust and uses [Tract](https://github.com/snipsco/tract) as the backend inference engine.\nInfera supports loading and running models in [ONNX](https://onnx.ai/) format.\nCheck out the [ONNX Model Zoo](https://huggingface.co/onnxmodelzoo) repository on Hugging Face for a large\ncollection of ready-to-use models that can be used with Infera.\n\n### Motivation\n\nIn a conventional data science workflow, when data is stored in a database, it is not typically possible to use ML\nmodels directly on the data.\nUsers need to move the data out of the database first (for example, export it to a CSV file) and load the data into a\nPython or R environment, run the model there, and then import the results back into the database.\nThis process is time-consuming and inefficient.\nInfera aims to solve this problem by letting users run ML models directly in SQL queries inside the database.\nIt simplifies the workflow and speeds up the process for users, and eliminates the need for moving data around.\n\n### Features\n\n- Adds ML inference as a first-class citizen in SQL queries.\n- Supports loading and using local as well as remote models.\n- Supports using ML models in ONNX format with a simple and flexible API.\n- Supports performing inference on table columns or raw tensor data.\n- Supports both single-value and multi-value model outputs.\n- Supports autoloading all models from a specified directory.\n- Thread-safe, fast, and memory-efficient.\n\nSee the [ROADMAP.md](ROADMAP.md) for the list of implemented and planned features.\n\n\u003e [!IMPORTANT]\n\u003e Infera is in early development, so bugs and breaking changes are expected.\n\u003e Please use the [issues page](https://github.com/CogitatorTech/infera/issues) to report bugs or request features.\n\n---\n\n### Quickstart\n\n#### Install from Community Extensions Repository\n\nYou can install and load Infera from\nthe [DuckDB community extensions](https://duckdb.org/community_extensions/extensions/infera) repository by running the\nfollowing SQL commands in the DuckDB shell:\n\n```sql\ninstall infera from community;\nload infera;\n```\n\n#### Build from Source\n\nAlternatively, you can build Infera from source and use it by following these steps:\n\n1. Clone the repository and build the Infera extension from source:\n\n```bash\ngit clone --recursive https://github.com/CogitatorTech/infera.git\ncd infera\n\n# This might take a while to run\nmake release\n```\n\n2. Start DuckDB shell (with Infera statically linked to it):\n\n```bash\n./build/release/duckdb\n```\n\n\u003e [!NOTE]\n\u003e After building from source, the Infera binary will be `build/release/extension/infera/infera.duckdb_extension`.\n\u003e You can load it using the `load 'build/release/extension/infera/infera.duckdb_extension';` in the DuckDB shell.\n\u003e Note that the extension binary will only work with the DuckDB version that it was built against.\n\u003e You can download the pre-built binaries from the [releases page](https://github.com/CogitatorTech/infera/releases) for\n\u003e your platform.\n\n\n#### Trying Infera\n\n```sql\n-- 0. Install and load Infera \n-- Skip this step if you built from source and ran `./build/release/duckdb`\ninstall infera from community;\nload infera;\n\n-- 1. Load a simple linear model from a remote URL\nselect infera_load_model('linear_model',\n                         'https://github.com/CogitatorTech/infera/raw/refs/heads/main/test/models/linear.onnx');\n\n-- 2. Run a prediction using a very simple linear model\n-- Model: y = 2*x1 - 1*x2 + 0.5*x3 + 0.25\nselect infera_predict('linear_model', 1.0, 2.0, 3.0);\n-- Expected output: 1.75\n\n-- 3. Unload the model when we're done with it\nselect infera_unload_model('linear_model');\n\n-- 4. Check the Infera version\nselect infera_get_version();\n```\n\n[![Simple Demo 1](https://asciinema.org/a/745806.svg)](https://asciinema.org/a/745806)\n\n---\n\n### Documentation\n\nCheck out the [docs](docs/README.md) directory for the API documentation, how to build Infera from source, and more.\n\n#### Examples\n\nCheck out the [examples](docs/examples) directory for SQL scripts that show how to use Infera.\n\n---\n\n### Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to make a contribution.\n\n### License\n\nInfera is available under either of the following licenses:\n\n* MIT License ([LICENSE-MIT](LICENSE-MIT))\n* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE))\n\n### Acknowledgements\n\n* The logo is from [here](https://www.svgrepo.com/svg/499306/overmind) with some modifications.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCogitatorTech%2Finfera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCogitatorTech%2Finfera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCogitatorTech%2Finfera/lists"}