Metadata-Version: 2.4
Name: predictlm
Version: 11.1.0
Summary: Compact distilled tabular foundation model for in-context regression and classification.
Author: ZeroOne Research
License: Apache-2.0
Project-URL: Homepage, https://huggingface.co/zerooneresearch/predictlm-mini-13m
Project-URL: Repository, https://github.com/zerooneresearch/predictlm-v11
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=2.0
Requires-Dist: numpy>=1.24
Requires-Dist: scikit-learn>=1.2
Provides-Extra: hub
Requires-Dist: huggingface_hub>=0.20; extra == "hub"
Dynamic: license-file

# predictlm

A small, calibrated **tabular foundation model** for in-context regression and classification. Two open-weight checkpoints — **Mini** (13M) and **Base** (26M) — both Apache-2.0. Headline: **0.751 classification accuracy / 0.609 regression R²** on a locked 25-dataset OpenML benchmark via the published Duo + TTT recipe.

## Install

```bash
pip install predictlm
```

## Use

```python
from predictlm import PredictLM
import pandas as pd

# One model object — partner checkpoint is auto-downloaded on first .predict()
# and the package runs the published Duo + TTT recipe under the hood.
model = PredictLM.from_pretrained("zerooneresearch/predictlm-mini-13m")

X_train = pd.DataFrame(...)   # labeled context rows
y_train = pd.Series(...)      # labels — float → regression, int/str → classification
X_test  = pd.DataFrame(...)   # rows you want predictions for

preds = model.fit(X_train, y_train).predict(X_test)
probs = model.predict_proba(X_test)
```

PredictLM auto-detects regression vs classification from the dtype of `y_train` and routes through the matching head. Same model, single fit/predict API.

## Single-model fast path

Skip the Duo + TTT recipe (no partner download, no test-time training):

```python
model = PredictLM.from_pretrained("zerooneresearch/predictlm-mini-13m", auto_duo=False)
preds = model.fit(X_train, y_train).predict(X_test)
# Zero-tuning baseline: ~0.673 cls / 0.536 reg
```

## Model cards

- **[zerooneresearch/predictlm-mini-13m](https://huggingface.co/zerooneresearch/predictlm-mini-13m)** — 13.5M params, 54 MB. Distilled from Base. Recommended for CPU / edge.
- **[zerooneresearch/predictlm-base-26m](https://huggingface.co/zerooneresearch/predictlm-base-26m)** — 26.2M params, 105 MB. Highest-accuracy in the family.

## License

Apache-2.0. Commercial use allowed.

## Citation

```bibtex
@misc{zerooneresearch_predictlm_2026,
  title  = {PredictLM v1: Open-weight tabular foundation models with calibrated outputs},
  author = {Zero One Research},
  year   = {2026},
  url    = {https://huggingface.co/zerooneresearch}
}
```
