Skip to content

Commit

Permalink
Merge pull request deepset-ai#170 from deepset-ai/replace-farmranker-…
Browse files Browse the repository at this point in the history
…in-pipeline

Replace FARMRanker with SentenceTransformersRanker in pipeline
  • Loading branch information
julian-risch committed Oct 1, 2021
2 parents 238b901 + 16cfd53 commit 3380d12
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 3380d12

Please sign in to comment.