fela-tab / quickstart /README.md
itstheraj's picture
initial commit
c902bdf
|
Raw
History Blame Contribute Delete
1.79 kB

Quickstart

Point FelaTab at a real public table and get zero shot predictions on CPU. Uses the self contained loader and in context predict path in ../modeling.py.

Steps

  1. Install the pinned requirements (CPU PyTorch + scikit-learn for the example datasets):

    pip install -r requirements.txt
    
  2. Run. The model files ship in the parent directory, so the default --weights points there:

    python run.py                       # small int8 tier, breast cancer classification
    python run.py --tier big            # the 411.9M flagship
    python run.py --dataset wine --bag 8   # with inference time bagging
    

Load from Python

from modeling import load_model, predict, predict_bagged

# tier = "small" (dim512, ~51.6M) or "big" (dim1024, ~411.9M). The loader auto detects
# the int8 bundle and dequantizes it, so you always get a plain fp32 model.
model = load_model("/path/to/repo_dir", tier="small")   # or a HF repo id, or a .safetensors path

# classification: Xtr/ytr are the support rows (your labelled examples), Xte the query rows
probs = predict(model, Xtr, ytr, Xte, task="classification", n_classes=3)   # [n_query, 3]

# regression: returns (mean, std) error bars in the original label units
mean, std = predict(model, Xtr, ytr, Xte, task="regression")

# optional: inference time bagging lifts classification a little (no retraining)
probs = predict_bagged(model, Xtr, ytr, Xte, task="classification", n_classes=3, n_bag=16)

There is no per table training. The support rows and query rows are packed into one sequence and run through the model in a single forward pass; the query predictions come out calibrated. See the model card for the honest measured numbers, the regression caveat, and the intended use.