Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions pgml-cms/docs/open-source/korvus/guides/constructing-pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,48 @@ pipeline = Pipeline(
The `Pipeline` above generates embeddings and tsvectors for the `abstract` and splits and generates embeddings and tsvectors for the `text`.

We can now perform search over both the `text` and `abstract` key of our documents. See the [guide for vector search](vector-search) for more information on how to do this.

## Self-Hosting Specific Parameters

**This section is only relevant for self hosted instances of PostgresML**. These parameters are never required for instances hosted by PostgresML.

### Trust Remote Code

Some HuggingFace models require the argument `trust_remote_code=true`. To enable this, pass it as a parameter in the pipeline construction:

```python
pipeline = Pipeline(
"v0",
{
"text": {
"semantic_search": {
"model": "Alibaba-NLP/gte-base-en-v1.5",
"parameters": {
"trust_remote_code": True
}
}
}
}
)
```

### HuggingFace authentication

Pass your HuggingFace token into the pipeline to access gated repos:

```python
pipeline = Pipeline(
"v0",
{
"text": {
"semantic_search": {
"model": "Alibaba-NLP/gte-base-en-v1.5",
"parameters": {
"trust_remote_code": True,
"token": "YOUR_TOKEN"
}
}
}
}
)
```