-
Notifications
You must be signed in to change notification settings - Fork 1
docs: update for HF ungating change #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,60 +1,42 @@ | ||
| --- | ||
| title: "How to access TabPFN-2.6" | ||
| title: "How to access TabPFN-2.5 and TabPFN-2.6" | ||
| --- | ||
|
|
||
| TabPFN-2.6 is released under a [non-commercial license](models#tabpfn-model-license), which you need to accept before the model files can be downloaded. | ||
| TabPFN-2.5 and TabPFN-2.6 are released under a [non-commercial license](/models#tabpfn-model-license), which you need to accept before the model files can be downloaded. | ||
|
|
||
| <iframe | ||
| className="w-full aspect-video rounded-xl" | ||
| src="https://www.loom.com/embed/fab672fc18bd4febaaf8ec8737180920" | ||
| loading="lazy" | ||
| title="Accessing HuggingFace gated models" | ||
| allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" | ||
| allowFullScreen | ||
| ></iframe> | ||
| ## Automatic Setup (recommended) | ||
|
|
||
| ## Step 1: Accept the license agreement | ||
| On first use, TabPFN will automatically open a browser window where you can log in via [PriorLabs](https://ux.priorlabs.ai) and accept the license terms. Your authentication token is cached locally, so you only need to do this once. | ||
|
|
||
| Visit Hugging Face, where the model is hosted, and agree to the license terms: https://huggingface.co/Prior-Labs/tabpfn_2_6/ | ||
|
|
||
| You will need to log in to your Hugging Face account, or create one if you don't already have it. Once you have agreed to the license, you should be granted access immediately. | ||
|
|
||
| ## Step 2: Create an access token | ||
|
|
||
| - If you created a new account: ensure you have verified your Hugging Face email address | ||
| - Create a new token using this link: https://huggingface.co/settings/tokens/new?tokenType=fineGrained | ||
| - Give the token a name | ||
| - Check the box "Read access to contents of all public gated repos you can access" ( [screenshot](/guide-screenshots/hf-token-creation.png)) | ||
| - Press "Create token", and copy the displayed token (you will only be able to see it once).\ | ||
| Your token should look like `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` | ||
|
|
||
| ## Step 3: Log in with your new token | ||
| ```python | ||
| from tabpfn import TabPFNClassifier | ||
|
|
||
| ### **If using Google Colab** | ||
| # This will open a browser for login and license acceptance on first use | ||
| model = TabPFNClassifier() | ||
| model.fit(X_train, y_train) | ||
| ``` | ||
|
|
||
| - Select "Secrets" from the left-hand menu ([screenshot](/guide-screenshots/colab-secrets-pane.png)) | ||
| - Create a new secret. Set name to "HF_TOKEN" and value to the token itself | ||
| - Ensure that "Notebook access" is enabled | ||
| ## Headless / CI Environments | ||
|
|
||
| ### **If using a notebook other than Google Colab** | ||
| For environments where a browser is not available (e.g. remote servers, CI pipelines, Docker containers): | ||
|
|
||
| Ensure TabPFN is installed. Create a new Python code cell containing: | ||
| 1. Visit [https://ux.priorlabs.ai](https://ux.priorlabs.ai) and log in | ||
| 2. Go to the **License** tab and accept the license | ||
| 3. Copy your authentication token from your account | ||
| 4. Set the `TABPFN_TOKEN` environment variable: | ||
|
|
||
| ```python | ||
| import huggingface_hub | ||
| huggingface_hub.login() | ||
| ```bash | ||
| export TABPFN_TOKEN="your-token-here" | ||
| ``` | ||
|
|
||
| Execute this cell and follow the instructions. | ||
| You can also set `TABPFN_NO_BROWSER` to disable the automatic browser login if needed (e.g. in environments where opening a browser is undesirable). | ||
|
|
||
| ### **If using the terminal** | ||
| ## Google Colab | ||
|
|
||
| - Activate the Python environment that you use for TabPFN | ||
| - Run `hf auth login` | ||
| - Enter the token when prompted | ||
| In Google Colab, the browser-based login flow works automatically. Alternatively, you can set the `TABPFN_TOKEN` secret: | ||
|
|
||
| ### In scripts or CI pipelines | ||
|
|
||
| Configure your environment to specify the `HF_TOKEN` environment variable. | ||
| - Select "Secrets" from the left-hand menu | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These instructions should also include how to get the token, as in |
||
| - Create a new secret with name `TABPFN_TOKEN` and value set to your token | ||
| - Ensure that "Notebook access" is enabled | ||
|
|
||
| For more information, refer to the Hugging Face [documentation](https://huggingface.co/docs/huggingface_hub/en/quick-start#authentication). | ||
| If access via the browser-based flow is not an option for you, please contact us at [sales@priorlabs.ai](mailto:sales@priorlabs.ai). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe this should say "if access via one of these options is not possible for you"? |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,7 +47,7 @@ preds = model.predict(X_test) | |
| ``` | ||
|
|
||
| <Warning> | ||
| The first time you use the model, you will be asked to accept the model license and configure the access token, see the [detailed instructions](/how-to-access-gated-models). | ||
| The first time you use the model, a browser window will open for you to log in and accept the model license. For headless environments, see the [detailed instructions](/how-to-access-gated-models). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would say something more like "For more information, see the detailed instructions", because quite a lot of people won't know what a headless environment is. |
||
| </Warning> | ||
|
|
||
| <Note> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should move this up one section so it's under
## Automatic Setup (recommended)? Just so non-technical users see it quickly if the automatic login doesn't work.