Skip to main content
Synthefy Nori (Tabular) predicts continuous values from tabular data. You give it some labeled rows as examples, and it predicts on new rows — no training, no fine-tuning required. GitHub  ·  🤗 Hugging Face There are two ways to use it:

Run locally

Install the Python package and run inference on your own machine or server.

Call the API

Send a request to our hosted endpoint. No setup, no GPU required.

Local

Install the client with local support:
pip install "synthefy[local]"
Model weights download automatically from Hugging Face on first use — no API key needed.

Your first prediction

Use the same SynthefyNoriClient as the hosted API, with mode="local" to run in-process — no network, no API key:
from synthefy import SynthefyNoriClient

X_train = [[0.0, 1.0], [1.0, 0.0], [0.5, 0.5], [0.2, 0.8]]
y_train = [0.1, 0.9, 0.5, 0.3]
X_test  = [[0.3, 0.7], [0.8, 0.2]]

client = SynthefyNoriClient(mode="local")
pred = client.predict(X_train, y_train, X_test)
print(pred)
[0.36, 0.74]
Use mode="auto" to run locally when synthefy[local] is installed and fall back to the hosted API otherwise — the exact same code works in both places.

With a DataFrame

import pandas as pd
from synthefy import SynthefyNoriClient

df = pd.read_csv("data.csv")
target_col = "price"
feature_cols = [c for c in df.columns if c != target_col]

train = df.sample(frac=0.8, random_state=42)
test  = df.drop(train.index)

client = SynthefyNoriClient(mode="local")
predictions = client.predict(
    train[feature_cols].values,
    train[target_col].values,
    test[feature_cols].values,
)

Handle missing values

You don’t need to fill in missing values beforehand — the model handles them automatically.
import numpy as np
from synthefy import SynthefyNoriClient

X_train = [[0.0, 1.0], [1.0, np.nan], [0.5, 0.5], [np.nan, 0.8]]
y_train = [0.1, 0.9, 0.5, 0.3]
X_test  = [[0.3, 0.7], [0.8, np.nan]]

client = SynthefyNoriClient(mode="local")
print(client.predict(X_train, y_train, X_test))
[0.37, 0.69]
The model uses a GPU automatically if one is available, and falls back to CPU otherwise.

API

The hosted API runs the same model on our infrastructure — no installation or GPU required. Set up your API key in the API key guide. Install the client:
pip install synthefy

Make a request

Send your labeled rows (X_train, y_train) and the rows you want to predict (X_test) in a single call:
import os
from synthefy import SynthefyNoriClient

client = SynthefyNoriClient(api_key=os.environ["SYNTHEFY_NORI_API_KEY"], mode="remote")

X_train = [[0.0, 1.0], [1.0, 0.0], [0.5, 0.5], [0.2, 0.8]]
y_train = [0.1, 0.9, 0.5, 0.3]
X_test  = [[0.3, 0.7], [0.8, 0.2]]

predictions = client.predict(X_train, y_train, X_test)
print(predictions)
The cURL example posts to the generic, slug-routed inference endpoint and authenticates with a Baseten API key (Bearer scheme). Request body
FieldRequiredDescription
modelRequiredThe model slug, synthefy/nori. Routes the request to the model — omitting it returns a 400.
taskOptional"regression" or "reg"; defaults to "regression". This is a regression-only deployment.
X_trainRequiredContext feature matrix, n_context × n_features (array of arrays of numbers).
y_trainRequiredContext targets, aligned 1:1 with X_train rows (array of numbers).
X_testRequiredQuery feature matrix, n_query × n_features (array of arrays of numbers).
null/NaN cells are allowed in X_train and X_test and are imputed server-side.

Response

The client returns one value per row in X_test as a plain list:
[0.36, 0.74]
The underlying HTTP endpoint (used by the cURL example) returns the full envelope on a 200. The predictions values below are illustrative:
{
  "task": "regression",
  "predictions": [0.3699104921941226, 0.7807573902172393],
  "usage": {
    "input_tokens": 16,
    "output_tokens": 2,
    "total_tokens": 18
  }
}
The usage block follows the OpenAI token counting convention:
  • input_tokens — the number of real (non-null) values sent across X_train, y_train, and X_test. null/NaN cells are imputed and are not counted.
  • output_tokens — one predicted target per X_test row.
  • total_tokensinput_tokens + output_tokens.
The first request after a scale-to-zero idle triggers a checkpoint download and warmup and can take ~60–90 seconds. Warm requests return in ~1–2 seconds.

Resources

API key

Set up your API key to call the hosted Nori API.

Product page

Learn more about Synthefy Nori (Tabular).

GitHub

Source code for training, inference, and evaluation.

Hugging Face

Pretrained model weights.