Skip to content
DuckDB community extension

anofox_tabfm

Zero-shot tabular machine learning inside DuckDB — classification, regression, synthetic-data generation and imputation with real tabular foundation models (Mitra, TabDPT, TabPFN v2/2.5/2.6/3/3.5, TabICL, Orion-BiX/MSP, TabFM, LimiX-2M, Causilo, Nori, EXAONE Tabular, Kumo-Tabular) on ONNX Runtime, no training loop

01 / SETUP

Install and load

Run these commands in a Haybarn SQL session. The extension is available from the community repository.

Haybarn 2.0.0 · SQL
INSTALL anofox_tabfm FROM community;
LOAD anofox_tabfm FROM community;

Using upstream DuckDB? Follow the maintainer’s installation instructions.

02 / QUERY

Usage example

Fetch a real tabular foundation model once (Mitra, Apache-2.0, ~300 MB,

SQL
-- Fetch a real tabular foundation model once (Mitra, Apache-2.0, ~300 MB,
-- no license gate). Cached under ~/.cache/anofox-tabfm and reused after.
INSTALL httpfs; LOAD httpfs;                       -- weights are fetched over HTTPS
CALL tabfm_download('classification', model := 'mitra');

-- Label a few rows; leave the ones you want scored as NULL. The model reads
-- the labelled rows as in-context examples and predicts the rest — no training.
CREATE TABLE iris AS SELECT * FROM VALUES
  (5.1, 3.5, 1.4, 0.2, 'setosa'),
  (4.9, 3.0, 1.4, 0.2, 'setosa'),
  (7.0, 3.2, 4.7, 1.4, 'versicolor'),
  (6.4, 3.2, 4.5, 1.5, 'versicolor'),
  (6.3, 3.3, 6.0, 2.5, 'virginica'),
  (5.8, 2.7, 5.1, 1.9, 'virginica'),
  (5.0, 3.6, 1.4, 0.2, NULL),                      -- predict me
  (6.5, 3.0, 5.8, 2.2, NULL)                       -- and me
  AS t(sepal_len, sepal_wid, petal_len, petal_wid, species);

SELECT petal_len, petal_wid, yhat AS predicted_species, yhat_score
FROM tabfm_classify('iris', 'species', model := 'mitra')
WHERE species IS NULL;

Provided by DataZooDE. Not yet verified on Haybarn 2.0.0.

Sample data & setup

About this extension

anofox_tabfm embeds real tabular foundation models — TabPFN-style in-context learners — into DuckDB, so tabular classification and regression become a single SQL statement. There is no training loop, no Python, and no MLOps: the model reads your labelled rows as context and predicts the rest.

Eleven models ship in the extension and are selected with model := (or a SET anofox_tabfm_default_model once per session). The catalog covers the entire top five of the TabArena v0.1.4 leaderboard.

Project overview from the community descriptor.

Documentation and resources

Project and build details
Repository
DataZooDE/anofox-tabfm
License
MIT
Maintainers
sipemu, jrosskopf
Written in
C++
Build source
ce58a780a42d
Build definition
Community descriptor