Hi everyone,
I’ve got a speed issue when using Rasa NLU with the large spaCy default model. It takes about 11 seconds to respond when running through the pipeline. When I use the small spaCy model it’s only about 300-500ms. I believe this slowness is coming from loading the spaCy model every time a call is made to Rasa NLU.
I have an endpoint in a Django project that calls `from rasa_nlu.model import Interpreter interpreter = Interpreter.load(INTENT_RECOGNITION_MODEL_DIRECTORY)
return interpreter.parse(text)`
My NLU pipeline is as follows `pipeline:
- name: “SpacyNLP” model: “en_core_web_lg”
- name: “SpacyTokenizer”
- name: “RegexFeaturizer”
- name: “SpacyFeaturizer”
- name: “SpacyEntityExtractor”
- name: “custom.component”
- name: “SklearnIntentClassifier”`
Is there any way to speed up the load time? If not, is there any way to cache the spaCy model in a variable in memory and have that called rather than performing a spacy.load() every time?
Thanks!