Description
Pretrained BertEmbeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. bge-large-en
is a English model originally trained by BAAI
.
How to use
documentAssembler = DocumentAssembler() \
.setInputCols(["text"]) \
.setOutputCols("document")
tokenizer = Tokenizer() \
.setInputCols("document") \
.setOutputCol("token")
bert_loaded = BertEmbeddings.pretrained("bert_embeddings_bge_large","en") \
.setInputCols(["document", "token"]) \
.setOutputCol("embeddings") \
.setCaseSensitive(True)
pipeline = Pipeline(stages=[documentAssembler, tokenizer, bert_loaded])
data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text")
result = pipeline.fit(data).transform(data)
val documentAssembler = new DocumentAssembler()
.setInputCols(Array("text"))
.setOutputCols(Array("document"))
val tokenizer = new Tokenizer()
.setInputCols("document")
.setOutputCol("token")
val bert_loaded = BertEmbeddings.pretrained("bert_embeddings_bge_large","en")
.setInputCols(Array("document", "token"))
.setOutputCol("embeddings")
.setCaseSensitive(true)
val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, bert_loaded))
val data = Seq("I love Spark NLP").toDS.toDF("text")
val result = pipeline.fit(data).transform(data)
Model Information
Model Name: | bert_embeddings_bge_large |
Compatibility: | Spark NLP 5.1.0+ |
License: | Open Source |
Edition: | Official |
Input Labels: | [document, token] |
Output Labels: | [bert] |
Language: | en |
Size: | 795.1 MB |
Case sensitive: | true |
References
- https://huggingface.co/BAAI/bge-large-en
- https://github.com/FlagOpen/FlagEmbedding
- https://github.com/FlagOpen/FlagEmbedding/blob/master/README_zh.md
- https://arxiv.org/pdf/2309.07597.pdf
- https://data.baai.ac.cn/details/BAAI-MTP
- https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/baai_general_embedding/README.md
- https://github.com/FlagOpen/FlagEmbedding/blob/master/C_MTEB
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/reranker
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/reranker
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune
- https://github.com/FlagOpen/FlagEmbedding/tree/master/C_MTEB
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune#hard-negatives
- https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/baai_general_embedding/README.md
- https://github.com/FlagOpen/FlagEmbedding/tree/master#model-list
- https://www.SBERT.net
- https://github.com/FlagOpen/FlagEmbedding/tree/master#model-list
- https://github.com/FlagOpen/FlagEmbedding/blob/master/C_MTEB/README.md
- https://platform.openai.com/docs/guides/embeddings
- https://github.com/FlagOpen/FlagEmbedding/blob/master/C_MTEB/README.md
- https://platform.openai.com/docs/guides/embeddings/what-are-embeddings
- https://github.com/FlagOpen/FlagEmbedding/blob/master/C_MTEB/
- https://github.com/staoxiao/RetroMAE
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/pretrain
- https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/baai_general_embedding/README.md
- https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/reranker
- https://github.com/FlagOpen/FlagEmbedding/tree/master/FlagEmbedding/reranker
- https://github.com/FlagOpen/FlagEmbedding/blob/master/LICENSE
- https://paperswithcode.com/sota?task=Classification&dataset=MTEB+AmazonCounterfactualClassification+%28en%29