|
@@ -384,11 +384,11 @@ the model definition is not supplied.
|
|
|
`inference_config`::
|
|
|
(Required, object)
|
|
|
The default configuration for inference. This can be: `regression`,
|
|
|
-`classification`, `fill_mask`, `ner`, `question_answering`,
|
|
|
+`classification`, `fill_mask`, `ner`, `question_answering`,
|
|
|
`text_classification`, `text_embedding` or `zero_shot_classification`.
|
|
|
If `regression` or `classification`, it must match the `target_type` of the
|
|
|
-underlying `definition.trained_model`. If `fill_mask`, `ner`,
|
|
|
-`question_answering`, `text_classification`, or `text_embedding`; the
|
|
|
+underlying `definition.trained_model`. If `fill_mask`, `ner`,
|
|
|
+`question_answering`, `text_classification`, or `text_embedding`; the
|
|
|
`model_type` must be `pytorch`.
|
|
|
+
|
|
|
.Properties of `inference_config`
|
|
@@ -525,9 +525,9 @@ include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-ner]
|
|
|
=====
|
|
|
`classification_labels`::::
|
|
|
(Optional, string)
|
|
|
-An array of classification labels. NER only supports Inside-Outside-Beginning
|
|
|
+An array of classification labels. NER only supports Inside-Outside-Beginning
|
|
|
labels (IOB) and only persons, organizations, locations, and miscellaneous.
|
|
|
-Example: ["O", "B-PER", "I-PER", "B-ORG", "I-ORG", "B-LOC", "I-LOC", "B-MISC",
|
|
|
+Example: ["O", "B-PER", "I-PER", "B-ORG", "I-ORG", "B-LOC", "I-LOC", "B-MISC",
|
|
|
"I-MISC"]
|
|
|
|
|
|
`results_field`::::
|
|
@@ -722,7 +722,7 @@ include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-results-field]
|
|
|
(Optional, object)
|
|
|
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization]
|
|
|
+
|
|
|
-Recommended to set `max_sentence_length` to `386` with `128` of `span` and set
|
|
|
+Recommended to set `max_sentence_length` to `386` with `128` of `span` and set
|
|
|
`truncate` to `none`.
|
|
|
+
|
|
|
.Properties of tokenization
|
|
@@ -1015,6 +1015,107 @@ include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenizati
|
|
|
(Optional, string)
|
|
|
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-truncate]
|
|
|
|
|
|
+`with_special_tokens`::::
|
|
|
+(Optional, boolean)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-mpnet-with-special-tokens]
|
|
|
+=======
|
|
|
+======
|
|
|
+=====
|
|
|
+`text_similarity`::::
|
|
|
+(Object, optional)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-text-similarity]
|
|
|
++
|
|
|
+.Properties of text_similarity inference
|
|
|
+[%collapsible%open]
|
|
|
+=====
|
|
|
+`span_score_combination_function`::::
|
|
|
+(Optional, string)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-text-similarity-span-score-func]
|
|
|
+
|
|
|
+`tokenization`::::
|
|
|
+(Optional, object)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization]
|
|
|
++
|
|
|
+.Properties of tokenization
|
|
|
+[%collapsible%open]
|
|
|
+======
|
|
|
+`bert`::::
|
|
|
+(Optional, object)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-bert]
|
|
|
++
|
|
|
+.Properties of bert
|
|
|
+[%collapsible%open]
|
|
|
+=======
|
|
|
+`do_lower_case`::::
|
|
|
+(Optional, boolean)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-do-lower-case]
|
|
|
+
|
|
|
+`max_sequence_length`::::
|
|
|
+(Optional, integer)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-max-sequence-length]
|
|
|
+
|
|
|
+`span`::::
|
|
|
+(Optional, integer)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-span]
|
|
|
+
|
|
|
+`truncate`::::
|
|
|
+(Optional, string)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-truncate]
|
|
|
+
|
|
|
+`with_special_tokens`::::
|
|
|
+(Optional, boolean)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-bert-with-special-tokens]
|
|
|
+=======
|
|
|
+`roberta`::::
|
|
|
+(Optional, object)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-roberta]
|
|
|
++
|
|
|
+.Properties of roberta
|
|
|
+[%collapsible%open]
|
|
|
+=======
|
|
|
+`add_prefix_space`::::
|
|
|
+(Optional, boolean)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-roberta-add-prefix-space]
|
|
|
+
|
|
|
+`max_sequence_length`::::
|
|
|
+(Optional, integer)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-max-sequence-length]
|
|
|
+
|
|
|
+`span`::::
|
|
|
+(Optional, integer)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-span]
|
|
|
+
|
|
|
+`truncate`::::
|
|
|
+(Optional, string)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-truncate]
|
|
|
+
|
|
|
+`with_special_tokens`::::
|
|
|
+(Optional, boolean)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-roberta-with-special-tokens]
|
|
|
+=======
|
|
|
+`mpnet`::::
|
|
|
+(Optional, object)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-mpnet]
|
|
|
++
|
|
|
+.Properties of mpnet
|
|
|
+[%collapsible%open]
|
|
|
+=======
|
|
|
+`do_lower_case`::::
|
|
|
+(Optional, boolean)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-do-lower-case]
|
|
|
+
|
|
|
+`max_sequence_length`::::
|
|
|
+(Optional, integer)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-max-sequence-length]
|
|
|
+
|
|
|
+`span`::::
|
|
|
+(Optional, integer)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-span]
|
|
|
+
|
|
|
+`truncate`::::
|
|
|
+(Optional, string)
|
|
|
+include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-truncate]
|
|
|
+
|
|
|
`with_special_tokens`::::
|
|
|
(Optional, boolean)
|
|
|
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-nlp-tokenization-mpnet-with-special-tokens]
|