Design a document-to-Markdown API with separate CPU, GPU and memory stages

HardSystem design60 minSWEMLEREPro outline

The question

Design an API that takes PDFs and scanned images and returns clean Markdown, including tables. The pipeline has CPU-heavy stages (file parsing, page rendering), GPU stages (a vision-language model that reads each page) and memory-heavy stages (assembling long documents).

Customers send everything from single pages to 1,000 page reports. Design it.

What the interviewer is looking for

  • Splits the pipeline into stages that scale independently
  • Uses queues between stages and page-level parallelism
  • Batches GPU work for throughput while bounding latency
  • Handles large documents without running out of memory
  • Covers sync versus async APIs, retries, idempotency and cost

Your answer

Saved in this browser only. Nobody else sees it.

Why this question

Written by BlogLLM in the style of a publicly reported Mistral AI question type: Document-to-Markdown inference API with separate CPU, GPU and memory stages.

Reported in: supacv.com

Practice question written by BlogLLM based on publicly reported interview formats. Not an official Mistral AI question.