The Hugging Face Connector exports trained AI models from Narrative’s model repository to Hugging Face Hub, making them available for inference and sharing.Documentation Index
Fetch the complete documentation index at: https://docs.narrative.io/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Unlike audience delivery connectors that push data to advertising platforms, the Hugging Face Connector handles model delivery. After you train a model in Narrative’s Model Studio, the connector uploads it to your Hugging Face account as a private model repository. Delivered models include:- All model weights and configuration files
- Inference files (
handler.pyandrequirements.txt) for Hugging Face’s inference infrastructure - A version tag (e.g.,
v1) for tracking model iterations
Requirements
Hugging Face access token
You need a Hugging Face User Access Token with write permissions. The connector supports two token types:| Token Type | Required Permissions |
|---|---|
| Fine-grained token | repo.content.read and repo.write, scoped to at least one entity |
| Write token (legacy) | Automatically grants access to your namespace and all your organizations |
Delivery destinations
When delivering a model, you choose where it goes on Hugging Face:| Option | Description |
|---|---|
| New model repository | Creates a new private repository under the selected owner (organization or user) |
| Existing model repository | Delivers to a repository that already exists |
Installation
Navigate to the connector
In Narrative, go to Installed Apps in the left navigation and select Hugging Face Connector.
Enter your access token
Paste your Hugging Face User Access Token into the token field and click Validate.
Review accessible entities
After validation, expand Hugging Face Access Token Details to see the organizations, users, and model repositories your token grants write access to. These are the destinations available for model delivery.
Delivering a model
Model delivery happens automatically after training completes in Model Studio:- Train a model in Model Studio by selecting a base model, training dataset, and compute instance
- Once training finishes, a delivery job is created that uses your connector profile
- The connector downloads the model from Narrative’s model store, prepares inference files, and uploads everything to Hugging Face Hub
- The model appears as a private repository in your Hugging Face account, tagged with the model version
Delivery can take up to 30 minutes depending on model size. The process is idempotent—if a delivery is interrupted, it can safely retry without creating duplicates.
Troubleshooting
Token validation errors
| Error | Cause | Resolution |
|---|---|---|
| Token is invalid | Token doesn’t authenticate with Hugging Face | Verify the token value in your Hugging Face settings |
| Must be a user access token | Token is an organization token or unrecognized type | Create a new User Access Token on Hugging Face |
| Must grant write access | Token has no writable entities | Update token permissions to include repo.content.read and repo.write for at least one entity |
Expired or revoked token
If your token expires or is revoked after profile creation, the profile detail page displays a warning. Contact Narrative Support to resolve the issue—you’ll need to create a new profile with a valid token.Related content
Connectors Overview
Reference documentation for all available connectors
Data Activation Overview
Understand how connectors deliver data

