[DOCS] Fixes adaptive_allocations examples (#113248)

Co-authored-by: Jan Kuipers <148754765+jan-elastic@users.noreply.github.com>
This commit is contained in:
István Zoltán Szabó 2024-09-20 11:31:04 +02:00 committed by GitHub
parent 1b2b202ef7
commit 9b7d808bf4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 2 deletions

View file

@ -179,6 +179,7 @@ PUT _inference/text_embedding/my-e5-model
"min_number_of_allocations": 3, "min_number_of_allocations": 3,
"max_number_of_allocations": 10 "max_number_of_allocations": 10
}, },
"num_threads": 1,
"model_id": ".multilingual-e5-small" "model_id": ".multilingual-e5-small"
} }
} }

View file

@ -147,7 +147,8 @@ PUT _inference/sparse_embedding/my-elser-model
"enabled": true, "enabled": true,
"min_number_of_allocations": 3, "min_number_of_allocations": 3,
"max_number_of_allocations": 10 "max_number_of_allocations": 10
} },
"num_threads": 1
} }
} }
------------------------------------------------------------ ------------------------------------------------------------

View file

@ -36,7 +36,11 @@ PUT _inference/sparse_embedding/my-elser-endpoint <1>
{ {
"service": "elser", <2> "service": "elser", <2>
"service_settings": { "service_settings": {
"num_allocations": 1, "adaptive_allocations": { <3>
"enabled": true,
"min_number_of_allocations": 3,
"max_number_of_allocations": 10
},
"num_threads": 1 "num_threads": 1
} }
} }
@ -46,6 +50,8 @@ PUT _inference/sparse_embedding/my-elser-endpoint <1>
be used and ELSER creates sparse vectors. The `inference_id` is be used and ELSER creates sparse vectors. The `inference_id` is
`my-elser-endpoint`. `my-elser-endpoint`.
<2> The `elser` service is used in this example. <2> The `elser` service is used in this example.
<3> This setting enables and configures {ml-docs}/ml-nlp-elser.html#elser-adaptive-allocations[adaptive allocations].
Adaptive allocations make it possible for ELSER to automatically scale up or down resources based on the current load on the process.
[NOTE] [NOTE]
==== ====