CINXE.COM
E5 – EmbEddings from bidirEctional Encoder rEpresentations | Machine Learning in the Elastic Stack [8.16] | Elastic
<!DOCTYPE html> <html lang="en-us"> <head> <meta charset="UTF-8"> <meta name="keywords" content="ML, Elastic Stack, natural language processing, inference"> <title>E5 – EmbEddings from bidirEctional Encoder rEpresentations | Machine Learning in the Elastic Stack [8.16] | Elastic</title> <meta class="elastic" name="content" content="E5 – EmbEddings from bidirEctional Encoder rEpresentations | Machine Learning in the Elastic Stack [8.16]"> <link rel="home" href="index.html" title="Machine Learning in the Elastic Stack [8.16]"/> <link rel="up" href="ml-nlp-built-in-models.html" title="Built-in NLP models"/> <link rel="prev" href="ml-nlp-elser.html" title="ELSER – Elastic Learned Sparse EncodeR"/> <link rel="next" href="ml-nlp-lang-ident.html" title="Language identification"/> <meta class="elastic" name="product_version" content="8.16"/> <meta class="elastic" name="product_name" content="Machine Learning"/> <meta class="elastic" name="website_area" content="documentation"/> <meta name="DC.type" content="Learn/Docs/Elastic Stack/Machine Learning/8.16"/> <meta name="DC.subject" content="Machine Learning"/> <meta name="DC.identifier" content="8.16"/> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <script src="https://cdn.optimizely.com/js/18132920325.js"></script> <link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png"> <link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png"> <link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png"> <link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png"> <link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png"> <link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png"> <link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png"> <link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png"> <link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png"> <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"> <link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192"> <link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96"> <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"> <link rel="manifest" href="/manifest.json"> <meta name="apple-mobile-web-app-title" content="Elastic"> <meta name="application-name" content="Elastic"> <meta name="msapplication-TileColor" content="#ffffff"> <meta name="msapplication-TileImage" content="/mstile-144x144.png"> <meta name="theme-color" content="#ffffff"> <meta name="naver-site-verification" content="936882c1853b701b3cef3721758d80535413dbfd" /> <meta name="yandex-verification" content="d8a47e95d0972434" /> <meta name="localized" content="true" /> <meta name="st:robots" content="follow,index" /> <meta property="og:image" content="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt280217a63b82a734/6202d3378b1f312528798412/elastic-logo.svg" /> <meta property="og:image:width" content="500" /> <meta property="og:image:height" content="172" /> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"> <link rel="icon" href="/favicon.ico" type="image/x-icon"> <link rel="apple-touch-icon-precomposed" sizes="64x64" href="/favicon_64x64_16bit.png"> <link rel="apple-touch-icon-precomposed" sizes="32x32" href="/favicon_32x32.png"> <link rel="apple-touch-icon-precomposed" sizes="16x16" href="/favicon_16x16.png"> <!-- Give IE8 a fighting chance --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> <link rel="stylesheet" type="text/css" href="/guide/static/styles-v1.css" /> </head> <!--© 2015-2025 Elasticsearch B.V. --> <!-- All Elastic documentation is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. --> <!-- http://creativecommons.org/licenses/by-nc-nd/4.0/ --> <body> <!-- Google Tag Manager --> <script>dataLayer = [];</script><noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-58RLH5" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-58RLH5');</script> <!-- End Google Tag Manager --> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-12395217-16"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-12395217-16'); </script> <!-- Google Tag Manager for GA4 --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-KNJMG2M');</script> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KNJMG2M" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager for GA4--> <div id='elastic-nav' style="display:none;"></div> <script src='https://www.elastic.co/elastic-nav.js'></script> <div class="main-container"> <section id="content" > <div class="content-wrapper"> <section id="guide" lang="en"> <div class="container-fluid"> <div class="row pb-3"> <div class="col-12 order-2 col-md-4 order-md-1 col-lg-3 h-almost-full-md sticky-top-md" id="left_col"> <!-- The TOC is appended here --> </div> <div class="col-12 order-1 col-md-8 order-md-2 col-lg-7 order-lg-2 guide-section" id="middle_col"> <!-- start body --> <div class="navheader"> <span class="prev"> <a href="ml-nlp-elser.html">« ELSER – Elastic Learned Sparse EncodeR</a> </span> <span class="next"> <a href="ml-nlp-lang-ident.html">Language identification »</a> </span> </div> <div class="book" lang="en"> <div class="titlepage"> <div class="breadcrumbs"> <span class="breadcrumb-link"><a href="/guide/">Elastic Docs</a></span> <span class="chevron-right">›</span><span class="breadcrumb-link"><a href="index.html">Machine Learning in the Elastic Stack [8.16]</a></span> <span class="chevron-right">›</span><span class="breadcrumb-link"><a href="ml-nlp.html">Natural language processing</a></span> <span class="chevron-right">›</span><span class="breadcrumb-link"><a href="ml-nlp-built-in-models.html">Built-in NLP models</a></span> </div> <div> <div><h1 class="title"><a id="id-1"></a>E5 – EmbEddings from bidirEctional Encoder rEpresentations</h1><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/stack-docs/edit/8.16/docs/en/stack/ml/nlp/ml-nlp-e5.asciidoc">edit</a></div> </div> <!--EXTRA--> </div> <div id="content"> <div class="section"> <div class="titlepage"><div><div> <div class="position-relative"><h2 class="title"><a id="ml-nlp-e5"></a>E5 – EmbEddings from bidirEctional Encoder rEpresentations</h2><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/stack-docs/edit/8.16/docs/en/stack/ml/nlp/ml-nlp-e5.asciidoc">edit</a></div> </div></div></div> <p>EmbEddings from bidirEctional Encoder rEpresentations - or E5 - is a natural language processing model that enables you to perform multi-lingual semantic search by using dense vector representations. This model is recommended for non-English language documents and queries. If you want to perform semantic search on English language documents, use the <a class="xref" href="ml-nlp-elser.html" title="ELSER – Elastic Learned Sparse EncodeR">ELSER</a> model.</p> <p><a href="/guide/en/elasticsearch/reference/8.16/semantic-search.html" class="ulink" target="_top">Semantic search</a> provides you search results based on contextual meaning and user intent, rather than exact keyword matches.</p> <p>E5 has two versions: one cross-platform version which runs on any hardware and one version which is optimized for Intel® silicon. The <span class="strong strong"><strong>Model Management</strong></span> > <span class="strong strong"><strong>Trained Models</strong></span> page shows you which version of E5 is recommended to deploy based on your cluster’s hardware. However, the recommended way to use E5 is through the <a href="/guide/en/elasticsearch/reference/8.16/infer-service-elasticsearch.html" class="ulink" target="_top">inference API</a> as a service which makes it easier to download and deploy the model and you don’t need to select from different versions.</p> <p>Refer to the model cards of the <a href="https://huggingface.co/elastic/multilingual-e5-small" class="ulink" target="_top">multilingual-e5-small</a> and the <a href="https://huggingface.co/elastic/multilingual-e5-small-optimized" class="ulink" target="_top">multilingual-e5-small-optimized</a> models on HuggingFace for further information including licensing.</p> <div class="position-relative"><h4><a id="e5-req"></a>Requirements</h4><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/stack-docs/edit/8.16/docs/en/stack/ml/nlp/ml-nlp-e5.asciidoc">edit</a></div> <p>To use E5, you must have the <a href="/subscriptions" class="ulink" target="_top">appropriate subscription</a> level for semantic search or the trial period activated.</p> <p>Enabling trained model autoscaling for your E5 deployment is recommended. Refer to <a class="xref" href="ml-nlp-auto-scale.html" title="Trained model autoscaling"><em>Trained model autoscaling</em></a> to learn more.</p> <div class="position-relative"><h4><a id="download-deploy-e5"></a>Download and deploy E5</h4><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/stack-docs/edit/8.16/docs/en/stack/ml/nlp/ml-nlp-e5.asciidoc">edit</a></div> <p>The easiest and recommended way to download and deploy E5 is to use the <a href="/guide/en/elasticsearch/reference/8.16/inference-apis.html" class="ulink" target="_top">inference API</a>.</p> <div class="olist orderedlist"> <ol class="orderedlist"> <li class="listitem"> In Kibana, navigate to the <span class="strong strong"><strong>Dev Console</strong></span>. </li> <li class="listitem"> <p>Create an inference endpoint with the <code class="literal">elasticsearch</code> service by running the following API request:</p> <div class="pre_wrapper lang-console"> <div class="console_code_copy" title="Copy to clipboard"></div> <pre class="programlisting prettyprint lang-console">PUT _inference/text_embedding/my-e5-model { "service": "elasticsearch", "service_settings": { "num_allocations": 1, "num_threads": 1, "model_id": ".multilingual-e5-small" } }</pre> </div> <div class="console_widget" data-snippet="snippets/69.console"></div> <p>The API request automatically initiates the model download and then deploy the model.</p> </li> </ol> </div> <p>Refer to the <a href="/guide/en/elasticsearch/reference/8.16/infer-service-elasticsearch.html" class="ulink" target="_top"><code class="literal">elasticsearch</code> inference service documentation</a> to learn more about the available settings.</p> <p>After you created the E5 inference endpoint, it’s ready to be used for semantic search. The easiest way to perform semantic search in the Elastic Stack is to <a href="/guide/en/elasticsearch/reference/8.16/semantic-search-semantic-text.html" class="ulink" target="_top">follow the <code class="literal">semantic_text</code> workflow</a>.</p> <div class="position-relative"><h5><a id="alternative-download-deploy-e5"></a>Alternative methods to download and deploy E5</h5><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/stack-docs/edit/8.16/docs/en/stack/ml/nlp/ml-nlp-e5.asciidoc">edit</a></div> <p>You can also download and deploy the E5 model either from <span class="strong strong"><strong>Machine Learning</strong></span> > <span class="strong strong"><strong>Trained Models</strong></span>, from <span class="strong strong"><strong>Search</strong></span> > <span class="strong strong"><strong>Indices</strong></span>, or by using the trained models API in Dev Console.</p> <div class="note admon"> <div class="icon"></div> <div class="admon_content"> <p>For most cases, the preferred version is the <span class="strong strong"><strong>Intel and Linux optimized</strong></span> model, it is recommended to download and deploy that version.</p> </div> </div> <details> <summary class="title">Using the Trained Models page</summary> <div class="content"> <div class="position-relative"><h6><a id="trained-model-e5"></a>Using the Trained Models page</h6><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/stack-docs/edit/8.16/docs/en/stack/ml/nlp/ml-nlp-e5.asciidoc">edit</a></div> <div class="olist orderedlist"> <ol class="orderedlist"> <li class="listitem"> In Kibana, navigate to <span class="strong strong"><strong>Machine Learning</strong></span> > <span class="strong strong"><strong>Trained Models</strong></span> from the main menu, or use the <a href="/guide/en/kibana/8.16/kibana-concepts-analysts.html#_finding_your_apps_and_objects" class="ulink" target="_top">global search field</a>. E5 can be found in the list of trained models. There are two versions available: one portable version which runs on any hardware and one version which is optimized for Intel® silicon. You can see which model is recommended to use based on your hardware configuration. </li> <li class="listitem"> <p>Click the <span class="strong strong"><strong>Add trained model</strong></span> button. Select the E5 model version you want to use in the opening modal window. The model that is recommended for you based on your hardware configuration is highlighted. Click <span class="strong strong"><strong>Download</strong></span>. You can check the download status on the <span class="strong strong"><strong>Notifications</strong></span> page.</p> <div class="imageblock text-center screenshot"> <div class="content"> <img src="images/ml-nlp-e5-download.png" alt="Downloading E5"> </div> </div> <p>Alternatively, click the <span class="strong strong"><strong>Download model</strong></span> button under <span class="strong strong"><strong>Actions</strong></span> in the trained model list.</p> </li> <li class="listitem"> After the download is finished, start the deployment by clicking the <span class="strong strong"><strong>Start deployment</strong></span> button. </li> <li class="listitem"> <p>Provide a deployment ID, select the priority, and set the number of allocations and threads per allocation values.</p> <div class="imageblock text-center screenshot"> <div class="content"> <img src="images/ml-nlp-deployment-id-e5.png" alt="Deploying E5"> </div> </div> </li> <li class="listitem"> Click Start. </li> </ol> </div> </div> </details> <details> <summary class="title">Using the search indices UI</summary> <div class="content"> <div class="position-relative"><h6><a id="elasticsearch-e5"></a>Using the search indices UI</h6><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/stack-docs/edit/8.16/docs/en/stack/ml/nlp/ml-nlp-e5.asciidoc">edit</a></div> <p>Alternatively, you can download and deploy the E5 model to an inference pipeline using the search indices UI.</p> <div class="olist orderedlist"> <ol class="orderedlist"> <li class="listitem"> In Kibana, navigate to <span class="strong strong"><strong>Search</strong></span> > <span class="strong strong"><strong>Indices</strong></span>. </li> <li class="listitem"> Select the index from the list that has an inference pipeline in which you want to use E5. </li> <li class="listitem"> Navigate to the <span class="strong strong"><strong>Pipelines</strong></span> tab. </li> <li class="listitem"> <p>Under <span class="strong strong"><strong>Machine Learning Inference Pipelines</strong></span>, click the <span class="strong strong"><strong>Deploy</strong></span> button in the <span class="strong strong"><strong>Improve your results with E5</strong></span> section to begin downloading the E5 model. This may take a few minutes depending on your network.</p> <div class="imageblock text-center screenshot"> <div class="content"> <img src="images/ml-nlp-deploy-e5-es.png" alt="Deploying E5 in Elasticsearch"> </div> </div> </li> <li class="listitem"> <p>Once the model is downloaded, click the <span class="strong strong"><strong>Start single-threaded</strong></span> button to start the model with basic configuration or select the <span class="strong strong"><strong>Fine-tune performance</strong></span> option to navigate to the <span class="strong strong"><strong>Trained Models</strong></span> page where you can configure the model deployment.</p> <div class="imageblock text-center screenshot"> <div class="content"> <img src="images/ml-nlp-start-e5-es.png" alt="Start E5 in Elasticsearch"> </div> </div> </li> </ol> </div> <p>When your E5 model is deployed and started, it is ready to be used in a pipeline.</p> </div> </details> <details> <summary class="title">Using the trained models API in Dev Console</summary> <div class="content"> <div class="position-relative"><h6><a id="dev-console-e5"></a>Using the trained models API in Dev Console</h6><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/stack-docs/edit/8.16/docs/en/stack/ml/nlp/ml-nlp-e5.asciidoc">edit</a></div> <div class="olist orderedlist"> <ol class="orderedlist"> <li class="listitem"> In Kibana, navigate to the <span class="strong strong"><strong>Dev Console</strong></span>. </li> <li class="listitem"> <p>Create the E5 model configuration by running the following API call:</p> <div class="pre_wrapper lang-console"> <div class="console_code_copy" title="Copy to clipboard"></div> <pre class="programlisting prettyprint lang-console">PUT _ml/trained_models/.multilingual-e5-small { "input": { "field_names": ["text_field"] } }</pre> </div> <div class="console_widget" data-snippet="snippets/70.console"></div> <p>The API call automatically initiates the model download if the model is not downloaded yet.</p> </li> <li class="listitem"> <p>Deploy the model by using the <a href="/guide/en/elasticsearch/reference/8.16/start-trained-model-deployment.html" class="ulink" target="_top">start trained model deployment API</a> with a delpoyment ID:</p> <div class="pre_wrapper lang-console"> <div class="console_code_copy" title="Copy to clipboard"></div> <pre class="programlisting prettyprint lang-console">POST _ml/trained_models/.multilingual-e5-small/deployment/_start?deployment_id=for_search</pre> </div> <div class="console_widget" data-snippet="snippets/71.console"></div> </li> </ol> </div> </div> </details> <div class="position-relative"><h4><a id="air-gapped-install-e5"></a>Deploy the E5 model in an air-gapped environment</h4><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/stack-docs/edit/8.16/docs/en/stack/ml/nlp/ml-nlp-e5.asciidoc">edit</a></div> <p>If you want to install E5 in an air-gapped environment, you have the following options: * put the model artifacts into a directory inside the config directory on all master-eligible nodes (for <code class="literal">multilingual-e5-small</code> and <code class="literal">multilingual-e5-small-linux-x86-64</code>) * install the model by using HuggingFace (for <code class="literal">multilingual-e5-small</code> model only).</p> <div class="position-relative"><h5><a id="e5-model-artifacts"></a>Model artifact files</h5><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/stack-docs/edit/8.16/docs/en/stack/ml/nlp/ml-nlp-e5.asciidoc">edit</a></div> <p>For the <code class="literal">multilingual-e5-small</code> model, you need the following files in your system:</p> <pre class="screen">https://ml-models.elastic.co/multilingual-e5-small.metadata.json https://ml-models.elastic.co/multilingual-e5-small.pt https://ml-models.elastic.co/multilingual-e5-small.vocab.json</pre> <p>For the optimized version, you need the following files in your system:</p> <pre class="screen">https://ml-models.elastic.co/multilingual-e5-small_linux-x86_64.metadata.json https://ml-models.elastic.co/multilingual-e5-small_linux-x86_64.pt https://ml-models.elastic.co/multilingual-e5-small_linux-x86_64.vocab.json</pre> <div class="position-relative"><h5><a id="_using_file_based_access_2"></a>Using file-based access</h5><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/stack-docs/edit/8.16/docs/en/stack/ml/nlp/ml-nlp-e5.asciidoc">edit</a></div> <p>For a file-based access, follow these steps:</p> <div class="olist orderedlist"> <ol class="orderedlist"> <li class="listitem"> Download the <a class="xref" href="ml-nlp-e5.html#e5-model-artifacts" title="Model artifact files">model artifact files</a>. </li> <li class="listitem"> Put the files into a <code class="literal">models</code> subdirectory inside the <code class="literal">config</code> directory of your Elasticsearch deployment. </li> <li class="listitem"> <p>Point your Elasticsearch deployment to the model directory by adding the following line to the <code class="literal">config/elasticsearch.yml</code> file:</p> <pre class="screen">xpack.ml.model_repository: file://${path.home}/config/models/`</pre> </li> <li class="listitem"> Repeat step 2 and step 3 on all master-eligible nodes. </li> <li class="listitem"> <a href="/guide/en/elasticsearch/reference/8.16/restart-cluster.html#restart-cluster-rolling" class="ulink" target="_top">Restart</a> the master-eligible nodes one by one. </li> <li class="listitem"> Navigate to the <span class="strong strong"><strong>Trained Models</strong></span> page from the main menu, or use the <a href="/guide/en/kibana/8.16/kibana-concepts-analysts.html#_finding_your_apps_and_objects" class="ulink" target="_top">global search field</a> in Kibana. E5 can be found in the list of trained models. </li> <li class="listitem"> Click the <span class="strong strong"><strong>Add trained model</strong></span> button, select the E5 model version you downloaded in step 1 and want to deploy and click <span class="strong strong"><strong>Download</strong></span>. The selected model will be downloaded from the model directory where you put in step 2. </li> <li class="listitem"> After the download is finished, start the deployment by clicking the <span class="strong strong"><strong>Start deployment</strong></span> button. </li> <li class="listitem"> Provide a deployment ID, select the priority, and set the number of allocations and threads per allocation values. </li> <li class="listitem"> Click <span class="strong strong"><strong>Start</strong></span>. </li> </ol> </div> <div class="position-relative"><h5><a id="_using_the_huggingface_repository"></a>Using the HuggingFace repository</h5><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/stack-docs/edit/8.16/docs/en/stack/ml/nlp/ml-nlp-e5.asciidoc">edit</a></div> <p>You can install the <code class="literal">multilingual-e5-small</code> model in a restricted or closed network by pointing the <code class="literal">eland_import_hub_model</code> script to the model’s local files.</p> <p>For an offline install, the model first needs to be cloned locally, Git and <a href="https://git-lfs.com/" class="ulink" target="_top">Git Large File Storage</a> are required to be installed in your system.</p> <div class="olist orderedlist"> <ol class="orderedlist"> <li class="listitem"> <p>Clone the E5 model from Hugging Face by using the model URL.</p> <div class="pre_wrapper lang-bash"> <div class="console_code_copy" title="Copy to clipboard"></div> <pre class="programlisting prettyprint lang-bash">git clone https://huggingface.co/elastic/multilingual-e5-small</pre> </div> <p>The command results in a local copy of the model in the <code class="literal">multilingual-e5-small</code> directory.</p> </li> <li class="listitem"> <p>Use the <code class="literal">eland_import_hub_model</code> script with the <code class="literal">--hub-model-id</code> set to the directory of the cloned model to install it:</p> <div class="pre_wrapper lang-bash"> <div class="console_code_copy" title="Copy to clipboard"></div> <pre class="programlisting prettyprint lang-bash">eland_import_hub_model \ --url 'XXXX' \ --hub-model-id /PATH/TO/MODEL \ --task-type text_embedding \ --es-username elastic --es-password XXX \ --es-model-id multilingual-e5-small</pre> </div> <p>If you use the Docker image to run <code class="literal">eland_import_hub_model</code> you must bind mount the model directory, so the container can read the files.</p> <div class="pre_wrapper lang-bash"> <div class="console_code_copy" title="Copy to clipboard"></div> <pre class="programlisting prettyprint lang-bash">docker run --mount type=bind,source=/PATH/TO/MODELS,destination=/models,readonly -it --rm docker.elastic.co/eland/eland \ eland_import_hub_model \ --url 'XXXX' \ --hub-model-id /models/multilingual-e5-small \ --task-type text_embedding \ --es-username elastic --es-password XXX \ --es-model-id multilingual-e5-small</pre> </div> <p>Once it’s uploaded to Elasticsearch, the model will have the ID specified by <code class="literal">--es-model-id</code>. If it is not set, the model ID is derived from <code class="literal">--hub-model-id</code>; spaces and path delimiters are converted to double underscores <code class="literal">__</code>.</p> </li> </ol> </div> <div class="position-relative"><h4><a id="terms-of-use-e5"></a>Disclaimer</h4><a class="edit_me" rel="nofollow" title="Edit this page on GitHub" href="https://github.com/elastic/stack-docs/edit/8.16/docs/en/stack/ml/nlp/ml-nlp-e5.asciidoc">edit</a></div> <p>Customers may add third party trained models for management in Elastic. These models are not owned by Elastic. While Elastic will support the integration with these models in the performance according to the documentation, you understand and agree that Elastic has no control over, or liability for, the third party models or the underlying training data they may utilize.</p> <p>This e5 model, as defined, hosted, integrated and used in conjunction with our other Elastic Software is covered by our standard warranty.</p> </div> </div> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ messageStyle: "none", tex2jax: { inlineMath: [["\\(", "\\)"]], displayMath: [["\\[", "\\]"]], ignoreClass: "nostem|nolatexmath" }, asciimath2jax: { delimiters: [["\\$", "\\$"]], ignoreClass: "nostem|noasciimath" }, TeX: { equationNumbers: { autoNumber: "none" } } }) MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () { MathJax.InputJax.AsciiMath.postfilterHooks.Add(function (data, node) { if ((node = data.script.parentNode) && (node = node.parentNode) && node.classList.contains('stemblock')) { data.math.root.display = "block" } return data }) }) </script> <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script> </div><div class="navfooter"> <span class="prev"> <a href="ml-nlp-elser.html">« ELSER – Elastic Learned Sparse EncodeR</a> </span> <span class="next"> <a href="ml-nlp-lang-ident.html">Language identification »</a> </span> </div> <!-- end body --> </div> <div class="col-12 order-3 col-lg-2 order-lg-3 h-almost-full-lg sticky-top-lg" id="right_col"> <div id="sticky_content"> <!-- The OTP is appended here --> <div class="row"> <div class="col-0 col-md-4 col-lg-0" id="bottom_left_col"></div> <div class="col-12 col-md-8 col-lg-12"> <div id="rtpcontainer"> <div class="mktg-promo" id="most-popular"> <p class="aside-heading">Most Popular</p> <div class="pb-2"> <p class="media-type">Video</p> <a href="https://www.elastic.co/webinars/getting-started-elasticsearch?page=docs&placement=top-video"> <p class="mb-0">Get Started with Elasticsearch</p> </a> </div> <div class="pb-2"> <p class="media-type">Video</p> <a href="https://www.elastic.co/webinars/getting-started-kibana?page=docs&placement=top-video"> <p class="mb-0">Intro to Kibana</p> </a> </div> <div class="pb-2"> <p class="media-type">Video</p> <a href="https://www.elastic.co/webinars/introduction-elk-stack?page=docs&placement=top-video"> <p class="mb-0">ELK for Logs & Metrics</p> </a> </div> </div> </div> <!-- Feedback widget --> <div id="feedbackWidgetContainer"></div> </div> </div> </div> </div> </div> </div> </section> </div> <div id='elastic-footer'></div> <script src='https://www.elastic.co/elastic-footer.js'></script> <!-- Footer Section end--> </section> </div> <!-- Feedback modal --> <div id="feedbackModalContainer"></div> <script src="/guide/static/jquery.js"></script> <script type="text/javascript" src="/guide/static/docs-v1.js"></script> <script type="text/javascript"> window.initial_state = {}</script> </body> </html>