From 25a65661ada7d1c92a798600a2d37bec643dcc3c Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:28:53 +0700 Subject: [PATCH 001/255] Add model 2023-11-12-bert_qa_base_cased_squad2_en --- ...2023-11-12-bert_qa_base_cased_squad2_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_squad2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_squad2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_squad2_en.md new file mode 100644 index 00000000000000..002eec855c8c0a --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_squad2_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_base_cased_squad2 BertForQuestionAnswering from Shobhank-iiitdwd +author: John Snow Labs +name: bert_qa_base_cased_squad2 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_cased_squad2` is a English model originally trained by Shobhank-iiitdwd. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_cased_squad2_en_5.2.0_3.0_1699781323466.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_cased_squad2_en_5.2.0_3.0_1699781323466.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_cased_squad2","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_cased_squad2", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_cased_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/Shobhank-iiitdwd/BERT-base-cased-squad2-QA \ No newline at end of file From 0a22220c9a1ccfd8d848979bbd9e1185ad384faf Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:29:52 +0700 Subject: [PATCH 002/255] Add model 2023-11-12-bert_qa_base_portuguese_cased_finetuned_squad_v1_pt --- ..._portuguese_cased_finetuned_squad_v1_pt.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_portuguese_cased_finetuned_squad_v1_pt.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_portuguese_cased_finetuned_squad_v1_pt.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_portuguese_cased_finetuned_squad_v1_pt.md new file mode 100644 index 00000000000000..197af35d79e1f3 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_portuguese_cased_finetuned_squad_v1_pt.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Portuguese bert_qa_base_portuguese_cased_finetuned_squad_v1 BertForQuestionAnswering from mrm8488 +author: John Snow Labs +name: bert_qa_base_portuguese_cased_finetuned_squad_v1 +date: 2023-11-12 +tags: [bert, pt, open_source, question_answering, onnx] +task: Question Answering +language: pt +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_portuguese_cased_finetuned_squad_v1` is a Portuguese model originally trained by mrm8488. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_portuguese_cased_finetuned_squad_v1_pt_5.2.0_3.0_1699781369340.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_portuguese_cased_finetuned_squad_v1_pt_5.2.0_3.0_1699781369340.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_portuguese_cased_finetuned_squad_v1","pt") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_portuguese_cased_finetuned_squad_v1", "pt") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_portuguese_cased_finetuned_squad_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|pt| +|Size:|405.9 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/mrm8488/bert-base-portuguese-cased-finetuned-squad-v1-pt \ No newline at end of file From 58c0f9043221a374a40fd9e87e81949fe80a79bb Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:30:53 +0700 Subject: [PATCH 003/255] Add model 2023-11-12-bert_qa_arap_v2_ar --- .../2023-11-12-bert_qa_arap_v2_ar.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_arap_v2_ar.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_arap_v2_ar.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_arap_v2_ar.md new file mode 100644 index 00000000000000..27e649703841fb --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_arap_v2_ar.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Arabic bert_qa_arap_v2 BertForQuestionAnswering from gfdgdfgdg +author: John Snow Labs +name: bert_qa_arap_v2 +date: 2023-11-12 +tags: [bert, ar, open_source, question_answering, onnx] +task: Question Answering +language: ar +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_arap_v2` is a Arabic model originally trained by gfdgdfgdg. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_arap_v2_ar_5.2.0_3.0_1699781386386.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_arap_v2_ar_5.2.0_3.0_1699781386386.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_arap_v2","ar") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_arap_v2", "ar") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_arap_v2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|ar| +|Size:|504.8 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/gfdgdfgdg/arap_qa_bert_v2 \ No newline at end of file From b6a4432aba09dd9313bd408d1aa2cc64667fe4e0 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:31:53 +0700 Subject: [PATCH 004/255] Add model 2023-11-12-bert_qa_arabic_ar --- .../2023-11-12-bert_qa_arabic_ar.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_arabic_ar.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_arabic_ar.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_arabic_ar.md new file mode 100644 index 00000000000000..a0effe3f3c5996 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_arabic_ar.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Arabic bert_qa_arabic BertForQuestionAnswering from abdalrahmanshahrour +author: John Snow Labs +name: bert_qa_arabic +date: 2023-11-12 +tags: [bert, ar, open_source, question_answering, onnx] +task: Question Answering +language: ar +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_arabic` is a Arabic model originally trained by abdalrahmanshahrour. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_arabic_ar_5.2.0_3.0_1699781377235.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_arabic_ar_5.2.0_3.0_1699781377235.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_arabic","ar") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_arabic", "ar") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_arabic| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|ar| +|Size:|412.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/abdalrahmanshahrour/ArabicQA \ No newline at end of file From 9c4c5f775d8b09bcfb41d21ba080d4bd85a9285f Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:32:53 +0700 Subject: [PATCH 005/255] Add model 2023-11-12-bert_qa_base_alian_uncased_squad_it --- ...-12-bert_qa_base_alian_uncased_squad_it.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_alian_uncased_squad_it.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_alian_uncased_squad_it.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_alian_uncased_squad_it.md new file mode 100644 index 00000000000000..5fb7af492ae93e --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_alian_uncased_squad_it.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Italian bert_qa_base_alian_uncased_squad BertForQuestionAnswering from antoniocappiello +author: John Snow Labs +name: bert_qa_base_alian_uncased_squad +date: 2023-11-12 +tags: [bert, it, open_source, question_answering, onnx] +task: Question Answering +language: it +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_alian_uncased_squad` is a Italian model originally trained by antoniocappiello. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_alian_uncased_squad_it_5.2.0_3.0_1699781375077.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_alian_uncased_squad_it_5.2.0_3.0_1699781375077.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_alian_uncased_squad","it") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_alian_uncased_squad", "it") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_alian_uncased_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|it| +|Size:|409.7 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/antoniocappiello/bert-base-italian-uncased-squad-it \ No newline at end of file From 3573e3d1c2b8974cb9d09ad8ec5b46696037864f Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:33:54 +0700 Subject: [PATCH 006/255] Add model 2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.13_v1_en --- ...ncased_squad1.1_block_sparse_0.13_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.13_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.13_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.13_v1_en.md new file mode 100644 index 00000000000000..3e1d65acaa8606 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.13_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_base_uncased_squad1.1_block_sparse_0.13_v1 BertForQuestionAnswering from madlag +author: John Snow Labs +name: bert_qa_base_uncased_squad1.1_block_sparse_0.13_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_uncased_squad1.1_block_sparse_0.13_v1` is a English model originally trained by madlag. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad1.1_block_sparse_0.13_v1_en_5.2.0_3.0_1699781603540.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad1.1_block_sparse_0.13_v1_en_5.2.0_3.0_1699781603540.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squad1.1_block_sparse_0.13_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_uncased_squad1.1_block_sparse_0.13_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_squad1.1_block_sparse_0.13_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|148.6 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/madlag/bert-base-uncased-squad1.1-block-sparse-0.13-v1 \ No newline at end of file From 40903a82ce6c8339bd5e119ae9f070b4fa9bd886 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:34:54 +0700 Subject: [PATCH 007/255] Add model 2023-11-12-bert_qa_arap_ar --- .../2023-11-12-bert_qa_arap_ar.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_arap_ar.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_arap_ar.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_arap_ar.md new file mode 100644 index 00000000000000..3075d4252c178c --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_arap_ar.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Arabic bert_qa_arap BertForQuestionAnswering from gfdgdfgdg +author: John Snow Labs +name: bert_qa_arap +date: 2023-11-12 +tags: [bert, ar, open_source, question_answering, onnx] +task: Question Answering +language: ar +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_arap` is a Arabic model originally trained by gfdgdfgdg. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_arap_ar_5.2.0_3.0_1699781625274.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_arap_ar_5.2.0_3.0_1699781625274.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_arap","ar") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_arap", "ar") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_arap| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|ar| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/gfdgdfgdg/arap_qa_bert \ No newline at end of file From 24b09d947336060ee1ab947038c4695df6263442 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:35:54 +0700 Subject: [PATCH 008/255] Add model 2023-11-12-bert_qa_base_cased_squad_v1_en --- ...23-11-12-bert_qa_base_cased_squad_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_squad_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_squad_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_squad_v1_en.md new file mode 100644 index 00000000000000..aa6a76ab67caf6 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_squad_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_base_cased_squad_v1 BertForQuestionAnswering from batterydata +author: John Snow Labs +name: bert_qa_base_cased_squad_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_cased_squad_v1` is a English model originally trained by batterydata. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_cased_squad_v1_en_5.2.0_3.0_1699781630158.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_cased_squad_v1_en_5.2.0_3.0_1699781630158.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_cased_squad_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_cased_squad_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_cased_squad_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/batterydata/bert-base-cased-squad-v1 \ No newline at end of file From 06cd1b914b180d28c7a48c644e8afd90e2c36569 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:36:54 +0700 Subject: [PATCH 009/255] Add model 2023-11-12-bert_qa_base_cased_squad_v1.1_portuguese_pt --- ..._qa_base_cased_squad_v1.1_portuguese_pt.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_squad_v1.1_portuguese_pt.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_squad_v1.1_portuguese_pt.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_squad_v1.1_portuguese_pt.md new file mode 100644 index 00000000000000..41949376850cb7 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_squad_v1.1_portuguese_pt.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Portuguese bert_qa_base_cased_squad_v1.1_portuguese BertForQuestionAnswering from pierreguillou +author: John Snow Labs +name: bert_qa_base_cased_squad_v1.1_portuguese +date: 2023-11-12 +tags: [bert, pt, open_source, question_answering, onnx] +task: Question Answering +language: pt +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_cased_squad_v1.1_portuguese` is a Portuguese model originally trained by pierreguillou. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_cased_squad_v1.1_portuguese_pt_5.2.0_3.0_1699781642034.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_cased_squad_v1.1_portuguese_pt_5.2.0_3.0_1699781642034.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_cased_squad_v1.1_portuguese","pt") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_cased_squad_v1.1_portuguese", "pt") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_cased_squad_v1.1_portuguese| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|pt| +|Size:|405.9 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/pierreguillou/bert-base-cased-squad-v1.1-portuguese \ No newline at end of file From 109444e987455d205e8129b1aead5c9a74541b5f Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:37:55 +0700 Subject: [PATCH 010/255] Add model 2023-11-12-bert_qa_base_uncased_squadv1_x2.01_f89.2_d30_hybrid_rewind_opt_v1_en --- ...x2.01_f89.2_d30_hybrid_rewind_opt_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x2.01_f89.2_d30_hybrid_rewind_opt_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x2.01_f89.2_d30_hybrid_rewind_opt_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x2.01_f89.2_d30_hybrid_rewind_opt_v1_en.md new file mode 100644 index 00000000000000..0e80146bb45078 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x2.01_f89.2_d30_hybrid_rewind_opt_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_base_uncased_squadv1_x2.01_f89.2_d30_hybrid_rewind_opt_v1 BertForQuestionAnswering from madlag +author: John Snow Labs +name: bert_qa_base_uncased_squadv1_x2.01_f89.2_d30_hybrid_rewind_opt_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_uncased_squadv1_x2.01_f89.2_d30_hybrid_rewind_opt_v1` is a English model originally trained by madlag. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squadv1_x2.01_f89.2_d30_hybrid_rewind_opt_v1_en_5.2.0_3.0_1699781844341.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squadv1_x2.01_f89.2_d30_hybrid_rewind_opt_v1_en_5.2.0_3.0_1699781844341.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squadv1_x2.01_f89.2_d30_hybrid_rewind_opt_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_uncased_squadv1_x2.01_f89.2_d30_hybrid_rewind_opt_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_squadv1_x2.01_f89.2_d30_hybrid_rewind_opt_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|193.1 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/madlag/bert-base-uncased-squadv1-x2.01-f89.2-d30-hybrid-rewind-opt-v1 \ No newline at end of file From d92c2ef6913f264f07dbb4a36d8fa45afd79abf9 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:38:55 +0700 Subject: [PATCH 011/255] Add model 2023-11-12-bert_qa_base_finetuned_squad2_en --- ...-11-12-bert_qa_base_finetuned_squad2_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_finetuned_squad2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_finetuned_squad2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_finetuned_squad2_en.md new file mode 100644 index 00000000000000..b686610782d066 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_finetuned_squad2_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_base_finetuned_squad2 BertForQuestionAnswering from phiyodr +author: John Snow Labs +name: bert_qa_base_finetuned_squad2 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_finetuned_squad2` is a English model originally trained by phiyodr. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_finetuned_squad2_en_5.2.0_3.0_1699781918539.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_finetuned_squad2_en_5.2.0_3.0_1699781918539.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_finetuned_squad2","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_finetuned_squad2", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_finetuned_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/phiyodr/bert-base-finetuned-squad2 \ No newline at end of file From 78b8900e2d3f41e9a84a44586ae4aac99f0e70d5 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:39:55 +0700 Subject: [PATCH 012/255] Add model 2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_s_c_es --- ...base_spanish_wwm_cased_finetuned_s_c_es.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_s_c_es.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_s_c_es.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_s_c_es.md new file mode 100644 index 00000000000000..0720492d3dbc7a --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_s_c_es.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Castilian, Spanish bert_qa_base_spanish_wwm_cased_finetuned_s_c BertForQuestionAnswering from MMG +author: John Snow Labs +name: bert_qa_base_spanish_wwm_cased_finetuned_s_c +date: 2023-11-12 +tags: [bert, es, open_source, question_answering, onnx] +task: Question Answering +language: es +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_spanish_wwm_cased_finetuned_s_c` is a Castilian, Spanish model originally trained by MMG. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_spanish_wwm_cased_finetuned_s_c_es_5.2.0_3.0_1699781982780.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_spanish_wwm_cased_finetuned_s_c_es_5.2.0_3.0_1699781982780.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_spanish_wwm_cased_finetuned_s_c","es") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_spanish_wwm_cased_finetuned_s_c", "es") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_spanish_wwm_cased_finetuned_s_c| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|es| +|Size:|409.5 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/MMG/bert-base-spanish-wwm-cased-finetuned-sqac \ No newline at end of file From b2b68724863288f5a55043c8780a19b6ac091c28 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:40:56 +0700 Subject: [PATCH 013/255] Add model 2023-11-12-bert_qa_base_multilingual_cased_finetuned_polish_squad2_pl --- ...ingual_cased_finetuned_polish_squad2_pl.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_cased_finetuned_polish_squad2_pl.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_cased_finetuned_polish_squad2_pl.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_cased_finetuned_polish_squad2_pl.md new file mode 100644 index 00000000000000..9834d68c8200c1 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_cased_finetuned_polish_squad2_pl.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Polish bert_qa_base_multilingual_cased_finetuned_polish_squad2 BertForQuestionAnswering from henryk +author: John Snow Labs +name: bert_qa_base_multilingual_cased_finetuned_polish_squad2 +date: 2023-11-12 +tags: [bert, pl, open_source, question_answering, onnx] +task: Question Answering +language: pl +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_multilingual_cased_finetuned_polish_squad2` is a Polish model originally trained by henryk. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_multilingual_cased_finetuned_polish_squad2_pl_5.2.0_3.0_1699781674966.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_multilingual_cased_finetuned_polish_squad2_pl_5.2.0_3.0_1699781674966.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_multilingual_cased_finetuned_polish_squad2","pl") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_multilingual_cased_finetuned_polish_squad2", "pl") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_multilingual_cased_finetuned_polish_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|pl| +|Size:|665.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/henryk/bert-base-multilingual-cased-finetuned-polish-squad2 \ No newline at end of file From df174ac982174cac2b6c0f546d8b1d888de4639f Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:41:56 +0700 Subject: [PATCH 014/255] Add model 2023-11-12-bert_qa_base_swedish_squad2_sv --- ...23-11-12-bert_qa_base_swedish_squad2_sv.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_swedish_squad2_sv.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_swedish_squad2_sv.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_swedish_squad2_sv.md new file mode 100644 index 00000000000000..797608ead19d47 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_swedish_squad2_sv.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Swedish bert_qa_base_swedish_squad2 BertForQuestionAnswering from susumu2357 +author: John Snow Labs +name: bert_qa_base_swedish_squad2 +date: 2023-11-12 +tags: [bert, sv, open_source, question_answering, onnx] +task: Question Answering +language: sv +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_swedish_squad2` is a Swedish model originally trained by susumu2357. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_swedish_squad2_sv_5.2.0_3.0_1699781919044.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_swedish_squad2_sv_5.2.0_3.0_1699781919044.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_swedish_squad2","sv") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_swedish_squad2", "sv") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_swedish_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|sv| +|Size:|465.2 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/susumu2357/bert-base-swedish-squad2 \ No newline at end of file From 9342e38c8bb1d1e676efbb061d8168531e5d337c Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:42:56 +0700 Subject: [PATCH 015/255] Add model 2023-11-12-bert_qa_batteryonly_uncased_squad_v1_en --- ...bert_qa_batteryonly_uncased_squad_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_batteryonly_uncased_squad_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_batteryonly_uncased_squad_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_batteryonly_uncased_squad_v1_en.md new file mode 100644 index 00000000000000..c2e9a47aea3b85 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_batteryonly_uncased_squad_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_batteryonly_uncased_squad_v1 BertForQuestionAnswering from batterydata +author: John Snow Labs +name: bert_qa_batteryonly_uncased_squad_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_batteryonly_uncased_squad_v1` is a English model originally trained by batterydata. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_batteryonly_uncased_squad_v1_en_5.2.0_3.0_1699782126318.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_batteryonly_uncased_squad_v1_en_5.2.0_3.0_1699782126318.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_batteryonly_uncased_squad_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_batteryonly_uncased_squad_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_batteryonly_uncased_squad_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|408.1 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/batterydata/batteryonlybert-uncased-squad-v1 \ No newline at end of file From 4b764601cedc37facfd02734188193af03c3b63f Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:43:57 +0700 Subject: [PATCH 016/255] Add model 2023-11-12-bert_qa_base_uncased_squad_v1_en --- ...-11-12-bert_qa_base_uncased_squad_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad_v1_en.md new file mode 100644 index 00000000000000..f46908af204108 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_base_uncased_squad_v1 BertForQuestionAnswering from batterydata +author: John Snow Labs +name: bert_qa_base_uncased_squad_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_uncased_squad_v1` is a English model originally trained by batterydata. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad_v1_en_5.2.0_3.0_1699782199497.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad_v1_en_5.2.0_3.0_1699782199497.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squad_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_uncased_squad_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_squad_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/batterydata/bert-base-uncased-squad-v1 \ No newline at end of file From fa2cf389c6989565be88c4e4ba8c6b5a8017c2d9 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:44:57 +0700 Subject: [PATCH 017/255] Add model 2023-11-12-bert_qa_base_multilingual_cased_finetuned_polish_squad1_pl --- ...ingual_cased_finetuned_polish_squad1_pl.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_cased_finetuned_polish_squad1_pl.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_cased_finetuned_polish_squad1_pl.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_cased_finetuned_polish_squad1_pl.md new file mode 100644 index 00000000000000..74bbc88fa8551a --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_cased_finetuned_polish_squad1_pl.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Polish bert_qa_base_multilingual_cased_finetuned_polish_squad1 BertForQuestionAnswering from henryk +author: John Snow Labs +name: bert_qa_base_multilingual_cased_finetuned_polish_squad1 +date: 2023-11-12 +tags: [bert, pl, open_source, question_answering, onnx] +task: Question Answering +language: pl +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_multilingual_cased_finetuned_polish_squad1` is a Polish model originally trained by henryk. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_multilingual_cased_finetuned_polish_squad1_pl_5.2.0_3.0_1699782279830.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_multilingual_cased_finetuned_polish_squad1_pl_5.2.0_3.0_1699782279830.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_multilingual_cased_finetuned_polish_squad1","pl") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_multilingual_cased_finetuned_polish_squad1", "pl") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_multilingual_cased_finetuned_polish_squad1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|pl| +|Size:|665.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/henryk/bert-base-multilingual-cased-finetuned-polish-squad1 \ No newline at end of file From 3851244e7668c95edebc0b3fb8aeb4d9dadacc28 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:45:57 +0700 Subject: [PATCH 018/255] Add model 2023-11-12-bert_qa_arap_large_v2_ar --- .../2023-11-12-bert_qa_arap_large_v2_ar.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_arap_large_v2_ar.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_arap_large_v2_ar.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_arap_large_v2_ar.md new file mode 100644 index 00000000000000..63ad04971313f2 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_arap_large_v2_ar.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Arabic bert_qa_arap_large_v2 BertForQuestionAnswering from gfdgdfgdg +author: John Snow Labs +name: bert_qa_arap_large_v2 +date: 2023-11-12 +tags: [bert, ar, open_source, question_answering, onnx] +task: Question Answering +language: ar +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_arap_large_v2` is a Arabic model originally trained by gfdgdfgdg. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_arap_large_v2_ar_5.2.0_3.0_1699782151696.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_arap_large_v2_ar_5.2.0_3.0_1699782151696.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_arap_large_v2","ar") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_arap_large_v2", "ar") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_arap_large_v2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|ar| +|Size:|1.4 GB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/gfdgdfgdg/arap_qa_bert_large_v2 \ No newline at end of file From 71a1fb1ad3615954dde3228c1be49b55112dedfc Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:46:57 +0700 Subject: [PATCH 019/255] Add model 2023-11-12-bert_qa_distiled_medium_squad2_en --- ...11-12-bert_qa_distiled_medium_squad2_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_distiled_medium_squad2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_distiled_medium_squad2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_distiled_medium_squad2_en.md new file mode 100644 index 00000000000000..07855ac7b4e086 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_distiled_medium_squad2_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_distiled_medium_squad2 BertForQuestionAnswering from Shobhank-iiitdwd +author: John Snow Labs +name: bert_qa_distiled_medium_squad2 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_distiled_medium_squad2` is a English model originally trained by Shobhank-iiitdwd. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_distiled_medium_squad2_en_5.2.0_3.0_1699782361823.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_distiled_medium_squad2_en_5.2.0_3.0_1699782361823.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_distiled_medium_squad2","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_distiled_medium_squad2", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_distiled_medium_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|154.2 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/Shobhank-iiitdwd/Distiled-bert-medium-squad2-QA \ No newline at end of file From b0301ca8979eb9223e752cfde0dad1c4fcf8f2cc Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:47:57 +0700 Subject: [PATCH 020/255] Add model 2023-11-12-bert_qa_base_uncased_squadv1_x1.16_f88.1_d8_unstruct_v1_en --- ...d_squadv1_x1.16_f88.1_d8_unstruct_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x1.16_f88.1_d8_unstruct_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x1.16_f88.1_d8_unstruct_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x1.16_f88.1_d8_unstruct_v1_en.md new file mode 100644 index 00000000000000..98f96456d4199e --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x1.16_f88.1_d8_unstruct_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_base_uncased_squadv1_x1.16_f88.1_d8_unstruct_v1 BertForQuestionAnswering from madlag +author: John Snow Labs +name: bert_qa_base_uncased_squadv1_x1.16_f88.1_d8_unstruct_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_uncased_squadv1_x1.16_f88.1_d8_unstruct_v1` is a English model originally trained by madlag. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squadv1_x1.16_f88.1_d8_unstruct_v1_en_5.2.0_3.0_1699782439487.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squadv1_x1.16_f88.1_d8_unstruct_v1_en_5.2.0_3.0_1699782439487.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squadv1_x1.16_f88.1_d8_unstruct_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_uncased_squadv1_x1.16_f88.1_d8_unstruct_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_squadv1_x1.16_f88.1_d8_unstruct_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|145.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/madlag/bert-base-uncased-squadv1-x1.16-f88.1-d8-unstruct-v1 \ No newline at end of file From 30b3ace8a1eeb023fb6319b1f1a68ad2aa01a336 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:48:58 +0700 Subject: [PATCH 021/255] Add model 2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_squad2_es --- ...e_spanish_wwm_cased_finetuned_squad2_es.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_squad2_es.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_squad2_es.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_squad2_es.md new file mode 100644 index 00000000000000..3f2e3d0a6d7218 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_squad2_es.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Castilian, Spanish bert_qa_base_spanish_wwm_cased_finetuned_squad2 BertForQuestionAnswering from MMG +author: John Snow Labs +name: bert_qa_base_spanish_wwm_cased_finetuned_squad2 +date: 2023-11-12 +tags: [bert, es, open_source, question_answering, onnx] +task: Question Answering +language: es +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_spanish_wwm_cased_finetuned_squad2` is a Castilian, Spanish model originally trained by MMG. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_spanish_wwm_cased_finetuned_squad2_es_5.2.0_3.0_1699782470750.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_spanish_wwm_cased_finetuned_squad2_es_5.2.0_3.0_1699782470750.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_spanish_wwm_cased_finetuned_squad2","es") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_spanish_wwm_cased_finetuned_squad2", "es") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_spanish_wwm_cased_finetuned_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|es| +|Size:|409.5 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/MMG/bert-base-spanish-wwm-cased-finetuned-squad2-es \ No newline at end of file From d860bd06a888bde203bdbf940344c2ead75ad337 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:49:58 +0700 Subject: [PATCH 022/255] Add model 2023-11-12-bert_qa_base_multilingual_cased_finetuned_dutch_squad2_nl --- ...lingual_cased_finetuned_dutch_squad2_nl.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_cased_finetuned_dutch_squad2_nl.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_cased_finetuned_dutch_squad2_nl.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_cased_finetuned_dutch_squad2_nl.md new file mode 100644 index 00000000000000..743a007da2eb29 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_cased_finetuned_dutch_squad2_nl.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Dutch, Flemish bert_qa_base_multilingual_cased_finetuned_dutch_squad2 BertForQuestionAnswering from henryk +author: John Snow Labs +name: bert_qa_base_multilingual_cased_finetuned_dutch_squad2 +date: 2023-11-12 +tags: [bert, nl, open_source, question_answering, onnx] +task: Question Answering +language: nl +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_multilingual_cased_finetuned_dutch_squad2` is a Dutch, Flemish model originally trained by henryk. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_multilingual_cased_finetuned_dutch_squad2_nl_5.2.0_3.0_1699782486758.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_multilingual_cased_finetuned_dutch_squad2_nl_5.2.0_3.0_1699782486758.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_multilingual_cased_finetuned_dutch_squad2","nl") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_multilingual_cased_finetuned_dutch_squad2", "nl") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_multilingual_cased_finetuned_dutch_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|nl| +|Size:|665.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/henryk/bert-base-multilingual-cased-finetuned-dutch-squad2 \ No newline at end of file From f7053b47f562556c652f1ab5e8db702f6753f3ac Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:50:58 +0700 Subject: [PATCH 023/255] Add model 2023-11-12-bert_qa_italian_finedtuned_squadv1_italian_alfa_it --- ...lian_finedtuned_squadv1_italian_alfa_it.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_italian_finedtuned_squadv1_italian_alfa_it.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_italian_finedtuned_squadv1_italian_alfa_it.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_italian_finedtuned_squadv1_italian_alfa_it.md new file mode 100644 index 00000000000000..2e00602638bb1e --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_italian_finedtuned_squadv1_italian_alfa_it.md @@ -0,0 +1,93 @@ +--- +layout: model +title: Italian bert_qa_italian_finedtuned_squadv1_italian_alfa BertForQuestionAnswering from mrm8488 +author: John Snow Labs +name: bert_qa_italian_finedtuned_squadv1_italian_alfa +date: 2023-11-12 +tags: [bert, it, open_source, question_answering, onnx] +task: Question Answering +language: it +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_italian_finedtuned_squadv1_italian_alfa` is a Italian model originally trained by mrm8488. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_italian_finedtuned_squadv1_italian_alfa_it_5.2.0_3.0_1699782548719.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_italian_finedtuned_squadv1_italian_alfa_it_5.2.0_3.0_1699782548719.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_italian_finedtuned_squadv1_italian_alfa","it") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_italian_finedtuned_squadv1_italian_alfa", "it") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_italian_finedtuned_squadv1_italian_alfa| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|it| +|Size:|409.6 MB| + +## References + +https://huggingface.co/mrm8488/bert-italian-finedtuned-squadv1-it-alfa \ No newline at end of file From 939a9ad45b9a0a76ab6fa756b421c35e50a2f500 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:51:58 +0700 Subject: [PATCH 024/255] Add model 2023-11-12-bert_qa_base_uncased_squadv1_x1.84_f88.7_d36_hybrid_filled_v1_en --- ...dv1_x1.84_f88.7_d36_hybrid_filled_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x1.84_f88.7_d36_hybrid_filled_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x1.84_f88.7_d36_hybrid_filled_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x1.84_f88.7_d36_hybrid_filled_v1_en.md new file mode 100644 index 00000000000000..8ae608e93c57da --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x1.84_f88.7_d36_hybrid_filled_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_base_uncased_squadv1_x1.84_f88.7_d36_hybrid_filled_v1 BertForQuestionAnswering from madlag +author: John Snow Labs +name: bert_qa_base_uncased_squadv1_x1.84_f88.7_d36_hybrid_filled_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_uncased_squadv1_x1.84_f88.7_d36_hybrid_filled_v1` is a English model originally trained by madlag. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squadv1_x1.84_f88.7_d36_hybrid_filled_v1_en_5.2.0_3.0_1699782682798.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squadv1_x1.84_f88.7_d36_hybrid_filled_v1_en_5.2.0_3.0_1699782682798.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squadv1_x1.84_f88.7_d36_hybrid_filled_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_uncased_squadv1_x1.84_f88.7_d36_hybrid_filled_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_squadv1_x1.84_f88.7_d36_hybrid_filled_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|205.9 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/madlag/bert-base-uncased-squadv1-x1.84-f88.7-d36-hybrid-filled-v1 \ No newline at end of file From 4518b7fcced8ec7be3babd16d4be510dbb0f724e Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:52:58 +0700 Subject: [PATCH 025/255] Add model 2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_es --- ...anish_wwm_cased_finetuned_spa_squad2_es.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_es.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_es.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_es.md new file mode 100644 index 00000000000000..067deb8da9476e --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_es.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Castilian, Spanish bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2 BertForQuestionAnswering from mrm8488 +author: John Snow Labs +name: bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2 +date: 2023-11-12 +tags: [bert, es, open_source, question_answering, onnx] +task: Question Answering +language: es +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2` is a Castilian, Spanish model originally trained by mrm8488. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_es_5.2.0_3.0_1699782227618.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_es_5.2.0_3.0_1699782227618.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2","es") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2", "es") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|es| +|Size:|409.5 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/mrm8488/bert-base-spanish-wwm-cased-finetuned-spa-squad2-es \ No newline at end of file From b1b048c90ade1591929acead8d14e23f5bf036f8 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:53:59 +0700 Subject: [PATCH 026/255] Add model 2023-11-12-bert_qa_base_turkish_squad_tr --- ...023-11-12-bert_qa_base_turkish_squad_tr.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_turkish_squad_tr.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_turkish_squad_tr.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_turkish_squad_tr.md new file mode 100644 index 00000000000000..f7904d923a5388 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_turkish_squad_tr.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Turkish bert_qa_base_turkish_squad BertForQuestionAnswering from savasy +author: John Snow Labs +name: bert_qa_base_turkish_squad +date: 2023-11-12 +tags: [bert, tr, open_source, question_answering, onnx] +task: Question Answering +language: tr +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_turkish_squad` is a Turkish model originally trained by savasy. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_turkish_squad_tr_5.2.0_3.0_1699782767219.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_turkish_squad_tr_5.2.0_3.0_1699782767219.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_turkish_squad","tr") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_turkish_squad", "tr") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_turkish_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|tr| +|Size:|412.3 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/savasy/bert-base-turkish-squad \ No newline at end of file From f626231a6b103e6276fbd0f33bf141591590bb6c Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:54:59 +0700 Subject: [PATCH 027/255] Add model 2023-11-12-bert_qa_base_uncased_finetuned_news_en --- ...-bert_qa_base_uncased_finetuned_news_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_finetuned_news_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_finetuned_news_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_finetuned_news_en.md new file mode 100644 index 00000000000000..b81aeb99175319 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_finetuned_news_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_base_uncased_finetuned_news BertForQuestionAnswering from mirbostani +author: John Snow Labs +name: bert_qa_base_uncased_finetuned_news +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_uncased_finetuned_news` is a English model originally trained by mirbostani. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_finetuned_news_en_5.2.0_3.0_1699782754816.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_finetuned_news_en_5.2.0_3.0_1699782754816.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_finetuned_news","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_uncased_finetuned_news", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_finetuned_news| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.1 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/mirbostani/bert-base-uncased-finetuned-newsqa \ No newline at end of file From 9d36d61984db6afaec7c54dbdc6cde85f3e6a0d4 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:55:59 +0700 Subject: [PATCH 028/255] Add model 2023-11-12-bert_qa_base_uncased_squadv1_x1.96_f88.3_d27_hybrid_filled_opt_v1_en --- ...x1.96_f88.3_d27_hybrid_filled_opt_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x1.96_f88.3_d27_hybrid_filled_opt_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x1.96_f88.3_d27_hybrid_filled_opt_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x1.96_f88.3_d27_hybrid_filled_opt_v1_en.md new file mode 100644 index 00000000000000..22a2c0e8583d65 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x1.96_f88.3_d27_hybrid_filled_opt_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_base_uncased_squadv1_x1.96_f88.3_d27_hybrid_filled_opt_v1 BertForQuestionAnswering from madlag +author: John Snow Labs +name: bert_qa_base_uncased_squadv1_x1.96_f88.3_d27_hybrid_filled_opt_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_uncased_squadv1_x1.96_f88.3_d27_hybrid_filled_opt_v1` is a English model originally trained by madlag. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squadv1_x1.96_f88.3_d27_hybrid_filled_opt_v1_en_5.2.0_3.0_1699782925798.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squadv1_x1.96_f88.3_d27_hybrid_filled_opt_v1_en_5.2.0_3.0_1699782925798.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squadv1_x1.96_f88.3_d27_hybrid_filled_opt_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_uncased_squadv1_x1.96_f88.3_d27_hybrid_filled_opt_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_squadv1_x1.96_f88.3_d27_hybrid_filled_opt_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|187.1 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/madlag/bert-base-uncased-squadv1-x1.96-f88.3-d27-hybrid-filled-opt-v1 \ No newline at end of file From 50aac533a654d16266d91b1a90d291753aa34119 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:57:00 +0700 Subject: [PATCH 029/255] Add model 2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.07_v1_en --- ...ncased_squad1.1_block_sparse_0.07_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.07_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.07_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.07_v1_en.md new file mode 100644 index 00000000000000..45403e30f75527 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.07_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_base_uncased_squad1.1_block_sparse_0.07_v1 BertForQuestionAnswering from madlag +author: John Snow Labs +name: bert_qa_base_uncased_squad1.1_block_sparse_0.07_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_uncased_squad1.1_block_sparse_0.07_v1` is a English model originally trained by madlag. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad1.1_block_sparse_0.07_v1_en_5.2.0_3.0_1699782975867.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad1.1_block_sparse_0.07_v1_en_5.2.0_3.0_1699782975867.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squad1.1_block_sparse_0.07_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_uncased_squad1.1_block_sparse_0.07_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_squad1.1_block_sparse_0.07_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|132.6 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/madlag/bert-base-uncased-squad1.1-block-sparse-0.07-v1 \ No newline at end of file From 174c58a2ef91df733c6ec3f6644d094d5fa1a750 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:58:00 +0700 Subject: [PATCH 030/255] Add model 2023-11-12-bert_qa_battery_cased_squad_v1_en --- ...11-12-bert_qa_battery_cased_squad_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_battery_cased_squad_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_battery_cased_squad_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_battery_cased_squad_v1_en.md new file mode 100644 index 00000000000000..c1488167a5156f --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_battery_cased_squad_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_battery_cased_squad_v1 BertForQuestionAnswering from batterydata +author: John Snow Labs +name: bert_qa_battery_cased_squad_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_battery_cased_squad_v1` is a English model originally trained by batterydata. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_battery_cased_squad_v1_en_5.2.0_3.0_1699783036370.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_battery_cased_squad_v1_en_5.2.0_3.0_1699783036370.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_battery_cased_squad_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_battery_cased_squad_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_battery_cased_squad_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/batterydata/batterybert-cased-squad-v1 \ No newline at end of file From 8a06672faf31759e10a00fc45ade5057d9d541fc Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 16:59:00 +0700 Subject: [PATCH 031/255] Add model 2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad_es --- ..._cased_finetuned_s_c_finetuned_squad_es.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad_es.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad_es.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad_es.md new file mode 100644 index 00000000000000..17b2bf7f59e494 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad_es.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Castilian, Spanish bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad BertForQuestionAnswering from MMG +author: John Snow Labs +name: bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad +date: 2023-11-12 +tags: [bert, es, open_source, question_answering, onnx] +task: Question Answering +language: es +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad` is a Castilian, Spanish model originally trained by MMG. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad_es_5.2.0_3.0_1699783117208.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad_es_5.2.0_3.0_1699783117208.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad","es") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad", "es") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|es| +|Size:|409.5 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/MMG/bert-base-spanish-wwm-cased-finetuned-sqac-finetuned-squad \ No newline at end of file From 7702a24fc284ccc373fff228e357a4cc62fa38da Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:00:00 +0700 Subject: [PATCH 032/255] Add model 2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.20_v1_en --- ...ncased_squad1.1_block_sparse_0.20_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.20_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.20_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.20_v1_en.md new file mode 100644 index 00000000000000..5e50ade13aef8c --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.20_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_base_uncased_squad1.1_block_sparse_0.20_v1 BertForQuestionAnswering from madlag +author: John Snow Labs +name: bert_qa_base_uncased_squad1.1_block_sparse_0.20_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_uncased_squad1.1_block_sparse_0.20_v1` is a English model originally trained by madlag. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad1.1_block_sparse_0.20_v1_en_5.2.0_3.0_1699783190361.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad1.1_block_sparse_0.20_v1_en_5.2.0_3.0_1699783190361.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squad1.1_block_sparse_0.20_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_uncased_squad1.1_block_sparse_0.20_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_squad1.1_block_sparse_0.20_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|172.1 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/madlag/bert-base-uncased-squad1.1-block-sparse-0.20-v1 \ No newline at end of file From d5459d3fc8cc3ee40c099328e01c36d59f25a4f4 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:01:01 +0700 Subject: [PATCH 033/255] Add model 2023-11-12-bert_qa_base_sinhala_si --- .../2023-11-12-bert_qa_base_sinhala_si.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_sinhala_si.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_sinhala_si.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_sinhala_si.md new file mode 100644 index 00000000000000..0b85fee212f758 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_sinhala_si.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Sinhala, Sinhalese bert_qa_base_sinhala BertForQuestionAnswering from sankhajay +author: John Snow Labs +name: bert_qa_base_sinhala +date: 2023-11-12 +tags: [bert, si, open_source, question_answering, onnx] +task: Question Answering +language: si +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_sinhala` is a Sinhala, Sinhalese model originally trained by sankhajay. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_sinhala_si_5.2.0_3.0_1699782858660.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_sinhala_si_5.2.0_3.0_1699782858660.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_sinhala","si") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_sinhala", "si") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_sinhala| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|si| +|Size:|751.9 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/sankhajay/bert-base-sinhala-qa \ No newline at end of file From d96d2fb1da7a3060ef68bb5f82eb716504f1c362 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:02:01 +0700 Subject: [PATCH 034/255] Add model 2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_spanish_finetuned_s_c_es --- ...ned_spa_squad2_spanish_finetuned_s_c_es.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_spanish_finetuned_s_c_es.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_spanish_finetuned_s_c_es.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_spanish_finetuned_s_c_es.md new file mode 100644 index 00000000000000..044a037ce9cd95 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_spanish_finetuned_s_c_es.md @@ -0,0 +1,93 @@ +--- +layout: model +title: Castilian, Spanish bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_spanish_finetuned_s_c BertForQuestionAnswering from MMG +author: John Snow Labs +name: bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_spanish_finetuned_s_c +date: 2023-11-12 +tags: [bert, es, open_source, question_answering, onnx] +task: Question Answering +language: es +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_spanish_finetuned_s_c` is a Castilian, Spanish model originally trained by MMG. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_spanish_finetuned_s_c_es_5.2.0_3.0_1699783294681.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_spanish_finetuned_s_c_es_5.2.0_3.0_1699783294681.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_spanish_finetuned_s_c","es") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_spanish_finetuned_s_c", "es") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_spanish_wwm_cased_finetuned_spa_squad2_spanish_finetuned_s_c| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|es| +|Size:|409.5 MB| + +## References + +https://huggingface.co/MMG/bert-base-spanish-wwm-cased-finetuned-spa-squad2-es-finetuned-sqac \ No newline at end of file From b4e793791e850e99e1826523c923f0c8d3ffcfb7 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:03:02 +0700 Subject: [PATCH 035/255] Add model 2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pistherea_conll2003_with_neg_with_repeat_en --- ...herea_conll2003_with_neg_with_repeat_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pistherea_conll2003_with_neg_with_repeat_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pistherea_conll2003_with_neg_with_repeat_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pistherea_conll2003_with_neg_with_repeat_en.md new file mode 100644 index 00000000000000..808381caeedd14 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pistherea_conll2003_with_neg_with_repeat_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pistherea_conll2003_with_neg_with_repeat BertForQuestionAnswering from andi611 +author: John Snow Labs +name: bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pistherea_conll2003_with_neg_with_repeat +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pistherea_conll2003_with_neg_with_repeat` is a English model originally trained by andi611. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pistherea_conll2003_with_neg_with_repeat_en_5.2.0_3.0_1699783049982.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pistherea_conll2003_with_neg_with_repeat_en_5.2.0_3.0_1699783049982.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pistherea_conll2003_with_neg_with_repeat","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pistherea_conll2003_with_neg_with_repeat", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pistherea_conll2003_with_neg_with_repeat| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|1.3 GB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/andi611/bert-large-uncased-whole-word-masking-squad2-with-ner-Pistherea-conll2003-with-neg-with-repeat \ No newline at end of file From dec1eb6c3d425ad76675ec630176117d762b3d55 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:04:02 +0700 Subject: [PATCH 036/255] Add model 2023-11-12-bert_qa_battery_uncased_squad_v1_en --- ...-12-bert_qa_battery_uncased_squad_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_battery_uncased_squad_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_battery_uncased_squad_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_battery_uncased_squad_v1_en.md new file mode 100644 index 00000000000000..df5c31f5825f29 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_battery_uncased_squad_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_battery_uncased_squad_v1 BertForQuestionAnswering from batterydata +author: John Snow Labs +name: bert_qa_battery_uncased_squad_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_battery_uncased_squad_v1` is a English model originally trained by batterydata. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_battery_uncased_squad_v1_en_5.2.0_3.0_1699783423288.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_battery_uncased_squad_v1_en_5.2.0_3.0_1699783423288.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_battery_uncased_squad_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_battery_uncased_squad_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_battery_uncased_squad_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.1 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/batterydata/batterybert-uncased-squad-v1 \ No newline at end of file From 8be1c62bc51718a3c3f7791c4618bc10d4aa1270 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:05:02 +0700 Subject: [PATCH 037/255] Add model 2023-11-12-bert_qa_base_uncased_squadv1_x2.44_f87.7_d26_hybrid_filled_v1_en --- ...dv1_x2.44_f87.7_d26_hybrid_filled_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x2.44_f87.7_d26_hybrid_filled_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x2.44_f87.7_d26_hybrid_filled_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x2.44_f87.7_d26_hybrid_filled_v1_en.md new file mode 100644 index 00000000000000..b7d2d5e82e3f02 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x2.44_f87.7_d26_hybrid_filled_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_base_uncased_squadv1_x2.44_f87.7_d26_hybrid_filled_v1 BertForQuestionAnswering from madlag +author: John Snow Labs +name: bert_qa_base_uncased_squadv1_x2.44_f87.7_d26_hybrid_filled_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_uncased_squadv1_x2.44_f87.7_d26_hybrid_filled_v1` is a English model originally trained by madlag. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squadv1_x2.44_f87.7_d26_hybrid_filled_v1_en_5.2.0_3.0_1699783123612.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squadv1_x2.44_f87.7_d26_hybrid_filled_v1_en_5.2.0_3.0_1699783123612.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squadv1_x2.44_f87.7_d26_hybrid_filled_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_uncased_squadv1_x2.44_f87.7_d26_hybrid_filled_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_squadv1_x2.44_f87.7_d26_hybrid_filled_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|173.6 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/madlag/bert-base-uncased-squadv1-x2.44-f87.7-d26-hybrid-filled-v1 \ No newline at end of file From de9694360230e35e16c29274143c9fe7aa1df695 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:06:02 +0700 Subject: [PATCH 038/255] Add model 2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad2_es --- ...cased_finetuned_s_c_finetuned_squad2_es.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad2_es.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad2_es.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad2_es.md new file mode 100644 index 00000000000000..d1ef9a19f5b065 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad2_es.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Castilian, Spanish bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad2 BertForQuestionAnswering from MMG +author: John Snow Labs +name: bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad2 +date: 2023-11-12 +tags: [bert, es, open_source, question_answering, onnx] +task: Question Answering +language: es +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad2` is a Castilian, Spanish model originally trained by MMG. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad2_es_5.2.0_3.0_1699782522865.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad2_es_5.2.0_3.0_1699782522865.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad2","es") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad2", "es") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_spanish_wwm_cased_finetuned_s_c_finetuned_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|es| +|Size:|409.5 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/MMG/bert-base-spanish-wwm-cased-finetuned-sqac-finetuned-squad2-es \ No newline at end of file From 4f95a7f1298942619b89d2929a931cdd1dc399ac Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:07:02 +0700 Subject: [PATCH 039/255] Add model 2023-11-12-bert_qa_batterysci_cased_squad_v1_en --- ...12-bert_qa_batterysci_cased_squad_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_batterysci_cased_squad_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_batterysci_cased_squad_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_batterysci_cased_squad_v1_en.md new file mode 100644 index 00000000000000..47ccc54327f9c6 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_batterysci_cased_squad_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_batterysci_cased_squad_v1 BertForQuestionAnswering from batterydata +author: John Snow Labs +name: bert_qa_batterysci_cased_squad_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_batterysci_cased_squad_v1` is a English model originally trained by batterydata. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_batterysci_cased_squad_v1_en_5.2.0_3.0_1699783492180.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_batterysci_cased_squad_v1_en_5.2.0_3.0_1699783492180.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_batterysci_cased_squad_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_batterysci_cased_squad_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_batterysci_cased_squad_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|409.9 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/batterydata/batteryscibert-cased-squad-v1 \ No newline at end of file From 0a90e6f1328a2fae4ca0c304c5b127818113fb30 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:08:03 +0700 Subject: [PATCH 040/255] Add model 2023-11-12-bert_qa_bertv1_fine_en --- .../2023-11-12-bert_qa_bertv1_fine_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bertv1_fine_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bertv1_fine_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bertv1_fine_en.md new file mode 100644 index 00000000000000..084f9e2203410b --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bertv1_fine_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_bertv1_fine BertForQuestionAnswering from JAlexis +author: John Snow Labs +name: bert_qa_bertv1_fine +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bertv1_fine` is a English model originally trained by JAlexis. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bertv1_fine_en_5.2.0_3.0_1699783655316.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bertv1_fine_en_5.2.0_3.0_1699783655316.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bertv1_fine","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bertv1_fine", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bertv1_fine| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/JAlexis/Bertv1_fine \ No newline at end of file From fb9fff97f4aa7e527d3f7b530da10ce81bdf0467 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:09:03 +0700 Subject: [PATCH 041/255] Add model 2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.32_v1_en --- ...ncased_squad1.1_block_sparse_0.32_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.32_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.32_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.32_v1_en.md new file mode 100644 index 00000000000000..74c178d332c689 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1.1_block_sparse_0.32_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_base_uncased_squad1.1_block_sparse_0.32_v1 BertForQuestionAnswering from madlag +author: John Snow Labs +name: bert_qa_base_uncased_squad1.1_block_sparse_0.32_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_uncased_squad1.1_block_sparse_0.32_v1` is a English model originally trained by madlag. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad1.1_block_sparse_0.32_v1_en_5.2.0_3.0_1699783735181.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad1.1_block_sparse_0.32_v1_en_5.2.0_3.0_1699783735181.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squad1.1_block_sparse_0.32_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_uncased_squad1.1_block_sparse_0.32_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_squad1.1_block_sparse_0.32_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|207.0 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/madlag/bert-base-uncased-squad1.1-block-sparse-0.32-v1 \ No newline at end of file From 324edee6aa4748598dda30d3f0ce01f3f6ffe784 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:10:03 +0700 Subject: [PATCH 042/255] Add model 2023-11-12-bert_qa_batterysci_uncased_squad_v1_en --- ...-bert_qa_batterysci_uncased_squad_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_batterysci_uncased_squad_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_batterysci_uncased_squad_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_batterysci_uncased_squad_v1_en.md new file mode 100644 index 00000000000000..1f9ee7d92de1d6 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_batterysci_uncased_squad_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_batterysci_uncased_squad_v1 BertForQuestionAnswering from batterydata +author: John Snow Labs +name: bert_qa_batterysci_uncased_squad_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_batterysci_uncased_squad_v1` is a English model originally trained by batterydata. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_batterysci_uncased_squad_v1_en_5.2.0_3.0_1699783784910.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_batterysci_uncased_squad_v1_en_5.2.0_3.0_1699783784910.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_batterysci_uncased_squad_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_batterysci_uncased_squad_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_batterysci_uncased_squad_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|410.0 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/batterydata/batteryscibert-uncased-squad-v1 \ No newline at end of file From a2b1c37112eac004d3bde8ff49a387001d78b6e9 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:11:04 +0700 Subject: [PATCH 043/255] Add model 2023-11-12-bert_qa_gbertqna_de --- .../2023-11-12-bert_qa_gbertqna_de.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_gbertqna_de.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_gbertqna_de.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_gbertqna_de.md new file mode 100644 index 00000000000000..9323a8997eb51e --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_gbertqna_de.md @@ -0,0 +1,95 @@ +--- +layout: model +title: German bert_qa_gbertqna BertForQuestionAnswering from Sahajtomar +author: John Snow Labs +name: bert_qa_gbertqna +date: 2023-11-12 +tags: [bert, de, open_source, question_answering, onnx] +task: Question Answering +language: de +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_gbertqna` is a German model originally trained by Sahajtomar. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_gbertqna_de_5.2.0_3.0_1699783578911.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_gbertqna_de_5.2.0_3.0_1699783578911.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_gbertqna","de") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_gbertqna", "de") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_gbertqna| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|de| +|Size:|1.3 GB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/Sahajtomar/GBERTQnA \ No newline at end of file From bc72765b7f7bfaed2e4d92118653862828f80800 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:12:04 +0700 Subject: [PATCH 044/255] Add model 2023-11-12-bert_qa_pruebabert_en --- .../2023-11-12-bert_qa_pruebabert_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_pruebabert_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_pruebabert_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_pruebabert_en.md new file mode 100644 index 00000000000000..81c3423ca108e4 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_pruebabert_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_pruebabert BertForQuestionAnswering from JAlexis +author: John Snow Labs +name: bert_qa_pruebabert +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_pruebabert` is a English model originally trained by JAlexis. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_pruebabert_en_5.2.0_3.0_1699783903394.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_pruebabert_en_5.2.0_3.0_1699783903394.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_pruebabert","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_pruebabert", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_pruebabert| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/JAlexis/PruebaBert \ No newline at end of file From 9e1ba0d3e055a3a013bb2c469d4ed9053bae0d2c Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:13:04 +0700 Subject: [PATCH 045/255] Add model 2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pwhatisthe_conll2003_with_neg_with_repeat_en --- ...isthe_conll2003_with_neg_with_repeat_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pwhatisthe_conll2003_with_neg_with_repeat_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pwhatisthe_conll2003_with_neg_with_repeat_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pwhatisthe_conll2003_with_neg_with_repeat_en.md new file mode 100644 index 00000000000000..8d440af9585b68 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pwhatisthe_conll2003_with_neg_with_repeat_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pwhatisthe_conll2003_with_neg_with_repeat BertForQuestionAnswering from andi611 +author: John Snow Labs +name: bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pwhatisthe_conll2003_with_neg_with_repeat +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pwhatisthe_conll2003_with_neg_with_repeat` is a English model originally trained by andi611. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pwhatisthe_conll2003_with_neg_with_repeat_en_5.2.0_3.0_1699783587877.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pwhatisthe_conll2003_with_neg_with_repeat_en_5.2.0_3.0_1699783587877.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pwhatisthe_conll2003_with_neg_with_repeat","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pwhatisthe_conll2003_with_neg_with_repeat", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_large_uncased_whole_word_masking_squad2_with_ner_pwhatisthe_conll2003_with_neg_with_repeat| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|1.3 GB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/andi611/bert-large-uncased-whole-word-masking-squad2-with-ner-Pwhatisthe-conll2003-with-neg-with-repeat \ No newline at end of file From eee1ec3b0813cd2b362e514a458507fbcd61ac72 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:14:05 +0700 Subject: [PATCH 046/255] Add model 2023-11-12-bert_qa_base_uncased_squad_v1_sparse0.25_en --- ..._qa_base_uncased_squad_v1_sparse0.25_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad_v1_sparse0.25_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad_v1_sparse0.25_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad_v1_sparse0.25_en.md new file mode 100644 index 00000000000000..143e3177193564 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad_v1_sparse0.25_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_base_uncased_squad_v1_sparse0.25 BertForQuestionAnswering from madlag +author: John Snow Labs +name: bert_qa_base_uncased_squad_v1_sparse0.25 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_uncased_squad_v1_sparse0.25` is a English model originally trained by madlag. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad_v1_sparse0.25_en_5.2.0_3.0_1699783981765.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad_v1_sparse0.25_en_5.2.0_3.0_1699783981765.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squad_v1_sparse0.25","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_uncased_squad_v1_sparse0.25", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_squad_v1_sparse0.25| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|194.1 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/madlag/bert-base-uncased-squad-v1-sparse0.25 \ No newline at end of file From 53b76361ab2e898a45914aaf53114996ef815b9d Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:15:05 +0700 Subject: [PATCH 047/255] Add model 2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_squad2_spanish_finetuned_s_c_es --- ...netuned_squad2_spanish_finetuned_s_c_es.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_squad2_spanish_finetuned_s_c_es.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_squad2_spanish_finetuned_s_c_es.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_squad2_spanish_finetuned_s_c_es.md new file mode 100644 index 00000000000000..f20257219e8aad --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_cased_finetuned_squad2_spanish_finetuned_s_c_es.md @@ -0,0 +1,93 @@ +--- +layout: model +title: Castilian, Spanish bert_qa_base_spanish_wwm_cased_finetuned_squad2_spanish_finetuned_s_c BertForQuestionAnswering from MMG +author: John Snow Labs +name: bert_qa_base_spanish_wwm_cased_finetuned_squad2_spanish_finetuned_s_c +date: 2023-11-12 +tags: [bert, es, open_source, question_answering, onnx] +task: Question Answering +language: es +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_spanish_wwm_cased_finetuned_squad2_spanish_finetuned_s_c` is a Castilian, Spanish model originally trained by MMG. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_spanish_wwm_cased_finetuned_squad2_spanish_finetuned_s_c_es_5.2.0_3.0_1699783492585.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_spanish_wwm_cased_finetuned_squad2_spanish_finetuned_s_c_es_5.2.0_3.0_1699783492585.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_spanish_wwm_cased_finetuned_squad2_spanish_finetuned_s_c","es") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_spanish_wwm_cased_finetuned_squad2_spanish_finetuned_s_c", "es") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_spanish_wwm_cased_finetuned_squad2_spanish_finetuned_s_c| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|es| +|Size:|409.5 MB| + +## References + +https://huggingface.co/MMG/bert-base-spanish-wwm-cased-finetuned-squad2-es-finetuned-sqac \ No newline at end of file From 34f078d03ea2156363e66bc47b23ac577f85bf82 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:16:05 +0700 Subject: [PATCH 048/255] Add model 2023-11-12-bert_qa_srcocotero_en --- .../2023-11-12-bert_qa_srcocotero_en.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_srcocotero_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_srcocotero_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_srcocotero_en.md new file mode 100644 index 00000000000000..9afd0ebe6d25b7 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_srcocotero_en.md @@ -0,0 +1,93 @@ +--- +layout: model +title: English bert_qa_srcocotero BertForQuestionAnswering from srcocotero +author: John Snow Labs +name: bert_qa_srcocotero +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_srcocotero` is a English model originally trained by srcocotero. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_srcocotero_en_5.2.0_3.0_1699784120796.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_srcocotero_en_5.2.0_3.0_1699784120796.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_srcocotero","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_srcocotero", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_srcocotero| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| + +## References + +https://huggingface.co/srcocotero/bert-qa-en \ No newline at end of file From 26ff02df1ee1afd2b96f28ba1a3593ef25235bf2 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:17:14 +0700 Subject: [PATCH 049/255] Add model 2023-11-12-bert_qa_large_cased_whole_word_masking_finetuned_squad_en --- ...d_whole_word_masking_finetuned_squad_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_cased_whole_word_masking_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_cased_whole_word_masking_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_cased_whole_word_masking_finetuned_squad_en.md new file mode 100644 index 00000000000000..3f39721f317823 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_cased_whole_word_masking_finetuned_squad_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_large_cased_whole_word_masking_finetuned_squad BertForQuestionAnswering from huggingface +author: John Snow Labs +name: bert_qa_large_cased_whole_word_masking_finetuned_squad +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_large_cased_whole_word_masking_finetuned_squad` is a English model originally trained by huggingface. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_large_cased_whole_word_masking_finetuned_squad_en_5.2.0_3.0_1699784210088.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_large_cased_whole_word_masking_finetuned_squad_en_5.2.0_3.0_1699784210088.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_large_cased_whole_word_masking_finetuned_squad","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_large_cased_whole_word_masking_finetuned_squad", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_large_cased_whole_word_masking_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|1.2 GB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/bert-large-cased-whole-word-masking-finetuned-squad \ No newline at end of file From 875cd50efbc5acdcd982b0d519af9b8e8aee1f75 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:18:14 +0700 Subject: [PATCH 050/255] Add model 2023-11-12-bert_qa_large_cased_squad_v1.1_portuguese_pt --- ...qa_large_cased_squad_v1.1_portuguese_pt.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_cased_squad_v1.1_portuguese_pt.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_cased_squad_v1.1_portuguese_pt.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_cased_squad_v1.1_portuguese_pt.md new file mode 100644 index 00000000000000..3bd48924d816f4 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_cased_squad_v1.1_portuguese_pt.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Portuguese bert_qa_large_cased_squad_v1.1_portuguese BertForQuestionAnswering from pierreguillou +author: John Snow Labs +name: bert_qa_large_cased_squad_v1.1_portuguese +date: 2023-11-12 +tags: [bert, pt, open_source, question_answering, onnx] +task: Question Answering +language: pt +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_large_cased_squad_v1.1_portuguese` is a Portuguese model originally trained by pierreguillou. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_large_cased_squad_v1.1_portuguese_pt_5.2.0_3.0_1699784212057.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_large_cased_squad_v1.1_portuguese_pt_5.2.0_3.0_1699784212057.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_large_cased_squad_v1.1_portuguese","pt") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_large_cased_squad_v1.1_portuguese", "pt") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_large_cased_squad_v1.1_portuguese| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|pt| +|Size:|1.2 GB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/pierreguillou/bert-large-cased-squad-v1.1-portuguese \ No newline at end of file From 478a8ebfb8c58c2f81f767508b925e72027ff39d Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:19:14 +0700 Subject: [PATCH 051/255] Add model 2023-11-12-bert_qa_l_en --- .../ahmedlone127/2023-11-12-bert_qa_l_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_l_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_l_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_l_en.md new file mode 100644 index 00000000000000..4148a4a26c1800 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_l_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_l BertForQuestionAnswering from Shobhank-iiitdwd +author: John Snow Labs +name: bert_qa_l +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_l` is a English model originally trained by Shobhank-iiitdwd. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_l_en_5.2.0_3.0_1699784332739.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_l_en_5.2.0_3.0_1699784332739.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_l","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_l", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_l| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|1.3 GB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/Shobhank-iiitdwd/BERT-L-QA \ No newline at end of file From ed7b60ed6fd828447d5f31034edb1e02d2960a51 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:20:14 +0700 Subject: [PATCH 052/255] Add model 2023-11-12-bert_qa_base_uncased_squadv1_x2.32_f86.6_d15_hybrid_v1_en --- ...ed_squadv1_x2.32_f86.6_d15_hybrid_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x2.32_f86.6_d15_hybrid_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x2.32_f86.6_d15_hybrid_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x2.32_f86.6_d15_hybrid_v1_en.md new file mode 100644 index 00000000000000..5aae8945ef24f8 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squadv1_x2.32_f86.6_d15_hybrid_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_base_uncased_squadv1_x2.32_f86.6_d15_hybrid_v1 BertForQuestionAnswering from madlag +author: John Snow Labs +name: bert_qa_base_uncased_squadv1_x2.32_f86.6_d15_hybrid_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_uncased_squadv1_x2.32_f86.6_d15_hybrid_v1` is a English model originally trained by madlag. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squadv1_x2.32_f86.6_d15_hybrid_v1_en_5.2.0_3.0_1699784261780.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squadv1_x2.32_f86.6_d15_hybrid_v1_en_5.2.0_3.0_1699784261780.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squadv1_x2.32_f86.6_d15_hybrid_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_uncased_squadv1_x2.32_f86.6_d15_hybrid_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_squadv1_x2.32_f86.6_d15_hybrid_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|148.0 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/madlag/bert-base-uncased-squadv1-x2.32-f86.6-d15-hybrid-v1 \ No newline at end of file From 5d7560a0f83639c1fa57d23007351be879db6d59 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:23:06 +0700 Subject: [PATCH 053/255] Add model 2023-11-12-bert_qa_batteryonly_cased_squad_v1_en --- ...2-bert_qa_batteryonly_cased_squad_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_batteryonly_cased_squad_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_batteryonly_cased_squad_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_batteryonly_cased_squad_v1_en.md new file mode 100644 index 00000000000000..9c781392d7252b --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_batteryonly_cased_squad_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_batteryonly_cased_squad_v1 BertForQuestionAnswering from batterydata +author: John Snow Labs +name: bert_qa_batteryonly_cased_squad_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_batteryonly_cased_squad_v1` is a English model originally trained by batterydata. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_batteryonly_cased_squad_v1_en_5.2.0_3.0_1699784577318.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_batteryonly_cased_squad_v1_en_5.2.0_3.0_1699784577318.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_batteryonly_cased_squad_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_batteryonly_cased_squad_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_batteryonly_cased_squad_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|403.7 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/batterydata/batteryonlybert-cased-squad-v1 \ No newline at end of file From 65e36b1e5c6e454107f65ac8e6b3aa4b079dce19 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:25:08 +0700 Subject: [PATCH 054/255] Add model 2023-11-12-bert_qa_covid_bertb_en --- .../2023-11-12-bert_qa_covid_bertb_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_covid_bertb_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_covid_bertb_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_covid_bertb_en.md new file mode 100644 index 00000000000000..c6331cf3939de1 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_covid_bertb_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_covid_bertb BertForQuestionAnswering from rahulkuruvilla +author: John Snow Labs +name: bert_qa_covid_bertb +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_covid_bertb` is a English model originally trained by rahulkuruvilla. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_covid_bertb_en_5.2.0_3.0_1699784684258.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_covid_bertb_en_5.2.0_3.0_1699784684258.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_covid_bertb","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_covid_bertb", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_covid_bertb| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|1.3 GB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/rahulkuruvilla/COVID-BERTb \ No newline at end of file From 30983b95de8886409142bfd677f9ea46a6d3ed17 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:26:08 +0700 Subject: [PATCH 055/255] Add model 2023-11-12-bert_qa_large_uncased_squadv1.1_sparse_90_unstructured_en --- ...sed_squadv1.1_sparse_90_unstructured_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_squadv1.1_sparse_90_unstructured_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_squadv1.1_sparse_90_unstructured_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_squadv1.1_sparse_90_unstructured_en.md new file mode 100644 index 00000000000000..952bfbf14311cb --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_squadv1.1_sparse_90_unstructured_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_large_uncased_squadv1.1_sparse_90_unstructured BertForQuestionAnswering from Intel +author: John Snow Labs +name: bert_qa_large_uncased_squadv1.1_sparse_90_unstructured +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_large_uncased_squadv1.1_sparse_90_unstructured` is a English model originally trained by Intel. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_squadv1.1_sparse_90_unstructured_en_5.2.0_3.0_1699784745302.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_squadv1.1_sparse_90_unstructured_en_5.2.0_3.0_1699784745302.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_large_uncased_squadv1.1_sparse_90_unstructured","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_large_uncased_squadv1.1_sparse_90_unstructured", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_large_uncased_squadv1.1_sparse_90_unstructured| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|362.1 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/Intel/bert-large-uncased-squadv1.1-sparse-90-unstructured \ No newline at end of file From 6d7ce0b9eb4bdf84830a62af882d2ef0d8d2b42c Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:27:09 +0700 Subject: [PATCH 056/255] Add model 2023-11-12-bert_qa_large_uncased_wwm_squadv2_x2.15_f83.2_d25_hybrid_v1_en --- ...wm_squadv2_x2.15_f83.2_d25_hybrid_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_wwm_squadv2_x2.15_f83.2_d25_hybrid_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_wwm_squadv2_x2.15_f83.2_d25_hybrid_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_wwm_squadv2_x2.15_f83.2_d25_hybrid_v1_en.md new file mode 100644 index 00000000000000..15ec31216a4935 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_wwm_squadv2_x2.15_f83.2_d25_hybrid_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_large_uncased_wwm_squadv2_x2.15_f83.2_d25_hybrid_v1 BertForQuestionAnswering from madlag +author: John Snow Labs +name: bert_qa_large_uncased_wwm_squadv2_x2.15_f83.2_d25_hybrid_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_large_uncased_wwm_squadv2_x2.15_f83.2_d25_hybrid_v1` is a English model originally trained by madlag. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_wwm_squadv2_x2.15_f83.2_d25_hybrid_v1_en_5.2.0_3.0_1699784758641.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_wwm_squadv2_x2.15_f83.2_d25_hybrid_v1_en_5.2.0_3.0_1699784758641.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_large_uncased_wwm_squadv2_x2.15_f83.2_d25_hybrid_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_large_uncased_wwm_squadv2_x2.15_f83.2_d25_hybrid_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_large_uncased_wwm_squadv2_x2.15_f83.2_d25_hybrid_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|452.9 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/madlag/bert-large-uncased-wwm-squadv2-x2.15-f83.2-d25-hybrid-v1 \ No newline at end of file From d47d9d9d033460b048b810b2a7ef87a70a3e567c Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:28:09 +0700 Subject: [PATCH 057/255] Add model 2023-11-12-bert_qa_dist_squad2_en --- .../2023-11-12-bert_qa_dist_squad2_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_dist_squad2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_dist_squad2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_dist_squad2_en.md new file mode 100644 index 00000000000000..c134f5a36b1690 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_dist_squad2_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_dist_squad2 BertForQuestionAnswering from Shobhank-iiitdwd +author: John Snow Labs +name: bert_qa_dist_squad2 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_dist_squad2` is a English model originally trained by Shobhank-iiitdwd. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_dist_squad2_en_5.2.0_3.0_1699784824216.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_dist_squad2_en_5.2.0_3.0_1699784824216.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_dist_squad2","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_dist_squad2", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_dist_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|248.9 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/Shobhank-iiitdwd/DistBERT-squad2-QA \ No newline at end of file From bb9e05a2d8937691aa9f354d21567d27dbc0959e Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:29:09 +0700 Subject: [PATCH 058/255] Add model 2023-11-12-bert_qa_large_uncased_whole_word_masking_finetuned_squad_en --- ...d_whole_word_masking_finetuned_squad_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_finetuned_squad_en.md new file mode 100644 index 00000000000000..c7b49265f71986 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_finetuned_squad_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Large Uncased model (from Jiqing) +author: John Snow Labs +name: bert_qa_large_uncased_whole_word_masking_finetuned_squad +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-large-uncased-whole-word-masking-finetuned-squad-finetuned-squad` is a English model originally trained by `Jiqing`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_whole_word_masking_finetuned_squad_en_5.2.0_3.0_1699784867260.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_whole_word_masking_finetuned_squad_en_5.2.0_3.0_1699784867260.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_large_uncased_whole_word_masking_finetuned_squad","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_large_uncased_whole_word_masking_finetuned_squad","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_large_uncased_whole_word_masking_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|1.3 GB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/Jiqing/bert-large-uncased-whole-word-masking-finetuned-squad-finetuned-squad \ No newline at end of file From f7dde372a6d929154300a54b3ca965209e0855bf Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:31:39 +0700 Subject: [PATCH 059/255] Add model 2023-11-12-bert_qa_alexander_learn_bert_finetuned_squad_en --- ...alexander_learn_bert_finetuned_squad_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_alexander_learn_bert_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_alexander_learn_bert_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_alexander_learn_bert_finetuned_squad_en.md new file mode 100644 index 00000000000000..0c7d42093ae7a2 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_alexander_learn_bert_finetuned_squad_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_alexander_learn_bert_finetuned_squad BertForQuestionAnswering from Alexander-Learn +author: John Snow Labs +name: bert_qa_alexander_learn_bert_finetuned_squad +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_alexander_learn_bert_finetuned_squad` is a English model originally trained by Alexander-Learn. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_alexander_learn_bert_finetuned_squad_en_5.2.0_3.0_1699785091187.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_alexander_learn_bert_finetuned_squad_en_5.2.0_3.0_1699785091187.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_alexander_learn_bert_finetuned_squad","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_alexander_learn_bert_finetuned_squad", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_alexander_learn_bert_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/Alexander-Learn/bert-finetuned-squad \ No newline at end of file From 7646e47c6faa8fdd13815daa1d532458e988ac5a Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:32:40 +0700 Subject: [PATCH 060/255] Add model 2023-11-12-bert_qa_indo_id --- .../2023-11-12-bert_qa_indo_id.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_indo_id.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_indo_id.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_indo_id.md new file mode 100644 index 00000000000000..00c1d413316755 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_indo_id.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Indonesian bert_qa_indo BertForQuestionAnswering from Rifky +author: John Snow Labs +name: bert_qa_indo +date: 2023-11-12 +tags: [bert, id, open_source, question_answering, onnx] +task: Question Answering +language: id +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_indo` is a Indonesian model originally trained by Rifky. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_indo_id_5.2.0_3.0_1699785132714.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_indo_id_5.2.0_3.0_1699785132714.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_indo","id") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_indo", "id") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_indo| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|id| +|Size:|411.7 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/Rifky/Indobert-QA \ No newline at end of file From ea6bea0132991aeefdacda57edb5c5117ed30ab5 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:34:16 +0700 Subject: [PATCH 061/255] Add model 2023-11-12-bert_qa_covid_bertc_en --- .../2023-11-12-bert_qa_covid_bertc_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_covid_bertc_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_covid_bertc_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_covid_bertc_en.md new file mode 100644 index 00000000000000..be216d54804977 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_covid_bertc_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_covid_bertc BertForQuestionAnswering from rahulkuruvilla +author: John Snow Labs +name: bert_qa_covid_bertc +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_covid_bertc` is a English model originally trained by rahulkuruvilla. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_covid_bertc_en_5.2.0_3.0_1699785238336.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_covid_bertc_en_5.2.0_3.0_1699785238336.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_covid_bertc","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_covid_bertc", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_covid_bertc| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|1.3 GB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/rahulkuruvilla/COVID-BERTc \ No newline at end of file From c773623a2fc3d68b0cefb268eb810b9cca37f93f Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:35:42 +0700 Subject: [PATCH 062/255] Add model 2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_restaurant_with_neg_with_repeat_en --- ..._mit_restaurant_with_neg_with_repeat_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_restaurant_with_neg_with_repeat_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_restaurant_with_neg_with_repeat_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_restaurant_with_neg_with_repeat_en.md new file mode 100644 index 00000000000000..89e5f832aab2d0 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_restaurant_with_neg_with_repeat_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_restaurant_with_neg_with_repeat BertForQuestionAnswering from andi611 +author: John Snow Labs +name: bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_restaurant_with_neg_with_repeat +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_restaurant_with_neg_with_repeat` is a English model originally trained by andi611. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_restaurant_with_neg_with_repeat_en_5.2.0_3.0_1699785324740.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_restaurant_with_neg_with_repeat_en_5.2.0_3.0_1699785324740.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_restaurant_with_neg_with_repeat","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_restaurant_with_neg_with_repeat", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_restaurant_with_neg_with_repeat| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|1.3 GB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/andi611/bert-large-uncased-whole-word-masking-squad2-with-ner-mit-restaurant-with-neg-with-repeat \ No newline at end of file From 5703ecb817f7da22940bf91f747a38dc40bbeb20 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:37:31 +0700 Subject: [PATCH 063/255] Add model 2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_movie_with_neg_with_repeat_en --- ...h_ner_mit_movie_with_neg_with_repeat_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_movie_with_neg_with_repeat_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_movie_with_neg_with_repeat_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_movie_with_neg_with_repeat_en.md new file mode 100644 index 00000000000000..408d81068e9dc2 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_movie_with_neg_with_repeat_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_movie_with_neg_with_repeat BertForQuestionAnswering from andi611 +author: John Snow Labs +name: bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_movie_with_neg_with_repeat +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_movie_with_neg_with_repeat` is a English model originally trained by andi611. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_movie_with_neg_with_repeat_en_5.2.0_3.0_1699785429863.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_movie_with_neg_with_repeat_en_5.2.0_3.0_1699785429863.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_movie_with_neg_with_repeat","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_movie_with_neg_with_repeat", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_large_uncased_whole_word_masking_squad2_with_ner_mit_movie_with_neg_with_repeat| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|1.3 GB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/andi611/bert-large-uncased-whole-word-masking-squad2-with-ner-mit-movie-with-neg-with-repeat \ No newline at end of file From d4eaacc007ae45eab1ce25dec6b293e850f68e5f Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:39:08 +0700 Subject: [PATCH 064/255] Add model 2023-11-12-bert_qa_fardinsaboori_bert_finetuned_squad_en --- ...a_fardinsaboori_bert_finetuned_squad_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_fardinsaboori_bert_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_fardinsaboori_bert_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_fardinsaboori_bert_finetuned_squad_en.md new file mode 100644 index 00000000000000..3588769bda774a --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_fardinsaboori_bert_finetuned_squad_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_fardinsaboori_bert_finetuned_squad BertForQuestionAnswering from FardinSaboori +author: John Snow Labs +name: bert_qa_fardinsaboori_bert_finetuned_squad +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_fardinsaboori_bert_finetuned_squad` is a English model originally trained by FardinSaboori. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_fardinsaboori_bert_finetuned_squad_en_5.2.0_3.0_1699785542325.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_fardinsaboori_bert_finetuned_squad_en_5.2.0_3.0_1699785542325.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_fardinsaboori_bert_finetuned_squad","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_fardinsaboori_bert_finetuned_squad", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_fardinsaboori_bert_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/FardinSaboori/bert-finetuned-squad \ No newline at end of file From fb065a750ab15b459bac6854d8483bfe35dfd2eb Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:40:09 +0700 Subject: [PATCH 065/255] Add model 2023-11-12-bert_qa_mini_finetuned_squadv2_en --- ...11-12-bert_qa_mini_finetuned_squadv2_en.md | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_mini_finetuned_squadv2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_mini_finetuned_squadv2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_mini_finetuned_squadv2_en.md new file mode 100644 index 00000000000000..969584bb713dff --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_mini_finetuned_squadv2_en.md @@ -0,0 +1,102 @@ +--- +layout: model +title: English BertForQuestionAnswering Mini Cased model (from M-FAC) +author: John Snow Labs +name: bert_qa_mini_finetuned_squadv2 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-mini-finetuned-squadv2` is a English model originally trained by `M-FAC`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_mini_finetuned_squadv2_en_5.2.0_3.0_1699785590314.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_mini_finetuned_squadv2_en_5.2.0_3.0_1699785590314.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_mini_finetuned_squadv2","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_mini_finetuned_squadv2","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squadv2.v2_mini_finetuned").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_mini_finetuned_squadv2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|41.8 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/M-FAC/bert-mini-finetuned-squadv2 +- https://arxiv.org/pdf/2107.03356.pdf +- https://github.com/IST-DASLab/M-FAC \ No newline at end of file From e492d7e7704e3e98a945073f1daac975bb0e2d23 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:41:14 +0700 Subject: [PATCH 066/255] Add model 2023-11-12-bert_qa_covid_berta_en --- .../2023-11-12-bert_qa_covid_berta_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_covid_berta_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_covid_berta_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_covid_berta_en.md new file mode 100644 index 00000000000000..cedd9e3b8986c1 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_covid_berta_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_covid_berta BertForQuestionAnswering from rahulkuruvilla +author: John Snow Labs +name: bert_qa_covid_berta +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_covid_berta` is a English model originally trained by rahulkuruvilla. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_covid_berta_en_5.2.0_3.0_1699785648056.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_covid_berta_en_5.2.0_3.0_1699785648056.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_covid_berta","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_covid_berta", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_covid_berta| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|1.3 GB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/rahulkuruvilla/COVID-BERTa \ No newline at end of file From cf729beec3fef360b2c0ece89312799a91c711aa Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:42:14 +0700 Subject: [PATCH 067/255] Add model 2023-11-12-bert_qa_large_uncased_wwm_squadv2_x2.63_f82.6_d16_hybrid_v1_en --- ...wm_squadv2_x2.63_f82.6_d16_hybrid_v1_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_wwm_squadv2_x2.63_f82.6_d16_hybrid_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_wwm_squadv2_x2.63_f82.6_d16_hybrid_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_wwm_squadv2_x2.63_f82.6_d16_hybrid_v1_en.md new file mode 100644 index 00000000000000..9153ee20f794fa --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_wwm_squadv2_x2.63_f82.6_d16_hybrid_v1_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_large_uncased_wwm_squadv2_x2.63_f82.6_d16_hybrid_v1 BertForQuestionAnswering from madlag +author: John Snow Labs +name: bert_qa_large_uncased_wwm_squadv2_x2.63_f82.6_d16_hybrid_v1 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_large_uncased_wwm_squadv2_x2.63_f82.6_d16_hybrid_v1` is a English model originally trained by madlag. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_wwm_squadv2_x2.63_f82.6_d16_hybrid_v1_en_5.2.0_3.0_1699785717960.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_wwm_squadv2_x2.63_f82.6_d16_hybrid_v1_en_5.2.0_3.0_1699785717960.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_large_uncased_wwm_squadv2_x2.63_f82.6_d16_hybrid_v1","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_large_uncased_wwm_squadv2_x2.63_f82.6_d16_hybrid_v1", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_large_uncased_wwm_squadv2_x2.63_f82.6_d16_hybrid_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|346.9 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/madlag/bert-large-uncased-wwm-squadv2-x2.63-f82.6-d16-hybrid-v1 \ No newline at end of file From 2d5fd2d65c383dd7cf3cebc55c358730389d1633 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:43:14 +0700 Subject: [PATCH 068/255] Add model 2023-11-12-bert_qa_large_finetuned_squad2_en --- ...11-12-bert_qa_large_finetuned_squad2_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_finetuned_squad2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_finetuned_squad2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_finetuned_squad2_en.md new file mode 100644 index 00000000000000..532e392439cde9 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_finetuned_squad2_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_large_finetuned_squad2 BertForQuestionAnswering from phiyodr +author: John Snow Labs +name: bert_qa_large_finetuned_squad2 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_large_finetuned_squad2` is a English model originally trained by phiyodr. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_large_finetuned_squad2_en_5.2.0_3.0_1699785750435.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_large_finetuned_squad2_en_5.2.0_3.0_1699785750435.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_large_finetuned_squad2","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_large_finetuned_squad2", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_large_finetuned_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|1.3 GB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/phiyodr/bert-large-finetuned-squad2 \ No newline at end of file From 5929a9bf3d9c683254ce6ff4b90c971a2e8f2dea Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:44:14 +0700 Subject: [PATCH 069/255] Add model 2023-11-12-bert_qa_mtl_bert_base_uncased_ww_squad_en --- ...rt_qa_mtl_bert_base_uncased_ww_squad_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_mtl_bert_base_uncased_ww_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_mtl_bert_base_uncased_ww_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_mtl_bert_base_uncased_ww_squad_en.md new file mode 100644 index 00000000000000..d0b9690ea99f54 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_mtl_bert_base_uncased_ww_squad_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_mtl_bert_base_uncased_ww_squad BertForQuestionAnswering from jgammack +author: John Snow Labs +name: bert_qa_mtl_bert_base_uncased_ww_squad +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_mtl_bert_base_uncased_ww_squad` is a English model originally trained by jgammack. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_mtl_bert_base_uncased_ww_squad_en_5.2.0_3.0_1699785823473.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_mtl_bert_base_uncased_ww_squad_en_5.2.0_3.0_1699785823473.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_mtl_bert_base_uncased_ww_squad","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_mtl_bert_base_uncased_ww_squad", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_mtl_bert_base_uncased_ww_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/jgammack/MTL-bert-base-uncased-ww-squad \ No newline at end of file From 9dc7d6104aaefe18cdeac2cb33be4ccc88382ab3 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:45:15 +0700 Subject: [PATCH 070/255] Add model 2023-11-12-bert_qa_medium_finetuned_squadv2_en --- ...-12-bert_qa_medium_finetuned_squadv2_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_medium_finetuned_squadv2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_medium_finetuned_squadv2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_medium_finetuned_squadv2_en.md new file mode 100644 index 00000000000000..993512d64ae11c --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_medium_finetuned_squadv2_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_medium_finetuned_squadv2 BertForQuestionAnswering from mrm8488 +author: John Snow Labs +name: bert_qa_medium_finetuned_squadv2 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_medium_finetuned_squadv2` is a English model originally trained by mrm8488. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_medium_finetuned_squadv2_en_5.2.0_3.0_1699785901564.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_medium_finetuned_squadv2_en_5.2.0_3.0_1699785901564.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_medium_finetuned_squadv2","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_medium_finetuned_squadv2", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_medium_finetuned_squadv2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|154.2 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/mrm8488/bert-medium-finetuned-squadv2 \ No newline at end of file From ab7d4169a664e7eae646c3a8e38d135b0a1b2252 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:46:15 +0700 Subject: [PATCH 071/255] Add model 2023-11-12-bert_qa_klue_commonsense_model_en --- ...11-12-bert_qa_klue_commonsense_model_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_klue_commonsense_model_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_klue_commonsense_model_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_klue_commonsense_model_en.md new file mode 100644 index 00000000000000..dd8660ef00eb12 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_klue_commonsense_model_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_klue_commonsense_model BertForQuestionAnswering from EasthShin +author: John Snow Labs +name: bert_qa_klue_commonsense_model +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_klue_commonsense_model` is a English model originally trained by EasthShin. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_klue_commonsense_model_en_5.2.0_3.0_1699785924753.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_klue_commonsense_model_en_5.2.0_3.0_1699785924753.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_klue_commonsense_model","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_klue_commonsense_model", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_klue_commonsense_model| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|412.4 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/EasthShin/Klue-CommonSense-model \ No newline at end of file From 8f07eaaee765a7b4372a14a93b68924e749e69f2 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:47:15 +0700 Subject: [PATCH 072/255] Add model 2023-11-12-bert_base_cased_qa_squad2_en --- ...2023-11-12-bert_base_cased_qa_squad2_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_base_cased_qa_squad2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_base_cased_qa_squad2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_base_cased_qa_squad2_en.md new file mode 100644 index 00000000000000..c98054bcc7d027 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_base_cased_qa_squad2_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from deepset) +author: John Snow Labs +name: bert_base_cased_qa_squad2 +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-cased-squad2` is a English model orginally trained by `deepset`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_base_cased_qa_squad2_en_5.2.0_3.0_1699785841705.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_base_cased_qa_squad2_en_5.2.0_3.0_1699785841705.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_base_cased_qa_squad2","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_base_cased_qa_squad2","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squadv2.bert.base_cased.by_deepset").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_base_cased_qa_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/deepset/bert-base-cased-squad2 \ No newline at end of file From ae9c157a9fcfe6c3b0cdec59184fae633ce68f10 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:50:57 +0700 Subject: [PATCH 073/255] Add model 2023-11-12-bert_qa_manuert_for_xqua_en --- .../2023-11-12-bert_qa_manuert_for_xqua_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_manuert_for_xqua_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_manuert_for_xqua_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_manuert_for_xqua_en.md new file mode 100644 index 00000000000000..075b9334b7eb1e --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_manuert_for_xqua_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_manuert_for_xqua BertForQuestionAnswering from mrm8488 +author: John Snow Labs +name: bert_qa_manuert_for_xqua +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_manuert_for_xqua` is a English model originally trained by mrm8488. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_manuert_for_xqua_en_5.2.0_3.0_1699786245896.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_manuert_for_xqua_en_5.2.0_3.0_1699786245896.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_manuert_for_xqua","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_manuert_for_xqua", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_manuert_for_xqua| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|665.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/mrm8488/ManuERT-for-xqua \ No newline at end of file From 0751c6e67f28d60b3a21c9f848535f6955844a68 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:51:57 +0700 Subject: [PATCH 074/255] Add model 2023-11-12-bert_qa_neulvo_bert_finetuned_squad_en --- ...-bert_qa_neulvo_bert_finetuned_squad_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_neulvo_bert_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_neulvo_bert_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_neulvo_bert_finetuned_squad_en.md new file mode 100644 index 00000000000000..32e3775943710b --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_neulvo_bert_finetuned_squad_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_neulvo_bert_finetuned_squad BertForQuestionAnswering from Neulvo +author: John Snow Labs +name: bert_qa_neulvo_bert_finetuned_squad +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_neulvo_bert_finetuned_squad` is a English model originally trained by Neulvo. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_neulvo_bert_finetuned_squad_en_5.2.0_3.0_1699786256914.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_neulvo_bert_finetuned_squad_en_5.2.0_3.0_1699786256914.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_neulvo_bert_finetuned_squad","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_neulvo_bert_finetuned_squad", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_neulvo_bert_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/Neulvo/bert-finetuned-squad \ No newline at end of file From 9b81a21262cd619bfb7c164c239082af7a842460 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:52:57 +0700 Subject: [PATCH 075/255] Add model 2023-11-12-bert_qa_3lang_xx --- .../2023-11-12-bert_qa_3lang_xx.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_3lang_xx.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_3lang_xx.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_3lang_xx.md new file mode 100644 index 00000000000000..4e6153e9cff6c4 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_3lang_xx.md @@ -0,0 +1,100 @@ +--- +layout: model +title: Multilingual BertForQuestionAnswering Cased model (from krinal214) +author: John Snow Labs +name: bert_qa_3lang +date: 2023-11-12 +tags: [xx, open_source, bert, question_answering, onnx] +task: Question Answering +language: xx +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-3lang` is a Multilingual model originally trained by `krinal214`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_3lang_xx_5.2.0_3.0_1699786324189.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_3lang_xx_5.2.0_3.0_1699786324189.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_3lang","xx") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["PUT YOUR QUESTION HERE", "PUT YOUR CONTEXT HERE"]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_3lang","xx") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("PUT YOUR QUESTION HERE", "PUT YOUR CONTEXT HERE").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("xx.answer_question.bert.tydiqa.3lang").predict("""PUT YOUR QUESTION HERE|||"PUT YOUR CONTEXT HERE""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_3lang| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|xx| +|Size:|665.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/krinal214/bert-3lang \ No newline at end of file From 3b56f5f715e9d7dfd75ba86ae863bf8dddd6e2c0 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:53:57 +0700 Subject: [PATCH 076/255] Add model 2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_conll2003_with_neg_with_repeat_en --- ...h_ner_conll2003_with_neg_with_repeat_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_conll2003_with_neg_with_repeat_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_conll2003_with_neg_with_repeat_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_conll2003_with_neg_with_repeat_en.md new file mode 100644 index 00000000000000..54c28209bc5938 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_large_uncased_whole_word_masking_squad2_with_ner_conll2003_with_neg_with_repeat_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_large_uncased_whole_word_masking_squad2_with_ner_conll2003_with_neg_with_repeat BertForQuestionAnswering from andi611 +author: John Snow Labs +name: bert_qa_large_uncased_whole_word_masking_squad2_with_ner_conll2003_with_neg_with_repeat +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_large_uncased_whole_word_masking_squad2_with_ner_conll2003_with_neg_with_repeat` is a English model originally trained by andi611. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_whole_word_masking_squad2_with_ner_conll2003_with_neg_with_repeat_en_5.2.0_3.0_1699786355324.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_large_uncased_whole_word_masking_squad2_with_ner_conll2003_with_neg_with_repeat_en_5.2.0_3.0_1699786355324.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_large_uncased_whole_word_masking_squad2_with_ner_conll2003_with_neg_with_repeat","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_large_uncased_whole_word_masking_squad2_with_ner_conll2003_with_neg_with_repeat", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_large_uncased_whole_word_masking_squad2_with_ner_conll2003_with_neg_with_repeat| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|1.3 GB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/andi611/bert-large-uncased-whole-word-masking-squad2-with-ner-conll2003-with-neg-with-repeat \ No newline at end of file From a1273de07b669326d17aaf9b0db035060673740e Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:55:04 +0700 Subject: [PATCH 077/255] Add model 2023-11-12-bert_qa_nlp4web_xtremedistil_l6_h256_uncased_trivia_group2_en --- ...distil_l6_h256_uncased_trivia_group2_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_nlp4web_xtremedistil_l6_h256_uncased_trivia_group2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_nlp4web_xtremedistil_l6_h256_uncased_trivia_group2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_nlp4web_xtremedistil_l6_h256_uncased_trivia_group2_en.md new file mode 100644 index 00000000000000..c1bbc93d1c073c --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_nlp4web_xtremedistil_l6_h256_uncased_trivia_group2_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_nlp4web_xtremedistil_l6_h256_uncased_trivia_group2 BertForQuestionAnswering from TobiasFrey98 +author: John Snow Labs +name: bert_qa_nlp4web_xtremedistil_l6_h256_uncased_trivia_group2 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_nlp4web_xtremedistil_l6_h256_uncased_trivia_group2` is a English model originally trained by TobiasFrey98. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_nlp4web_xtremedistil_l6_h256_uncased_trivia_group2_en_5.2.0_3.0_1699786502052.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_nlp4web_xtremedistil_l6_h256_uncased_trivia_group2_en_5.2.0_3.0_1699786502052.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_nlp4web_xtremedistil_l6_h256_uncased_trivia_group2","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_nlp4web_xtremedistil_l6_h256_uncased_trivia_group2", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_nlp4web_xtremedistil_l6_h256_uncased_trivia_group2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|47.3 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/TobiasFrey98/NLP4Web-xtremedistil-l6-h256-uncased-TriviaQA-Group2 \ No newline at end of file From 7870ad07a7a434a471087467c47a1009bff97050 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:56:04 +0700 Subject: [PATCH 078/255] Add model 2023-11-12-bert_qa_spanbert_emotion_extraction_en --- ...-bert_qa_spanbert_emotion_extraction_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_spanbert_emotion_extraction_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_spanbert_emotion_extraction_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_spanbert_emotion_extraction_en.md new file mode 100644 index 00000000000000..792348ccab35db --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_spanbert_emotion_extraction_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_spanbert_emotion_extraction BertForQuestionAnswering from Nakul24 +author: John Snow Labs +name: bert_qa_spanbert_emotion_extraction +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_spanbert_emotion_extraction` is a English model originally trained by Nakul24. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_spanbert_emotion_extraction_en_5.2.0_3.0_1699786510105.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_spanbert_emotion_extraction_en_5.2.0_3.0_1699786510105.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_spanbert_emotion_extraction","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_spanbert_emotion_extraction", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_spanbert_emotion_extraction| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|384.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/Nakul24/Spanbert-emotion-extraction \ No newline at end of file From 68975639354c579d499c4eb1179f73561dd1bbac Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:57:04 +0700 Subject: [PATCH 079/255] Add model 2023-11-12-bert_qa_harsit_bert_finetuned_squad_en --- ...-bert_qa_harsit_bert_finetuned_squad_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_harsit_bert_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_harsit_bert_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_harsit_bert_finetuned_squad_en.md new file mode 100644 index 00000000000000..af45519bae17ee --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_harsit_bert_finetuned_squad_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_harsit_bert_finetuned_squad BertForQuestionAnswering from Harsit +author: John Snow Labs +name: bert_qa_harsit_bert_finetuned_squad +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_harsit_bert_finetuned_squad` is a English model originally trained by Harsit. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_harsit_bert_finetuned_squad_en_5.2.0_3.0_1699786550713.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_harsit_bert_finetuned_squad_en_5.2.0_3.0_1699786550713.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_harsit_bert_finetuned_squad","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_harsit_bert_finetuned_squad", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_harsit_bert_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/Harsit/bert-finetuned-squad \ No newline at end of file From c71abb561749a231b7c521bf303bb59763e71eae Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:58:04 +0700 Subject: [PATCH 080/255] Add model 2023-11-12-bert_qa_part_1_mbert_model_e1_xx --- ...-11-12-bert_qa_part_1_mbert_model_e1_xx.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_part_1_mbert_model_e1_xx.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_part_1_mbert_model_e1_xx.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_part_1_mbert_model_e1_xx.md new file mode 100644 index 00000000000000..8520bfeb668d15 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_part_1_mbert_model_e1_xx.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Multilingual bert_qa_part_1_mbert_model_e1 BertForQuestionAnswering from horsbug98 +author: John Snow Labs +name: bert_qa_part_1_mbert_model_e1 +date: 2023-11-12 +tags: [bert, xx, open_source, question_answering, onnx] +task: Question Answering +language: xx +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_part_1_mbert_model_e1` is a Multilingual model originally trained by horsbug98. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_part_1_mbert_model_e1_xx_5.2.0_3.0_1699786587415.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_part_1_mbert_model_e1_xx_5.2.0_3.0_1699786587415.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_part_1_mbert_model_e1","xx") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_part_1_mbert_model_e1", "xx") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_part_1_mbert_model_e1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|xx| +|Size:|665.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/horsbug98/Part_1_mBERT_Model_E1 \ No newline at end of file From 077ffe7e92990318c16dbfc460871abc4d2ce2b0 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 17:59:05 +0700 Subject: [PATCH 081/255] Add model 2023-11-12-bert_qa_graphcore_bert_large_uncased_squad_en --- ...a_graphcore_bert_large_uncased_squad_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_graphcore_bert_large_uncased_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_graphcore_bert_large_uncased_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_graphcore_bert_large_uncased_squad_en.md new file mode 100644 index 00000000000000..f38101123741b7 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_graphcore_bert_large_uncased_squad_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_graphcore_bert_large_uncased_squad BertForQuestionAnswering from Graphcore +author: John Snow Labs +name: bert_qa_graphcore_bert_large_uncased_squad +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_graphcore_bert_large_uncased_squad` is a English model originally trained by Graphcore. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_graphcore_bert_large_uncased_squad_en_5.2.0_3.0_1699786550142.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_graphcore_bert_large_uncased_squad_en_5.2.0_3.0_1699786550142.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_graphcore_bert_large_uncased_squad","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_graphcore_bert_large_uncased_squad", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_graphcore_bert_large_uncased_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|797.4 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/Graphcore/bert-large-uncased-squad \ No newline at end of file From 27b1bb48a417503d21cfab847898f991254e21c9 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:00:04 +0700 Subject: [PATCH 082/255] Add model 2023-11-12-bert_qa_kevinchoi_bert_finetuned_squad_accelerate_en --- ...choi_bert_finetuned_squad_accelerate_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_kevinchoi_bert_finetuned_squad_accelerate_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_kevinchoi_bert_finetuned_squad_accelerate_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_kevinchoi_bert_finetuned_squad_accelerate_en.md new file mode 100644 index 00000000000000..eb2f64c6dc2069 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_kevinchoi_bert_finetuned_squad_accelerate_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_kevinchoi_bert_finetuned_squad_accelerate BertForQuestionAnswering from KevinChoi +author: John Snow Labs +name: bert_qa_kevinchoi_bert_finetuned_squad_accelerate +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_kevinchoi_bert_finetuned_squad_accelerate` is a English model originally trained by KevinChoi. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_kevinchoi_bert_finetuned_squad_accelerate_en_5.2.0_3.0_1699786794507.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_kevinchoi_bert_finetuned_squad_accelerate_en_5.2.0_3.0_1699786794507.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_kevinchoi_bert_finetuned_squad_accelerate","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_kevinchoi_bert_finetuned_squad_accelerate", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_kevinchoi_bert_finetuned_squad_accelerate| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/KevinChoi/bert-finetuned-squad-accelerate \ No newline at end of file From 14efe049d7e20b3bc8928288d3b97f4252dd9e41 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:01:05 +0700 Subject: [PATCH 083/255] Add model 2023-11-12-bert_qa_sreyang_nvidia_bert_base_cased_finetuned_squad_en --- ...idia_bert_base_cased_finetuned_squad_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_sreyang_nvidia_bert_base_cased_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_sreyang_nvidia_bert_base_cased_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_sreyang_nvidia_bert_base_cased_finetuned_squad_en.md new file mode 100644 index 00000000000000..a57e5d89d29ce0 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_sreyang_nvidia_bert_base_cased_finetuned_squad_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_sreyang_nvidia_bert_base_cased_finetuned_squad BertForQuestionAnswering from SreyanG-NVIDIA +author: John Snow Labs +name: bert_qa_sreyang_nvidia_bert_base_cased_finetuned_squad +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_sreyang_nvidia_bert_base_cased_finetuned_squad` is a English model originally trained by SreyanG-NVIDIA. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_sreyang_nvidia_bert_base_cased_finetuned_squad_en_5.2.0_3.0_1699786799320.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_sreyang_nvidia_bert_base_cased_finetuned_squad_en_5.2.0_3.0_1699786799320.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_sreyang_nvidia_bert_base_cased_finetuned_squad","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_sreyang_nvidia_bert_base_cased_finetuned_squad", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_sreyang_nvidia_bert_base_cased_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/SreyanG-NVIDIA/bert-base-cased-finetuned-squad \ No newline at end of file From c85ce44dbdccedf38723b89f68e903396e8913a7 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:02:05 +0700 Subject: [PATCH 084/255] Add model 2023-11-12-bert_qa_question_answering_for_argriculture_zh --- ..._question_answering_for_argriculture_zh.md | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_question_answering_for_argriculture_zh.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_question_answering_for_argriculture_zh.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_question_answering_for_argriculture_zh.md new file mode 100644 index 00000000000000..95ad35d7573525 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_question_answering_for_argriculture_zh.md @@ -0,0 +1,98 @@ +--- +layout: model +title: Chinese BertForQuestionAnswering Cased model (from HankyStyle) +author: John Snow Labs +name: bert_qa_question_answering_for_argriculture +date: 2023-11-12 +tags: [zh, open_source, bert, question_answering, onnx] +task: Question Answering +language: zh +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `Question-Answering-for-Argriculture` is a Chinese model originally trained by `HankyStyle`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_question_answering_for_argriculture_zh_5.2.0_3.0_1699786850722.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_question_answering_for_argriculture_zh_5.2.0_3.0_1699786850722.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_question_answering_for_argriculture","zh")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_question_answering_for_argriculture","zh") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_question_answering_for_argriculture| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|zh| +|Size:|665.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/HankyStyle/Question-Answering-for-Argriculture +- https://nlpnchu.org/ +- https://demo.nlpnchu.org/ +- https://github.com/NCHU-NLP-Lab +- https://paperswithcode.com/sota?task=Question+Answering&dataset=ArgricultureQA \ No newline at end of file From 35dc6a900760ff0e78a7a10b45529aa3c0b286fe Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:03:06 +0700 Subject: [PATCH 085/255] Add model 2023-11-12-bert_qa_kevinchoi_bert_finetuned_squad_en --- ...rt_qa_kevinchoi_bert_finetuned_squad_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_kevinchoi_bert_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_kevinchoi_bert_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_kevinchoi_bert_finetuned_squad_en.md new file mode 100644 index 00000000000000..9902d797681441 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_kevinchoi_bert_finetuned_squad_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_kevinchoi_bert_finetuned_squad BertForQuestionAnswering from KevinChoi +author: John Snow Labs +name: bert_qa_kevinchoi_bert_finetuned_squad +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_kevinchoi_bert_finetuned_squad` is a English model originally trained by KevinChoi. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_kevinchoi_bert_finetuned_squad_en_5.2.0_3.0_1699786850491.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_kevinchoi_bert_finetuned_squad_en_5.2.0_3.0_1699786850491.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_kevinchoi_bert_finetuned_squad","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_kevinchoi_bert_finetuned_squad", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_kevinchoi_bert_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.7 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/KevinChoi/bert-finetuned-squad \ No newline at end of file From c2ceb903b4827ce76b3504635322b5c8c06785f7 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:04:05 +0700 Subject: [PATCH 086/255] Add model 2023-11-12-bert_qa_akihiro2_finetuned_squad_en --- ...-12-bert_qa_akihiro2_finetuned_squad_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_akihiro2_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_akihiro2_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_akihiro2_finetuned_squad_en.md new file mode 100644 index 00000000000000..a6e8766973b37b --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_akihiro2_finetuned_squad_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Cased model (from Akihiro2) +author: John Snow Labs +name: bert_qa_akihiro2_finetuned_squad +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-finetuned-squad` is a English model originally trained by `Akihiro2`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_akihiro2_finetuned_squad_en_5.2.0_3.0_1699787030761.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_akihiro2_finetuned_squad_en_5.2.0_3.0_1699787030761.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_akihiro2_finetuned_squad","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_akihiro2_finetuned_squad","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_akihiro2_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/Akihiro2/bert-finetuned-squad \ No newline at end of file From 4906aad57bea3d0d490eb0b2a00ee024e8aae347 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:05:06 +0700 Subject: [PATCH 087/255] Add model 2023-11-12-bert_qa_minilm_l12_h384_uncased_finetuned_squad_en --- ...ilm_l12_h384_uncased_finetuned_squad_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_minilm_l12_h384_uncased_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_minilm_l12_h384_uncased_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_minilm_l12_h384_uncased_finetuned_squad_en.md new file mode 100644 index 00000000000000..8ad7de3c888c83 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_minilm_l12_h384_uncased_finetuned_squad_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_minilm_l12_h384_uncased_finetuned_squad BertForQuestionAnswering from ncduy +author: John Snow Labs +name: bert_qa_minilm_l12_h384_uncased_finetuned_squad +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_minilm_l12_h384_uncased_finetuned_squad` is a English model originally trained by ncduy. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_minilm_l12_h384_uncased_finetuned_squad_en_5.2.0_3.0_1699787061428.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_minilm_l12_h384_uncased_finetuned_squad_en_5.2.0_3.0_1699787061428.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_minilm_l12_h384_uncased_finetuned_squad","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_minilm_l12_h384_uncased_finetuned_squad", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_minilm_l12_h384_uncased_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|123.8 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/ncduy/MiniLM-L12-H384-uncased-finetuned-squad \ No newline at end of file From e1f49032b945bbc732f9ec2509b2cbb44a573086 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:06:06 +0700 Subject: [PATCH 088/255] Add model 2023-11-12-bert_qa_sci_squad_quac_en --- .../2023-11-12-bert_qa_sci_squad_quac_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_sci_squad_quac_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_sci_squad_quac_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_sci_squad_quac_en.md new file mode 100644 index 00000000000000..ce72a9a9d72b49 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_sci_squad_quac_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_sci_squad_quac BertForQuestionAnswering from ixa-ehu +author: John Snow Labs +name: bert_qa_sci_squad_quac +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_sci_squad_quac` is a English model originally trained by ixa-ehu. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_sci_squad_quac_en_5.2.0_3.0_1699787138676.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_sci_squad_quac_en_5.2.0_3.0_1699787138676.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_sci_squad_quac","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_sci_squad_quac", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_sci_squad_quac| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|410.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/ixa-ehu/SciBERT-SQuAD-QuAC \ No newline at end of file From 50893957b4baa6cdd83728babe01f5e48ff70b61 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:07:06 +0700 Subject: [PATCH 089/255] Add model 2023-11-12-bert_qa_multi_ling_bert_en --- .../2023-11-12-bert_qa_multi_ling_bert_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_multi_ling_bert_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_multi_ling_bert_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_multi_ling_bert_en.md new file mode 100644 index 00000000000000..38293711b3a480 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_multi_ling_bert_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_multi_ling_bert BertForQuestionAnswering from HankyStyle +author: John Snow Labs +name: bert_qa_multi_ling_bert +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_multi_ling_bert` is a English model originally trained by HankyStyle. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_multi_ling_bert_en_5.2.0_3.0_1699787188522.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_multi_ling_bert_en_5.2.0_3.0_1699787188522.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_multi_ling_bert","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_multi_ling_bert", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_multi_ling_bert| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|625.5 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/HankyStyle/Multi-ling-BERT \ No newline at end of file From cf5a6d28dcab36f9f6993688f0959a3e24472ae4 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:08:07 +0700 Subject: [PATCH 090/255] Add model 2023-11-12-bert_qa_paul_vinh_bert_base_multilingual_cased_finetuned_squad_xx --- ...e_multilingual_cased_finetuned_squad_xx.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_paul_vinh_bert_base_multilingual_cased_finetuned_squad_xx.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_paul_vinh_bert_base_multilingual_cased_finetuned_squad_xx.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_paul_vinh_bert_base_multilingual_cased_finetuned_squad_xx.md new file mode 100644 index 00000000000000..cf2e4c47275b1d --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_paul_vinh_bert_base_multilingual_cased_finetuned_squad_xx.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Multilingual bert_qa_paul_vinh_bert_base_multilingual_cased_finetuned_squad BertForQuestionAnswering from Paul-Vinh +author: John Snow Labs +name: bert_qa_paul_vinh_bert_base_multilingual_cased_finetuned_squad +date: 2023-11-12 +tags: [bert, xx, open_source, question_answering, onnx] +task: Question Answering +language: xx +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_paul_vinh_bert_base_multilingual_cased_finetuned_squad` is a Multilingual model originally trained by Paul-Vinh. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_paul_vinh_bert_base_multilingual_cased_finetuned_squad_xx_5.2.0_3.0_1699787269894.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_paul_vinh_bert_base_multilingual_cased_finetuned_squad_xx_5.2.0_3.0_1699787269894.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_paul_vinh_bert_base_multilingual_cased_finetuned_squad","xx") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_paul_vinh_bert_base_multilingual_cased_finetuned_squad", "xx") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_paul_vinh_bert_base_multilingual_cased_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|xx| +|Size:|665.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/Paul-Vinh/bert-base-multilingual-cased-finetuned-squad \ No newline at end of file From 0c7e1210ee9d7796e4fcec58de925a0dc041ebb3 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:09:07 +0700 Subject: [PATCH 091/255] Add model 2023-11-12-bert_qa_amartyobanerjee_finetuned_squad_en --- ...t_qa_amartyobanerjee_finetuned_squad_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_amartyobanerjee_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_amartyobanerjee_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_amartyobanerjee_finetuned_squad_en.md new file mode 100644 index 00000000000000..48d0a5d1036f2f --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_amartyobanerjee_finetuned_squad_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Cased model (from amartyobanerjee) +author: John Snow Labs +name: bert_qa_amartyobanerjee_finetuned_squad +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-finetuned-squad` is a English model originally trained by `amartyobanerjee`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_amartyobanerjee_finetuned_squad_en_5.2.0_3.0_1699787315808.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_amartyobanerjee_finetuned_squad_en_5.2.0_3.0_1699787315808.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_amartyobanerjee_finetuned_squad","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_amartyobanerjee_finetuned_squad","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_amartyobanerjee_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|403.7 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/amartyobanerjee/bert-finetuned-squad \ No newline at end of file From 17206cd28b3db786bce5e51eee4fe30ec89f5700 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:10:07 +0700 Subject: [PATCH 092/255] Add model 2023-11-12-bert_qa_part_2_mbert_model_e2_en --- ...-11-12-bert_qa_part_2_mbert_model_e2_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_part_2_mbert_model_e2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_part_2_mbert_model_e2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_part_2_mbert_model_e2_en.md new file mode 100644 index 00000000000000..b95d615e465a61 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_part_2_mbert_model_e2_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_part_2_mbert_model_e2 BertForQuestionAnswering from horsbug98 +author: John Snow Labs +name: bert_qa_part_2_mbert_model_e2 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_part_2_mbert_model_e2` is a English model originally trained by horsbug98. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_part_2_mbert_model_e2_en_5.2.0_3.0_1699787364065.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_part_2_mbert_model_e2_en_5.2.0_3.0_1699787364065.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_part_2_mbert_model_e2","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_part_2_mbert_model_e2", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_part_2_mbert_model_e2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|665.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/horsbug98/Part_2_mBERT_Model_E2 \ No newline at end of file From 6e5ca261e79e195c98d8196c92fe019f74d26033 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:11:08 +0700 Subject: [PATCH 093/255] Add model 2023-11-12-bert_qa_part_2_bert_multilingual_dutch_model_e1_nl --- ...t_2_bert_multilingual_dutch_model_e1_nl.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_part_2_bert_multilingual_dutch_model_e1_nl.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_part_2_bert_multilingual_dutch_model_e1_nl.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_part_2_bert_multilingual_dutch_model_e1_nl.md new file mode 100644 index 00000000000000..1201ea94f26616 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_part_2_bert_multilingual_dutch_model_e1_nl.md @@ -0,0 +1,95 @@ +--- +layout: model +title: Dutch, Flemish bert_qa_part_2_bert_multilingual_dutch_model_e1 BertForQuestionAnswering from horsbug98 +author: John Snow Labs +name: bert_qa_part_2_bert_multilingual_dutch_model_e1 +date: 2023-11-12 +tags: [bert, nl, open_source, question_answering, onnx] +task: Question Answering +language: nl +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_part_2_bert_multilingual_dutch_model_e1` is a Dutch, Flemish model originally trained by horsbug98. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_part_2_bert_multilingual_dutch_model_e1_nl_5.2.0_3.0_1699786903306.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_part_2_bert_multilingual_dutch_model_e1_nl_5.2.0_3.0_1699786903306.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_part_2_bert_multilingual_dutch_model_e1","nl") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_part_2_bert_multilingual_dutch_model_e1", "nl") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_part_2_bert_multilingual_dutch_model_e1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|nl| +|Size:|665.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/horsbug98/Part_2_BERT_Multilingual_Dutch_Model_E1 \ No newline at end of file From dff7f73f4062a6297f7ca07424d96301d4a23fa5 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:12:07 +0700 Subject: [PATCH 094/255] Add model 2023-11-12-bert_qa_sotireas_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert_en --- ...text_contaminationqamodel_pubmedbert_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_sotireas_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_sotireas_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_sotireas_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert_en.md new file mode 100644 index 00000000000000..ec472b85807370 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_sotireas_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_sotireas_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert BertForQuestionAnswering from Sotireas +author: John Snow Labs +name: bert_qa_sotireas_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_sotireas_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert` is a English model originally trained by Sotireas. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_sotireas_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert_en_5.2.0_3.0_1699787495976.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_sotireas_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert_en_5.2.0_3.0_1699787495976.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_sotireas_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_sotireas_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_sotireas_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|408.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/Sotireas/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext-ContaminationQAmodel_PubmedBERT \ No newline at end of file From a54f7d9c9d5dbd28a7c120145a298b0b663a011e Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:13:08 +0700 Subject: [PATCH 095/255] Add model 2023-11-12-bert_qa_shushant_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert_en --- ...text_contaminationqamodel_pubmedbert_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_shushant_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_shushant_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_shushant_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert_en.md new file mode 100644 index 00000000000000..d7f0d2f5d932ce --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_shushant_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_shushant_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert BertForQuestionAnswering from Shushant +author: John Snow Labs +name: bert_qa_shushant_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_shushant_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert` is a English model originally trained by Shushant. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_shushant_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert_en_5.2.0_3.0_1699787514569.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_shushant_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert_en_5.2.0_3.0_1699787514569.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_shushant_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_shushant_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_shushant_biomednlp_pubmedbert_base_uncased_abstract_fulltext_contaminationqamodel_pubmedbert| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|408.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/Shushant/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext-ContaminationQAmodel_PubmedBERT \ No newline at end of file From 62b09b2c89eaf60c6da1f43b825cab39b779b94e Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:14:08 +0700 Subject: [PATCH 096/255] Add model 2023-11-12-bert_qa_part_1_mbert_model_e2_en --- ...-11-12-bert_qa_part_1_mbert_model_e2_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_part_1_mbert_model_e2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_part_1_mbert_model_e2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_part_1_mbert_model_e2_en.md new file mode 100644 index 00000000000000..43ebec16b036f6 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_part_1_mbert_model_e2_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_part_1_mbert_model_e2 BertForQuestionAnswering from horsbug98 +author: John Snow Labs +name: bert_qa_part_1_mbert_model_e2 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_part_1_mbert_model_e2` is a English model originally trained by horsbug98. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_part_1_mbert_model_e2_en_5.2.0_3.0_1699787563345.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_part_1_mbert_model_e2_en_5.2.0_3.0_1699787563345.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_part_1_mbert_model_e2","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_part_1_mbert_model_e2", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_part_1_mbert_model_e2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|665.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/horsbug98/Part_1_mBERT_Model_E2 \ No newline at end of file From be335aa047911ff18087c04766f6d5672b2ae947 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:15:08 +0700 Subject: [PATCH 097/255] Add model 2023-11-12-bert_qa_sreyang_nvidia_bert_base_uncased_finetuned_squad_en --- ...ia_bert_base_uncased_finetuned_squad_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_sreyang_nvidia_bert_base_uncased_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_sreyang_nvidia_bert_base_uncased_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_sreyang_nvidia_bert_base_uncased_finetuned_squad_en.md new file mode 100644 index 00000000000000..892026183ee945 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_sreyang_nvidia_bert_base_uncased_finetuned_squad_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_sreyang_nvidia_bert_base_uncased_finetuned_squad BertForQuestionAnswering from SreyanG-NVIDIA +author: John Snow Labs +name: bert_qa_sreyang_nvidia_bert_base_uncased_finetuned_squad +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_sreyang_nvidia_bert_base_uncased_finetuned_squad` is a English model originally trained by SreyanG-NVIDIA. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_sreyang_nvidia_bert_base_uncased_finetuned_squad_en_5.2.0_3.0_1699787611987.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_sreyang_nvidia_bert_base_uncased_finetuned_squad_en_5.2.0_3.0_1699787611987.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_sreyang_nvidia_bert_base_uncased_finetuned_squad","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_sreyang_nvidia_bert_base_uncased_finetuned_squad", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_sreyang_nvidia_bert_base_uncased_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/SreyanG-NVIDIA/bert-base-uncased-finetuned-squad \ No newline at end of file From 62459635af4ec162b18d71e4c38b4e8dd4297aea Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:16:08 +0700 Subject: [PATCH 098/255] Add model 2023-11-12-bert_qa_andresestevez_bert_base_cased_finetuned_squad_en --- ...evez_bert_base_cased_finetuned_squad_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_andresestevez_bert_base_cased_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_andresestevez_bert_base_cased_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_andresestevez_bert_base_cased_finetuned_squad_en.md new file mode 100644 index 00000000000000..4d642478a0edb4 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_andresestevez_bert_base_cased_finetuned_squad_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from andresestevez) +author: John Snow Labs +name: bert_qa_andresestevez_bert_base_cased_finetuned_squad +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-cased-finetuned-squad` is a English model orginally trained by `andresestevez`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_andresestevez_bert_base_cased_finetuned_squad_en_5.2.0_3.0_1699787555761.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_andresestevez_bert_base_cased_finetuned_squad_en_5.2.0_3.0_1699787555761.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_andresestevez_bert_base_cased_finetuned_squad","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_andresestevez_bert_base_cased_finetuned_squad","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.base_cased").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_andresestevez_bert_base_cased_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.7 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/andresestevez/bert-base-cased-finetuned-squad \ No newline at end of file From d55d7ec9f533ebda4922a840ce0b2e52d512af49 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:17:08 +0700 Subject: [PATCH 099/255] Add model 2023-11-12-bert_qa_ainize_klue_bert_base_mrc_ko --- ...12-bert_qa_ainize_klue_bert_base_mrc_ko.md | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_ainize_klue_bert_base_mrc_ko.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ainize_klue_bert_base_mrc_ko.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ainize_klue_bert_base_mrc_ko.md new file mode 100644 index 00000000000000..37271950166e01 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ainize_klue_bert_base_mrc_ko.md @@ -0,0 +1,113 @@ +--- +layout: model +title: Korean BertForQuestionAnswering model (from ainize) +author: John Snow Labs +name: bert_qa_ainize_klue_bert_base_mrc +date: 2023-11-12 +tags: [ko, open_source, question_answering, bert, onnx] +task: Question Answering +language: ko +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `klue-bert-base-mrc` is a Korean model orginally trained by `ainize`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_ainize_klue_bert_base_mrc_ko_5.2.0_3.0_1699787802266.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_ainize_klue_bert_base_mrc_ko_5.2.0_3.0_1699787802266.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_ainize_klue_bert_base_mrc","ko") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_ainize_klue_bert_base_mrc","ko") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("ko.answer_question.klue.bert.base").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_ainize_klue_bert_base_mrc| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|ko| +|Size:|412.4 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/ainize/klue-bert-base-mrc +- https://ainize.ai/ +- https://main-klue-mrc-bert-scy6500.endpoint.ainize.ai/ +- https://ainize.ai/scy6500/KLUE-MRC-BERT?branch=main +- https://ainize.ai/teachable-nlp +- https://link.ainize.ai/3FjvBVn \ No newline at end of file From a9502e278b1995d7a7a9efc0e4a91e1a14bd7692 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:18:09 +0700 Subject: [PATCH 100/255] Add model 2023-11-12-bert_qa_tianle_bert_base_uncased_finetuned_squad_en --- ...le_bert_base_uncased_finetuned_squad_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_tianle_bert_base_uncased_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_tianle_bert_base_uncased_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_tianle_bert_base_uncased_finetuned_squad_en.md new file mode 100644 index 00000000000000..9100c6b23839c5 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_tianle_bert_base_uncased_finetuned_squad_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_tianle_bert_base_uncased_finetuned_squad BertForQuestionAnswering from Tianle +author: John Snow Labs +name: bert_qa_tianle_bert_base_uncased_finetuned_squad +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_tianle_bert_base_uncased_finetuned_squad` is a English model originally trained by Tianle. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_tianle_bert_base_uncased_finetuned_squad_en_5.2.0_3.0_1699787796865.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_tianle_bert_base_uncased_finetuned_squad_en_5.2.0_3.0_1699787796865.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_tianle_bert_base_uncased_finetuned_squad","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_tianle_bert_base_uncased_finetuned_squad", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_tianle_bert_base_uncased_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/Tianle/bert-base-uncased-finetuned-squad \ No newline at end of file From 6d3352e5089018ebff06a24c31e5c352d14509ae Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:19:09 +0700 Subject: [PATCH 101/255] Add model 2023-11-12-bert_qa_seongkyu_bert_base_cased_finetuned_squad_en --- ...gkyu_bert_base_cased_finetuned_squad_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_seongkyu_bert_base_cased_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_seongkyu_bert_base_cased_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_seongkyu_bert_base_cased_finetuned_squad_en.md new file mode 100644 index 00000000000000..ca032f50d60052 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_seongkyu_bert_base_cased_finetuned_squad_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_seongkyu_bert_base_cased_finetuned_squad BertForQuestionAnswering from Seongkyu +author: John Snow Labs +name: bert_qa_seongkyu_bert_base_cased_finetuned_squad +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_seongkyu_bert_base_cased_finetuned_squad` is a English model originally trained by Seongkyu. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_seongkyu_bert_base_cased_finetuned_squad_en_5.2.0_3.0_1699787850251.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_seongkyu_bert_base_cased_finetuned_squad_en_5.2.0_3.0_1699787850251.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_seongkyu_bert_base_cased_finetuned_squad","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_seongkyu_bert_base_cased_finetuned_squad", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_seongkyu_bert_base_cased_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/Seongkyu/bert-base-cased-finetuned-squad \ No newline at end of file From e85d454bee7d034373a8135af20f0322dd4649af Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:20:09 +0700 Subject: [PATCH 102/255] Add model 2023-11-12-bert_qa_supriyaarun_bert_base_uncased_finetuned_squad_en --- ...un_bert_base_uncased_finetuned_squad_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_supriyaarun_bert_base_uncased_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_supriyaarun_bert_base_uncased_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_supriyaarun_bert_base_uncased_finetuned_squad_en.md new file mode 100644 index 00000000000000..6bc2657ebad9b4 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_supriyaarun_bert_base_uncased_finetuned_squad_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_supriyaarun_bert_base_uncased_finetuned_squad BertForQuestionAnswering from SupriyaArun +author: John Snow Labs +name: bert_qa_supriyaarun_bert_base_uncased_finetuned_squad +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_supriyaarun_bert_base_uncased_finetuned_squad` is a English model originally trained by SupriyaArun. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_supriyaarun_bert_base_uncased_finetuned_squad_en_5.2.0_3.0_1699787853621.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_supriyaarun_bert_base_uncased_finetuned_squad_en_5.2.0_3.0_1699787853621.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_supriyaarun_bert_base_uncased_finetuned_squad","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_supriyaarun_bert_base_uncased_finetuned_squad", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_supriyaarun_bert_base_uncased_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/SupriyaArun/bert-base-uncased-finetuned-squad \ No newline at end of file From a127a4eaaf41928b9498b59a8cd4b1dfe2d78150 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:21:13 +0700 Subject: [PATCH 103/255] Add model 2023-11-12-bert_qa_ajuste_02_en --- .../2023-11-12-bert_qa_ajuste_02_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_ajuste_02_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ajuste_02_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ajuste_02_en.md new file mode 100644 index 00000000000000..e5f825c7f2aac2 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ajuste_02_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Cased model (from JAlexis) +author: John Snow Labs +name: bert_qa_ajuste_02 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `ajuste_02` is a English model originally trained by `JAlexis`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_ajuste_02_en_5.2.0_3.0_1699788063198.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_ajuste_02_en_5.2.0_3.0_1699788063198.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_ajuste_02","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_ajuste_02","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_ajuste_02| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/JAlexis/ajuste_02 \ No newline at end of file From 55df4691fb932ebcbed2a69a8bfc096b572f9399 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:22:13 +0700 Subject: [PATCH 104/255] Add model 2023-11-12-bert_qa_autotrain_small_qna_1380352953_en --- ...rt_qa_autotrain_small_qna_1380352953_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_autotrain_small_qna_1380352953_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_autotrain_small_qna_1380352953_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_autotrain_small_qna_1380352953_en.md new file mode 100644 index 00000000000000..1c0af074fce0e5 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_autotrain_small_qna_1380352953_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Small Cased model (from gaaush) +author: John Snow Labs +name: bert_qa_autotrain_small_qna_1380352953 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `autotrain-small-qna-1380352953` is a English model originally trained by `gaaush`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_autotrain_small_qna_1380352953_en_5.2.0_3.0_1699788070058.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_autotrain_small_qna_1380352953_en_5.2.0_3.0_1699788070058.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_autotrain_small_qna_1380352953","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_autotrain_small_qna_1380352953","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_autotrain_small_qna_1380352953| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|1.2 GB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/gaaush/autotrain-small-qna-1380352953 \ No newline at end of file From 946b724ca83b99edb7dd651b018c2edb30242dde Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:23:13 +0700 Subject: [PATCH 105/255] Add model 2023-11-12-bert_qa_akshay1791_finetuned_squad_en --- ...2-bert_qa_akshay1791_finetuned_squad_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_akshay1791_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_akshay1791_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_akshay1791_finetuned_squad_en.md new file mode 100644 index 00000000000000..e1caefe29675a2 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_akshay1791_finetuned_squad_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Cased model (from Akshay1791) +author: John Snow Labs +name: bert_qa_akshay1791_finetuned_squad +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-finetuned-squad` is a English model originally trained by `Akshay1791`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_akshay1791_finetuned_squad_en_5.2.0_3.0_1699788131498.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_akshay1791_finetuned_squad_en_5.2.0_3.0_1699788131498.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_akshay1791_finetuned_squad","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_akshay1791_finetuned_squad","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_akshay1791_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|403.7 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/Akshay1791/bert-finetuned-squad \ No newline at end of file From a1a050e400473c0282078deab9c8a41b6f075fa3 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:24:14 +0700 Subject: [PATCH 106/255] Add model 2023-11-12-bert_qa_ancient_chinese_base_ud_head_zh --- ...bert_qa_ancient_chinese_base_ud_head_zh.md | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_ancient_chinese_base_ud_head_zh.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ancient_chinese_base_ud_head_zh.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ancient_chinese_base_ud_head_zh.md new file mode 100644 index 00000000000000..b65fb685bb07ba --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ancient_chinese_base_ud_head_zh.md @@ -0,0 +1,96 @@ +--- +layout: model +title: Chinese BertForQuestionAnswering Base Cased model (from KoichiYasuoka) +author: John Snow Labs +name: bert_qa_ancient_chinese_base_ud_head +date: 2023-11-12 +tags: [zh, open_source, bert, question_answering, onnx] +task: Question Answering +language: zh +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-ancient-chinese-base-ud-head` is a Chinese model originally trained by `KoichiYasuoka`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_ancient_chinese_base_ud_head_zh_5.2.0_3.0_1699788240227.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_ancient_chinese_base_ud_head_zh_5.2.0_3.0_1699788240227.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_ancient_chinese_base_ud_head","zh")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_ancient_chinese_base_ud_head","zh") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_ancient_chinese_base_ud_head| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|zh| +|Size:|430.5 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/KoichiYasuoka/bert-ancient-chinese-base-ud-head +- https://github.com/UniversalDependencies/UD_Classical_Chinese-Kyoto +- https://pypi.org/project/ufal.chu-liu-edmonds/ \ No newline at end of file From 7033d188ad8d6e0f91b26a71c31738ae84784648 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:25:14 +0700 Subject: [PATCH 107/255] Add model 2023-11-12-bert_qa_trial_3_results_en --- .../2023-11-12-bert_qa_trial_3_results_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_trial_3_results_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_trial_3_results_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_trial_3_results_en.md new file mode 100644 index 00000000000000..498d20a1487b4b --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_trial_3_results_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_trial_3_results BertForQuestionAnswering from sunitha +author: John Snow Labs +name: bert_qa_trial_3_results +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_trial_3_results` is a English model originally trained by sunitha. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_trial_3_results_en_5.2.0_3.0_1699788149777.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_trial_3_results_en_5.2.0_3.0_1699788149777.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_trial_3_results","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_trial_3_results", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_trial_3_results| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/sunitha/Trial_3_Results \ No newline at end of file From 6ad67d69e0df708a3b98ba918980bae7b32c0a8b Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:27:18 +0700 Subject: [PATCH 108/255] Add model 2023-11-12-bert_qa_adars_base_cased_finetuned_squad_en --- ..._qa_adars_base_cased_finetuned_squad_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_adars_base_cased_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_adars_base_cased_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_adars_base_cased_finetuned_squad_en.md new file mode 100644 index 00000000000000..f1016ad30df949 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_adars_base_cased_finetuned_squad_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Cased model (from Adars) +author: John Snow Labs +name: bert_qa_adars_base_cased_finetuned_squad +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-cased-finetuned-squad` is a English model originally trained by `Adars`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_adars_base_cased_finetuned_squad_en_5.2.0_3.0_1699788427985.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_adars_base_cased_finetuned_squad_en_5.2.0_3.0_1699788427985.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_adars_base_cased_finetuned_squad","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_adars_base_cased_finetuned_squad","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_adars_base_cased_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|403.7 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/Adars/bert-base-cased-finetuned-squad \ No newline at end of file From eff2f953ba8ab78a61635898de18a792096df68d Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:28:18 +0700 Subject: [PATCH 109/255] Add model 2023-11-12-bert_qa_ankitkupadhyay_bert_finetuned_squad_en --- ..._ankitkupadhyay_bert_finetuned_squad_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_ankitkupadhyay_bert_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ankitkupadhyay_bert_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ankitkupadhyay_bert_finetuned_squad_en.md new file mode 100644 index 00000000000000..c239103f34f928 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ankitkupadhyay_bert_finetuned_squad_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from ankitkupadhyay) +author: John Snow Labs +name: bert_qa_ankitkupadhyay_bert_finetuned_squad +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-finetuned-squad` is a English model orginally trained by `ankitkupadhyay`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_ankitkupadhyay_bert_finetuned_squad_en_5.2.0_3.0_1699788452476.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_ankitkupadhyay_bert_finetuned_squad_en_5.2.0_3.0_1699788452476.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_ankitkupadhyay_bert_finetuned_squad","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_ankitkupadhyay_bert_finetuned_squad","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.by_ankitkupadhyay").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_ankitkupadhyay_bert_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/ankitkupadhyay/bert-finetuned-squad \ No newline at end of file From 60bdfd347f863af7c9482569441cc1bb0026c559 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:29:18 +0700 Subject: [PATCH 110/255] Add model 2023-11-12-bert_qa_autotrain_a3_1043835930_en --- ...1-12-bert_qa_autotrain_a3_1043835930_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_autotrain_a3_1043835930_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_autotrain_a3_1043835930_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_autotrain_a3_1043835930_en.md new file mode 100644 index 00000000000000..bbd476abc9baab --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_autotrain_a3_1043835930_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Cased model (from deepesh0x) +author: John Snow Labs +name: bert_qa_autotrain_a3_1043835930 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `autotrain-a3-1043835930` is a English model originally trained by `deepesh0x`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_autotrain_a3_1043835930_en_5.2.0_3.0_1699788524206.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_autotrain_a3_1043835930_en_5.2.0_3.0_1699788524206.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_autotrain_a3_1043835930","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_autotrain_a3_1043835930","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_autotrain_a3_1043835930| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|408.2 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/deepesh0x/autotrain-a3-1043835930 \ No newline at end of file From 9f10283afd0a5a0a0daa4d8806da06d07bf761b6 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:30:19 +0700 Subject: [PATCH 111/255] Add model 2023-11-12-bert_qa_base_multilingual_uncased_finetuned_squad_xx --- ...multilingual_uncased_finetuned_squad_xx.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_uncased_finetuned_squad_xx.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_uncased_finetuned_squad_xx.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_uncased_finetuned_squad_xx.md new file mode 100644 index 00000000000000..e75bdb0df19d41 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_uncased_finetuned_squad_xx.md @@ -0,0 +1,94 @@ +--- +layout: model +title: Multilingual BertForQuestionAnswering Base Uncased model (from monakth) +author: John Snow Labs +name: bert_qa_base_multilingual_uncased_finetuned_squad +date: 2023-11-12 +tags: [xx, open_source, bert, question_answering, onnx] +task: Question Answering +language: xx +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-multilingual-uncased-finetuned-squad` is a Multilingual model originally trained by `monakth`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_multilingual_uncased_finetuned_squad_xx_5.2.0_3.0_1699788565904.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_multilingual_uncased_finetuned_squad_xx_5.2.0_3.0_1699788565904.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_multilingual_uncased_finetuned_squad","xx")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_multilingual_uncased_finetuned_squad","xx") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_multilingual_uncased_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|xx| +|Size:|625.5 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/monakth/bert-base-multilingual-uncased-finetuned-squad \ No newline at end of file From 4a7e1f921536b00423ddf56d6296bc0b1da43634 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:31:19 +0700 Subject: [PATCH 112/255] Add model 2023-11-12-bert_qa_ahujaniharika95_minilm_uncased_squad2_finetuned_squad_en --- ...inilm_uncased_squad2_finetuned_squad_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_ahujaniharika95_minilm_uncased_squad2_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ahujaniharika95_minilm_uncased_squad2_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ahujaniharika95_minilm_uncased_squad2_finetuned_squad_en.md new file mode 100644 index 00000000000000..a108fd3e5c23ee --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ahujaniharika95_minilm_uncased_squad2_finetuned_squad_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Mini Uncased model (from ahujaniharika95) +author: John Snow Labs +name: bert_qa_ahujaniharika95_minilm_uncased_squad2_finetuned_squad +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `minilm-uncased-squad2-finetuned-squad` is a English model originally trained by `ahujaniharika95`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_ahujaniharika95_minilm_uncased_squad2_finetuned_squad_en_5.2.0_3.0_1699788587653.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_ahujaniharika95_minilm_uncased_squad2_finetuned_squad_en_5.2.0_3.0_1699788587653.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_ahujaniharika95_minilm_uncased_squad2_finetuned_squad","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_ahujaniharika95_minilm_uncased_squad2_finetuned_squad","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squadv2.uncased_mini_lm_mini_finetuned").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_ahujaniharika95_minilm_uncased_squad2_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|123.8 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/ahujaniharika95/minilm-uncased-squad2-finetuned-squad \ No newline at end of file From 86904a2cf7f3e3aa73293568b6b393b47e2c09e3 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:32:19 +0700 Subject: [PATCH 113/255] Add model 2023-11-12-bert_qa_andresestevez_bert_finetuned_squad_accelerate_en --- ...evez_bert_finetuned_squad_accelerate_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_andresestevez_bert_finetuned_squad_accelerate_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_andresestevez_bert_finetuned_squad_accelerate_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_andresestevez_bert_finetuned_squad_accelerate_en.md new file mode 100644 index 00000000000000..5c3636dd447a95 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_andresestevez_bert_finetuned_squad_accelerate_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from andresestevez) +author: John Snow Labs +name: bert_qa_andresestevez_bert_finetuned_squad_accelerate +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-finetuned-squad-accelerate` is a English model orginally trained by `andresestevez`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_andresestevez_bert_finetuned_squad_accelerate_en_5.2.0_3.0_1699788526078.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_andresestevez_bert_finetuned_squad_accelerate_en_5.2.0_3.0_1699788526078.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_andresestevez_bert_finetuned_squad_accelerate","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_andresestevez_bert_finetuned_squad_accelerate","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.by_andresestevez").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_andresestevez_bert_finetuned_squad_accelerate| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/andresestevez/bert-finetuned-squad-accelerate \ No newline at end of file From 097feaf762c88d415aa0118a3bede2f3e15b65be Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:33:41 +0700 Subject: [PATCH 114/255] Add model 2023-11-12-bert_qa_baru98_base_cased_finetuned_squad_en --- ...qa_baru98_base_cased_finetuned_squad_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_baru98_base_cased_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_baru98_base_cased_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_baru98_base_cased_finetuned_squad_en.md new file mode 100644 index 00000000000000..e47d0cd8a0e7c6 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_baru98_base_cased_finetuned_squad_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Cased model (from baru98) +author: John Snow Labs +name: bert_qa_baru98_base_cased_finetuned_squad +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-cased-finetuned-squad` is a English model originally trained by `baru98`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_baru98_base_cased_finetuned_squad_en_5.2.0_3.0_1699788813572.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_baru98_base_cased_finetuned_squad_en_5.2.0_3.0_1699788813572.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_baru98_base_cased_finetuned_squad","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_baru98_base_cased_finetuned_squad","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.cased_base_finetuned").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_baru98_base_cased_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/baru98/bert-base-cased-finetuned-squad \ No newline at end of file From 5a767305ef53fe0b995ccf0b0aba95997636f49c Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:34:41 +0700 Subject: [PATCH 115/255] Add model 2023-11-12-bert_qa_aiyshwariya_finetuned_squad_en --- ...-bert_qa_aiyshwariya_finetuned_squad_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_aiyshwariya_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_aiyshwariya_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_aiyshwariya_finetuned_squad_en.md new file mode 100644 index 00000000000000..81e655f413ebe1 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_aiyshwariya_finetuned_squad_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Cased model (from Aiyshwariya) +author: John Snow Labs +name: bert_qa_aiyshwariya_finetuned_squad +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-finetuned-squad` is a English model originally trained by `Aiyshwariya`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_aiyshwariya_finetuned_squad_en_5.2.0_3.0_1699788850083.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_aiyshwariya_finetuned_squad_en_5.2.0_3.0_1699788850083.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_aiyshwariya_finetuned_squad","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_aiyshwariya_finetuned_squad","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.finetuned").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_aiyshwariya_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/Aiyshwariya/bert-finetuned-squad \ No newline at end of file From 537f6161e9748abd0d2e9fa55e3225e348431a6f Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:35:41 +0700 Subject: [PATCH 116/255] Add model 2023-11-12-bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_full_xx --- ...etuned_squadv2_finetuned_vizalo_full_xx.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_full_xx.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_full_xx.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_full_xx.md new file mode 100644 index 00000000000000..b4ef46a270623e --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_full_xx.md @@ -0,0 +1,94 @@ +--- +layout: model +title: Multilingual BertForQuestionAnswering Base Uncased model (from khoanvm) +author: John Snow Labs +name: bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_full +date: 2023-11-12 +tags: [xx, open_source, bert, question_answering, onnx] +task: Question Answering +language: xx +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-multilingual-uncased-finetuned-squadv2-finetuned-vizalo-full` is a Multilingual model originally trained by `khoanvm`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_full_xx_5.2.0_3.0_1699788894223.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_full_xx_5.2.0_3.0_1699788894223.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_full","xx")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_full","xx") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_full| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|xx| +|Size:|625.5 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/khoanvm/bert-base-multilingual-uncased-finetuned-squadv2-finetuned-vizalo-full \ No newline at end of file From 01f2320a6dce0f9e537e13e7620c7618ef0be4cf Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:36:42 +0700 Subject: [PATCH 117/255] Add model 2023-11-12-bert_qa_augmented_en --- .../2023-11-12-bert_qa_augmented_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_augmented_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_augmented_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_augmented_en.md new file mode 100644 index 00000000000000..c1326dace3bb3a --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_augmented_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from krinal214) +author: John Snow Labs +name: bert_qa_augmented +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `augmented` is a English model orginally trained by `krinal214`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_augmented_en_5.2.0_3.0_1699788905018.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_augmented_en_5.2.0_3.0_1699788905018.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_augmented","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_augmented","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.augmented").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_augmented| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|665.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/krinal214/augmented \ No newline at end of file From 5b708d3be8fe0d196ffd1bcd9ade180f642c1352 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:37:42 +0700 Subject: [PATCH 118/255] Add model 2023-11-12-bert_qa_arabert_finetuned_arcd_ar --- ...11-12-bert_qa_arabert_finetuned_arcd_ar.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_arabert_finetuned_arcd_ar.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_arabert_finetuned_arcd_ar.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_arabert_finetuned_arcd_ar.md new file mode 100644 index 00000000000000..0883a18c309de9 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_arabert_finetuned_arcd_ar.md @@ -0,0 +1,94 @@ +--- +layout: model +title: Arabic BertForQuestionAnswering Cased model (from Sh3ra) +author: John Snow Labs +name: bert_qa_arabert_finetuned_arcd +date: 2023-11-12 +tags: [ar, open_source, bert, question_answering, onnx] +task: Question Answering +language: ar +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `arabert-finetuned-arcd` is a Arabic model originally trained by `Sh3ra`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_arabert_finetuned_arcd_ar_5.2.0_3.0_1699788857557.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_arabert_finetuned_arcd_ar_5.2.0_3.0_1699788857557.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_arabert_finetuned_arcd","ar") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["ما هو اسمي؟", "اسمي كلارا وأنا أعيش في بيركلي."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_arabert_finetuned_arcd","ar") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("ما هو اسمي؟", "اسمي كلارا وأنا أعيش في بيركلي.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_arabert_finetuned_arcd| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|ar| +|Size:|504.9 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/Sh3ra/arabert-finetuned-arcd \ No newline at end of file From d93103c0db0be695ce5a769168e86a569b1b458b Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:38:42 +0700 Subject: [PATCH 119/255] Add model 2023-11-12-bert_qa_base_cased_iuchatbot_ontologydts_berttokenizer_12april2022_en --- ...ntologydts_berttokenizer_12april2022_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_iuchatbot_ontologydts_berttokenizer_12april2022_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_iuchatbot_ontologydts_berttokenizer_12april2022_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_iuchatbot_ontologydts_berttokenizer_12april2022_en.md new file mode 100644 index 00000000000000..e5b3ca5a2f9ee7 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_iuchatbot_ontologydts_berttokenizer_12april2022_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Cased model (from nntadotzip) +author: John Snow Labs +name: bert_qa_base_cased_iuchatbot_ontologydts_berttokenizer_12april2022 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-cased-IUChatbot-ontologyDts-bertBaseCased-bertTokenizer-12April2022` is a English model originally trained by `nntadotzip`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_cased_iuchatbot_ontologydts_berttokenizer_12april2022_en_5.2.0_3.0_1699789068115.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_cased_iuchatbot_ontologydts_berttokenizer_12april2022_en_5.2.0_3.0_1699789068115.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_cased_iuchatbot_ontologydts_berttokenizer_12april2022","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_cased_iuchatbot_ontologydts_berttokenizer_12april2022","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.cased_base").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_cased_iuchatbot_ontologydts_berttokenizer_12april2022| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/nntadotzip/bert-base-cased-IUChatbot-ontologyDts-bertBaseCased-bertTokenizer-12April2022 \ No newline at end of file From 6faae112220c19aa9c126ce473b2797b883a9149 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:39:42 +0700 Subject: [PATCH 120/255] Add model 2023-11-12-bert_qa_ajuste_01_en --- .../2023-11-12-bert_qa_ajuste_01_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_ajuste_01_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ajuste_01_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ajuste_01_en.md new file mode 100644 index 00000000000000..906550f0d7cef1 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_ajuste_01_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Cased model (from JAlexis) +author: John Snow Labs +name: bert_qa_ajuste_01 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `ajuste_01` is a English model originally trained by `JAlexis`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_ajuste_01_en_5.2.0_3.0_1699789090928.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_ajuste_01_en_5.2.0_3.0_1699789090928.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_ajuste_01","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_ajuste_01","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_ajuste_01| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/JAlexis/ajuste_01 \ No newline at end of file From 6be5c1223fab8c6da619d150bb155b5d4eb98730 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:40:43 +0700 Subject: [PATCH 121/255] Add model 2023-11-12-bert_qa_base_1024_full_trivia_en --- ...-11-12-bert_qa_base_1024_full_trivia_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_1024_full_trivia_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_1024_full_trivia_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_1024_full_trivia_en.md new file mode 100644 index 00000000000000..f2f5e1106622d1 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_1024_full_trivia_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Cased model (from MrAnderson) +author: John Snow Labs +name: bert_qa_base_1024_full_trivia +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-1024-full-trivia` is a English model originally trained by `MrAnderson`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_1024_full_trivia_en_5.2.0_3.0_1699789105143.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_1024_full_trivia_en_5.2.0_3.0_1699789105143.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_1024_full_trivia","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_1024_full_trivia","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.trivia.base_1024d").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_1024_full_trivia| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|408.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/MrAnderson/bert-base-1024-full-trivia \ No newline at end of file From 872a4c6ec241cbcdb64a025310cd38676cd574e4 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:41:43 +0700 Subject: [PATCH 122/255] Add model 2023-11-12-bert_qa_base_pars_uncased_persian_fa --- ...12-bert_qa_base_pars_uncased_persian_fa.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_pars_uncased_persian_fa.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_pars_uncased_persian_fa.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_pars_uncased_persian_fa.md new file mode 100644 index 00000000000000..9a274580202d6d --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_pars_uncased_persian_fa.md @@ -0,0 +1,94 @@ +--- +layout: model +title: Persian BertForQuestionAnswering Base Uncased model (from mohsenfayyaz) +author: John Snow Labs +name: bert_qa_base_pars_uncased_persian +date: 2023-11-12 +tags: [fa, open_source, bert, question_answering, onnx] +task: Question Answering +language: fa +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-parsbert-uncased_persian_qa` is a Persian model originally trained by `mohsenfayyaz`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_pars_uncased_persian_fa_5.2.0_3.0_1699789257443.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_pars_uncased_persian_fa_5.2.0_3.0_1699789257443.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_pars_uncased_persian","fa")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_pars_uncased_persian","fa") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_pars_uncased_persian| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|fa| +|Size:|606.4 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/mohsenfayyaz/bert-base-parsbert-uncased_persian_qa \ No newline at end of file From 3b7323b52027cf7985800dadf32291698437abbc Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:42:43 +0700 Subject: [PATCH 123/255] Add model 2023-11-12-bert_qa_augmented_squad_translated_en --- ...2-bert_qa_augmented_squad_translated_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_augmented_squad_translated_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_augmented_squad_translated_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_augmented_squad_translated_en.md new file mode 100644 index 00000000000000..af5fb81fd7c8aa --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_augmented_squad_translated_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_augmented_squad_translated BertForQuestionAnswering from krinal214 +author: John Snow Labs +name: bert_qa_augmented_squad_translated +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_augmented_squad_translated` is a English model originally trained by krinal214. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_augmented_squad_translated_en_5.2.0_3.0_1699789286206.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_augmented_squad_translated_en_5.2.0_3.0_1699789286206.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_augmented_squad_translated","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_augmented_squad_translated", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_augmented_squad_translated| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|665.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/krinal214/augmented_Squad_Translated \ No newline at end of file From 893d158bb87fc65571d3ccf69eb839e42ab97340 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:43:44 +0700 Subject: [PATCH 124/255] Add model 2023-11-12-bert_qa_araspeedest_en --- .../2023-11-12-bert_qa_araspeedest_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_araspeedest_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_araspeedest_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_araspeedest_en.md new file mode 100644 index 00000000000000..81ef73621c3d12 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_araspeedest_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_araspeedest BertForQuestionAnswering from aymanm419 +author: John Snow Labs +name: bert_qa_araspeedest +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_araspeedest` is a English model originally trained by aymanm419. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_araspeedest_en_5.2.0_3.0_1699789370590.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_araspeedest_en_5.2.0_3.0_1699789370590.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_araspeedest","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_araspeedest", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_araspeedest| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|504.8 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/aymanm419/araSpeedest \ No newline at end of file From d2319e698dac29f4366b053988e306a02e3aecfb Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:44:44 +0700 Subject: [PATCH 125/255] Add model 2023-11-12-bert_qa_base_cased_finetuned_squad_r3f_en --- ...rt_qa_base_cased_finetuned_squad_r3f_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_finetuned_squad_r3f_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_finetuned_squad_r3f_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_finetuned_squad_r3f_en.md new file mode 100644 index 00000000000000..d814e86535bf47 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_finetuned_squad_r3f_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Cased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_cased_finetuned_squad_r3f +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-cased-finetuned-squad-r3f` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_cased_finetuned_squad_r3f_en_5.2.0_3.0_1699789462063.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_cased_finetuned_squad_r3f_en_5.2.0_3.0_1699789462063.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_cased_finetuned_squad_r3f","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_cased_finetuned_squad_r3f","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.cased_base_finetuned.by_anas_awadalla").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_cased_finetuned_squad_r3f| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-cased-finetuned-squad-r3f \ No newline at end of file From 155c48d38f6a414543379094cd8e4a9eccda4d09 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:45:44 +0700 Subject: [PATCH 126/255] Add model 2023-11-12-bert_qa_base_squad_v2_portuguese_pt --- ...-12-bert_qa_base_squad_v2_portuguese_pt.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_squad_v2_portuguese_pt.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_squad_v2_portuguese_pt.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_squad_v2_portuguese_pt.md new file mode 100644 index 00000000000000..88be44dcfabc70 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_squad_v2_portuguese_pt.md @@ -0,0 +1,94 @@ +--- +layout: model +title: Portuguese BertForQuestionAnswering Base Cased model (from brianpaiva) +author: John Snow Labs +name: bert_qa_base_squad_v2_portuguese +date: 2023-11-12 +tags: [pt, open_source, bert, question_answering, onnx] +task: Question Answering +language: pt +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-squad-v2-portuguese` is a Portuguese model originally trained by `brianpaiva`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_squad_v2_portuguese_pt_5.2.0_3.0_1699789510332.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_squad_v2_portuguese_pt_5.2.0_3.0_1699789510332.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_squad_v2_portuguese","pt")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_squad_v2_portuguese","pt") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_squad_v2_portuguese| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|pt| +|Size:|405.9 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/brianpaiva/bert-base-squad-v2-portuguese \ No newline at end of file From c80fa009d199ea6dfdf8aa30cdf5c341c77ca7e5 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:46:44 +0700 Subject: [PATCH 127/255] Add model 2023-11-12-bert_qa_base_japanese_wikipedia_ud_head_ja --- ...t_qa_base_japanese_wikipedia_ud_head_ja.md | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_japanese_wikipedia_ud_head_ja.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_japanese_wikipedia_ud_head_ja.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_japanese_wikipedia_ud_head_ja.md new file mode 100644 index 00000000000000..7cde7fbdc338c2 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_japanese_wikipedia_ud_head_ja.md @@ -0,0 +1,101 @@ +--- +layout: model +title: Japanese BertForQuestionAnswering Base model (from KoichiYasuoka) +author: John Snow Labs +name: bert_qa_base_japanese_wikipedia_ud_head +date: 2023-11-12 +tags: [ja, open_source, bert, question_answering, onnx] +task: Question Answering +language: ja +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-japanese-wikipedia-ud-head` is a Japanese model originally trained by `KoichiYasuoka`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_japanese_wikipedia_ud_head_ja_5.2.0_3.0_1699789292031.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_japanese_wikipedia_ud_head_ja_5.2.0_3.0_1699789292031.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_japanese_wikipedia_ud_head","ja") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer")\ +.setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["私の名前は何ですか?", "私の名前はクララで、私はバークレーに住んでいます。"]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() +.setInputCols(Array("question", "context")) +.setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_japanese_wikipedia_ud_head","ja") +.setInputCols(Array("document", "token")) +.setOutputCol("answer") +.setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("私の名前は何ですか?", "私の名前はクララで、私はバークレーに住んでいます。").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("ja.answer_question.wikipedia.bert.base").predict("""私の名前は何ですか?|||"私の名前はクララで、私はバークレーに住んでいます。""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_japanese_wikipedia_ud_head| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|ja| +|Size:|338.1 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/KoichiYasuoka/bert-base-japanese-wikipedia-ud-head +- https://github.com/UniversalDependencies/UD_Japanese-GSDLUW \ No newline at end of file From dc95bb80fe37527892bc87ae892619aab9b8bdeb Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:47:45 +0700 Subject: [PATCH 128/255] Add model 2023-11-12-bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_xx --- ...d_finetuned_squadv2_finetuned_vizalo_xx.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_xx.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_xx.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_xx.md new file mode 100644 index 00000000000000..fd32c6ace751ab --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_xx.md @@ -0,0 +1,94 @@ +--- +layout: model +title: Multilingual BertForQuestionAnswering Base Uncased model (from khoanvm) +author: John Snow Labs +name: bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo +date: 2023-11-12 +tags: [xx, open_source, bert, question_answering, onnx] +task: Question Answering +language: xx +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-multilingual-uncased-finetuned-squadv2-finetuned-vizalo` is a Multilingual model originally trained by `khoanvm`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_xx_5.2.0_3.0_1699789612662.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo_xx_5.2.0_3.0_1699789612662.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo","xx")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo","xx") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_multilingual_uncased_finetuned_squadv2_finetuned_vizalo| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|xx| +|Size:|625.5 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/khoanvm/bert-base-multilingual-uncased-finetuned-squadv2-finetuned-vizalo \ No newline at end of file From ab419235abd22badb7e284f7f0266d5d1fdd47aa Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:48:45 +0700 Subject: [PATCH 129/255] Add model 2023-11-12-bert_qa_base_for_question_answering_en --- ...-bert_qa_base_for_question_answering_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_for_question_answering_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_for_question_answering_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_for_question_answering_en.md new file mode 100644 index 00000000000000..ce691323b96de9 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_for_question_answering_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Cased model (from Zamachi) +author: John Snow Labs +name: bert_qa_base_for_question_answering +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-for-question-answering` is a English model originally trained by `Zamachi`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_for_question_answering_en_5.2.0_3.0_1699789672656.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_for_question_answering_en_5.2.0_3.0_1699789672656.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_for_question_answering","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_for_question_answering","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_for_question_answering| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.9 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/Zamachi/bert-base-for-question-answering \ No newline at end of file From 6f3ef9793169896862787ae31e00855f27e36d9e Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:49:45 +0700 Subject: [PATCH 130/255] Add model 2023-11-12-bert_qa_base_cased_finetuned_squad_v2_en --- ...ert_qa_base_cased_finetuned_squad_v2_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_finetuned_squad_v2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_finetuned_squad_v2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_finetuned_squad_v2_en.md new file mode 100644 index 00000000000000..d2db7bc891c8d4 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_cased_finetuned_squad_v2_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Cased model (from victorlee071200) +author: John Snow Labs +name: bert_qa_base_cased_finetuned_squad_v2 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-cased-finetuned-squad_v2` is a English model originally trained by `victorlee071200`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_cased_finetuned_squad_v2_en_5.2.0_3.0_1699789748848.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_cased_finetuned_squad_v2_en_5.2.0_3.0_1699789748848.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_cased_finetuned_squad_v2","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_cased_finetuned_squad_v2","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squadv2.cased_v2_base_finetuned").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_cased_finetuned_squad_v2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|403.7 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/victorlee071200/bert-base-cased-finetuned-squad_v2 \ No newline at end of file From b39ec44bdd906332ba52c4ce668fd4586f46fb3c Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:50:45 +0700 Subject: [PATCH 131/255] Add model 2023-11-12-bert_qa_autotrain_xlm_fine_tune_1380052948_en --- ...a_autotrain_xlm_fine_tune_1380052948_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_autotrain_xlm_fine_tune_1380052948_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_autotrain_xlm_fine_tune_1380052948_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_autotrain_xlm_fine_tune_1380052948_en.md new file mode 100644 index 00000000000000..d9a2df74d4a6fa --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_autotrain_xlm_fine_tune_1380052948_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Cased model (from tushar23) +author: John Snow Labs +name: bert_qa_autotrain_xlm_fine_tune_1380052948 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `autotrain-xlm_bert_fine_tune-1380052948` is a English model originally trained by `tushar23`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_autotrain_xlm_fine_tune_1380052948_en_5.2.0_3.0_1699789795351.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_autotrain_xlm_fine_tune_1380052948_en_5.2.0_3.0_1699789795351.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_autotrain_xlm_fine_tune_1380052948","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_autotrain_xlm_fine_tune_1380052948","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_autotrain_xlm_fine_tune_1380052948| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|1.2 GB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/tushar23/autotrain-xlm_bert_fine_tune-1380052948 \ No newline at end of file From 374b0c256fc8cb11aaed77f3a13c1a1052839cfc Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:51:45 +0700 Subject: [PATCH 132/255] Add model 2023-11-12-bert_qa_base_turkish_128k_cased_finetuned_lr_2e_05_epochs_3_tr --- ...8k_cased_finetuned_lr_2e_05_epochs_3_tr.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_turkish_128k_cased_finetuned_lr_2e_05_epochs_3_tr.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_turkish_128k_cased_finetuned_lr_2e_05_epochs_3_tr.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_turkish_128k_cased_finetuned_lr_2e_05_epochs_3_tr.md new file mode 100644 index 00000000000000..2489a0ba71b953 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_turkish_128k_cased_finetuned_lr_2e_05_epochs_3_tr.md @@ -0,0 +1,94 @@ +--- +layout: model +title: Turkish BertForQuestionAnswering Base Cased model (from husnu) +author: John Snow Labs +name: bert_qa_base_turkish_128k_cased_finetuned_lr_2e_05_epochs_3 +date: 2023-11-12 +tags: [tr, open_source, bert, question_answering, onnx] +task: Question Answering +language: tr +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-turkish-128k-cased-finetuned_lr-2e-05_epochs-3` is a Turkish model originally trained by `husnu`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_turkish_128k_cased_finetuned_lr_2e_05_epochs_3_tr_5.2.0_3.0_1699789839321.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_turkish_128k_cased_finetuned_lr_2e_05_epochs_3_tr_5.2.0_3.0_1699789839321.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_turkish_128k_cased_finetuned_lr_2e_05_epochs_3","tr") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["Benim adım ne?", "Benim adım Clara ve Berkeley'de yaşıyorum."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_turkish_128k_cased_finetuned_lr_2e_05_epochs_3","tr") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("Benim adım ne?", "Benim adım Clara ve Berkeley'de yaşıyorum.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_turkish_128k_cased_finetuned_lr_2e_05_epochs_3| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|tr| +|Size:|688.9 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/husnu/bert-base-turkish-128k-cased-finetuned_lr-2e-05_epochs-3 \ No newline at end of file From 2083c2058d4d1a82bc39b8f12c6cd81cea570129 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:52:46 +0700 Subject: [PATCH 133/255] Add model 2023-11-12-bert_qa_base_multilingual_uncased_mo_finetuned_squad_v2_xx --- ...ingual_uncased_mo_finetuned_squad_v2_xx.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_uncased_mo_finetuned_squad_v2_xx.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_uncased_mo_finetuned_squad_v2_xx.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_uncased_mo_finetuned_squad_v2_xx.md new file mode 100644 index 00000000000000..df8164ce9a3e27 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multilingual_uncased_mo_finetuned_squad_v2_xx.md @@ -0,0 +1,94 @@ +--- +layout: model +title: Multilingual BertForQuestionAnswering Base Uncased model (from monakth) +author: John Snow Labs +name: bert_qa_base_multilingual_uncased_mo_finetuned_squad_v2 +date: 2023-11-12 +tags: [xx, open_source, bert, question_answering, onnx] +task: Question Answering +language: xx +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-multilingual-uncased-finetuned-squad-squadv2` is a Multilingual model originally trained by `monakth`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_multilingual_uncased_mo_finetuned_squad_v2_xx_5.2.0_3.0_1699789914874.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_multilingual_uncased_mo_finetuned_squad_v2_xx_5.2.0_3.0_1699789914874.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_multilingual_uncased_mo_finetuned_squad_v2","xx")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_multilingual_uncased_mo_finetuned_squad_v2","xx") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_multilingual_uncased_mo_finetuned_squad_v2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|xx| +|Size:|625.5 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/monakth/bert-base-multilingual-uncased-finetuned-squad-squadv2 \ No newline at end of file From 22c55621dfb922bf4719d4c0ea017c0889d358d6 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:53:46 +0700 Subject: [PATCH 134/255] Add model 2023-11-12-bert_qa_base_chinese_zh --- .../2023-11-12-bert_qa_base_chinese_zh.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_chinese_zh.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_chinese_zh.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_chinese_zh.md new file mode 100644 index 00000000000000..e8b6bac91ef5d3 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_chinese_zh.md @@ -0,0 +1,99 @@ +--- +layout: model +title: Chinese BertForQuestionAnswering Base Cased model (from ckiplab) +author: John Snow Labs +name: bert_qa_base_chinese +date: 2023-11-12 +tags: [zh, open_source, bert, question_answering, onnx] +task: Question Answering +language: zh +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-chinese-qa` is a Chinese model originally trained by `ckiplab`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_chinese_zh_5.2.0_3.0_1699789991574.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_chinese_zh_5.2.0_3.0_1699789991574.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_chinese","zh")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_chinese","zh") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_chinese| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|zh| +|Size:|381.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/ckiplab/bert-base-chinese-qa +- https://github.com/ckiplab/ckip-transformers +- https://muyang.pro +- https://ckip.iis.sinica.edu.tw +- https://github.com/ckiplab/ckip-transformers +- https://github.com/ckiplab/ckip-transformers \ No newline at end of file From ea935313aef742faaa3bc7e81bf520a9613318d9 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 18:54:46 +0700 Subject: [PATCH 135/255] Add model 2023-11-12-bert_qa_base_indonesian_tydiqa_id --- ...11-12-bert_qa_base_indonesian_tydiqa_id.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_indonesian_tydiqa_id.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_indonesian_tydiqa_id.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_indonesian_tydiqa_id.md new file mode 100644 index 00000000000000..72fcbb6111b54f --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_indonesian_tydiqa_id.md @@ -0,0 +1,100 @@ +--- +layout: model +title: Indonesian BertForQuestionAnswering Base Cased model (from cahya) +author: John Snow Labs +name: bert_qa_base_indonesian_tydiqa +date: 2023-11-12 +tags: [id, open_source, bert, question_answering, onnx] +task: Question Answering +language: id +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-indonesian-tydiqa` is a Indonesian model originally trained by `cahya`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_indonesian_tydiqa_id_5.2.0_3.0_1699789939394.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_indonesian_tydiqa_id_5.2.0_3.0_1699789939394.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_indonesian_tydiqa","id") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["Siapa namaku?", "Nama saya Clara dan saya tinggal di Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_indonesian_tydiqa","id") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("Siapa namaku?", "Nama saya Clara dan saya tinggal di Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("id.answer_question.bert.tydiqa.base").predict("""Siapa namaku?|||"Nama saya Clara dan saya tinggal di Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_indonesian_tydiqa| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|id| +|Size:|412.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/cahya/bert-base-indonesian-tydiqa \ No newline at end of file From ca760a1aae5bfa403665ba76f92f6f0dae98df64 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 19:03:09 +0700 Subject: [PATCH 136/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_10_en --- ..._shot_k_1024_finetuned_squad_seed_10_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_10_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_10_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_10_en.md new file mode 100644 index 00000000000000..a25cb5e061ed59 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_10_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_10 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-1024-finetuned-squad-seed-10` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_10_en_5.2.0_3.0_1699790580658.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_10_en_5.2.0_3.0_1699790580658.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_10","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_10","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_10_base_1024d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_10| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-1024-finetuned-squad-seed-10 \ No newline at end of file From 7da3cb826e056d7456570f83941a5dfa5fae16da Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 19:09:07 +0700 Subject: [PATCH 137/255] Add model 2023-11-12-bert_qa_base_multi_uncased_xx --- ...023-11-12-bert_qa_base_multi_uncased_xx.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multi_uncased_xx.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multi_uncased_xx.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multi_uncased_xx.md new file mode 100644 index 00000000000000..cee66ea81d1be5 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multi_uncased_xx.md @@ -0,0 +1,100 @@ +--- +layout: model +title: Multilingual BertForQuestionAnswering Base Uncased model (from roshnir) +author: John Snow Labs +name: bert_qa_base_multi_uncased +date: 2023-11-12 +tags: [xx, open_source, bert, question_answering, onnx] +task: Question Answering +language: xx +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-multi-uncased-en-hi` is a Multilingual model originally trained by `roshnir`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_multi_uncased_xx_5.2.0_3.0_1699790863248.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_multi_uncased_xx_5.2.0_3.0_1699790863248.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_multi_uncased","xx") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["PUT YOUR QUESTION HERE", "PUT YOUR CONTEXT HERE"]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_multi_uncased","xx") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("PUT YOUR QUESTION HERE", "PUT YOUR CONTEXT HERE").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("xx.answer_question.bert.uncased_base").predict("""PUT YOUR QUESTION HERE|||"PUT YOUR CONTEXT HERE""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_multi_uncased| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|xx| +|Size:|625.5 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/roshnir/bert-base-multi-uncased-en-hi \ No newline at end of file From a003701c1d93b6c06798e1525523291667ed781a Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 19:12:22 +0700 Subject: [PATCH 138/255] Add model 2023-11-12-bert_qa_base_nnish_cased_squad2_fi --- ...1-12-bert_qa_base_nnish_cased_squad2_fi.md | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_nnish_cased_squad2_fi.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_nnish_cased_squad2_fi.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_nnish_cased_squad2_fi.md new file mode 100644 index 00000000000000..99a54db2140e6c --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_nnish_cased_squad2_fi.md @@ -0,0 +1,96 @@ +--- +layout: model +title: Finnish BertForQuestionAnswering Base Cased model (from ilmariky) +author: John Snow Labs +name: bert_qa_base_nnish_cased_squad2 +date: 2023-11-12 +tags: [fi, open_source, bert, question_answering, onnx] +task: Question Answering +language: fi +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-finnish-cased-squad2-fi` is a Finnish model originally trained by `ilmariky`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_nnish_cased_squad2_fi_5.2.0_3.0_1699791134037.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_nnish_cased_squad2_fi_5.2.0_3.0_1699791134037.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_nnish_cased_squad2","fi")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_nnish_cased_squad2","fi") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_nnish_cased_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|fi| +|Size:|464.7 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/ilmariky/bert-base-finnish-cased-squad2-fi +- https://github.com/google-research-datasets/tydiqa +- https://worksheets.codalab.org/rest/bundles/0x6b567e1cf2e041ec80d7098f031c5c9e/contents/blob/ \ No newline at end of file From f163db4f8132b2e50ea80f3f24bdf433e7966a53 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 19:14:33 +0700 Subject: [PATCH 139/255] Add model 2023-11-12-bert_qa_base_chinese_finetuned_squad_zh --- ...bert_qa_base_chinese_finetuned_squad_zh.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_chinese_finetuned_squad_zh.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_chinese_finetuned_squad_zh.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_chinese_finetuned_squad_zh.md new file mode 100644 index 00000000000000..c47ed62eee269e --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_chinese_finetuned_squad_zh.md @@ -0,0 +1,94 @@ +--- +layout: model +title: Chinese BertForQuestionAnswering Base Cased model (from jimmy880219) +author: John Snow Labs +name: bert_qa_base_chinese_finetuned_squad +date: 2023-11-12 +tags: [zh, open_source, bert, question_answering, onnx] +task: Question Answering +language: zh +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-chinese-finetuned-squad` is a Chinese model originally trained by `jimmy880219`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_chinese_finetuned_squad_zh_5.2.0_3.0_1699791265983.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_chinese_finetuned_squad_zh_5.2.0_3.0_1699791265983.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_chinese_finetuned_squad","zh")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_chinese_finetuned_squad","zh") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_chinese_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|zh| +|Size:|381.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/jimmy880219/bert-base-chinese-finetuned-squad \ No newline at end of file From da41c25d3e26372457965000797b116c60c8a52e Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 19:19:30 +0700 Subject: [PATCH 140/255] Add model 2023-11-12-bert_qa_base_multi_mlqa_dev_en --- ...23-11-12-bert_qa_base_multi_mlqa_dev_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multi_mlqa_dev_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multi_mlqa_dev_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multi_mlqa_dev_en.md new file mode 100644 index 00000000000000..5c7a58aabaaad8 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_multi_mlqa_dev_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Cased model (from roshnir) +author: John Snow Labs +name: bert_qa_base_multi_mlqa_dev +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-multi-mlqa-dev-en` is a English model originally trained by `roshnir`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_multi_mlqa_dev_en_5.2.0_3.0_1699791505023.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_multi_mlqa_dev_en_5.2.0_3.0_1699791505023.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_multi_mlqa_dev","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_multi_mlqa_dev","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.mlqa.base").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_multi_mlqa_dev| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|625.5 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/roshnir/bert-base-multi-mlqa-dev-en \ No newline at end of file From 04289888c644b85304efd9176ca18a6a9fec094e Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 19:35:47 +0700 Subject: [PATCH 141/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_8_en --- ...w_shot_k_1024_finetuned_squad_seed_8_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_8_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_8_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_8_en.md new file mode 100644 index 00000000000000..553d5fbe42c2d4 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_8_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_8 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-1024-finetuned-squad-seed-8` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_8_en_5.2.0_3.0_1699792540163.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_8_en_5.2.0_3.0_1699792540163.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_8","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_8","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_8_base_1024d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_8| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-1024-finetuned-squad-seed-8 \ No newline at end of file From 4ad45a3792d52b10a9fb3e1532f48c26ad8b4675 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 20:14:21 +0700 Subject: [PATCH 142/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_2_en --- ...few_shot_k_16_finetuned_squad_seed_2_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_2_en.md new file mode 100644 index 00000000000000..af721a2e355648 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_2_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_2 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-16-finetuned-squad-seed-2` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_2_en_5.2.0_3.0_1699794852712.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_2_en_5.2.0_3.0_1699794852712.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_2","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_2","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_2_base_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-16-finetuned-squad-seed-2 \ No newline at end of file From 5f8c89e1163d547e4652efd73ca3f7c76bc9d9ee Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 20:36:01 +0700 Subject: [PATCH 143/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_2_en --- ...w_shot_k_1024_finetuned_squad_seed_2_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_2_en.md new file mode 100644 index 00000000000000..eb013da312dd5f --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_2_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_2 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-1024-finetuned-squad-seed-2` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_2_en_5.2.0_3.0_1699796153809.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_2_en_5.2.0_3.0_1699796153809.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_2","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_2","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_2_base_1024d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-1024-finetuned-squad-seed-2 \ No newline at end of file From 6effa4c9c3f30bbc57130bf0bf858a57bd83a765 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 20:50:14 +0700 Subject: [PATCH 144/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_4_en --- ...few_shot_k_16_finetuned_squad_seed_4_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_4_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_4_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_4_en.md new file mode 100644 index 00000000000000..74940063368bee --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_4_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_4 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-16-finetuned-squad-seed-4` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_4_en_5.2.0_3.0_1699797006561.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_4_en_5.2.0_3.0_1699797006561.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_4","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_4","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_4_base_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_4| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-16-finetuned-squad-seed-4 \ No newline at end of file From a12e81df86241193569f4e157b27481515c5b00e Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 20:51:46 +0700 Subject: [PATCH 145/255] Add model 2023-11-12-bert_qa_base_pars_uncased_pquad_and_persian_fa --- ..._base_pars_uncased_pquad_and_persian_fa.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_pars_uncased_pquad_and_persian_fa.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_pars_uncased_pquad_and_persian_fa.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_pars_uncased_pquad_and_persian_fa.md new file mode 100644 index 00000000000000..8100e0deef6b9f --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_pars_uncased_pquad_and_persian_fa.md @@ -0,0 +1,94 @@ +--- +layout: model +title: Persian BertForQuestionAnswering Base Uncased model (from mohsenfayyaz) +author: John Snow Labs +name: bert_qa_base_pars_uncased_pquad_and_persian +date: 2023-11-12 +tags: [fa, open_source, bert, question_answering, onnx] +task: Question Answering +language: fa +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-parsbert-uncased_pquad_and_persian_qa` is a Persian model originally trained by `mohsenfayyaz`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_pars_uncased_pquad_and_persian_fa_5.2.0_3.0_1699797094922.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_pars_uncased_pquad_and_persian_fa_5.2.0_3.0_1699797094922.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_pars_uncased_pquad_and_persian","fa")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_pars_uncased_pquad_and_persian","fa") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_pars_uncased_pquad_and_persian| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|fa| +|Size:|606.4 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/mohsenfayyaz/bert-base-parsbert-uncased_pquad_and_persian_qa \ No newline at end of file From f5e81361f9d0226800941b2fcfba7e79280c4855 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 21:01:49 +0700 Subject: [PATCH 146/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_0_en --- ...w_shot_k_1024_finetuned_squad_seed_0_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_0_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_0_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_0_en.md new file mode 100644 index 00000000000000..86ea3c8c917344 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_0_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_0 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-1024-finetuned-squad-seed-0` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_0_en_5.2.0_3.0_1699797702107.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_0_en_5.2.0_3.0_1699797702107.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_0","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_0","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_0_base_1024d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_0| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-1024-finetuned-squad-seed-0 \ No newline at end of file From 1587501f0963699366a25e93341a12ac1574a3cd Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 21:23:04 +0700 Subject: [PATCH 147/255] Add model 2023-11-12-bert_qa_base_spanish_wwm_uncased_finetuned_squad_es --- ..._spanish_wwm_uncased_finetuned_squad_es.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_uncased_finetuned_squad_es.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_uncased_finetuned_squad_es.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_uncased_finetuned_squad_es.md new file mode 100644 index 00000000000000..3cda5639f89488 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_spanish_wwm_uncased_finetuned_squad_es.md @@ -0,0 +1,100 @@ +--- +layout: model +title: Spanish BertForQuestionAnswering Base Uncased model (from stevemobs) +author: John Snow Labs +name: bert_qa_base_spanish_wwm_uncased_finetuned_squad +date: 2023-11-12 +tags: [es, open_source, bert, question_answering, onnx] +task: Question Answering +language: es +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-spanish-wwm-uncased-finetuned-squad_es` is a Spanish model originally trained by `stevemobs`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_spanish_wwm_uncased_finetuned_squad_es_5.2.0_3.0_1699798973637.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_spanish_wwm_uncased_finetuned_squad_es_5.2.0_3.0_1699798973637.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_spanish_wwm_uncased_finetuned_squad","es") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["¿Cuál es mi nombre?", "Mi nombre es Clara y vivo en Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_spanish_wwm_uncased_finetuned_squad","es") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("¿Cuál es mi nombre?", "Mi nombre es Clara y vivo en Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("es.answer_question.bert.squad_es.uncased_base_finetuned").predict("""¿Cuál es mi nombre?", "Mi nombre es Clara y vivo en Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_spanish_wwm_uncased_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|es| +|Size:|409.7 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/stevemobs/bert-base-spanish-wwm-uncased-finetuned-squad_es \ No newline at end of file From 721361338fef5a2e243e3d6311e3d3dc98f2d78f Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 21:24:04 +0700 Subject: [PATCH 148/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_6_en --- ...few_shot_k_16_finetuned_squad_seed_6_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_6_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_6_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_6_en.md new file mode 100644 index 00000000000000..7d7032a8a8e8e3 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_6_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_6 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-16-finetuned-squad-seed-6` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_6_en_5.2.0_3.0_1699798973643.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_6_en_5.2.0_3.0_1699798973643.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_6","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_6","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_6_base_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_6| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-16-finetuned-squad-seed-6 \ No newline at end of file From 46a4de06648354df8b4446e9ea229e744ee833cf Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 21:32:59 +0700 Subject: [PATCH 149/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_6_en --- ...w_shot_k_1024_finetuned_squad_seed_6_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_6_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_6_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_6_en.md new file mode 100644 index 00000000000000..3d83abaa06bbae --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_6_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_6 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-1024-finetuned-squad-seed-6` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_6_en_5.2.0_3.0_1699799571644.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_6_en_5.2.0_3.0_1699799571644.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_6","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_6","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_6_base_1024d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_1024_finetuned_squad_seed_6| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-1024-finetuned-squad-seed-6 \ No newline at end of file From d5947f231df081ad758f77bc41ca55564ad11296 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 21:44:17 +0700 Subject: [PATCH 150/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_8_en --- ...ew_shot_k_128_finetuned_squad_seed_8_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_8_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_8_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_8_en.md new file mode 100644 index 00000000000000..cde9d5c14d3dad --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_8_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_8 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-128-finetuned-squad-seed-8` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_8_en_5.2.0_3.0_1699800249353.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_8_en_5.2.0_3.0_1699800249353.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_8","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_8","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_8_base_128d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_8| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-128-finetuned-squad-seed-8 \ No newline at end of file From 4ce74eed02cbb9272ab5ac6caee09cc9ef408abb Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 21:55:17 +0700 Subject: [PATCH 151/255] Add model 2023-11-12-bert_qa_base_squad2_en --- .../2023-11-12-bert_qa_base_squad2_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_squad2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_squad2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_squad2_en.md new file mode 100644 index 00000000000000..77616c2788d62a --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_squad2_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Cased model (from ModelTC) +author: John Snow Labs +name: bert_qa_base_squad2 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-squad2` is a English model originally trained by `ModelTC`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_squad2_en_5.2.0_3.0_1699800909449.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_squad2_en_5.2.0_3.0_1699800909449.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_squad2","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_squad2","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/ModelTC/bert-base-squad2 \ No newline at end of file From f641e79419afb0809c706b0fe6b0fba92b10ea44 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 22:07:14 +0700 Subject: [PATCH 152/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_4_en --- ...ew_shot_k_128_finetuned_squad_seed_4_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_4_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_4_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_4_en.md new file mode 100644 index 00000000000000..d262d8caffe22f --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_4_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_4 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-128-finetuned-squad-seed-4` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_4_en_5.2.0_3.0_1699801625595.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_4_en_5.2.0_3.0_1699801625595.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_4","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_4","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_4_base_128d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_4| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-128-finetuned-squad-seed-4 \ No newline at end of file From 5af358d8995eef3133550e90b03e38b94b783493 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 22:16:06 +0700 Subject: [PATCH 153/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_10_en --- ...ew_shot_k_16_finetuned_squad_seed_10_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_10_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_10_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_10_en.md new file mode 100644 index 00000000000000..ffec2d16282a1e --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_10_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_10 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-16-finetuned-squad-seed-10` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_10_en_5.2.0_3.0_1699802159274.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_10_en_5.2.0_3.0_1699802159274.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_10","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_10","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_10_base_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_10| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-16-finetuned-squad-seed-10 \ No newline at end of file From 0e7086132baa8443bf9757ee6147cf33c60cbdcd Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 22:28:41 +0700 Subject: [PATCH 154/255] Add model 2023-11-12-bert_qa_base_swedish_cased_finetuned_squad_sv --- ...a_base_swedish_cased_finetuned_squad_sv.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_swedish_cased_finetuned_squad_sv.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_swedish_cased_finetuned_squad_sv.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_swedish_cased_finetuned_squad_sv.md new file mode 100644 index 00000000000000..e7d75d8b8aa967 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_swedish_cased_finetuned_squad_sv.md @@ -0,0 +1,94 @@ +--- +layout: model +title: Swedish BertForQuestionAnswering Base Cased model (from miwink) +author: John Snow Labs +name: bert_qa_base_swedish_cased_finetuned_squad +date: 2023-11-12 +tags: [sv, open_source, bert, question_answering, onnx] +task: Question Answering +language: sv +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-swedish-cased-finetuned-squad` is a Swedish model originally trained by `miwink`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_swedish_cased_finetuned_squad_sv_5.2.0_3.0_1699802912894.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_swedish_cased_finetuned_squad_sv_5.2.0_3.0_1699802912894.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_swedish_cased_finetuned_squad","sv")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_swedish_cased_finetuned_squad","sv") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_swedish_cased_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|sv| +|Size:|465.2 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/miwink/bert-base-swedish-cased-finetuned-squad \ No newline at end of file From d05dc217fbb0c063a482e148ae187a0f8ec9a00e Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 22:29:41 +0700 Subject: [PATCH 155/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_4_en --- ...ew_shot_k_512_finetuned_squad_seed_4_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_4_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_4_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_4_en.md new file mode 100644 index 00000000000000..d9c113acc57096 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_4_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_4 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-512-finetuned-squad-seed-4` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_4_en_5.2.0_3.0_1699802944662.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_4_en_5.2.0_3.0_1699802944662.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_4","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_4","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_4_base_512d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_4| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-512-finetuned-squad-seed-4 \ No newline at end of file From 53defffbb4fc979cec12cea6150a92b46ddae0fa Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 22:40:39 +0700 Subject: [PATCH 156/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_2_en --- ...few_shot_k_32_finetuned_squad_seed_2_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_2_en.md new file mode 100644 index 00000000000000..c17adeec798548 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_2_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_2 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-32-finetuned-squad-seed-2` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_2_en_5.2.0_3.0_1699803627728.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_2_en_5.2.0_3.0_1699803627728.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_2","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_2","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_2_base_32d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-32-finetuned-squad-seed-2 \ No newline at end of file From ed321fbe521597ed6b6fee8f61addbd761955b05 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 22:41:40 +0700 Subject: [PATCH 157/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_2_en --- ...ew_shot_k_256_finetuned_squad_seed_2_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_2_en.md new file mode 100644 index 00000000000000..6b3e8b52de17cd --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_2_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_2 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-256-finetuned-squad-seed-2` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_2_en_5.2.0_3.0_1699803627711.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_2_en_5.2.0_3.0_1699803627711.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_2","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_2","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_2_base_256d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-256-finetuned-squad-seed-2 \ No newline at end of file From 1ca10db4604a06f4b5cb49d4cf8db1a6f8921e9b Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 22:48:19 +0700 Subject: [PATCH 158/255] Add model 2023-11-12-bert_qa_base_parsbert_uncased_finetuned_perqa_fa --- ...ase_parsbert_uncased_finetuned_perqa_fa.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_parsbert_uncased_finetuned_perqa_fa.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_parsbert_uncased_finetuned_perqa_fa.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_parsbert_uncased_finetuned_perqa_fa.md new file mode 100644 index 00000000000000..c6fe0a806783cd --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_parsbert_uncased_finetuned_perqa_fa.md @@ -0,0 +1,94 @@ +--- +layout: model +title: Persian BertForQuestionAnswering Base Uncased model (from aminnaghavi) +author: John Snow Labs +name: bert_qa_base_parsbert_uncased_finetuned_perqa +date: 2023-11-12 +tags: [fa, open_source, bert, question_answering, onnx] +task: Question Answering +language: fa +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-parsbert-uncased-finetuned-perQA` is a Persian model originally trained by `aminnaghavi`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_parsbert_uncased_finetuned_perqa_fa_5.2.0_3.0_1699804081424.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_parsbert_uncased_finetuned_perqa_fa_5.2.0_3.0_1699804081424.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_parsbert_uncased_finetuned_perqa","fa") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["اسم من چیست؟", "نام من کلارا است و من در برکلی زندگی می کنم."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_parsbert_uncased_finetuned_perqa","fa") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("اسم من چیست؟", "نام من کلارا است و من در برکلی زندگی می کنم.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_parsbert_uncased_finetuned_perqa| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|fa| +|Size:|606.4 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/aminnaghavi/bert-base-parsbert-uncased-finetuned-perQA \ No newline at end of file From dfcfc3a4ea90321069f643182bd636f8732d792c Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 23:01:46 +0700 Subject: [PATCH 159/255] Add model 2023-11-12-bert_qa_base_uncased_finetuned_squad_finetuned_trivia_en --- ...sed_finetuned_squad_finetuned_trivia_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_finetuned_squad_finetuned_trivia_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_finetuned_squad_finetuned_trivia_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_finetuned_squad_finetuned_trivia_en.md new file mode 100644 index 00000000000000..eb260de13b145e --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_finetuned_squad_finetuned_trivia_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from FabianWillner) +author: John Snow Labs +name: bert_qa_base_uncased_finetuned_squad_finetuned_trivia +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-finetuned-squad-finetuned-triviaqa` is a English model originally trained by `FabianWillner`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_finetuned_squad_finetuned_trivia_en_5.2.0_3.0_1699804899623.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_finetuned_squad_finetuned_trivia_en_5.2.0_3.0_1699804899623.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_finetuned_squad_finetuned_trivia","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_finetuned_squad_finetuned_trivia","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_finetuned_squad_finetuned_trivia| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/FabianWillner/bert-base-uncased-finetuned-squad-finetuned-triviaqa \ No newline at end of file From 166145ca661ffa2de6c8593882512e1c295bfa3a Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 23:03:18 +0700 Subject: [PATCH 160/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_42_en --- ...w_shot_k_128_finetuned_squad_seed_42_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_42_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_42_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_42_en.md new file mode 100644 index 00000000000000..25d8c6240018d9 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_42_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_42 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-128-finetuned-squad-seed-42` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_42_en_5.2.0_3.0_1699804991277.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_42_en_5.2.0_3.0_1699804991277.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_42","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_42","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_42_base_128d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_42| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-128-finetuned-squad-seed-42 \ No newline at end of file From bd11343655b5660c69a24eba381d85d312806618 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 23:11:49 +0700 Subject: [PATCH 161/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_8_en --- ...ew_shot_k_512_finetuned_squad_seed_8_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_8_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_8_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_8_en.md new file mode 100644 index 00000000000000..15cb47e47c5e7b --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_8_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_8 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-512-finetuned-squad-seed-8` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_8_en_5.2.0_3.0_1699805501759.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_8_en_5.2.0_3.0_1699805501759.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_8","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_8","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_8_base_512d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_8| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-512-finetuned-squad-seed-8 \ No newline at end of file From ca71e958c0c10eeaf559eab946383b0aaf3f087d Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 23:12:49 +0700 Subject: [PATCH 162/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_2_en --- ...ew_shot_k_512_finetuned_squad_seed_2_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_2_en.md new file mode 100644 index 00000000000000..dd696e0a86a203 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_2_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_2 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-512-finetuned-squad-seed-2` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_2_en_5.2.0_3.0_1699805511614.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_2_en_5.2.0_3.0_1699805511614.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_2","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_2","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_2_base_512d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-512-finetuned-squad-seed-2 \ No newline at end of file From ea2cf09aaebcb1a514a35440dd1ef17682650f84 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 23:13:59 +0700 Subject: [PATCH 163/255] Add model 2023-11-12-bert_qa_base_squad_en --- .../2023-11-12-bert_qa_base_squad_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_squad_en.md new file mode 100644 index 00000000000000..d44d790a41e245 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_squad_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Cased model (from ModelTC) +author: John Snow Labs +name: bert_qa_base_squad +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-squad` is a English model originally trained by `ModelTC`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_squad_en_5.2.0_3.0_1699805632427.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_squad_en_5.2.0_3.0_1699805632427.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_squad","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_squad","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/ModelTC/bert-base-squad \ No newline at end of file From 353ec6ea887d90591724277c60cc16af686c0d71 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 23:35:15 +0700 Subject: [PATCH 164/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_10_en --- ...w_shot_k_256_finetuned_squad_seed_10_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_10_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_10_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_10_en.md new file mode 100644 index 00000000000000..722a34368ab8fd --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_10_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_10 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-256-finetuned-squad-seed-10` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_10_en_5.2.0_3.0_1699806905048.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_10_en_5.2.0_3.0_1699806905048.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_10","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_10","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_10_base_256d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_10| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-256-finetuned-squad-seed-10 \ No newline at end of file From d8af1f87fdbe0b24a869e142315477f196f5923c Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 23:36:15 +0700 Subject: [PATCH 165/255] Add model 2023-11-12-bert_qa_base_uncased_squad1_en --- ...23-11-12-bert_qa_base_uncased_squad1_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1_en.md new file mode 100644 index 00000000000000..7f6295b278a2d2 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad1_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from sguskin) +author: John Snow Labs +name: bert_qa_base_uncased_squad1 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-squad1` is a English model originally trained by `sguskin`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad1_en_5.2.0_3.0_1699806905051.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad1_en_5.2.0_3.0_1699806905051.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squad1","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squad1","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_squad1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/sguskin/bert-base-uncased-squad1 \ No newline at end of file From f7ff5fd4c91810a48df9e6ceb1ece543f1a457c7 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 23:47:16 +0700 Subject: [PATCH 166/255] Add model 2023-11-12-bert_qa_base_swedish_cased_squad_experimental_sv --- ...ase_swedish_cased_squad_experimental_sv.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_swedish_cased_squad_experimental_sv.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_swedish_cased_squad_experimental_sv.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_swedish_cased_squad_experimental_sv.md new file mode 100644 index 00000000000000..4d552e4093371f --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_swedish_cased_squad_experimental_sv.md @@ -0,0 +1,100 @@ +--- +layout: model +title: Swedish BertForQuestionAnswering Base Cased model (from KBLab) +author: John Snow Labs +name: bert_qa_base_swedish_cased_squad_experimental +date: 2023-11-12 +tags: [sv, open_source, bert, question_answering, onnx] +task: Question Answering +language: sv +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-swedish-cased-squad-experimental` is a Swedish model originally trained by `KBLab`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_swedish_cased_squad_experimental_sv_5.2.0_3.0_1699807628119.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_swedish_cased_squad_experimental_sv_5.2.0_3.0_1699807628119.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_swedish_cased_squad_experimental","sv") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["Vad är mitt namn?", "Jag heter Clara och jag bor i Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_swedish_cased_squad_experimental","sv") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("Vad är mitt namn?", "Jag heter Clara och jag bor i Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("sv.answer_question.bert.squad.cased_base.by_KBLab").predict("""Vad är mitt namn?|||"Jag heter Clara och jag bor i Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_swedish_cased_squad_experimental| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|sv| +|Size:|465.2 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/KBLab/bert-base-swedish-cased-squad-experimental \ No newline at end of file From 52e43c06f2cedc3cf506787bd8f9c67a3f5ad3f5 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Sun, 12 Nov 2023 23:52:58 +0700 Subject: [PATCH 167/255] Add model 2023-11-12-bert_qa_base_uncased_squad_v1.0_finetuned_en --- ...qa_base_uncased_squad_v1.0_finetuned_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad_v1.0_finetuned_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad_v1.0_finetuned_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad_v1.0_finetuned_en.md new file mode 100644 index 00000000000000..79c238d175e0a2 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_squad_v1.0_finetuned_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from kamalkraj) +author: John Snow Labs +name: bert_qa_base_uncased_squad_v1.0_finetuned +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-squad-v1.0-finetuned` is a English model originally trained by `kamalkraj`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad_v1.0_finetuned_en_5.2.0_3.0_1699807969771.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad_v1.0_finetuned_en_5.2.0_3.0_1699807969771.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squad_v1.0_finetuned","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squad_v1.0_finetuned","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_base_finetuned").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_squad_v1.0_finetuned| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/kamalkraj/bert-base-uncased-squad-v1.0-finetuned \ No newline at end of file From 0206a8a78ed454a83e5dc86852c8b0c07700fc07 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 00:02:31 +0700 Subject: [PATCH 168/255] Add model 2023-11-12-bert_qa_bert003_en --- .../2023-11-12-bert_qa_bert003_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert003_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert003_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert003_en.md new file mode 100644 index 00000000000000..a54b40704745b2 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert003_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Cased model (from JAlexis) +author: John Snow Labs +name: bert_qa_bert003 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert003` is a English model originally trained by `JAlexis`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert003_en_5.2.0_3.0_1699808541136.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert003_en_5.2.0_3.0_1699808541136.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_bert003","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_bert003","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert003| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/JAlexis/bert003 \ No newline at end of file From 81caca5310239e9ddc062797b4125c82578071a7 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 00:03:32 +0700 Subject: [PATCH 169/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_8_en --- ...ew_shot_k_256_finetuned_squad_seed_8_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_8_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_8_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_8_en.md new file mode 100644 index 00000000000000..7580d4e989c5bc --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_8_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_8 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-256-finetuned-squad-seed-8` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_8_en_5.2.0_3.0_1699808541247.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_8_en_5.2.0_3.0_1699808541247.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_8","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_8","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_8_base_256d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_8| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-256-finetuned-squad-seed-8 \ No newline at end of file From a8c1549b75714bb30318f5b2214e1a137bedd78c Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 00:32:17 +0700 Subject: [PATCH 170/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_10_en --- ...ew_shot_k_32_finetuned_squad_seed_10_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_10_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_10_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_10_en.md new file mode 100644 index 00000000000000..ba48c2d299de14 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_10_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_10 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-32-finetuned-squad-seed-10` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_10_en_5.2.0_3.0_1699810325201.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_10_en_5.2.0_3.0_1699810325201.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_10","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_10","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_10_base_32d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_10| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-32-finetuned-squad-seed-10 \ No newline at end of file From 61cbf66e32b16734707239ceb94fea75aec4203d Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 00:33:17 +0700 Subject: [PATCH 171/255] Add model 2023-11-12-bert_qa_bert_ft_newsqa_en --- .../2023-11-12-bert_qa_bert_ft_newsqa_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_ft_newsqa_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_ft_newsqa_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_ft_newsqa_en.md new file mode 100644 index 00000000000000..95f8696efe7a90 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_ft_newsqa_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_bert_ft_newsqa BertForQuestionAnswering from AnonymousSub +author: John Snow Labs +name: bert_qa_bert_ft_newsqa +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_ft_newsqa` is a English model originally trained by AnonymousSub. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_ft_newsqa_en_5.2.0_3.0_1699810324949.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_ft_newsqa_en_5.2.0_3.0_1699810324949.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_ft_newsqa","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_ft_newsqa", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_ft_newsqa| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/AnonymousSub/bert_FT_newsqa \ No newline at end of file From dff65eccc9214481e3b20a1d4127675f66eefbb5 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 00:38:45 +0700 Subject: [PATCH 172/255] Add model 2023-11-12-bert_qa_bert_ft_nepal_bhasa_newsqa_en --- ...2-bert_qa_bert_ft_nepal_bhasa_newsqa_en.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_ft_nepal_bhasa_newsqa_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_ft_nepal_bhasa_newsqa_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_ft_nepal_bhasa_newsqa_en.md new file mode 100644 index 00000000000000..780bbfd266c38a --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_ft_nepal_bhasa_newsqa_en.md @@ -0,0 +1,93 @@ +--- +layout: model +title: English bert_qa_bert_ft_nepal_bhasa_newsqa BertForQuestionAnswering from AnonymousSub +author: John Snow Labs +name: bert_qa_bert_ft_nepal_bhasa_newsqa +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_ft_nepal_bhasa_newsqa` is a English model originally trained by AnonymousSub. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_ft_nepal_bhasa_newsqa_en_5.2.0_3.0_1699810716617.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_ft_nepal_bhasa_newsqa_en_5.2.0_3.0_1699810716617.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_ft_nepal_bhasa_newsqa","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_ft_nepal_bhasa_newsqa", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_ft_nepal_bhasa_newsqa| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| + +## References + +https://huggingface.co/AnonymousSub/bert_FT_new_newsqa \ No newline at end of file From 0392f4efa81dd1ee315e8b67f46b86468e09293b Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 01:01:54 +0700 Subject: [PATCH 173/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_10_en --- ...w_shot_k_128_finetuned_squad_seed_10_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_10_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_10_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_10_en.md new file mode 100644 index 00000000000000..38649954a9d046 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_10_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_10 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-128-finetuned-squad-seed-10` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_10_en_5.2.0_3.0_1699812103122.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_10_en_5.2.0_3.0_1699812103122.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_10","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_10","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_10_base_128d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_10| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-128-finetuned-squad-seed-10 \ No newline at end of file From 9d2814d29f1e9f02f8bc2fe45803d3878d0343f2 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 01:02:54 +0700 Subject: [PATCH 174/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_6_en --- ...few_shot_k_32_finetuned_squad_seed_6_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_6_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_6_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_6_en.md new file mode 100644 index 00000000000000..f4d8ad230e99c2 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_6_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_6 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-32-finetuned-squad-seed-6` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_6_en_5.2.0_3.0_1699812114701.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_6_en_5.2.0_3.0_1699812114701.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_6","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_6","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_6_base_32d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_6| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-32-finetuned-squad-seed-6 \ No newline at end of file From 01411a98349c038d80f10350ebce210bbf4768d2 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 01:03:54 +0700 Subject: [PATCH 175/255] Add model 2023-11-12-bert_qa_bert_base_cased_chaii_en --- ...-11-12-bert_qa_bert_base_cased_chaii_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_cased_chaii_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_cased_chaii_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_cased_chaii_en.md new file mode 100644 index 00000000000000..5b65349ebcdd5c --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_cased_chaii_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from SauravMaheshkar) +author: John Snow Labs +name: bert_qa_bert_base_cased_chaii +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-cased-chaii` is a English model orginally trained by `SauravMaheshkar`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_cased_chaii_en_5.2.0_3.0_1699812120231.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_cased_chaii_en_5.2.0_3.0_1699812120231.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_cased_chaii","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_cased_chaii","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.chaii.bert.base_cased").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_cased_chaii| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/SauravMaheshkar/bert-base-cased-chaii \ No newline at end of file From d8bb2fa850912e4b91a08c222aaf02c46c7901e5 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 01:10:49 +0700 Subject: [PATCH 176/255] Add model 2023-11-12-bert_qa_bert_base_4096_full_trivia_copied_embeddings_en --- ...e_4096_full_trivia_copied_embeddings_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_4096_full_trivia_copied_embeddings_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_4096_full_trivia_copied_embeddings_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_4096_full_trivia_copied_embeddings_en.md new file mode 100644 index 00000000000000..2fc545583ebf6f --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_4096_full_trivia_copied_embeddings_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from MrAnderson) +author: John Snow Labs +name: bert_qa_bert_base_4096_full_trivia_copied_embeddings +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-4096-full-trivia-copied-embeddings` is a English model orginally trained by `MrAnderson`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_4096_full_trivia_copied_embeddings_en_5.2.0_3.0_1699812642173.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_4096_full_trivia_copied_embeddings_en_5.2.0_3.0_1699812642173.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_4096_full_trivia_copied_embeddings","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_4096_full_trivia_copied_embeddings","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.trivia.bert.base_4096.by_MrAnderson").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_4096_full_trivia_copied_embeddings| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|417.5 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/MrAnderson/bert-base-4096-full-trivia-copied-embeddings \ No newline at end of file From 58dc318e013593574d125905edc6be27f12e172d Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 01:33:55 +0700 Subject: [PATCH 177/255] Add model 2023-11-12-bert_qa_bert_base_persian_farsi_qa_fa --- ...2-bert_qa_bert_base_persian_farsi_qa_fa.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_persian_farsi_qa_fa.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_persian_farsi_qa_fa.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_persian_farsi_qa_fa.md new file mode 100644 index 00000000000000..9ee910fb852d2f --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_persian_farsi_qa_fa.md @@ -0,0 +1,93 @@ +--- +layout: model +title: Persian bert_qa_bert_base_persian_farsi_qa BertForQuestionAnswering from SajjadAyoubi +author: John Snow Labs +name: bert_qa_bert_base_persian_farsi_qa +date: 2023-11-12 +tags: [bert, fa, open_source, question_answering, onnx] +task: Question Answering +language: fa +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_base_persian_farsi_qa` is a Persian model originally trained by SajjadAyoubi. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_persian_farsi_qa_fa_5.2.0_3.0_1699814025272.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_persian_farsi_qa_fa_5.2.0_3.0_1699814025272.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_persian_farsi_qa","fa") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_base_persian_farsi_qa", "fa") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_persian_farsi_qa| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|fa| +|Size:|606.5 MB| + +## References + +https://huggingface.co/SajjadAyoubi/bert-base-fa-qa \ No newline at end of file From 19c20db24c112733ab3cbed6fa20b7a436fb7ce3 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 01:37:23 +0700 Subject: [PATCH 178/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_10_en --- ...w_shot_k_512_finetuned_squad_seed_10_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_10_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_10_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_10_en.md new file mode 100644 index 00000000000000..8bed06eae488b5 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_10_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_10 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-512-finetuned-squad-seed-10` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_10_en_5.2.0_3.0_1699814236059.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_10_en_5.2.0_3.0_1699814236059.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_10","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_10","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_10_base_512d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_10| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-512-finetuned-squad-seed-10 \ No newline at end of file From 3617cdf8a124236589819cd9bc21b7779243c995 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 01:57:54 +0700 Subject: [PATCH 179/255] Add model 2023-11-12-bert_qa_base_uncased_spanish_sign_language_en --- ...a_base_uncased_spanish_sign_language_en.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_spanish_sign_language_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_spanish_sign_language_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_spanish_sign_language_en.md new file mode 100644 index 00000000000000..1a07c465d3648c --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_spanish_sign_language_en.md @@ -0,0 +1,93 @@ +--- +layout: model +title: English bert_qa_base_uncased_spanish_sign_language BertForQuestionAnswering from michaelrglass +author: John Snow Labs +name: bert_qa_base_uncased_spanish_sign_language +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_base_uncased_spanish_sign_language` is a English model originally trained by michaelrglass. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_spanish_sign_language_en_5.2.0_3.0_1699815469233.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_spanish_sign_language_en_5.2.0_3.0_1699815469233.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_spanish_sign_language","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_base_uncased_spanish_sign_language", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_spanish_sign_language| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|258.6 MB| + +## References + +https://huggingface.co/michaelrglass/bert-base-uncased-sspt \ No newline at end of file From ec47ffb66ee01eac6172ab1a154ced7021d36510 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 02:00:44 +0700 Subject: [PATCH 180/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_6_en --- ...ew_shot_k_128_finetuned_squad_seed_6_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_6_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_6_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_6_en.md new file mode 100644 index 00000000000000..b5d08b0e6f1a23 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_6_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_6 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-128-finetuned-squad-seed-6` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_6_en_5.2.0_3.0_1699815637334.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_6_en_5.2.0_3.0_1699815637334.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_6","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_6","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_6_base_128d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_128_finetuned_squad_seed_6| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-128-finetuned-squad-seed-6 \ No newline at end of file From 51e9923264634c7bfa0bb71096d8095b9ad7ff8d Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 02:25:16 +0700 Subject: [PATCH 181/255] Add model 2023-11-12-bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_mlqa_es --- ...panish_wwm_uncased_finetuned_qa_mlqa_es.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_mlqa_es.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_mlqa_es.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_mlqa_es.md new file mode 100644 index 00000000000000..1e3284189141cc --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_mlqa_es.md @@ -0,0 +1,108 @@ +--- +layout: model +title: Castilian, Spanish BertForQuestionAnswering model (from CenIA) +author: John Snow Labs +name: bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_mlqa +date: 2023-11-12 +tags: [open_source, question_answering, bert, es, onnx] +task: Question Answering +language: es +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-spanish-wwm-uncased-finetuned-qa-mlqa` is a Castilian, Spanish model orginally trained by `CenIA`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_mlqa_es_5.2.0_3.0_1699817108555.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_mlqa_es_5.2.0_3.0_1699817108555.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_mlqa","es") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_mlqa","es") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("es.answer_question.mlqa.bert.base_uncased").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_mlqa| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|es| +|Size:|409.6 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/CenIA/bert-base-spanish-wwm-uncased-finetuned-qa-mlqa \ No newline at end of file From 873aa98c07ad650ffb976ece23544385b777d90e Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 02:34:43 +0700 Subject: [PATCH 182/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_0_en --- ...few_shot_k_16_finetuned_squad_seed_0_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_0_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_0_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_0_en.md new file mode 100644 index 00000000000000..e20489a378ff14 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_0_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_0 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-16-finetuned-squad-seed-0` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_0_en_5.2.0_3.0_1699817675983.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_0_en_5.2.0_3.0_1699817675983.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_0","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_0","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_0_base_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_0| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-16-finetuned-squad-seed-0 \ No newline at end of file From 409ac51dcd6a9f8aca50f6c6be0ed027083fe36b Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 02:39:25 +0700 Subject: [PATCH 183/255] Add model 2023-11-12-bert_qa_bert_en --- .../2023-11-12-bert_qa_bert_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_en.md new file mode 100644 index 00000000000000..83dc2643f16a74 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from nlpunibo) +author: John Snow Labs +name: bert_qa_bert +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert` is a English model orginally trained by `nlpunibo`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_en_5.2.0_3.0_1699817957155.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_en_5.2.0_3.0_1699817957155.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.by_nlpunibo").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/nlpunibo/bert \ No newline at end of file From 07f2e244eab27bd43efe9b0ae08f3747fffd9d24 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 02:56:57 +0700 Subject: [PATCH 184/255] Add model 2023-11-12-bert_qa_bert_base_swedish_cased_squad_experimental_sv --- ...ase_swedish_cased_squad_experimental_sv.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_swedish_cased_squad_experimental_sv.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_swedish_cased_squad_experimental_sv.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_swedish_cased_squad_experimental_sv.md new file mode 100644 index 00000000000000..75f991866031b8 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_swedish_cased_squad_experimental_sv.md @@ -0,0 +1,108 @@ +--- +layout: model +title: Swedish BertForQuestionAnswering model (from KB) +author: John Snow Labs +name: bert_qa_bert_base_swedish_cased_squad_experimental +date: 2023-11-12 +tags: [open_source, question_answering, bert, sv, onnx] +task: Question Answering +language: sv +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-swedish-cased-squad-experimental` is a Swedish model orginally trained by `KB`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_swedish_cased_squad_experimental_sv_5.2.0_3.0_1699819009756.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_swedish_cased_squad_experimental_sv_5.2.0_3.0_1699819009756.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_swedish_cased_squad_experimental","sv") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_swedish_cased_squad_experimental","sv") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("sv.answer_question.squad.bert.base_cased.by_KB").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_swedish_cased_squad_experimental| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|sv| +|Size:|465.2 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/KB/bert-base-swedish-cased-squad-experimental \ No newline at end of file From e6101c2a80e030d110f664787003dfc3d009b868 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 02:58:53 +0700 Subject: [PATCH 185/255] Add model 2023-11-12-bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_sqac_es --- ...panish_wwm_uncased_finetuned_qa_sqac_es.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_sqac_es.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_sqac_es.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_sqac_es.md new file mode 100644 index 00000000000000..dbe0359ffd5890 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_sqac_es.md @@ -0,0 +1,108 @@ +--- +layout: model +title: Castilian, Spanish BertForQuestionAnswering model (from CenIA) +author: John Snow Labs +name: bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_sqac +date: 2023-11-12 +tags: [open_source, question_answering, bert, es, onnx] +task: Question Answering +language: es +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-spanish-wwm-uncased-finetuned-qa-sqac` is a Castilian, Spanish model orginally trained by `CenIA`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_sqac_es_5.2.0_3.0_1699819125792.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_sqac_es_5.2.0_3.0_1699819125792.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_sqac","es") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_sqac","es") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("es.answer_question.sqac.bert.base_uncased").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_sqac| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|es| +|Size:|409.7 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/CenIA/bert-base-spanish-wwm-uncased-finetuned-qa-sqac \ No newline at end of file From 39f9f20028c4bdb566c97ac0da9dfdc693b6f69d Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 03:01:16 +0700 Subject: [PATCH 186/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_8_en --- ...few_shot_k_16_finetuned_squad_seed_8_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_8_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_8_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_8_en.md new file mode 100644 index 00000000000000..6462fc67df2bd6 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_8_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_8 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-16-finetuned-squad-seed-8` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_8_en_5.2.0_3.0_1699819269765.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_8_en_5.2.0_3.0_1699819269765.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_8","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_8","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_8_base_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_16_finetuned_squad_seed_8| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-16-finetuned-squad-seed-8 \ No newline at end of file From b45ed5239405c637782f1395cbad9e93b7fdfc8f Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 03:10:04 +0700 Subject: [PATCH 187/255] Add model 2023-11-12-bert_qa_bert001_en --- .../2023-11-12-bert_qa_bert001_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert001_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert001_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert001_en.md new file mode 100644 index 00000000000000..d0140713ba9cb6 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert001_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Cased model (from JAlexis) +author: John Snow Labs +name: bert_qa_bert001 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert001` is a English model originally trained by `JAlexis`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert001_en_5.2.0_3.0_1699819796932.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert001_en_5.2.0_3.0_1699819796932.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_bert001","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_bert001","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert001| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/JAlexis/bert001 \ No newline at end of file From 122d08b6ef298172648937d7bfbd966a7536e191 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 03:14:43 +0700 Subject: [PATCH 188/255] Add model 2023-11-12-bert_qa_bert_base_spanish_wwm_cased_finetuned_qa_tar_es --- ...e_spanish_wwm_cased_finetuned_qa_tar_es.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_spanish_wwm_cased_finetuned_qa_tar_es.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_spanish_wwm_cased_finetuned_qa_tar_es.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_spanish_wwm_cased_finetuned_qa_tar_es.md new file mode 100644 index 00000000000000..b3493c3179d820 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_spanish_wwm_cased_finetuned_qa_tar_es.md @@ -0,0 +1,108 @@ +--- +layout: model +title: Castilian, Spanish BertForQuestionAnswering model (from CenIA) +author: John Snow Labs +name: bert_qa_bert_base_spanish_wwm_cased_finetuned_qa_tar +date: 2023-11-12 +tags: [open_source, question_answering, bert, es, onnx] +task: Question Answering +language: es +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-spanish-wwm-cased-finetuned-qa-tar` is a Castilian, Spanish model orginally trained by `CenIA`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_spanish_wwm_cased_finetuned_qa_tar_es_5.2.0_3.0_1699820076531.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_spanish_wwm_cased_finetuned_qa_tar_es_5.2.0_3.0_1699820076531.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_spanish_wwm_cased_finetuned_qa_tar","es") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_spanish_wwm_cased_finetuned_qa_tar","es") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("es.answer_question.bert.base_cased.by_CenIA").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_spanish_wwm_cased_finetuned_qa_tar| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|es| +|Size:|409.5 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/CenIA/bert-base-spanish-wwm-cased-finetuned-qa-tar \ No newline at end of file From 404f1874fe640e28ba417160c5045e334e50643e Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 03:32:25 +0700 Subject: [PATCH 189/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_4_en --- ...ew_shot_k_256_finetuned_squad_seed_4_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_4_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_4_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_4_en.md new file mode 100644 index 00000000000000..3686f064729b6c --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_4_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_4 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-256-finetuned-squad-seed-4` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_4_en_5.2.0_3.0_1699821131222.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_4_en_5.2.0_3.0_1699821131222.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_4","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_4","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_4_base_256d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_4| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-256-finetuned-squad-seed-4 \ No newline at end of file From 50ba8e6b5c9548ed6bf0ec02333e6561e5f936af Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 03:33:25 +0700 Subject: [PATCH 190/255] Add model 2023-11-12-bert_qa_bert_base_uncased_few_shot_k_16_finetuned_squad_seed_42_en --- ...ew_shot_k_16_finetuned_squad_seed_42_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_16_finetuned_squad_seed_42_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_16_finetuned_squad_seed_42_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_16_finetuned_squad_seed_42_en.md new file mode 100644 index 00000000000000..f569a38b50b2b0 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_16_finetuned_squad_seed_42_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_bert_base_uncased_few_shot_k_16_finetuned_squad_seed_42 +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-16-finetuned-squad-seed-42` is a English model orginally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_few_shot_k_16_finetuned_squad_seed_42_en_5.2.0_3.0_1699821131822.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_few_shot_k_16_finetuned_squad_seed_42_en_5.2.0_3.0_1699821131822.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_few_shot_k_16_finetuned_squad_seed_42","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_uncased_few_shot_k_16_finetuned_squad_seed_42","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.base_uncased_seed_42").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_few_shot_k_16_finetuned_squad_seed_42| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-16-finetuned-squad-seed-42 \ No newline at end of file From 8f77423f168fcee98701d7bb98ad5d1977485a55 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 03:34:25 +0700 Subject: [PATCH 191/255] Add model 2023-11-12-bert_qa_bert_base_turkish_cased_finetuned_lr_2e_05_epochs_3_tr --- ...sh_cased_finetuned_lr_2e_05_epochs_3_tr.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_turkish_cased_finetuned_lr_2e_05_epochs_3_tr.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_turkish_cased_finetuned_lr_2e_05_epochs_3_tr.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_turkish_cased_finetuned_lr_2e_05_epochs_3_tr.md new file mode 100644 index 00000000000000..ff2cffde5527a9 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_turkish_cased_finetuned_lr_2e_05_epochs_3_tr.md @@ -0,0 +1,108 @@ +--- +layout: model +title: Turkish BertForQuestionAnswering model (from husnu) +author: John Snow Labs +name: bert_qa_bert_base_turkish_cased_finetuned_lr_2e_05_epochs_3 +date: 2023-11-12 +tags: [open_source, question_answering, bert, tr, onnx] +task: Question Answering +language: tr +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-turkish-cased-finetuned_lr-2e-05_epochs-3` is a Turkish model orginally trained by `husnu`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_turkish_cased_finetuned_lr_2e_05_epochs_3_tr_5.2.0_3.0_1699821252993.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_turkish_cased_finetuned_lr_2e_05_epochs_3_tr_5.2.0_3.0_1699821252993.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_turkish_cased_finetuned_lr_2e_05_epochs_3","tr") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_turkish_cased_finetuned_lr_2e_05_epochs_3","tr") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("tr.answer_question.bert.base_cased").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_turkish_cased_finetuned_lr_2e_05_epochs_3| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|tr| +|Size:|412.3 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/husnu/bert-base-turkish-cased-finetuned_lr-2e-05_epochs-3 \ No newline at end of file From 0b1a14f3cff32de659ef1bb8dbe4c5785875c358 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 03:47:34 +0700 Subject: [PATCH 192/255] Add model 2023-11-12-bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_tar_es --- ...spanish_wwm_uncased_finetuned_qa_tar_es.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_tar_es.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_tar_es.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_tar_es.md new file mode 100644 index 00000000000000..4631b19d15c16d --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_tar_es.md @@ -0,0 +1,108 @@ +--- +layout: model +title: Castilian, Spanish BertForQuestionAnswering model (from CenIA) +author: John Snow Labs +name: bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_tar +date: 2023-11-12 +tags: [open_source, question_answering, bert, es, onnx] +task: Question Answering +language: es +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-spanish-wwm-uncased-finetuned-qa-tar` is a Castilian, Spanish model orginally trained by `CenIA`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_tar_es_5.2.0_3.0_1699822047235.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_tar_es_5.2.0_3.0_1699822047235.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_tar","es") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_tar","es") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("es.answer_question.bert.base_uncased.by_CenIA").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_spanish_wwm_uncased_finetuned_qa_tar| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|es| +|Size:|409.6 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/CenIA/bert-base-spanish-wwm-uncased-finetuned-qa-tar \ No newline at end of file From 35a05d1c693b538f28575098d1e18fadcdfbb9cb Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 04:02:54 +0700 Subject: [PATCH 193/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_6_en --- ...ew_shot_k_256_finetuned_squad_seed_6_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_6_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_6_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_6_en.md new file mode 100644 index 00000000000000..4df67c0a0dcc6e --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_6_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_6 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-256-finetuned-squad-seed-6` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_6_en_5.2.0_3.0_1699822967928.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_6_en_5.2.0_3.0_1699822967928.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_6","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_6","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_6_base_256d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_256_finetuned_squad_seed_6| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-256-finetuned-squad-seed-6 \ No newline at end of file From 04e15291d237594db489db6c82f8e581655b4943 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 04:05:52 +0700 Subject: [PATCH 194/255] Add model 2023-11-12-bert_qa_bert_base_uncased_few_shot_k_256_finetuned_squad_seed_0_en --- ...ew_shot_k_256_finetuned_squad_seed_0_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_256_finetuned_squad_seed_0_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_256_finetuned_squad_seed_0_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_256_finetuned_squad_seed_0_en.md new file mode 100644 index 00000000000000..cf5aa4dc2d4867 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_256_finetuned_squad_seed_0_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_bert_base_uncased_few_shot_k_256_finetuned_squad_seed_0 +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-256-finetuned-squad-seed-0` is a English model orginally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_few_shot_k_256_finetuned_squad_seed_0_en_5.2.0_3.0_1699823144608.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_few_shot_k_256_finetuned_squad_seed_0_en_5.2.0_3.0_1699823144608.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_few_shot_k_256_finetuned_squad_seed_0","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_uncased_few_shot_k_256_finetuned_squad_seed_0","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.base_uncased_256d_seed_0").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_few_shot_k_256_finetuned_squad_seed_0| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-256-finetuned-squad-seed-0 \ No newline at end of file From bbda27aaec6b44546462f6d6b3662e293429594f Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 04:07:05 +0700 Subject: [PATCH 195/255] Add model 2023-11-12-bert_qa_bert_base_uncased_few_shot_k_32_finetuned_squad_seed_0_en --- ...few_shot_k_32_finetuned_squad_seed_0_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_32_finetuned_squad_seed_0_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_32_finetuned_squad_seed_0_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_32_finetuned_squad_seed_0_en.md new file mode 100644 index 00000000000000..96df84acf13217 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_32_finetuned_squad_seed_0_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_bert_base_uncased_few_shot_k_32_finetuned_squad_seed_0 +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-32-finetuned-squad-seed-0` is a English model orginally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_few_shot_k_32_finetuned_squad_seed_0_en_5.2.0_3.0_1699823217399.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_few_shot_k_32_finetuned_squad_seed_0_en_5.2.0_3.0_1699823217399.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_few_shot_k_32_finetuned_squad_seed_0","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_uncased_few_shot_k_32_finetuned_squad_seed_0","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.base_uncased_32d_seed_0").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_few_shot_k_32_finetuned_squad_seed_0| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-32-finetuned-squad-seed-0 \ No newline at end of file From b9e4ee5f9d125e2b841ce39139bd88a3a747b6c2 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 04:17:36 +0700 Subject: [PATCH 196/255] Add model 2023-11-12-bert_qa_bert_base_uncased_few_shot_k_1024_finetuned_squad_seed_42_en --- ..._shot_k_1024_finetuned_squad_seed_42_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_1024_finetuned_squad_seed_42_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_1024_finetuned_squad_seed_42_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_1024_finetuned_squad_seed_42_en.md new file mode 100644 index 00000000000000..596257d0b91fb3 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_1024_finetuned_squad_seed_42_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_bert_base_uncased_few_shot_k_1024_finetuned_squad_seed_42 +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-1024-finetuned-squad-seed-42` is a English model orginally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_few_shot_k_1024_finetuned_squad_seed_42_en_5.2.0_3.0_1699823850067.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_few_shot_k_1024_finetuned_squad_seed_42_en_5.2.0_3.0_1699823850067.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_few_shot_k_1024_finetuned_squad_seed_42","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_uncased_few_shot_k_1024_finetuned_squad_seed_42","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.base_uncased_1024d_seed_42").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_few_shot_k_1024_finetuned_squad_seed_42| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-1024-finetuned-squad-seed-42 \ No newline at end of file From 8370f5eac6afd088141a12b9802dd95fa49506fe Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 04:30:40 +0700 Subject: [PATCH 197/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_4_en --- ...few_shot_k_32_finetuned_squad_seed_4_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_4_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_4_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_4_en.md new file mode 100644 index 00000000000000..7678de92be3e0f --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_4_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_4 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-32-finetuned-squad-seed-4` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_4_en_5.2.0_3.0_1699824633822.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_4_en_5.2.0_3.0_1699824633822.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_4","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_4","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_4_base_32d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_32_finetuned_squad_seed_4| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-32-finetuned-squad-seed-4 \ No newline at end of file From c53a1e69f1659a0a59d112366811d6b5e51c2c78 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 04:38:07 +0700 Subject: [PATCH 198/255] Add model 2023-11-12-bert_qa_bert_base_uncased_few_shot_k_512_finetuned_squad_seed_0_en --- ...ew_shot_k_512_finetuned_squad_seed_0_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_512_finetuned_squad_seed_0_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_512_finetuned_squad_seed_0_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_512_finetuned_squad_seed_0_en.md new file mode 100644 index 00000000000000..9967a251ac3455 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_512_finetuned_squad_seed_0_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_bert_base_uncased_few_shot_k_512_finetuned_squad_seed_0 +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-512-finetuned-squad-seed-0` is a English model orginally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_few_shot_k_512_finetuned_squad_seed_0_en_5.2.0_3.0_1699825076044.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_few_shot_k_512_finetuned_squad_seed_0_en_5.2.0_3.0_1699825076044.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_few_shot_k_512_finetuned_squad_seed_0","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_uncased_few_shot_k_512_finetuned_squad_seed_0","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.base_uncased_512d_seed_0").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_few_shot_k_512_finetuned_squad_seed_0| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-512-finetuned-squad-seed-0 \ No newline at end of file From c78e6d559543d6c4bcadb63bd5c387fb7d819bb8 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 04:39:08 +0700 Subject: [PATCH 199/255] Add model 2023-11-12-bert_qa_bert_base_uncased_few_shot_k_64_finetuned_squad_seed_0_en --- ...few_shot_k_64_finetuned_squad_seed_0_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_64_finetuned_squad_seed_0_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_64_finetuned_squad_seed_0_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_64_finetuned_squad_seed_0_en.md new file mode 100644 index 00000000000000..38972f7e0ba706 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_64_finetuned_squad_seed_0_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_bert_base_uncased_few_shot_k_64_finetuned_squad_seed_0 +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-64-finetuned-squad-seed-0` is a English model orginally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_few_shot_k_64_finetuned_squad_seed_0_en_5.2.0_3.0_1699825076110.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_few_shot_k_64_finetuned_squad_seed_0_en_5.2.0_3.0_1699825076110.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_few_shot_k_64_finetuned_squad_seed_0","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_uncased_few_shot_k_64_finetuned_squad_seed_0","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.base_uncased_64d_seed_0").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_few_shot_k_64_finetuned_squad_seed_0| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-64-finetuned-squad-seed-0 \ No newline at end of file From 6292f4e8b70246b4263cec413398606f901b3a6f Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 04:45:16 +0700 Subject: [PATCH 200/255] Add model 2023-11-12-bert_qa_bert_base_uncased_few_shot_k_128_finetuned_squad_seed_0_en --- ...ew_shot_k_128_finetuned_squad_seed_0_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_128_finetuned_squad_seed_0_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_128_finetuned_squad_seed_0_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_128_finetuned_squad_seed_0_en.md new file mode 100644 index 00000000000000..4e676eb68949cc --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_few_shot_k_128_finetuned_squad_seed_0_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_bert_base_uncased_few_shot_k_128_finetuned_squad_seed_0 +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-128-finetuned-squad-seed-0` is a English model orginally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_few_shot_k_128_finetuned_squad_seed_0_en_5.2.0_3.0_1699825506203.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_few_shot_k_128_finetuned_squad_seed_0_en_5.2.0_3.0_1699825506203.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_few_shot_k_128_finetuned_squad_seed_0","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_uncased_few_shot_k_128_finetuned_squad_seed_0","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.base_uncased_128d_seed_0").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_few_shot_k_128_finetuned_squad_seed_0| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-128-finetuned-squad-seed-0 \ No newline at end of file From dcbf920905fa7ac5b2cb963745518ea0e7bd708d Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 04:46:16 +0700 Subject: [PATCH 201/255] Add model 2023-11-12-bert_qa_bert_base_1024_full_trivia_copied_embeddings_en --- ...e_1024_full_trivia_copied_embeddings_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_1024_full_trivia_copied_embeddings_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_1024_full_trivia_copied_embeddings_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_1024_full_trivia_copied_embeddings_en.md new file mode 100644 index 00000000000000..d19a1bfffe9839 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_1024_full_trivia_copied_embeddings_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from MrAnderson) +author: John Snow Labs +name: bert_qa_bert_base_1024_full_trivia_copied_embeddings +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-1024-full-trivia-copied-embeddings` is a English model orginally trained by `MrAnderson`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_1024_full_trivia_copied_embeddings_en_5.2.0_3.0_1699825506288.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_1024_full_trivia_copied_embeddings_en_5.2.0_3.0_1699825506288.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_1024_full_trivia_copied_embeddings","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_1024_full_trivia_copied_embeddings","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.trivia.bert.base_1024d").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_1024_full_trivia_copied_embeddings| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|408.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/MrAnderson/bert-base-1024-full-trivia-copied-embeddings \ No newline at end of file From b8cef4381442e69b059e357290bf31f83c03c5c3 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 05:04:42 +0700 Subject: [PATCH 202/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_6_en --- ...ew_shot_k_512_finetuned_squad_seed_6_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_6_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_6_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_6_en.md new file mode 100644 index 00000000000000..808635c141675a --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_6_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_6 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-512-finetuned-squad-seed-6` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_6_en_5.2.0_3.0_1699826674380.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_6_en_5.2.0_3.0_1699826674380.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_6","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_6","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_6_base_512d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_512_finetuned_squad_seed_6| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-512-finetuned-squad-seed-6 \ No newline at end of file From 3d207e2a6c6ad73add4b2f14f977c2ecc19c28ec Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 05:11:28 +0700 Subject: [PATCH 203/255] Add model 2023-11-12-bert_qa_bert_base_uncased_finetuned_infovqa_en --- ..._bert_base_uncased_finetuned_infovqa_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_finetuned_infovqa_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_finetuned_infovqa_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_finetuned_infovqa_en.md new file mode 100644 index 00000000000000..4dad5b8b17c3af --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_finetuned_infovqa_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from tiennvcs) +author: John Snow Labs +name: bert_qa_bert_base_uncased_finetuned_infovqa +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-finetuned-infovqa` is a English model orginally trained by `tiennvcs`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_finetuned_infovqa_en_5.2.0_3.0_1699827080467.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_finetuned_infovqa_en_5.2.0_3.0_1699827080467.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_finetuned_infovqa","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_uncased_finetuned_infovqa","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.infovqa.base_uncased.by_tiennvcs").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_finetuned_infovqa| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/tiennvcs/bert-base-uncased-finetuned-infovqa \ No newline at end of file From b8d57de74a4024670be84a42f77c9d3eaba821ba Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 05:12:28 +0700 Subject: [PATCH 204/255] Add model 2023-11-12-bert_qa_bert_base_uncased_finetuned_squad_v1_en --- ...bert_base_uncased_finetuned_squad_v1_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_finetuned_squad_v1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_finetuned_squad_v1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_finetuned_squad_v1_en.md new file mode 100644 index 00000000000000..4ddec6968b31c8 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_finetuned_squad_v1_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from lewtun) +author: John Snow Labs +name: bert_qa_bert_base_uncased_finetuned_squad_v1 +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-finetuned-squad-v1` is a English model orginally trained by `lewtun`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_finetuned_squad_v1_en_5.2.0_3.0_1699827083140.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_finetuned_squad_v1_en_5.2.0_3.0_1699827083140.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_finetuned_squad_v1","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_uncased_finetuned_squad_v1","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.base_uncased.by_lewtun").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_finetuned_squad_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/lewtun/bert-base-uncased-finetuned-squad-v1 \ No newline at end of file From 8e91561e2cca199fa156ee554e867d8a8d06a97d Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 05:15:00 +0700 Subject: [PATCH 205/255] Add model 2023-11-12-bert_qa_bert_base_uncased_finetuned_vietnamese_infovqa_vi --- ...uncased_finetuned_vietnamese_infovqa_vi.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_finetuned_vietnamese_infovqa_vi.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_finetuned_vietnamese_infovqa_vi.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_finetuned_vietnamese_infovqa_vi.md new file mode 100644 index 00000000000000..a2bf597901bff3 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_finetuned_vietnamese_infovqa_vi.md @@ -0,0 +1,93 @@ +--- +layout: model +title: Vietnamese bert_qa_bert_base_uncased_finetuned_vietnamese_infovqa BertForQuestionAnswering from tiennvcs +author: John Snow Labs +name: bert_qa_bert_base_uncased_finetuned_vietnamese_infovqa +date: 2023-11-12 +tags: [bert, vi, open_source, question_answering, onnx] +task: Question Answering +language: vi +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_base_uncased_finetuned_vietnamese_infovqa` is a Vietnamese model originally trained by tiennvcs. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_finetuned_vietnamese_infovqa_vi_5.2.0_3.0_1699827289415.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_finetuned_vietnamese_infovqa_vi_5.2.0_3.0_1699827289415.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_finetuned_vietnamese_infovqa","vi") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_base_uncased_finetuned_vietnamese_infovqa", "vi") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_finetuned_vietnamese_infovqa| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|vi| +|Size:|407.2 MB| + +## References + +https://huggingface.co/tiennvcs/bert-base-uncased-finetuned-vi-infovqa \ No newline at end of file From 3027b494e144f230917712ba1da4f81b100e4c6e Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 05:18:25 +0700 Subject: [PATCH 206/255] Add model 2023-11-12-bert_qa_bert_base_512_full_trivia_en --- ...12-bert_qa_bert_base_512_full_trivia_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_512_full_trivia_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_512_full_trivia_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_512_full_trivia_en.md new file mode 100644 index 00000000000000..44c133a867774f --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_512_full_trivia_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from MrAnderson) +author: John Snow Labs +name: bert_qa_bert_base_512_full_trivia +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-512-full-trivia` is a English model orginally trained by `MrAnderson`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_512_full_trivia_en_5.2.0_3.0_1699827497585.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_512_full_trivia_en_5.2.0_3.0_1699827497585.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_512_full_trivia","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_512_full_trivia","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.trivia.bert.base_512d").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_512_full_trivia| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/MrAnderson/bert-base-512-full-trivia \ No newline at end of file From 0f194e59b13ae3e3e17f0c5887e4bada803427bd Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 05:29:51 +0700 Subject: [PATCH 207/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_10_en --- ...ew_shot_k_64_finetuned_squad_seed_10_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_10_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_10_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_10_en.md new file mode 100644 index 00000000000000..656dfcb1026eae --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_10_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_10 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-64-finetuned-squad-seed-10` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_10_en_5.2.0_3.0_1699828184256.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_10_en_5.2.0_3.0_1699828184256.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_10","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_10","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_10_base_64d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_10| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-64-finetuned-squad-seed-10 \ No newline at end of file From 4fd0535f8446613c7feff7d80b72865dcc7d9bef Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 05:33:10 +0700 Subject: [PATCH 208/255] Add model 2023-11-12-bert_qa_bert_base_uncased_squad_l3_en --- ...2-bert_qa_bert_base_uncased_squad_l3_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_squad_l3_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_squad_l3_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_squad_l3_en.md new file mode 100644 index 00000000000000..cf9dafe0f9b18f --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_squad_l3_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_bert_base_uncased_squad_l3 BertForQuestionAnswering from howey +author: John Snow Labs +name: bert_qa_bert_base_uncased_squad_l3 +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_base_uncased_squad_l3` is a English model originally trained by howey. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_squad_l3_en_5.2.0_3.0_1699828370740.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_squad_l3_en_5.2.0_3.0_1699828370740.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_squad_l3","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_base_uncased_squad_l3", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_squad_l3| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|168.8 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/howey/bert_base_uncased_squad_L3 \ No newline at end of file From 9c83cfaeb22a85b9c4a32e6cec8de0cbe0c8d265 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 05:40:52 +0700 Subject: [PATCH 209/255] Add model 2023-11-12-bert_qa_bert_base_uncased_squadv1.1_sparse_80_1x4_block_pruneofa_en --- ...uadv1.1_sparse_80_1x4_block_pruneofa_en.md | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_squadv1.1_sparse_80_1x4_block_pruneofa_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_squadv1.1_sparse_80_1x4_block_pruneofa_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_squadv1.1_sparse_80_1x4_block_pruneofa_en.md new file mode 100644 index 00000000000000..35a29c2fa86d8d --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_squadv1.1_sparse_80_1x4_block_pruneofa_en.md @@ -0,0 +1,110 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from Intel) +author: John Snow Labs +name: bert_qa_bert_base_uncased_squadv1.1_sparse_80_1x4_block_pruneofa +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-squadv1.1-sparse-80-1x4-block-pruneofa` is a English model orginally trained by `Intel`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_squadv1.1_sparse_80_1x4_block_pruneofa_en_5.2.0_3.0_1699828847199.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_squadv1.1_sparse_80_1x4_block_pruneofa_en_5.2.0_3.0_1699828847199.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_squadv1.1_sparse_80_1x4_block_pruneofa","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_uncased_squadv1.1_sparse_80_1x4_block_pruneofa","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.base_uncased.by_Intel").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_squadv1.1_sparse_80_1x4_block_pruneofa| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|178.7 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/Intel/bert-base-uncased-squadv1.1-sparse-80-1x4-block-pruneofa +- https://arxiv.org/abs/2111.05754 +- https://github.com/IntelLabs/Model-Compression-Research-Package/tree/main/research/prune-once-for-all \ No newline at end of file From fb541cecd5b8b1a28b02549883d28dfc902abca2 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 05:41:53 +0700 Subject: [PATCH 210/255] Add model 2023-11-12-bert_qa_bert_base_uncased_qa_squad2_en --- ...-bert_qa_bert_base_uncased_qa_squad2_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_qa_squad2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_qa_squad2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_qa_squad2_en.md new file mode 100644 index 00000000000000..d16675dfb7dd28 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_qa_squad2_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from Vasanth) +author: John Snow Labs +name: bert_qa_bert_base_uncased_qa_squad2 +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-qa-squad2` is a English model orginally trained by `Vasanth`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_qa_squad2_en_5.2.0_3.0_1699828845456.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_qa_squad2_en_5.2.0_3.0_1699828845456.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_qa_squad2","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_uncased_qa_squad2","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squadv2.bert.base_uncased.by_Vasanth").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_qa_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/Vasanth/bert-base-uncased-qa-squad2 \ No newline at end of file From c62f316feb2936b1c1e26e343d73f24065ea6b5f Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 05:43:54 +0700 Subject: [PATCH 211/255] Add model 2023-11-12-bert_qa_bert_base_cased_iuchatbot_ontologydts_en --- ...ert_base_cased_iuchatbot_ontologydts_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_cased_iuchatbot_ontologydts_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_cased_iuchatbot_ontologydts_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_cased_iuchatbot_ontologydts_en.md new file mode 100644 index 00000000000000..5d478935df76bc --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_cased_iuchatbot_ontologydts_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_bert_base_cased_iuchatbot_ontologydts BertForQuestionAnswering from nntadotzip +author: John Snow Labs +name: bert_qa_bert_base_cased_iuchatbot_ontologydts +date: 2023-11-12 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_base_cased_iuchatbot_ontologydts` is a English model originally trained by nntadotzip. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_cased_iuchatbot_ontologydts_en_5.2.0_3.0_1699829027066.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_cased_iuchatbot_ontologydts_en_5.2.0_3.0_1699829027066.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_cased_iuchatbot_ontologydts","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_base_cased_iuchatbot_ontologydts", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_cased_iuchatbot_ontologydts| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +https://huggingface.co/nntadotzip/bert-base-cased-IUChatbot-ontologyDts \ No newline at end of file From a32d1690bff8097dff9bd1efddb3a8ee0366e717 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 05:55:50 +0700 Subject: [PATCH 212/255] Add model 2023-11-12-bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_2_en --- ...few_shot_k_64_finetuned_squad_seed_2_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_2_en.md new file mode 100644 index 00000000000000..21cfe8d713271b --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_2_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_2 +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-few-shot-k-64-finetuned-squad-seed-2` is a English model originally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_2_en_5.2.0_3.0_1699829742647.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_2_en_5.2.0_3.0_1699829742647.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_2","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_2","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squad.uncased_seed_2_base_64d_finetuned_few_shot").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_few_shot_k_64_finetuned_squad_seed_2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-base-uncased-few-shot-k-64-finetuned-squad-seed-2 \ No newline at end of file From f07765c990a1255cf53744ea57f691e9bf5dbd40 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 05:57:44 +0700 Subject: [PATCH 213/255] Add model 2023-11-12-bert_qa_bert_finetuned_squad1_en --- ...-11-12-bert_qa_bert_finetuned_squad1_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_finetuned_squad1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_finetuned_squad1_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_finetuned_squad1_en.md new file mode 100644 index 00000000000000..91a32cff15c8a1 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_finetuned_squad1_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from Ghost1) +author: John Snow Labs +name: bert_qa_bert_finetuned_squad1 +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-finetuned-squad1` is a English model orginally trained by `Ghost1`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_finetuned_squad1_en_5.2.0_3.0_1699829857657.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_finetuned_squad1_en_5.2.0_3.0_1699829857657.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_finetuned_squad1","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_finetuned_squad1","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.by_Ghost1").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_finetuned_squad1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/Ghost1/bert-finetuned-squad1 \ No newline at end of file From 0e3b0d7716e7a53db1c194358857daf2b093bb7f Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 06:15:08 +0700 Subject: [PATCH 214/255] Add model 2023-11-12-bert_qa_bert_base_cased_finetuned_squad_test_en --- ...bert_base_cased_finetuned_squad_test_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_cased_finetuned_squad_test_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_cased_finetuned_squad_test_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_cased_finetuned_squad_test_en.md new file mode 100644 index 00000000000000..3c108cd1a3e605 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_cased_finetuned_squad_test_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from ncduy) +author: John Snow Labs +name: bert_qa_bert_base_cased_finetuned_squad_test +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-cased-finetuned-squad-test` is a English model orginally trained by `ncduy`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_cased_finetuned_squad_test_en_5.2.0_3.0_1699830895202.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_cased_finetuned_squad_test_en_5.2.0_3.0_1699830895202.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_cased_finetuned_squad_test","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_cased_finetuned_squad_test","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.base_cased.by_ncduy").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_cased_finetuned_squad_test| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/ncduy/bert-base-cased-finetuned-squad-test \ No newline at end of file From 5ebc0a7cb7d4d34f1115994adbdaf237316f109f Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 06:16:09 +0700 Subject: [PATCH 215/255] Add model 2023-11-12-bert_qa_bert_chinese_finetuned_zh --- ...11-12-bert_qa_bert_chinese_finetuned_zh.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_chinese_finetuned_zh.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_chinese_finetuned_zh.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_chinese_finetuned_zh.md new file mode 100644 index 00000000000000..a82db84a5dac39 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_chinese_finetuned_zh.md @@ -0,0 +1,108 @@ +--- +layout: model +title: Chinese BertForQuestionAnswering model (from jackh1995) +author: John Snow Labs +name: bert_qa_bert_chinese_finetuned +date: 2023-11-12 +tags: [zh, open_source, question_answering, bert, onnx] +task: Question Answering +language: zh +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-chinese-finetuned` is a Chinese model orginally trained by `jackh1995`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_chinese_finetuned_zh_5.2.0_3.0_1699830895206.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_chinese_finetuned_zh_5.2.0_3.0_1699830895206.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_chinese_finetuned","zh") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_chinese_finetuned","zh") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("zh.answer_question.bert.by_jackh1995").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_chinese_finetuned| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|zh| +|Size:|380.8 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/jackh1995/bert-chinese-finetuned \ No newline at end of file From b8774063bb8201aeefce1eac7aad655491ad1714 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 06:17:09 +0700 Subject: [PATCH 216/255] Add model 2023-11-12-bert_qa_bert_base_uncased_squad1.1_pruned_x3.2_v2_en --- ...base_uncased_squad1.1_pruned_x3.2_v2_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_squad1.1_pruned_x3.2_v2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_squad1.1_pruned_x3.2_v2_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_squad1.1_pruned_x3.2_v2_en.md new file mode 100644 index 00000000000000..a9aea21ec009c2 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_base_uncased_squad1.1_pruned_x3.2_v2_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from madlag) +author: John Snow Labs +name: bert_qa_bert_base_uncased_squad1.1_pruned_x3.2_v2 +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-squad1.1-pruned-x3.2-v2` is a English model orginally trained by `madlag`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_squad1.1_pruned_x3.2_v2_en_5.2.0_3.0_1699830948837.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_squad1.1_pruned_x3.2_v2_en_5.2.0_3.0_1699830948837.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_squad1.1_pruned_x3.2_v2","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_uncased_squad1.1_pruned_x3.2_v2","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.base_uncased_v2").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_squad1.1_pruned_x3.2_v2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|171.9 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/madlag/bert-base-uncased-squad1.1-pruned-x3.2-v2 \ No newline at end of file From 25dff31d546475d1e43aac757f1404daf4ed7bb1 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 06:22:41 +0700 Subject: [PATCH 217/255] Add model 2023-11-12-bert_qa_base_uncased_finetuned_trivia_finetuned_squad_en --- ...sed_finetuned_trivia_finetuned_squad_en.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_finetuned_trivia_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_finetuned_trivia_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_finetuned_trivia_finetuned_squad_en.md new file mode 100644 index 00000000000000..7a37538b93283d --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_finetuned_trivia_finetuned_squad_en.md @@ -0,0 +1,94 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from FabianWillner) +author: John Snow Labs +name: bert_qa_base_uncased_finetuned_trivia_finetuned_squad +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-finetuned-triviaqa-finetuned-squad` is a English model originally trained by `FabianWillner`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_finetuned_trivia_finetuned_squad_en_5.2.0_3.0_1699831353838.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_finetuned_trivia_finetuned_squad_en_5.2.0_3.0_1699831353838.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_finetuned_trivia_finetuned_squad","en")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_finetuned_trivia_finetuned_squad","en") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_finetuned_trivia_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/FabianWillner/bert-base-uncased-finetuned-triviaqa-finetuned-squad \ No newline at end of file From ea2a64bc5f1e11b9d73e9a7df264bff00deaf1ed Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 06:26:45 +0700 Subject: [PATCH 218/255] Add model 2023-11-12-bert_qa_bert_finetuned_squad_accelerate_10epoch_transformerfrozen_en --- ...accelerate_10epoch_transformerfrozen_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_finetuned_squad_accelerate_10epoch_transformerfrozen_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_finetuned_squad_accelerate_10epoch_transformerfrozen_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_finetuned_squad_accelerate_10epoch_transformerfrozen_en.md new file mode 100644 index 00000000000000..4cc26786e3504c --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_bert_finetuned_squad_accelerate_10epoch_transformerfrozen_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from DaisyMak) +author: John Snow Labs +name: bert_qa_bert_finetuned_squad_accelerate_10epoch_transformerfrozen +date: 2023-11-12 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-finetuned-squad-accelerate-10epoch_transformerfrozen` is a English model orginally trained by `DaisyMak`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_finetuned_squad_accelerate_10epoch_transformerfrozen_en_5.2.0_3.0_1699831597359.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_finetuned_squad_accelerate_10epoch_transformerfrozen_en_5.2.0_3.0_1699831597359.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_finetuned_squad_accelerate_10epoch_transformerfrozen","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_finetuned_squad_accelerate_10epoch_transformerfrozen","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.by_DaisyMak").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_finetuned_squad_accelerate_10epoch_transformerfrozen| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/DaisyMak/bert-finetuned-squad-accelerate-10epoch_transformerfrozen \ No newline at end of file From a197d9662b83d9cdb73fec3878dc99ff61a63a1a Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 06:52:06 +0700 Subject: [PATCH 219/255] Add model 2023-11-12-bert_qa_base_uncased_pretrain_finetuned_coqa_fal_en --- ..._uncased_pretrain_finetuned_coqa_fal_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_pretrain_finetuned_coqa_fal_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_pretrain_finetuned_coqa_fal_en.md b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_pretrain_finetuned_coqa_fal_en.md new file mode 100644 index 00000000000000..5e23489cf6b921 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-12-bert_qa_base_uncased_pretrain_finetuned_coqa_fal_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from alistvt) +author: John Snow Labs +name: bert_qa_base_uncased_pretrain_finetuned_coqa_fal +date: 2023-11-12 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-pretrain-finetuned-coqa-falt` is a English model originally trained by `alistvt`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_pretrain_finetuned_coqa_fal_en_5.2.0_3.0_1699833119214.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_pretrain_finetuned_coqa_fal_en_5.2.0_3.0_1699833119214.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_pretrain_finetuned_coqa_fal","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_pretrain_finetuned_coqa_fal","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.uncased_base_finetuned").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_pretrain_finetuned_coqa_fal| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.1 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/alistvt/bert-base-uncased-pretrain-finetuned-coqa-falt \ No newline at end of file From 997f9a262ed7baea461b8a09e0733eeb84166811 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 07:26:24 +0700 Subject: [PATCH 220/255] Add model 2023-11-13-bert_qa_base_uncased_squad_v2.0_finetuned_en --- ...qa_base_uncased_squad_v2.0_finetuned_en.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_base_uncased_squad_v2.0_finetuned_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_base_uncased_squad_v2.0_finetuned_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_base_uncased_squad_v2.0_finetuned_en.md new file mode 100644 index 00000000000000..ac10d62206ea64 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_base_uncased_squad_v2.0_finetuned_en.md @@ -0,0 +1,100 @@ +--- +layout: model +title: English BertForQuestionAnswering Base Uncased model (from kamalkraj) +author: John Snow Labs +name: bert_qa_base_uncased_squad_v2.0_finetuned +date: 2023-11-13 +tags: [en, open_source, bert, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-squad-v2.0-finetuned` is a English model originally trained by `kamalkraj`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad_v2.0_finetuned_en_5.2.0_3.0_1699835177400.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_base_uncased_squad_v2.0_finetuned_en_5.2.0_3.0_1699835177400.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +documentAssembler = MultiDocumentAssembler() \ + .setInputCols(["question", "context"]) \ + .setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squad_v2.0_finetuned","en") \ + .setInputCols(["document_question", "document_context"]) \ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[documentAssembler, spanClassifier]) + +data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val documentAssembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val spanClassifer = BertForQuestionAnswering.pretrained("bert_qa_base_uncased_squad_v2.0_finetuned","en") + .setInputCols(Array("document", "token")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(documentAssembler, spanClassifier)) + +val data = Seq("What is my name?", "My name is Clara and I live in Berkeley.").toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.squadv2.uncased_v2_base_finetuned").predict("""What is my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_base_uncased_squad_v2.0_finetuned| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/kamalkraj/bert-base-uncased-squad-v2.0-finetuned \ No newline at end of file From c55f8bb066ad4022432b09ab2420162a4721df73 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 07:27:50 +0700 Subject: [PATCH 221/255] Add model 2023-11-13-bert_qa_bert_medium_wrslb_finetuned_squadv1_en --- ..._bert_medium_wrslb_finetuned_squadv1_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_medium_wrslb_finetuned_squadv1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_medium_wrslb_finetuned_squadv1_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_medium_wrslb_finetuned_squadv1_en.md new file mode 100644 index 00000000000000..358f59dad1ad87 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_medium_wrslb_finetuned_squadv1_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from mrm8488) +author: John Snow Labs +name: bert_qa_bert_medium_wrslb_finetuned_squadv1 +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-medium-wrslb-finetuned-squadv1` is a English model orginally trained by `mrm8488`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_medium_wrslb_finetuned_squadv1_en_5.2.0_3.0_1699835262254.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_medium_wrslb_finetuned_squadv1_en_5.2.0_3.0_1699835262254.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_medium_wrslb_finetuned_squadv1","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_medium_wrslb_finetuned_squadv1","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.medium").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_medium_wrslb_finetuned_squadv1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|154.2 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/mrm8488/bert-medium-wrslb-finetuned-squadv1 \ No newline at end of file From 0233efdd647428b83e4f7c9f9caa6f69b99c40e8 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 07:56:14 +0700 Subject: [PATCH 222/255] Add model 2023-11-13-bert_qa_bert_mini_wrslb_finetuned_squadv1_en --- ...qa_bert_mini_wrslb_finetuned_squadv1_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_mini_wrslb_finetuned_squadv1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_mini_wrslb_finetuned_squadv1_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_mini_wrslb_finetuned_squadv1_en.md new file mode 100644 index 00000000000000..efefb55f11f5d0 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_mini_wrslb_finetuned_squadv1_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from mrm8488) +author: John Snow Labs +name: bert_qa_bert_mini_wrslb_finetuned_squadv1 +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-mini-wrslb-finetuned-squadv1` is a English model orginally trained by `mrm8488`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_mini_wrslb_finetuned_squadv1_en_5.2.0_3.0_1699836970376.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_mini_wrslb_finetuned_squadv1_en_5.2.0_3.0_1699836970376.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_mini_wrslb_finetuned_squadv1","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_mini_wrslb_finetuned_squadv1","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.base").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_mini_wrslb_finetuned_squadv1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|41.8 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/mrm8488/bert-mini-wrslb-finetuned-squadv1 \ No newline at end of file From dc51eaa03bc1dd970934a4577aadb204d0751b34 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 09:02:31 +0700 Subject: [PATCH 223/255] Add model 2023-11-13-bert_qa_bert_qa_vietnamese_nvkha_vi --- ...-13-bert_qa_bert_qa_vietnamese_nvkha_vi.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_qa_vietnamese_nvkha_vi.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_qa_vietnamese_nvkha_vi.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_qa_vietnamese_nvkha_vi.md new file mode 100644 index 00000000000000..61c3219205f1bb --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_qa_vietnamese_nvkha_vi.md @@ -0,0 +1,93 @@ +--- +layout: model +title: Vietnamese bert_qa_bert_qa_vietnamese_nvkha BertForQuestionAnswering from nvkha +author: John Snow Labs +name: bert_qa_bert_qa_vietnamese_nvkha +date: 2023-11-13 +tags: [bert, vi, open_source, question_answering, onnx] +task: Question Answering +language: vi +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_qa_vietnamese_nvkha` is a Vietnamese model originally trained by nvkha. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_qa_vietnamese_nvkha_vi_5.2.0_3.0_1699840938730.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_qa_vietnamese_nvkha_vi_5.2.0_3.0_1699840938730.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_qa_vietnamese_nvkha","vi") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_qa_vietnamese_nvkha", "vi") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_qa_vietnamese_nvkha| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|vi| +|Size:|665.0 MB| + +## References + +https://huggingface.co/nvkha/bert-qa-vi \ No newline at end of file From ebc334c60fd2de90cc33441e55a4703e4392b820 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 09:04:16 +0700 Subject: [PATCH 224/255] Add model 2023-11-13-bert_qa_bert_small_2_finetuned_squadv2_en --- ...rt_qa_bert_small_2_finetuned_squadv2_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_2_finetuned_squadv2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_2_finetuned_squadv2_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_2_finetuned_squadv2_en.md new file mode 100644 index 00000000000000..e98a80cab5647f --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_2_finetuned_squadv2_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from mrm8488) +author: John Snow Labs +name: bert_qa_bert_small_2_finetuned_squadv2 +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-small-2-finetuned-squadv2` is a English model orginally trained by `mrm8488`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_small_2_finetuned_squadv2_en_5.2.0_3.0_1699841053924.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_small_2_finetuned_squadv2_en_5.2.0_3.0_1699841053924.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_small_2_finetuned_squadv2","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_small_2_finetuned_squadv2","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squadv2.bert.small_v2.by_mrm8488").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_small_2_finetuned_squadv2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|130.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/mrm8488/bert-small-2-finetuned-squadv2 \ No newline at end of file From 21946818e383727ddfcc8bcf5451bd35c34fbaca Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 09:30:33 +0700 Subject: [PATCH 225/255] Add model 2023-11-13-bert_qa_bert_small_finetuned_squad_en --- ...3-bert_qa_bert_small_finetuned_squad_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_finetuned_squad_en.md new file mode 100644 index 00000000000000..389f9302359587 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_finetuned_squad_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_bert_small_finetuned_squad +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-small-finetuned-squad` is a English model orginally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_small_finetuned_squad_en_5.2.0_3.0_1699842629949.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_small_finetuned_squad_en_5.2.0_3.0_1699842629949.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_small_finetuned_squad","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_small_finetuned_squad","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.small.by_anas-awadalla").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_small_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|107.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-small-finetuned-squad \ No newline at end of file From fdada334188de708731a191ac2fe0abd6c3d221b Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 09:35:21 +0700 Subject: [PATCH 226/255] Add model 2023-11-13-bert_qa_bert_small_cord19_squad2_en --- ...-13-bert_qa_bert_small_cord19_squad2_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_cord19_squad2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_cord19_squad2_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_cord19_squad2_en.md new file mode 100644 index 00000000000000..f538e92ca34ed7 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_cord19_squad2_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from NeuML) +author: John Snow Labs +name: bert_qa_bert_small_cord19_squad2 +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-small-cord19-squad2` is a English model orginally trained by `NeuML`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_small_cord19_squad2_en_5.2.0_3.0_1699842918116.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_small_cord19_squad2_en_5.2.0_3.0_1699842918116.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_small_cord19_squad2","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_small_cord19_squad2","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squadv2_cord19.bert.small").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_small_cord19_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|130.5 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/NeuML/bert-small-cord19-squad2 \ No newline at end of file From 907525ae5a93b9b036cd0e5ee5287d80d599c5d7 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 09:38:29 +0700 Subject: [PATCH 227/255] Add model 2023-11-13-bert_qa_bert_base_chinese_finetuned_squad_colab_zh --- ...t_base_chinese_finetuned_squad_colab_zh.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_chinese_finetuned_squad_colab_zh.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_chinese_finetuned_squad_colab_zh.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_chinese_finetuned_squad_colab_zh.md new file mode 100644 index 00000000000000..073e4c76bff370 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_chinese_finetuned_squad_colab_zh.md @@ -0,0 +1,108 @@ +--- +layout: model +title: Chinese BertForQuestionAnswering model (from TingChenChang) +author: John Snow Labs +name: bert_qa_bert_base_chinese_finetuned_squad_colab +date: 2023-11-13 +tags: [zh, open_source, question_answering, bert, onnx] +task: Question Answering +language: zh +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-chinese-finetuned-squad-colab` is a Chinese model orginally trained by `TingChenChang`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_chinese_finetuned_squad_colab_zh_5.2.0_3.0_1699843099568.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_chinese_finetuned_squad_colab_zh_5.2.0_3.0_1699843099568.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_chinese_finetuned_squad_colab","zh") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_chinese_finetuned_squad_colab","zh") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("zh.answer_question.squad.bert.base").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_chinese_finetuned_squad_colab| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|zh| +|Size:|381.0 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/TingChenChang/bert-base-chinese-finetuned-squad-colab \ No newline at end of file From 43ea300ff36fd529c7bd7aeb9b1f5bc38a4835e8 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 09:39:53 +0700 Subject: [PATCH 228/255] Add model 2023-11-13-bert_qa_bert_base_uncased_finetuned_docvqa_en --- ...a_bert_base_uncased_finetuned_docvqa_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_finetuned_docvqa_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_finetuned_docvqa_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_finetuned_docvqa_en.md new file mode 100644 index 00000000000000..b241ff3f932174 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_finetuned_docvqa_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from tiennvcs) +author: John Snow Labs +name: bert_qa_bert_base_uncased_finetuned_docvqa +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-finetuned-docvqa` is a English model orginally trained by `tiennvcs`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_finetuned_docvqa_en_5.2.0_3.0_1699843186356.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_finetuned_docvqa_en_5.2.0_3.0_1699843186356.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_finetuned_docvqa","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_uncased_finetuned_docvqa","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.docvqa.base_uncased.by_tiennvcs").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_finetuned_docvqa| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/tiennvcs/bert-base-uncased-finetuned-docvqa \ No newline at end of file From 8e662eed6306270c426f8f0576a0795aff932ff1 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 09:56:51 +0700 Subject: [PATCH 229/255] Add model 2023-11-13-bert_qa_bert_small_pretrained_finetuned_squad_en --- ...ert_small_pretrained_finetuned_squad_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_pretrained_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_pretrained_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_pretrained_finetuned_squad_en.md new file mode 100644 index 00000000000000..538e14306a1501 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_pretrained_finetuned_squad_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_bert_small_pretrained_finetuned_squad +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-small-pretrained-finetuned-squad` is a English model orginally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_small_pretrained_finetuned_squad_en_5.2.0_3.0_1699844207778.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_small_pretrained_finetuned_squad_en_5.2.0_3.0_1699844207778.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_small_pretrained_finetuned_squad","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_small_pretrained_finetuned_squad","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.small_finetuned.by_anas-awadalla").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_small_pretrained_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|106.9 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-small-pretrained-finetuned-squad \ No newline at end of file From dd7ff9d2ca9f136f0256bc344c4d7563c6adb182 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 10:04:27 +0700 Subject: [PATCH 230/255] Add model 2023-11-13-bert_qa_bert_small_cord19qa_en --- ...23-11-13-bert_qa_bert_small_cord19qa_en.md | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_cord19qa_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_cord19qa_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_cord19qa_en.md new file mode 100644 index 00000000000000..c895bb6b44806e --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_cord19qa_en.md @@ -0,0 +1,110 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from NeuML) +author: John Snow Labs +name: bert_qa_bert_small_cord19qa +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-small-cord19qa` is a English model orginally trained by `NeuML`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_small_cord19qa_en_5.2.0_3.0_1699844663819.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_small_cord19qa_en_5.2.0_3.0_1699844663819.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_small_cord19qa","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_small_cord19qa","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.cord19.bert.small").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_small_cord19qa| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|130.5 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/NeuML/bert-small-cord19qa +- https://www.kaggle.com/davidmezzetti/cord19-qa?select=cord19-qa.json +- https://www.semanticscholar.org/cord19 \ No newline at end of file From afc81eaa22707efdb98f3048db9274b0710a96e6 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 10:10:11 +0700 Subject: [PATCH 231/255] Add model 2023-11-13-bert_qa_bert_base_uncased_finetuned_duorc_bert_en --- ...rt_base_uncased_finetuned_duorc_bert_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_finetuned_duorc_bert_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_finetuned_duorc_bert_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_finetuned_duorc_bert_en.md new file mode 100644 index 00000000000000..9a45e68b72716c --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_finetuned_duorc_bert_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from machine2049) +author: John Snow Labs +name: bert_qa_bert_base_uncased_finetuned_duorc_bert +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-finetuned-duorc_bert` is a English model orginally trained by `machine2049`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_finetuned_duorc_bert_en_5.2.0_3.0_1699845004120.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_finetuned_duorc_bert_en_5.2.0_3.0_1699845004120.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_finetuned_duorc_bert","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_uncased_finetuned_duorc_bert","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.bert.base_uncased.by_machine2049").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_finetuned_duorc_bert| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/machine2049/bert-base-uncased-finetuned-duorc_bert \ No newline at end of file From e42b1c205e3c7eb06cb75e451b261f9cb3d50e81 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 10:15:50 +0700 Subject: [PATCH 232/255] Add model 2023-11-13-bert_qa_bert_base_squadv1_en --- ...2023-11-13-bert_qa_bert_base_squadv1_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_squadv1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_squadv1_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_squadv1_en.md new file mode 100644 index 00000000000000..01b0d9a689591e --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_squadv1_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from vuiseng9) +author: John Snow Labs +name: bert_qa_bert_base_squadv1 +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-squadv1` is a English model orginally trained by `vuiseng9`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_squadv1_en_5.2.0_3.0_1699845342258.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_squadv1_en_5.2.0_3.0_1699845342258.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_squadv1","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_squadv1","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.base.by_vuiseng9").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_squadv1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/vuiseng9/bert-base-squadv1 \ No newline at end of file From aedce28fd8b9bc4819507a67bd03cfb319918d9c Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 10:16:50 +0700 Subject: [PATCH 233/255] Add model 2023-11-13-bert_qa_bert_tiny_3_finetuned_squadv2_en --- ...ert_qa_bert_tiny_3_finetuned_squadv2_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_tiny_3_finetuned_squadv2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_tiny_3_finetuned_squadv2_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_tiny_3_finetuned_squadv2_en.md new file mode 100644 index 00000000000000..97cd02ae157294 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_tiny_3_finetuned_squadv2_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from mrm8488) +author: John Snow Labs +name: bert_qa_bert_tiny_3_finetuned_squadv2 +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-tiny-3-finetuned-squadv2` is a English model orginally trained by `mrm8488`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_tiny_3_finetuned_squadv2_en_5.2.0_3.0_1699845398939.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_tiny_3_finetuned_squadv2_en_5.2.0_3.0_1699845398939.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_tiny_3_finetuned_squadv2","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_tiny_3_finetuned_squadv2","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squadv2.bert.tiny_v3.by_mrm8488").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_tiny_3_finetuned_squadv2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|21.1 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/mrm8488/bert-tiny-3-finetuned-squadv2 \ No newline at end of file From 372a403811bf30934f71f492f62770c7025df1be Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 10:17:51 +0700 Subject: [PATCH 234/255] Add model 2023-11-13-bert_qa_bert_tiny_finetuned_squad_en --- ...13-bert_qa_bert_tiny_finetuned_squad_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_tiny_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_tiny_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_tiny_finetuned_squad_en.md new file mode 100644 index 00000000000000..30cc4e33314e37 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_tiny_finetuned_squad_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_bert_tiny_finetuned_squad +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-tiny-finetuned-squad` is a English model orginally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_tiny_finetuned_squad_en_5.2.0_3.0_1699845403647.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_tiny_finetuned_squad_en_5.2.0_3.0_1699845403647.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_tiny_finetuned_squad","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_tiny_finetuned_squad","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.tiny").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_tiny_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|16.7 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-tiny-finetuned-squad \ No newline at end of file From db5878949532d11757db1df868fce0d3f7717d22 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 10:28:56 +0700 Subject: [PATCH 235/255] Add model 2023-11-13-bert_qa_bert_multi_cased_squad_swedish_marbogusz_sv --- ..._multi_cased_squad_swedish_marbogusz_sv.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_multi_cased_squad_swedish_marbogusz_sv.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_multi_cased_squad_swedish_marbogusz_sv.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_multi_cased_squad_swedish_marbogusz_sv.md new file mode 100644 index 00000000000000..d42754f1578f8a --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_multi_cased_squad_swedish_marbogusz_sv.md @@ -0,0 +1,93 @@ +--- +layout: model +title: Swedish bert_qa_bert_multi_cased_squad_swedish_marbogusz BertForQuestionAnswering from marbogusz +author: John Snow Labs +name: bert_qa_bert_multi_cased_squad_swedish_marbogusz +date: 2023-11-13 +tags: [bert, sv, open_source, question_answering, onnx] +task: Question Answering +language: sv +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_multi_cased_squad_swedish_marbogusz` is a Swedish model originally trained by marbogusz. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_multi_cased_squad_swedish_marbogusz_sv_5.2.0_3.0_1699846129239.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_multi_cased_squad_swedish_marbogusz_sv_5.2.0_3.0_1699846129239.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_multi_cased_squad_swedish_marbogusz","sv") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_multi_cased_squad_swedish_marbogusz", "sv") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_multi_cased_squad_swedish_marbogusz| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|sv| +|Size:|465.2 MB| + +## References + +https://huggingface.co/marbogusz/bert-multi-cased-squad_sv \ No newline at end of file From 68cc01e0a480b6a4b111e293bd89e636468b3b53 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 10:30:23 +0700 Subject: [PATCH 236/255] Add model 2023-11-13-bert_qa_bert_base_uncased_fiqa_flm_albanian_flit_sq --- ..._base_uncased_fiqa_flm_albanian_flit_sq.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_fiqa_flm_albanian_flit_sq.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_fiqa_flm_albanian_flit_sq.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_fiqa_flm_albanian_flit_sq.md new file mode 100644 index 00000000000000..6bc4f4358508bc --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_fiqa_flm_albanian_flit_sq.md @@ -0,0 +1,93 @@ +--- +layout: model +title: Albanian bert_qa_bert_base_uncased_fiqa_flm_albanian_flit BertForQuestionAnswering from vanadhi +author: John Snow Labs +name: bert_qa_bert_base_uncased_fiqa_flm_albanian_flit +date: 2023-11-13 +tags: [bert, sq, open_source, question_answering, onnx] +task: Question Answering +language: sq +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_base_uncased_fiqa_flm_albanian_flit` is a Albanian model originally trained by vanadhi. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_fiqa_flm_albanian_flit_sq_5.2.0_3.0_1699846216180.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_fiqa_flm_albanian_flit_sq_5.2.0_3.0_1699846216180.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_fiqa_flm_albanian_flit","sq") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_base_uncased_fiqa_flm_albanian_flit", "sq") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_fiqa_flm_albanian_flit| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|sq| +|Size:|407.1 MB| + +## References + +https://huggingface.co/vanadhi/bert-base-uncased-fiqa-flm-sq-flit \ No newline at end of file From 043f4ad6b0c470062abd64290c58fdb357eb9ad7 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 10:33:19 +0700 Subject: [PATCH 237/255] Add model 2023-11-13-bert_qa_bert_uncased_l_2_h_512_a_8_squad2_en --- ...qa_bert_uncased_l_2_h_512_a_8_squad2_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_2_h_512_a_8_squad2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_2_h_512_a_8_squad2_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_2_h_512_a_8_squad2_en.md new file mode 100644 index 00000000000000..58d307a1c8da38 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_2_h_512_a_8_squad2_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_bert_uncased_l_2_h_512_a_8_squad2 BertForQuestionAnswering from aodiniz +author: John Snow Labs +name: bert_qa_bert_uncased_l_2_h_512_a_8_squad2 +date: 2023-11-13 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_uncased_l_2_h_512_a_8_squad2` is a English model originally trained by aodiniz. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_2_h_512_a_8_squad2_en_5.2.0_3.0_1699846397754.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_2_h_512_a_8_squad2_en_5.2.0_3.0_1699846397754.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_uncased_l_2_h_512_a_8_squad2","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_uncased_l_2_h_512_a_8_squad2", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_uncased_l_2_h_512_a_8_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|83.3 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/aodiniz/bert_uncased_L-2_H-512_A-8_squad2 \ No newline at end of file From e618845c9ee840d736f59594ea76fdef9c04c261 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 10:36:50 +0700 Subject: [PATCH 238/255] Add model 2023-11-13-bert_qa_bert_uncased_l_10_h_512_a_8_squad2_covid_qna_en --- ...ased_l_10_h_512_a_8_squad2_covid_qna_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_10_h_512_a_8_squad2_covid_qna_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_10_h_512_a_8_squad2_covid_qna_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_10_h_512_a_8_squad2_covid_qna_en.md new file mode 100644 index 00000000000000..bcd62052059432 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_10_h_512_a_8_squad2_covid_qna_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_bert_uncased_l_10_h_512_a_8_squad2_covid_qna BertForQuestionAnswering from aodiniz +author: John Snow Labs +name: bert_qa_bert_uncased_l_10_h_512_a_8_squad2_covid_qna +date: 2023-11-13 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_uncased_l_10_h_512_a_8_squad2_covid_qna` is a English model originally trained by aodiniz. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_10_h_512_a_8_squad2_covid_qna_en_5.2.0_3.0_1699846606190.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_10_h_512_a_8_squad2_covid_qna_en_5.2.0_3.0_1699846606190.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_uncased_l_10_h_512_a_8_squad2_covid_qna","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_uncased_l_10_h_512_a_8_squad2_covid_qna", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_uncased_l_10_h_512_a_8_squad2_covid_qna| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|177.8 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/aodiniz/bert_uncased_L-10_H-512_A-8_squad2_covid-qna \ No newline at end of file From e2c06f151cca7668b696234ea20780aa64db99de Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 10:37:51 +0700 Subject: [PATCH 239/255] Add model 2023-11-13-bert_qa_bert_base_uncased_finetuned_squad_frozen_v2_en --- ...se_uncased_finetuned_squad_frozen_v2_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_finetuned_squad_frozen_v2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_finetuned_squad_frozen_v2_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_finetuned_squad_frozen_v2_en.md new file mode 100644 index 00000000000000..117a7c814f72db --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_finetuned_squad_frozen_v2_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from ericRosello) +author: John Snow Labs +name: bert_qa_bert_base_uncased_finetuned_squad_frozen_v2 +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-base-uncased-finetuned-squad-frozen-v2` is a English model orginally trained by `ericRosello`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_finetuned_squad_frozen_v2_en_5.2.0_3.0_1699846639592.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_finetuned_squad_frozen_v2_en_5.2.0_3.0_1699846639592.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_finetuned_squad_frozen_v2","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_base_uncased_finetuned_squad_frozen_v2","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.base_uncased_v2.by_ericRosello").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_finetuned_squad_frozen_v2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/ericRosello/bert-base-uncased-finetuned-squad-frozen-v2 \ No newline at end of file From 6070d8b5f25b30807251e5aea78c1846d5b1f254 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 10:48:04 +0700 Subject: [PATCH 240/255] Add model 2023-11-13-bert_qa_bert_uncased_l_4_h_256_a_4_squad2_en --- ...qa_bert_uncased_l_4_h_256_a_4_squad2_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_256_a_4_squad2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_256_a_4_squad2_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_256_a_4_squad2_en.md new file mode 100644 index 00000000000000..9d0b6617ec4507 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_256_a_4_squad2_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_bert_uncased_l_4_h_256_a_4_squad2 BertForQuestionAnswering from aodiniz +author: John Snow Labs +name: bert_qa_bert_uncased_l_4_h_256_a_4_squad2 +date: 2023-11-13 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_uncased_l_4_h_256_a_4_squad2` is a English model originally trained by aodiniz. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_4_h_256_a_4_squad2_en_5.2.0_3.0_1699847283140.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_4_h_256_a_4_squad2_en_5.2.0_3.0_1699847283140.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_uncased_l_4_h_256_a_4_squad2","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_uncased_l_4_h_256_a_4_squad2", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_uncased_l_4_h_256_a_4_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|41.8 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/aodiniz/bert_uncased_L-4_H-256_A-4_squad2 \ No newline at end of file From e226beefea15df292a81703d35b97773d8143603 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 10:49:05 +0700 Subject: [PATCH 241/255] Add model 2023-11-13-bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_en --- ...d_l_4_h_256_a_4_cord19_200616_squad2_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_en.md new file mode 100644 index 00000000000000..556fc1100c5071 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2 BertForQuestionAnswering from aodiniz +author: John Snow Labs +name: bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2 +date: 2023-11-13 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2` is a English model originally trained by aodiniz. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_en_5.2.0_3.0_1699847284144.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_en_5.2.0_3.0_1699847284144.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|41.9 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/aodiniz/bert_uncased_L-4_H-256_A-4_cord19-200616_squad2 \ No newline at end of file From 596e10c19e3bd8d26d06eb9fe0d9db796cbcc571 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 10:50:06 +0700 Subject: [PATCH 242/255] Add model 2023-11-13-bert_qa_bert_base_uncased_squad_l6_en --- ...3-bert_qa_bert_base_uncased_squad_l6_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_squad_l6_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_squad_l6_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_squad_l6_en.md new file mode 100644 index 00000000000000..b47148892632ca --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_base_uncased_squad_l6_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_bert_base_uncased_squad_l6 BertForQuestionAnswering from howey +author: John Snow Labs +name: bert_qa_bert_base_uncased_squad_l6 +date: 2023-11-13 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_base_uncased_squad_l6` is a English model originally trained by howey. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_squad_l6_en_5.2.0_3.0_1699847398609.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_base_uncased_squad_l6_en_5.2.0_3.0_1699847398609.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_base_uncased_squad_l6","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_base_uncased_squad_l6", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_base_uncased_squad_l6| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|248.7 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/howey/bert-base-uncased-squad-L6 \ No newline at end of file From 33e93ee79d362374dacf7d8baa6c5ad3fd47e2fa Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 10:54:07 +0700 Subject: [PATCH 243/255] Add model 2023-11-13-bert_qa_bert_reader_squad2_en --- ...023-11-13-bert_qa_bert_reader_squad2_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_reader_squad2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_reader_squad2_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_reader_squad2_en.md new file mode 100644 index 00000000000000..54c342ecb40b98 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_reader_squad2_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from pinecone) +author: John Snow Labs +name: bert_qa_bert_reader_squad2 +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-reader-squad2` is a English model orginally trained by `pinecone`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_reader_squad2_en_5.2.0_3.0_1699847638974.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_reader_squad2_en_5.2.0_3.0_1699847638974.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_reader_squad2","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_reader_squad2","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squadv2.bert.by_pinecone").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_reader_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|407.2 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/pinecone/bert-reader-squad2 \ No newline at end of file From 0b764b255007571ee66501115c56fca68c8e9c74 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 10:58:53 +0700 Subject: [PATCH 244/255] Add model 2023-11-13-bert_qa_bert_persian_farsi_qa_v1_fa --- ...-13-bert_qa_bert_persian_farsi_qa_v1_fa.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_persian_farsi_qa_v1_fa.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_persian_farsi_qa_v1_fa.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_persian_farsi_qa_v1_fa.md new file mode 100644 index 00000000000000..5f08df62b627bb --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_persian_farsi_qa_v1_fa.md @@ -0,0 +1,93 @@ +--- +layout: model +title: Persian bert_qa_bert_persian_farsi_qa_v1 BertForQuestionAnswering from ForutanRad +author: John Snow Labs +name: bert_qa_bert_persian_farsi_qa_v1 +date: 2023-11-13 +tags: [bert, fa, open_source, question_answering, onnx] +task: Question Answering +language: fa +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_persian_farsi_qa_v1` is a Persian model originally trained by ForutanRad. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_persian_farsi_qa_v1_fa_5.2.0_3.0_1699847918388.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_persian_farsi_qa_v1_fa_5.2.0_3.0_1699847918388.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_persian_farsi_qa_v1","fa") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_persian_farsi_qa_v1", "fa") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_persian_farsi_qa_v1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|fa| +|Size:|606.5 MB| + +## References + +https://huggingface.co/ForutanRad/bert-fa-QA-v1 \ No newline at end of file From b6f07163eaf9b72bbf8354d94fdf0be02699588d Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 11:07:17 +0700 Subject: [PATCH 245/255] Add model 2023-11-13-bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_covid_qna_en --- ...6_a_4_cord19_200616_squad2_covid_qna_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_covid_qna_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_covid_qna_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_covid_qna_en.md new file mode 100644 index 00000000000000..0b7fb7c8dbe04f --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_covid_qna_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_covid_qna BertForQuestionAnswering from aodiniz +author: John Snow Labs +name: bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_covid_qna +date: 2023-11-13 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_covid_qna` is a English model originally trained by aodiniz. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_covid_qna_en_5.2.0_3.0_1699848434078.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_covid_qna_en_5.2.0_3.0_1699848434078.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_covid_qna","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_covid_qna", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_uncased_l_4_h_256_a_4_cord19_200616_squad2_covid_qna| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|41.9 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/aodiniz/bert_uncased_L-4_H-256_A-4_cord19-200616_squad2_covid-qna \ No newline at end of file From 6427032948ad3b703ef23a014918971168c012cf Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 11:08:17 +0700 Subject: [PATCH 246/255] Add model 2023-11-13-bert_qa_bert_uncased_l_4_h_512_a_8_squad2_covid_qna_en --- ...cased_l_4_h_512_a_8_squad2_covid_qna_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_512_a_8_squad2_covid_qna_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_512_a_8_squad2_covid_qna_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_512_a_8_squad2_covid_qna_en.md new file mode 100644 index 00000000000000..fb6c985970dbd1 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_512_a_8_squad2_covid_qna_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_bert_uncased_l_4_h_512_a_8_squad2_covid_qna BertForQuestionAnswering from aodiniz +author: John Snow Labs +name: bert_qa_bert_uncased_l_4_h_512_a_8_squad2_covid_qna +date: 2023-11-13 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_uncased_l_4_h_512_a_8_squad2_covid_qna` is a English model originally trained by aodiniz. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_4_h_512_a_8_squad2_covid_qna_en_5.2.0_3.0_1699848465367.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_4_h_512_a_8_squad2_covid_qna_en_5.2.0_3.0_1699848465367.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_uncased_l_4_h_512_a_8_squad2_covid_qna","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_uncased_l_4_h_512_a_8_squad2_covid_qna", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_uncased_l_4_h_512_a_8_squad2_covid_qna| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|107.0 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/aodiniz/bert_uncased_L-4_H-512_A-8_squad2_covid-qna \ No newline at end of file From bbb770bb3d8a8c32a177ea9e3b170ffe184007f7 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 11:10:50 +0700 Subject: [PATCH 247/255] Add model 2023-11-13-bert_qa_bert_small_wrslb_finetuned_squadv1_en --- ...a_bert_small_wrslb_finetuned_squadv1_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_wrslb_finetuned_squadv1_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_wrslb_finetuned_squadv1_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_wrslb_finetuned_squadv1_en.md new file mode 100644 index 00000000000000..baf78019034be5 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_small_wrslb_finetuned_squadv1_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from mrm8488) +author: John Snow Labs +name: bert_qa_bert_small_wrslb_finetuned_squadv1 +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-small-wrslb-finetuned-squadv1` is a English model orginally trained by `mrm8488`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_small_wrslb_finetuned_squadv1_en_5.2.0_3.0_1699848647000.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_small_wrslb_finetuned_squadv1_en_5.2.0_3.0_1699848647000.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_small_wrslb_finetuned_squadv1","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_small_wrslb_finetuned_squadv1","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.small").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_small_wrslb_finetuned_squadv1| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|106.9 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/mrm8488/bert-small-wrslb-finetuned-squadv1 \ No newline at end of file From 3b562634e494d8cbc4ed2451777fe21d9e11d9ce Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 11:28:57 +0700 Subject: [PATCH 248/255] Add model 2023-11-13-bert_qa_bert_uncased_l_4_h_768_a_12_cord19_200616_squad2_en --- ..._l_4_h_768_a_12_cord19_200616_squad2_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_768_a_12_cord19_200616_squad2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_768_a_12_cord19_200616_squad2_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_768_a_12_cord19_200616_squad2_en.md new file mode 100644 index 00000000000000..482fadcd1562b9 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_4_h_768_a_12_cord19_200616_squad2_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_bert_uncased_l_4_h_768_a_12_cord19_200616_squad2 BertForQuestionAnswering from aodiniz +author: John Snow Labs +name: bert_qa_bert_uncased_l_4_h_768_a_12_cord19_200616_squad2 +date: 2023-11-13 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_uncased_l_4_h_768_a_12_cord19_200616_squad2` is a English model originally trained by aodiniz. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_4_h_768_a_12_cord19_200616_squad2_en_5.2.0_3.0_1699849732825.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_4_h_768_a_12_cord19_200616_squad2_en_5.2.0_3.0_1699849732825.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_uncased_l_4_h_768_a_12_cord19_200616_squad2","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_uncased_l_4_h_768_a_12_cord19_200616_squad2", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_uncased_l_4_h_768_a_12_cord19_200616_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|194.4 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/aodiniz/bert_uncased_L-4_H-768_A-12_cord19-200616_squad2 \ No newline at end of file From a7e739410782f0a1c69f3375cb09678c96d59772 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 11:30:34 +0700 Subject: [PATCH 249/255] Add model 2023-11-13-bert_qa_bert_finetuned_squad_pytorch_en --- ...bert_qa_bert_finetuned_squad_pytorch_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_finetuned_squad_pytorch_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_finetuned_squad_pytorch_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_finetuned_squad_pytorch_en.md new file mode 100644 index 00000000000000..168bebf95b37f8 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_finetuned_squad_pytorch_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from stevemobs) +author: John Snow Labs +name: bert_qa_bert_finetuned_squad_pytorch +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-finetuned-squad-pytorch` is a English model orginally trained by `stevemobs`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_finetuned_squad_pytorch_en_5.2.0_3.0_1699849827618.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_finetuned_squad_pytorch_en_5.2.0_3.0_1699849827618.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_finetuned_squad_pytorch","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_finetuned_squad_pytorch","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.by_stevemobs").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_finetuned_squad_pytorch| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|403.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/stevemobs/bert-finetuned-squad-pytorch \ No newline at end of file From 39f3b5212a0542a547cfdefa59fd7b41b0223156 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 11:31:50 +0700 Subject: [PATCH 250/255] Add model 2023-11-13-bert_qa_bert_tiny_4_finetuned_squadv2_en --- ...ert_qa_bert_tiny_4_finetuned_squadv2_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_tiny_4_finetuned_squadv2_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_tiny_4_finetuned_squadv2_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_tiny_4_finetuned_squadv2_en.md new file mode 100644 index 00000000000000..459194cadd36a4 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_tiny_4_finetuned_squadv2_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from mrm8488) +author: John Snow Labs +name: bert_qa_bert_tiny_4_finetuned_squadv2 +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-tiny-4-finetuned-squadv2` is a English model orginally trained by `mrm8488`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_tiny_4_finetuned_squadv2_en_5.2.0_3.0_1699849909461.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_tiny_4_finetuned_squadv2_en_5.2.0_3.0_1699849909461.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_tiny_4_finetuned_squadv2","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_tiny_4_finetuned_squadv2","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squadv2.bert.tiny_v4.by_mrm8488").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_tiny_4_finetuned_squadv2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|22.6 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/mrm8488/bert-tiny-4-finetuned-squadv2 \ No newline at end of file From 5971dde9c572b6e98f014be215593fab98c7f603 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 11:33:43 +0700 Subject: [PATCH 251/255] Add model 2023-11-13-bert_qa_bespin_global_klue_bert_base_mrc_ko --- ..._qa_bespin_global_klue_bert_base_mrc_ko.md | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bespin_global_klue_bert_base_mrc_ko.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bespin_global_klue_bert_base_mrc_ko.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bespin_global_klue_bert_base_mrc_ko.md new file mode 100644 index 00000000000000..73920241547614 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bespin_global_klue_bert_base_mrc_ko.md @@ -0,0 +1,109 @@ +--- +layout: model +title: Korean BertForQuestionAnswering model (from bespin-global) +author: John Snow Labs +name: bert_qa_bespin_global_klue_bert_base_mrc +date: 2023-11-13 +tags: [ko, open_source, question_answering, bert, onnx] +task: Question Answering +language: ko +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `klue-bert-base-mrc` is a Korean model orginally trained by `bespin-global`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bespin_global_klue_bert_base_mrc_ko_5.2.0_3.0_1699850011426.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bespin_global_klue_bert_base_mrc_ko_5.2.0_3.0_1699850011426.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bespin_global_klue_bert_base_mrc","ko") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bespin_global_klue_bert_base_mrc","ko") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("ko.answer_question.klue.bert.base.by_bespin-global").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bespin_global_klue_bert_base_mrc| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|ko| +|Size:|412.4 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/bespin-global/klue-bert-base-mrc +- https://www.bespinglobal.com/ \ No newline at end of file From 7157fad154f641071641c8fe7ae36bc8d672ee9f Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 12:01:48 +0700 Subject: [PATCH 252/255] Add model 2023-11-13-bert_qa_bert_uncased_l_6_h_128_a_2_squad2_covid_qna_en --- ...cased_l_6_h_128_a_2_squad2_covid_qna_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_6_h_128_a_2_squad2_covid_qna_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_6_h_128_a_2_squad2_covid_qna_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_6_h_128_a_2_squad2_covid_qna_en.md new file mode 100644 index 00000000000000..c5d3573dc91651 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_6_h_128_a_2_squad2_covid_qna_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_bert_uncased_l_6_h_128_a_2_squad2_covid_qna BertForQuestionAnswering from aodiniz +author: John Snow Labs +name: bert_qa_bert_uncased_l_6_h_128_a_2_squad2_covid_qna +date: 2023-11-13 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_uncased_l_6_h_128_a_2_squad2_covid_qna` is a English model originally trained by aodiniz. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_6_h_128_a_2_squad2_covid_qna_en_5.2.0_3.0_1699851705959.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_6_h_128_a_2_squad2_covid_qna_en_5.2.0_3.0_1699851705959.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_uncased_l_6_h_128_a_2_squad2_covid_qna","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_uncased_l_6_h_128_a_2_squad2_covid_qna", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_uncased_l_6_h_128_a_2_squad2_covid_qna| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|19.6 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/aodiniz/bert_uncased_L-6_H-128_A-2_squad2_covid-qna \ No newline at end of file From b6a811350cffd76c264698d956619fefdd946d2b Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 12:05:26 +0700 Subject: [PATCH 253/255] Add model 2023-11-13-bert_qa_beto_espanhol_squad2_es --- ...3-11-13-bert_qa_beto_espanhol_squad2_es.md | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_beto_espanhol_squad2_es.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_beto_espanhol_squad2_es.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_beto_espanhol_squad2_es.md new file mode 100644 index 00000000000000..3f9ff460463f33 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_beto_espanhol_squad2_es.md @@ -0,0 +1,104 @@ +--- +layout: model +title: Spanish BertForQuestionAnswering Cased model (from Josue) +author: John Snow Labs +name: bert_qa_beto_espanhol_squad2 +date: 2023-11-13 +tags: [es, open_source, bert, question_answering, onnx] +task: Question Answering +language: es +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `BETO-espanhol-Squad2` is a Spanish model originally trained by `Josue`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_beto_espanhol_squad2_es_5.2.0_3.0_1699851919323.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_beto_espanhol_squad2_es_5.2.0_3.0_1699851919323.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +Document_Assembler = MultiDocumentAssembler()\ + .setInputCols(["question", "context"])\ + .setOutputCols(["document_question", "document_context"]) + +Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_beto_espanhol_squad2","es")\ + .setInputCols(["document_question", "document_context"])\ + .setOutputCol("answer")\ + .setCaseSensitive(True) + +pipeline = Pipeline(stages=[Document_Assembler, Question_Answering]) + +data = spark.createDataFrame([["What's my name?","My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(data).transform(data) +``` +```scala +val Document_Assembler = new MultiDocumentAssembler() + .setInputCols(Array("question", "context")) + .setOutputCols(Array("document_question", "document_context")) + +val Question_Answering = BertForQuestionAnswering.pretrained("bert_qa_beto_espanhol_squad2","es") + .setInputCols(Array("document_question", "document_context")) + .setOutputCol("answer") + .setCaseSensitive(true) + +val pipeline = new Pipeline().setStages(Array(Document_Assembler, Question_Answering)) + +val data = Seq("What's my name?","My name is Clara and I live in Berkeley.").toDS.toDF("question", "context") + +val result = pipeline.fit(data).transform(data) +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_beto_espanhol_squad2| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[document_question, document_context]| +|Output Labels:|[answer]| +|Language:|es| +|Size:|409.5 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/Josue/BETO-espanhol-Squad2 +- https://github.com/dccuchile/beto +- https://github.com/ccasimiro88/TranslateAlignRetrieve +- https://github.com/dccuchile/beto/blob/master/README.md +- https://github.com/google-research/bert +- https://github.com/josecannete/spanish-corpora +- https://github.com/google-research/bert/blob/master/multilingual.md +- https://github.com/ccasimiro88/TranslateAlignRetrieve +- https://media.giphy.com/media/mCIaBpfN0LQcuzkA2F/giphy.gif +- https://media.giphy.com/media/WT453aptcbCP7hxWTZ/giphy.gif +- https://twitter.com/Josuehu_ \ No newline at end of file From 0a08d1ddefd5a1cd77039f9cedf2ffc6b17f3ba6 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 12:33:32 +0700 Subject: [PATCH 254/255] Add model 2023-11-13-bert_qa_bert_uncased_l_2_h_512_a_8_squad2_covid_qna_en --- ...cased_l_2_h_512_a_8_squad2_covid_qna_en.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_2_h_512_a_8_squad2_covid_qna_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_2_h_512_a_8_squad2_covid_qna_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_2_h_512_a_8_squad2_covid_qna_en.md new file mode 100644 index 00000000000000..97faf59b406f37 --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_uncased_l_2_h_512_a_8_squad2_covid_qna_en.md @@ -0,0 +1,95 @@ +--- +layout: model +title: English bert_qa_bert_uncased_l_2_h_512_a_8_squad2_covid_qna BertForQuestionAnswering from aodiniz +author: John Snow Labs +name: bert_qa_bert_uncased_l_2_h_512_a_8_squad2_covid_qna +date: 2023-11-13 +tags: [bert, en, open_source, question_answering, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained BertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`bert_qa_bert_uncased_l_2_h_512_a_8_squad2_covid_qna` is a English model originally trained by aodiniz. + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_2_h_512_a_8_squad2_covid_qna_en_5.2.0_3.0_1699853610007.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_uncased_l_2_h_512_a_8_squad2_covid_qna_en_5.2.0_3.0_1699853610007.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python + + +document_assembler = MultiDocumentAssembler() \ + .setInputCol(["question", "context"]) \ + .setOutputCol(["document_question", "document_context"]) + + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_uncased_l_2_h_512_a_8_squad2_covid_qna","en") \ + .setInputCols(["document_question","document_context"]) \ + .setOutputCol("answer") + +pipeline = Pipeline().setStages([document_assembler, spanClassifier]) + +pipelineModel = pipeline.fit(data) + +pipelineDF = pipelineModel.transform(data) + +``` +```scala + + +val document_assembler = new MultiDocumentAssembler() + .setInputCol(Array("question", "context")) + .setOutputCol(Array("document_question", "document_context")) + +val spanClassifier = BertForQuestionAnswering + .pretrained("bert_qa_bert_uncased_l_2_h_512_a_8_squad2_covid_qna", "en") + .setInputCols(Array("document_question","document_context")) + .setOutputCol("answer") + +val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier)) + +val pipelineModel = pipeline.fit(data) + +val pipelineDF = pipelineModel.transform(data) + + +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_uncased_l_2_h_512_a_8_squad2_covid_qna| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|83.3 MB| +|Case sensitive:|false| +|Max sentence length:|512| + +## References + +https://huggingface.co/aodiniz/bert_uncased_L-2_H-512_A-8_squad2_covid-qna \ No newline at end of file From c080a282583052cb28fddf9fc84474fe160133a1 Mon Sep 17 00:00:00 2001 From: ahmedlone127 Date: Mon, 13 Nov 2023 12:34:32 +0700 Subject: [PATCH 255/255] Add model 2023-11-13-bert_qa_bert_medium_pretrained_finetuned_squad_en --- ...rt_medium_pretrained_finetuned_squad_en.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_medium_pretrained_finetuned_squad_en.md diff --git a/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_medium_pretrained_finetuned_squad_en.md b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_medium_pretrained_finetuned_squad_en.md new file mode 100644 index 00000000000000..1b393e013bf32a --- /dev/null +++ b/docs/_posts/ahmedlone127/2023-11-13-bert_qa_bert_medium_pretrained_finetuned_squad_en.md @@ -0,0 +1,108 @@ +--- +layout: model +title: English BertForQuestionAnswering model (from anas-awadalla) +author: John Snow Labs +name: bert_qa_bert_medium_pretrained_finetuned_squad +date: 2023-11-13 +tags: [en, open_source, question_answering, bert, onnx] +task: Question Answering +language: en +edition: Spark NLP 5.2.0 +spark_version: 3.0 +supported: true +engine: onnx +annotator: BertForQuestionAnswering +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `bert-medium-pretrained-finetuned-squad` is a English model orginally trained by `anas-awadalla`. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/bert_qa_bert_medium_pretrained_finetuned_squad_en_5.2.0_3.0_1699853638961.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/bert_qa_bert_medium_pretrained_finetuned_squad_en_5.2.0_3.0_1699853638961.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +document_assembler = MultiDocumentAssembler() \ +.setInputCols(["question", "context"]) \ +.setOutputCols(["document_question", "document_context"]) + +spanClassifier = BertForQuestionAnswering.pretrained("bert_qa_bert_medium_pretrained_finetuned_squad","en") \ +.setInputCols(["document_question", "document_context"]) \ +.setOutputCol("answer") \ +.setCaseSensitive(True) + +pipeline = Pipeline().setStages([ +document_assembler, +spanClassifier +]) + +example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context") + +result = pipeline.fit(example).transform(example) +``` +```scala +val document = new MultiDocumentAssembler() +.setInputCols("question", "context") +.setOutputCols("document_question", "document_context") + +val spanClassifier = BertForQuestionAnswering +.pretrained("bert_qa_bert_medium_pretrained_finetuned_squad","en") +.setInputCols(Array("document_question", "document_context")) +.setOutputCol("answer") +.setCaseSensitive(true) +.setMaxSentenceLength(512) + +val pipeline = new Pipeline().setStages(Array(document, spanClassifier)) + +val example = Seq( +("Where was John Lenon born?", "John Lenon was born in London and lived in Paris. My name is Sarah and I live in London."), +("What's my name?", "My name is Clara and I live in Berkeley.")) +.toDF("question", "context") + +val result = pipeline.fit(example).transform(example) +``` + +{:.nlu-block} +```python +import nlu +nlu.load("en.answer_question.squad.bert.medium_finetuned.by_anas-awadalla").predict("""What's my name?|||"My name is Clara and I live in Berkeley.""") +``` +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|bert_qa_bert_medium_pretrained_finetuned_squad| +|Compatibility:|Spark NLP 5.2.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|154.2 MB| +|Case sensitive:|true| +|Max sentence length:|512| + +## References + +References + +- https://huggingface.co/anas-awadalla/bert-medium-pretrained-finetuned-squad \ No newline at end of file