Create and Deploy custom ML models for NLP

Hello,

I've read the documentation on ML and deploying ML models Overview | Machine Learning in the Elastic Stack [8.6] | Elastic.

Does anyone have examples of how to do the following:

  1. Create a custom ML model that fits the needs (pytorch, TorchScript representation, etc.)
  2. Deploy an local ML model not hosted on huggingface.co

Best regards

Sebastian

Hi Sebastian

One example would be to fine tune a text embedding model for your specific needs. Using one of the compatible models listed here as the base model.

Use the Eland eland_import_hub_model script with the --hub-model-id argument set to the the path to the model.

See the example in Deploy trained model offline environment · Issue #502 · elastic/eland · GitHub

Hi @dkyle,

Thank you for your quick response. The offline example seems feasible. I will test that - thank you very much.

Do you have examples of creating your own ML models that meet Elastic requirements? I have the language requirement to provide NER, fill-mask, Q&A, text classification and embedding and also similarity in German language. So I'm afraid deriving a model from an existing one from Huggingface (most are English) would not be sufficient for our needs.

Thanks and best regards

Sebastian

Creating and training a transformer model is quite an advanced task and beyond the scope of this forum sorry.

There are a number of German language models on HuggingFace, simply searching for German returns 404 models.

Here's a German Bert base: bert-base-german-cased · Hugging Face
A model for sentiment analysis: oliverguhr/german-sentiment-bert · Hugging Face
Q and A: deepset/gbert-base-germandpr-question_encoder · Hugging Face

And many more...

Not all of the models will be compatible with Elastic, in general most BERT based models will be compatible and are a good place to start. See also the list of known compatible models (this is a small sample there will be many more models that are compatible).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.