Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2023-09-21-multilingual_e5_base_xx #14002

Merged
Show file tree
Hide file tree
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
100 changes: 100 additions & 0 deletions docs/_posts/ahmedlone127/2023-09-21-multilingual_e5_base_xx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
layout: model
title: Multilingual multilingual_e5_base XlmRoBertaSentenceEmbeddings from intfloat
author: John Snow Labs
name: multilingual_e5_base
date: 2023-09-21
tags: [xlm_roberta, xx, open_source, tensorflow]
task: Embeddings
language: xx
edition: Spark NLP 5.1.2
spark_version: 3.0
supported: true
engine: tensorflow
annotator: XlmRoBertaSentenceEmbeddings
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

## Description

Pretrained XlmRoBertaSentenceEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`multilingual_e5_base` is a Multilingual model originally trained by intfloat.

{:.btn-box}
<button class="button button-orange" disabled>Live Demo</button>
<button class="button button-orange" disabled>Open in Colab</button>
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/multilingual_e5_base_xx_5.1.2_3.0_1695314944172.zip){:.button.button-orange.button-orange-trans.arr.button-icon}
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/multilingual_e5_base_xx_5.1.2_3.0_1695314944172.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}

## How to use



<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python


document_assembler = DocumentAssembler() \
.setInputCol("text") \
.setOutputCol("documents")

sentencerDL = SentenceDetectorDLModel.pretrained("sentence_detector_dl", "xx")\
.setInputCols(["document"])\
.setOutputCol("sentence")

embeddings =XlmRoBertaSentenceEmbeddings.pretrained("multilingual_e5_base","xx") \
.setInputCols(["sentence"]) \
.setOutputCol("embeddings")

pipeline = Pipeline().setStages([document_assembler, sentencerDL, embeddings])

pipelineModel = pipeline.fit(data)

pipelineDF = pipelineModel.transform(data)

```
```scala


val document_assembler = new DocumentAssembler()
.setInputCol("text")
.setOutputCol("documents")

val sentencerDL = SentenceDetectorDLModel.pretrained("sentence_detector_dl", "xx")
.setInputCols(["document"])
.setOutputCol("sentence")

val embeddings = XlmRoBertaSentenceEmbeddings
.pretrained("multilingual_e5_base", "xx")
.setInputCols(Array("sentence"))
.setOutputCol("embeddings")

val pipeline = new Pipeline().setStages(Array(document_assembler, sentencerDL, embeddings))

val pipelineModel = pipeline.fit(data)

val pipelineDF = pipelineModel.transform(data)


```
</div>

{:.model-param}
## Model Information

{:.table-model}
|---|---|
|Model Name:|multilingual_e5_base|
|Compatibility:|Spark NLP 5.1.2+|
|License:|Open Source|
|Edition:|Official|
|Input Labels:|[sentence]|
|Output Labels:|[embeddings]|
|Language:|xx|
|Size:|667.1 MB|

## References

https://huggingface.co/intfloat/multilingual-e5-base
100 changes: 100 additions & 0 deletions docs/_posts/ahmedlone127/2023-09-21-multilingual_e5_large_xx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
layout: model
title: Multilingual multilingual_e5_large XlmRoBertaSentenceEmbeddings from intfloat
author: John Snow Labs
name: multilingual_e5_large
date: 2023-09-21
tags: [xlm_roberta, xx, open_source, tensorflow]
task: Embeddings
language: xx
edition: Spark NLP 5.1.2
spark_version: 3.0
supported: true
engine: tensorflow
annotator: XlmRoBertaSentenceEmbeddings
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

## Description

Pretrained XlmRoBertaSentenceEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`multilingual_e5_large` is a Multilingual model originally trained by intfloat.

{:.btn-box}
<button class="button button-orange" disabled>Live Demo</button>
<button class="button button-orange" disabled>Open in Colab</button>
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/multilingual_e5_large_xx_5.1.2_3.0_1695315223158.zip){:.button.button-orange.button-orange-trans.arr.button-icon}
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/multilingual_e5_large_xx_5.1.2_3.0_1695315223158.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}

## How to use



<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python


document_assembler = DocumentAssembler() \
.setInputCol("text") \
.setOutputCol("documents")

sentencerDL = SentenceDetectorDLModel.pretrained("sentence_detector_dl", "xx")\
.setInputCols(["document"])\
.setOutputCol("sentence")

embeddings =XlmRoBertaSentenceEmbeddings.pretrained("multilingual_e5_large","xx") \
.setInputCols(["sentence"]) \
.setOutputCol("embeddings")

pipeline = Pipeline().setStages([document_assembler, sentencerDL, embeddings])

pipelineModel = pipeline.fit(data)

pipelineDF = pipelineModel.transform(data)

```
```scala


val document_assembler = new DocumentAssembler()
.setInputCol("text")
.setOutputCol("documents")

val sentencerDL = SentenceDetectorDLModel.pretrained("sentence_detector_dl", "xx")
.setInputCols(["document"])
.setOutputCol("sentence")

val embeddings = XlmRoBertaSentenceEmbeddings
.pretrained("multilingual_e5_large", "xx")
.setInputCols(Array("sentence"))
.setOutputCol("embeddings")

val pipeline = new Pipeline().setStages(Array(document_assembler, sentencerDL, embeddings))

val pipelineModel = pipeline.fit(data)

val pipelineDF = pipelineModel.transform(data)


```
</div>

