Optimizing Azure Document Intelligence Layout Model performance on Google Cloud Run
Adham Elarabawy
0
Reputation points
Hello,
I'm experimenting with Azure document intelligence (specifically the layout model) to parse a wide variety of PDF documents. I'm using the 2022-08-31
api version, deployed via docker image (on GCP) on to Google Cloud Run (maxed out pod sizes of 8cpus/32gb memory). I have a few questions:
- The layout model seems to take a very long time to process pdf documents with length > 100. I've had certain calls take 5-10 minutes, which is unfortunately too long for my usecase. I have managed to circumvent this by parallelizing Layout model calls on a per-page basis (i.e. only sending ~3 pages per model call). This still takes approximately 20+ seconds to process longer documents, and I wanted to see if I could drive this down further. Are there any flags/options that allow me to enable/disable table extraction and other auxilliary features so that I can speed up my calls? I'm mainly interested in extracting paragraph roles (title/subheader/paragraph etc). Essentially any knob I can turn to speed the model call up!
- The cold start time per pod is ~15 seconds. Is there any way to speed this up? Perhaps an optimized docker image?
- It seems as though the async endpoint stalls endlessly. I've been using the synchronous endpoint instead (and using threads to parallelize calls). Is this a known issue? Is there a fix?
Thank you!
Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
2,100 questions
Sign in to answer