TabPFN icon indicating copy to clipboard operation
TabPFN copied to clipboard

Parse model version from model_path

Open brendan-priorlabs opened this issue 1 month ago • 5 comments

Issue

This ticket is more focused on the earlier private loading, but see https://linear.app/priorlabs/issue/ENG-102/install-private-tabpfn-model-implement-loading-from-protected

Motivation and Context

Allows selecting both v2 and v2.5 models via the model_path parameter.

Public API Changes

  • [ ] No Public API changes
  • [x] Yes, Public API changes (Details below)

API was widened (since model_path now specifies version), but is backwards compatible.


How Has This Been Tested?

Manually by setting TABPFN_MODEL_VERSION={v2.5,v2,unset} and specifying model paths of both versions to see if they override. For both classification and regression.

Checklist

  • [x] The changes have been tested locally.
  • [ ] Documentation has been updated (if the public API or usage changes).
  • [ ] A entry has been added to CHANGELOG.md (if relevant for users).
  • [ ] The code follows the project's style guidelines.
  • [x] I have considered the impact of these changes on the public API.

brendan-priorlabs avatar Nov 03 '25 17:11 brendan-priorlabs

@priorphil, after this PR is merged, I think the only thing we need to do to cut over to the gated repo is to adjust the constants here and here

brendan-priorlabs avatar Nov 03 '25 18:11 brendan-priorlabs

lgtm! I'm surprised at some of the test failures though, e.g. the ones hitting low accuracy, and the embedding shape ones. Maybe the test checkpoint we're using is weird in some way?

oscarkey avatar Nov 03 '25 19:11 oscarkey

Note: https://github.com/PriorLabs/TabPFN-private/pull/227 Also needs to be on the server before we can switch to the gated version (otherwise the checkpoint cleaned for deployment fails on load)

priorphil avatar Nov 04 '25 07:11 priorphil

@priorphil, thanks for the heads up! I was planning on cutting us back over to the public package now that everything is there. (Or will be after this PR.) Any concerns?

brendan-priorlabs avatar Nov 04 '25 09:11 brendan-priorlabs

Ah sorry, the linked PR is already the copy over from the public repo, so cutting over should be good!

priorphil avatar Nov 04 '25 09:11 priorphil

@priorphil, this may already be on your radar, but I think there's one final piece of coordination for the gated repo. We need to swap out the repos in the code, e.g., https://github.com/PriorLabs/TabPFN/pull/585/files#diff-a995eff4877044df142c78beaee80244e0624c9493d1f2109ea14383bb66412eR116, for the gated one and make sure the user corresponding to the huggingface tokens the API is using has accepted the license. That could happen in this PR, but maybe it'd be cleaner in a followup.

fyi, @bejaeger, I think there's an inconsistency in the default checkpoints between the two repos at the moment. Synthetic vs. tuned. Hopefully this won't turn up any additional surprises in the tests 😬

brendan-priorlabs avatar Nov 04 '25 22:11 brendan-priorlabs

@brendan-priorlabs , sounds good. I merged main with the fixes and updated the consistency tests so the CI should look better now. If we change the model again, it should only be the consistency tests we need to update.

bejaeger avatar Nov 05 '25 07:11 bejaeger