Skip to main content

tabctx

The serving engine for tabular foundation models.
Fit a table once, keep it on the GPU, and answer every later prediction in a fraction of a second.

PyPI unit tests codecov Python ≥ 3.12 license

Quickstart · Coding agents · Live demo · Serving guide · How it works · Benchmarks


TabPFN and TabICL often beat gradient boosting with no training loop (our numbers): the training table is the prompt. Encoding that table is the expensive part, and it's the same work on every prediction. tabctx encodes each table once, keeps the result in a GPU cache shared by many tables and users, and serves predictions against it, behind one HTTP endpoint you run on your own GPUs.

Fit time grows with the training table, from 0.5 s at 100 rows to 103 s at 100,000 rows; predict time against the cached context stays near 0.3 s

Highlights

  • Fit once, predict many. A fitted table becomes a context, addressed by id. Every later predict against it skips the re-encode.
  • Many tables, one GPU. Contexts share a byte-budgeted cache. The coldest one is evicted (or spilled to disk and restored on next use), and a fit that would run the GPU out of memory is refused before it runs.
  • Two models, one endpoint. tabicl-v2 and tabpfn-3.5 behind GET /v1/models; pick one per request. Adding a model is one class.
  • Drop-in scikit-learn. TabctxClassifier and TabctxRegressor take DataFrames with text, dates and missing values as they are, and work with pipelines and cross_val_score.
  • Tools for coding agents. tabctx-mcp lets Claude Code, Codex and Gemini CLI fit, predict, explain and run what-ifs on a CSV.
  • Built to run in production. Multi-GPU placement, multi-replica routing on Ray Serve (or a single process without Ray), tenant isolation, and a container image. Validated on L4, A40 and A100 GPUs.

Quickstart

Run a server on your laptop (CPU works; it uses the GPU if there is one):

pip install "tabctx[standalone,tabicl,client]" pandas
TABCTX_BACKEND=tabicl python -m tabctx.serve        # http://127.0.0.1:8000

Then use it like any scikit-learn model:

from sklearn.datasets import fetch_openml
from sklearn.model_selection import train_test_split
from tabctx import TabctxClassifier
from tabctx.client import TabctxClient

X, y = fetch_openml("credit-g", version=1, as_frame=True, return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0)

clf = TabctxClassifier(model="tabicl-v2", client=TabctxClient("http://127.0.0.1:8000"))
clf.fit(X_train, y_train)          # encodes the table once, on the server
clf.score(X_test, y_test)          # 0.77, no training loop, no tuning
clf.predict_proba(X_test[:5])      # reuses the cached context: ~50 ms on a laptop

On a GPU server, use the image (TabICL and TabPFN included, weights downloaded on first use):

docker run --gpus all -p 8000:8000 -e TABCTX_BACKEND=tabicl ghcr.io/vectorinstitute/tabctx

Prefer plain HTTP? Every client is a thin wrapper over two calls:

curl localhost:8000/v1/tabctx/fit -F dataset_id=churn -F target=churned -F file=@train.csv
curl localhost:8000/v1/tabctx/predict -F dataset_id=churn -F file=@today.csv

The serving guide covers Ray Serve, several GPUs, uploads, tenants and every setting.

Coding agents

Coding agents can read a CSV, but they can't learn from it. tabctx-mcp gives them tabular foundation models as tools: inspect_table, evaluate (vs. gradient boosting), fit_model, predict, what_if and explain.

pip install "tabctx[mcp]"
export TABCTX_BASE_URL=http://127.0.0.1:8000   # your tabctx server
claude mcp add tabctx -- tabctx-mcp             # or codex, gemini, pi

Then ask: "Which of today's patients are most likely to be readmitted, and what would lower their risk?" In the demo, Claude Code, Codex and pi each answer it on 30,000 real hospital stays and are scored against what actually happened. More on agents →

Why tabctx

Model in your process Hosted API tabctx
Data stays on your machines ✅ ❌ ✅
Many tables cached at once, per tenant ❌ ✅ ✅
Refuses a fit before it runs out of GPU memory ❌ n/a ✅
Models from several labs behind one endpoint ❌ ❌ ✅
Open source, no per-call metering ✅ ❌ ✅
Newest API-only models ❌ ✅ ❌

A model in your process (TabPFNClassifier().fit(...)) caches one table inside one Python object. A hosted API handles the serving for you, on its servers. tabctx is the serving layer for when you want both: many users and tables, on GPUs you control.

Models

Model id Model Weights license
tabicl-v2 TabICLv2 (Inria) BSD-3-Clause: commercial use OK
tabpfn-3.5 TabPFN-3.5 (Prior Labs) Non-commercial; production use needs a license from Prior Labs

TabPFN weights download after you accept Prior Labs' terms (set TABPFN_TOKEN). tabctx itself is Apache 2.0; each model's weights keep their own license.

Learn more

Contributing

Issues and PRs are welcome. The unit tests need no GPU (uv run pytest tests/unit); see CONTRIBUTING.md. If tabctx is useful to you, a ⭐ helps others find it.

Built at the Vector Institute. Apache 2.0.

Metadata

Release files for tabctx 0.18.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tabctx 0.18.0
File Size Uploaded Provenance Actions
tabctx-0.18.0.tar.gz 1.3 MB With provenance Details for tabctx-0.18.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tabctx 0.18.0
File Interpreter ABI Platform Actions
tabctx-0.18.0-py3-none-any.whl Python 3 none any Details for tabctx-0.18.0-py3-none-any.whl

Total release size: 1.5 MB

Release files / tabctx-0.18.0.tar.gz

Download URL tabctx-0.18.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
0c9d9e0c316dc5f8b2a8a87f084aae9714a0423e43d7e364696cf34c3996dc44
BLAKE2b-256 checksum
How to use checksums
fc37f68bee7422a5f77fa714163edfca5bb0097fa0e6700034d37221c3102890
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / tabctx-0.18.0-py3-none-any.whl

Download URL tabctx-0.18.0-py3-none-any.whl
Size 201.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b17f8c8a19de155b8229adb634cb4a1cf6b479e34b2877b3289f38c4437d4297
BLAKE2b-256 checksum
How to use checksums
f689010452fd10514a3259cc885b3e4b0baa4f5c8a22fbb1ccaa1d97cbddfd7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for tabctx 0.18.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tabctx-0.18.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page