0

I have a FastText trained model "*.ftz". My program runs in the multithread mode.

Is there anyway to load a model once and use it without loading for each thread?

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
Omid ab
  • 11
  • 1
    Good question. There are ways to do that in Gensim's FastText support, with models saved in Gensim's (multi-file) format. The steps are similar to the process described at another answer about `Word2Vec` models – https://stackoverflow.com/a/43067907/130288 – but may be slightly different for `FastText` and in recent Gensim 4.0+ versions. – gojomo Oct 18 '21 at 14:41

1 Answers1

0

After some efforts to find a good solution I used Fastapi and implemented model as a service.

Omid ab
  • 11
  • Please include a code snippet of your solution for those encountering the same problem. – pegah Oct 26 '21 at 12:22