Skip to content

Commit

Permalink
Replace FARMRanker with SentenceTransformersRanker in pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-risch committed Sep 29, 2021
1 parent fcb9fb5 commit 16cfd53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/latest/components/pipelines.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,12 @@ To create new pipeline nodes, we initialize the modules first. For our use case,

``` python
from haystack.retriever import ElasticsearchRetriever
from haystack.ranker import FARMRanker
from haystack.ranker import SentenceTransformersRanker
from haystack.summarizer import TransformersSummarizer

retriever = ElasticsearchRetriever(document_store, top_k=10)

ranker=FARMRanker(model_name_or_path="sentence-transformers/distilbert-multilingual-nli-stsb-quora-ranking", top_k=10)
ranker = SentenceTransformersRanker(model_name_or_path="cross-encoder/ms-marco-MiniLM-L-12-v2", top_k=10)

summarizer = TransformersSummarizer(model_name_or_path='t5-large', min_length=10, max_length=300, generate_single_summary=True)
```
Expand Down Expand Up @@ -458,4 +458,4 @@ pipeline = RayPipeline.load_from_yaml(path="my_pipelines.yaml", pipeline_name="m
pipeline.run(query="What is the capital of Germany?")
```
By default, RayPipelines creates an instance of RayServe locally. To connect to an existing Ray instance,
set the `address` parameter when creating the RayPipeline instance.
set the `address` parameter when creating the RayPipeline instance.

0 comments on commit 16cfd53

Please sign in to comment.