{:.model-param}
## Model Information

{:.table-model}
|---|---|
|Model Name:|multilingual_e5_large|
|Compatibility:|Spark NLP 5.1.2+|
|License:|Open Source|
|Edition:|Official|
|Input Labels:|[sentence]|
|Output Labels:|[embeddings]|
|Language:|xx|
|Size:|1.3 GB|

## References

https://huggingface.co/intfloat/multilingual-e5-large
100 changes: 100 additions & 0 deletions docs/_posts/ahmedlone127/2023-09-21-multilingual_e5_small_xx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
layout: model
title: Multilingual multilingual_e5_small XlmRoBertaSentenceEmbeddings from intfloat
author: John Snow Labs
name: multilingual_e5_small
date: 2023-09-21
tags: [xlm_roberta, xx, open_source, tensorflow]
task: Embeddings
language: xx
edition: Spark NLP 5.1.2
spark_version: 3.0
supported: true
engine: tensorflow
annotator: XlmRoBertaSentenceEmbeddings
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

## Description

Pretrained XlmRoBertaSentenceEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`multilingual_e5_small` is a Multilingual model originally trained by intfloat.

{:.btn-box}
<button class="button button-orange" disabled>Live Demo</button>
<button class="button button-orange" disabled>Open in Colab</button>
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/multilingual_e5_small_xx_5.1.2_3.0_1695316525385.zip){:.button.button-orange.button-orange-trans.arr.button-icon}
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/multilingual_e5_small_xx_5.1.2_3.0_1695316525385.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}

## How to use



<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python


document_assembler = DocumentAssembler() \
.setInputCol("text") \
.setOutputCol("documents")

sentencerDL = SentenceDetectorDLModel.pretrained("sentence_detector_dl", "xx")\
.setInputCols(["document"])\
.setOutputCol("sentence")

embeddings =XlmRoBertaSentenceEmbeddings.pretrained("multilingual_e5_small","xx") \
.setInputCols(["sentence"]) \
.setOutputCol("embeddings")

pipeline = Pipeline().setStages([document_assembler, sentencerDL, embeddings])

pipelineModel = pipeline.fit(data)

pipelineDF = pipelineModel.transform(data)

```
```scala


val document_assembler = new DocumentAssembler()
.setInputCol("text")
.setOutputCol("documents")

val sentencerDL = SentenceDetectorDLModel.pretrained("sentence_detector_dl", "xx")
.setInputCols(["document"])
.setOutputCol("sentence")

val embeddings = XlmRoBertaSentenceEmbeddings
.pretrained("multilingual_e5_small", "xx")
.setInputCols(Array("sentence"))
.setOutputCol("embeddings")

val pipeline = new Pipeline().setStages(Array(document_assembler, sentencerDL, embeddings))

val pipelineModel = pipeline.fit(data)

val pipelineDF = pipelineModel.transform(data)


```
</div>

{:.model-param}
## Model Information

{:.table-model}
|---|---|
|Model Name:|multilingual_e5_small|
|Compatibility:|Spark NLP 5.1.2+|
|License:|Open Source|
|Edition:|Official|
|Input Labels:|[sentence]|
|Output Labels:|[embeddings]|
|Language:|xx|
|Size:|284.4 MB|

## References

https://huggingface.co/intfloat/multilingual-e5-small