title: How to use FastAPI and Spacy together to handle multiple requests in parallel
body: <p>I am using spacy with FastAPI to serve requests for some nlp task. I am loading spacy large model while the API starts and the requests are served using that model. What I'm seeing is time for multiple requests is increasing linearly with the number of parallel requests. How to integrate spacy with FastAPI so that multiple requests can be served at the same time without an increase in time. I have a 4 core CPU and single request takes about 4ms. I would like to serve 4 requests at the same time in 4ms.</p>