Lattice
Lattice is a tabular foundation model that makes predictions in context, without any fine-tuning. A single frozen model handles both classification and regression; the scikit-learn style estimators accept NumPy arrays or pandas DataFrames, including mixed numeric/categorical features and missing values.
This repository hosts the default release checkpoints. A smaller variant is available at hachure-ai/Lattice-tiny.
Checkpoints
| Task | File | URL |
|---|---|---|
| Classification | cls.ckpt |
https://huggingface.co/hachure-ai/Lattice/blob/main/cls.ckpt |
| Regression | reg.ckpt |
https://huggingface.co/hachure-ai/Lattice/blob/main/reg.ckpt |
Architecture details are stored inside each checkpoint and need not be specified.
Usage
pip install git+https://github.com/hachure-ai/Lattice.git
from lattice import LatticeClassifier, LatticeRegressor
clf = LatticeClassifier() # downloads cls.ckpt from this repository
clf.fit(X_train, y_train)
pred = clf.predict(X_test)
proba = clf.predict_proba(X_test)
reg = LatticeRegressor() # downloads reg.ckpt from this repository
reg.fit(X_train, y_train)
pred = reg.predict(X_test)
Checkpoints are downloaded once and cached by huggingface_hub. Pass
model_size="tiny" to use the tiny release, or model_path=".../cls.ckpt" to
load a local file and avoid network access.
Declare categorical columns before fitting if X is a NumPy array:
clf.categorical_indices = [2, 7]