Creates a trained model vocabulary. This is supported only for natural language processing (NLP) models.
This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
Requires the manage_ml cluster privilege. This privilege is included in the
machine_learning_admin built-in role.
The vocabulary is stored in the index as described in
inference_config.*.vocabulary of the trained model definition.
The following example shows how to create a model vocabulary for a previously stored trained model configuration.
PUT _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/vocabulary
{
"vocabulary": [
"[PAD]",
"[unused0]",
...
]
}
The API returns the following results:
{
"acknowledged": true
}