A DuckDB extension for in-database inference
Maintainer(s):
habedi
Installing and Loading
INSTALL infera FROM community;
LOAD infera;
Example
-- 0. Assuming the extension is already installed and loaded
-- 1. Load a simple linear model from a remote URL
select infera_load_model('linear_model',
'https://github.com/CogitatorTech/infera/raw/refs/heads/main/test/models/linear.onnx');
-- 2. Run a prediction using a very simple linear model
-- Model: y = 2*x1 - 1*x2 + 0.5*x3 + 0.25
select infera_predict('linear_model', 1.0, 2.0, 3.0);
-- Expected output: 1.75
-- 3. Unload the model when we're done with it
select infera_unload_model('linear_model');
-- 4. Check the Infera version
select infera_get_version();
About infera
This extension is experimental at the moment, so it is not recommended for production use. For more information, like API references and examples, visit the project's GitHub repository: https://github.com/CogitatorTech/infera
Added Functions
function_name | function_type | description | comment | examples |
---|---|---|---|---|
infera_clear_cache | scalar | NULL | NULL | |
infera_get_cache_info | scalar | NULL | NULL | |
infera_get_loaded_models | scalar | NULL | NULL | |
infera_get_model_info | scalar | NULL | NULL | |
infera_get_version | scalar | NULL | NULL | |
infera_is_model_loaded | scalar | NULL | NULL | |
infera_load_model | scalar | NULL | NULL | |
infera_predict | scalar | NULL | NULL | |
infera_predict_from_blob | scalar | NULL | NULL | |
infera_predict_multi | scalar | NULL | NULL | |
infera_predict_multi_list | scalar | NULL | NULL | |
infera_set_autoload_dir | scalar | NULL | NULL | |
infera_unload_model | scalar | NULL | NULL |