[NMCUR-421] Add inference-server PDF benchmark path - #2349
[NMCUR-421] Add inference-server PDF benchmark path#2349praateekmahajan wants to merge 17 commits into
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
| - name: nemotron_parse_pdf_raydata | ||
| timeout_s: 2400 | ||
|
|
||
| - name: nemotron_parse_pdf_inference_server_ray_serve |
There was a problem hiding this comment.
Fyi @praateekmahajan for GB200s, I got it to work by setting up TIKTOKEN_RS_CACHE_DIR - #2348.
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>
|
/claude review |
|
/ok to test 4fc7724 |
| "total_output_chars": total_output_chars, | ||
| "num_output_length_truncated": float(sum(result.finish_reason == "length" for result in results)), | ||
| "num_empty_outputs": float(sum(not result.text.strip() for result in results)), | ||
| "num_request_errors": 0.0, |
There was a problem hiding this comment.
num_request_errors is hardcoded to 0.0 here and never incremented — a request that fails after retries propagates out of _query_pages/process and raises the whole task (as the class docstring intends). So this metric is always 0 on any run that completes.
That has two downstream effects worth confirming as intended:
- The docs table describes it as "Page requests that still failed after client retries," which will never be observable via this metric.
- In
nemotron_parse_pdf_benchmark.py, theelif pdf_parse_metrics["num_request_errors"]:branch (line 265) is effectively dead, and the benchmark requirementnum_request_errors exact_value: 0is trivially satisfied.
If the intent is truly "raise on any failure," consider dropping the metric/branch or adjusting the docs; if partial-failure counting was intended, the gather path would need return_exceptions handling.
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 the client's bounded concurrency and exponential-backoff retries, while preserving response order, raw completion usage, and finish metadata.inference_batch_sizemeans pages per GPU forward pass for HF or maximum concurrent page requests for the HTTP client.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.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 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. PDF benchmark Slack sinks are disabled for now, and both inference-server entries are 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 intermediate process-time, active-time, GPU-time, and parallelism values are calculation details and are not emitted as benchmark metrics.
Usage
Four-way 8*H100 comparison
All four entries succeeded on PR head
12bccbdd, processed 5,794 pages, and produced zero request errors in the same run.inference_stage_pages_per_sec_per_gpunemotron_parse_pdf_xennanemotron_parse_pdf_raydatanemotron_parse_pdf_inference_server_ray_serve_batch_32nemotron_parse_pdf_inference_server_dynamo_batch_32The 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. Full results are available in the run viewer.Validation
nightly-2026-08-27): Ruff and formatting passed; focused OpenAI-client, inference, HTTP-client, and pipeline-factory coverage passed 25/25 tests.pypdfium2.save()API and missingcv2extra.Checklist