From 16cfd533153ca026a8d7d3bc0106f45cbec29c99 Mon Sep 17 00:00:00 2001 From: Julian Risch Date: Wed, 29 Sep 2021 12:00:59 +0200 Subject: [PATCH] Replace FARMRanker with SentenceTransformersRanker in pipeline --- docs/latest/components/pipelines.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/latest/components/pipelines.mdx b/docs/latest/components/pipelines.mdx index 59e854289..6576e52c1 100644 --- a/docs/latest/components/pipelines.mdx +++ b/docs/latest/components/pipelines.mdx @@ -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) ``` @@ -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. \ No newline at end of file +set the `address` parameter when creating the RayPipeline instance.