Skip to main content
TabPFN-4 takes two optional per-row inputs at fit time:
  • Sample weight: how much influence a row has, roughly how many rows it stands for. Weight loans by outstanding balance so larger exposures count more, or down-weight an over-sampled period.
  • Label reliability: how much to trust a row’s label, from 1 (known to be right) to 0 (carries no information). Give verified outcomes 1.0 and provisional ones a lower score.
Both inputs are experimental. They require TabPFN-4 on the hosted API and tabpfn-client 0.11.0 or later. Other models reject them.

Quickstart

Pass either argument or both, with one value per training row in the same order as X_train. TabPFNRegressor.fit(), submit_fit() and cross_val_predict() take the same arguments; in cross-validation each fold fits with the weights of its training rows. Predictions take no weights.

Rules

  • sample_weight must be non-negative, and at least one weight must be positive. Only relative values matter: the weights are rescaled, so multiplying all of them by a constant changes nothing.
  • For classification, every class must keep a positive total sample_weight.
  • label_reliability must lie in [0, 1].
  • Thinking mode does not take either input yet; the API rejects the fit with HTTP 422.
  • Both work with the KV cache (fit_mode="fit_with_cache").

REST API

Upload the weights as a third file next to the features and targets. In POST /tabpfn/prepare_train_set_upload, add row_weights_info:
Upload the file to the signed URL in the response’s row_weights_info, with its required headers. The file has one row per training row, in the same order, and a sample_weight column, a label_reliability column, or both:
Then fit with "model_path": "v4_default" as usual. See the REST quickstart for the upload flow.

Grouped data

Tell TabPFN which rows belong to the same entity.

Classification

Binary and multi-class classification guide.