[NMCUR-421] Add inference-server PDF benchmark path - #2349
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
46188d3 to
5cdd194
Compare
Signed-off-by: Praateek <praateekm@gmail.com>
5cdd194 to
e2595e7
Compare
Signed-off-by: Praateek <praateekm@gmail.com>
Signed-off-by: Praateek <praateekm@gmail.com>
Signed-off-by: Praateek <praateekm@gmail.com>
Signed-off-by: Praateek <praateekm@gmail.com>
Signed-off-by: Praateek <praateekm@gmail.com>
Signed-off-by: Praateek <praateekm@gmail.com>
Signed-off-by: Praateek <praateekm@gmail.com>
Signed-off-by: Praateek <praateekm@gmail.com>
Signed-off-by: Praateek <praateekm@gmail.com>
Signed-off-by: Praateek <praateekm@gmail.com>
Signed-off-by: Praateek <praateekm@gmail.com>
Signed-off-by: Praateek <praateekm@gmail.com>
|
🌿 Preview your docs: https://nvidia-preview-inference-server-pdf-nmcur-421.docs.buildwithfern.com/nemo/curator Here are the markdown pages you've updated: |
Signed-off-by: Praateek <praateekm@gmail.com>
…f-nmcur-421 Signed-off-by: Praateek <praateekm@gmail.com>
|
/claude review |
|
/ok to test b901d27 |
Signed-off-by: Praateek <praateekm@gmail.com>
abhinavg4
left a comment
There was a problem hiding this comment.
Majorly around the usage guide.
…f-nmcur-421 Signed-off-by: Praateek <praateekm@gmail.com> # Conflicts: # benchmarking/benchmarks.yaml # benchmarking/scripts/ndd_benchmark.py
Signed-off-by: Praateek <praateekm@gmail.com>
Signed-off-by: Praateek <praateekm@gmail.com>
…f-nmcur-421 Signed-off-by: Praateek <praateekm@gmail.com>
Signed-off-by: Praateek <praateekm@gmail.com>
| parser.add_argument( | ||
| "--execution-mode", | ||
| default="streaming", | ||
| choices=["streaming", "batch"], |
There was a problem hiding this comment.
Nit but do we need to expose this?
There was a problem hiding this comment.
Looks like this was always there in the original main.py so got copied over, good catch removed it
|
|
||
| ``tiktoken_cache_dir``, if set, is passed to workers as ``TIKTOKEN_RS_CACHE_DIR`` | ||
| so gpt-oss's harmony encoding is read from a pre-populated local cache instead of | ||
| being downloaded from Azure blob storage at startup (see openai/harmony#101). |
There was a problem hiding this comment.
Can we keep the reference to this harmony issue if possible? So far I have only ever run into the tiktoken error on the GB200 benchmark.
Signed-off-by: Praateek <praateekm@gmail.com>
Signed-off-by: Praateek <praateekm@gmail.com>
Description
Adds reusable benchmark utilities for starting Ray Serve or Dynamo inference servers and moves the existing NDD benchmark onto them. Shared inference-server CLI JSON arguments are validated through one reusable
parse_json_objecthelper.Adds
NemotronParseHTTPClientStageto the production Nemotron-Parse stage package. It sends OpenAI-compatible multimodal page requests through Curator's existingAsyncOpenAIClient, including bounded concurrency and exponential-backoff retries, while preserving response order, raw completion usage, and finish metadata. Requests that still fail after retries raise the task, matching the in-process path and preventing silently partial PDF output.NemotronParsePDFReadercreates exactly one inference stage: the existing in-process stage when no endpoint is supplied, or the HTTP client stage wheninference_server_endpointis set. The composite and tutorial factory accept a directinference_server_client_num_workersvalue and do not model inference-server replicas. In-processproc_sizeremains internally derived fromAutoProcessor; the HTTP client stage retains the model-default(2048, 1664)metadata needed by postprocessing.The in-process vLLM stage and HTTP client stage derive their generation settings from one canonical plain mapping, including a shared parameterized
max_tokensdefault of 8192. The HTTP adapter only reshapes vLLM-specific fields into the OpenAI-compatibleextra_bodywire format.The recommended tutorial entry point is now
tutorials/interleaved/nemotron_parse_pdf/main.py: it detects Ray-visible GPUs, starts one Dynamo-vLLM replica per GPU, waits for health, runs the Ray Data pipeline, and stops the server. It does not expose--backend. The in-process fallback isinprocess.py, which owns--backend {vllm,hf}; shared argument and pipeline construction lives inpipeline_utils.py, so neither entry point imports the other. The docs include the exact Dynamo command and link theetcd/nats-serverinstaller for source environments.Server replicas default to
get_available_cpu_gpu_resources()[1]and can be overridden with--num-replicas. The PDF benchmark exposes--inference-server-client-workers-per-replica, set explicitly to4in YAML, computesnum_replicas * client_workers_per_replica, and passes that total to the composite asinference_server_client_num_workers. The HTTP stage warns below the validated starting point of 32 concurrent page requests per worker; the docs make clear that this was tested on 8 H100 GPUs and must be tuned on the target GPU and corpus.The existing Xenna and Ray Data in-process workloads and throughput thresholds are retained. One Ray Data inference-server entry per server type covers Ray Serve and Dynamo, both with inference batch size 32. Dynamo uses its TCP request plane. The temporary global Slack disablement has been reverted, and both inference-server entries remain registered in
benchmarking/4xGB200-64CPU.yaml.For a startup-independent comparison between in-process and inference-server execution, the benchmark reports exactly three inference-stage metrics:
inference_stage_pages_per_sec_per_gpuinference_stage_input_tokens_per_sec_per_gpuinference_stage_output_tokens_per_sec_per_gpuThey use the inference stage's task process-time sum normalized by stage parallelism and inference GPU count. Model/server startup is outside this stage timing. The benchmark harness continues to report full-script
exec_time_s, which includes inference-server startup;time_taken_scoverspipeline.run(), andinference_server_startup_sreports server startup separately.Usage
Four-way 8×H100 comparison
All four entries succeeded on PR head
12bccbddand processed the same 5,794 pages. A terminal HTTP failure now fails its task rather than contributing a permanently-zero error metric.inference_stage_pages_per_sec_per_gpunemotron_parse_pdf_xennanemotron_parse_pdf_raydatanemotron_parse_pdf_inference_server_ray_servenemotron_parse_pdf_inference_server_dynamoThe inference-stage metric excludes model/server startup. Mean GPU power draw is the arithmetic mean across all eight GPUs and all
gpustats.csvsamples over each complete benchmark entry. The run viewer also exposes the full-scriptexec_time_svalues. Full results are available in the run viewer.Validation
nightly-2026-09-07): 36 focused inference-stage, HTTP-client, server, and OpenAI-client tests passed.pypdfium2.save()API and missingcv2extra.main.py,inprocess.py, and benchmark CLIs all loaded successfully and rendered--helpfrom the nightly container.Checklist