Use Hugging Face Models

Use models hosted on Hugging Face in your pipelines.

You can use any model from Hugging Face in your pipelines. There are a couple of ways to do it:

Prerequisites

You need a Hugging Face token for the API you want to use.

Use Models from Hugging Face

Connect deepset Cloud to Hugging Face through the Connections page:

  1. Click your initials in the top right corner and select Connections.

  2. Click Connect next to the provider.

  3. Enter your user access token and submit it.

Then, add a component that uses the model you have in mind. Here are the available components by the model type:

ℹ️

Embedding Models in Query and Indexing Pipelines

The embedding model you use to embed documents in your indexing pipeline must be the same as the embedding model you use to embed the query in your query pipeline.


Usage Examples

Check the documentation of the component you want to use for usage examples.