NeMo Retriever Library is a retrieval-augmented generation (RAG) ingestion pipeline for documents that can parse text, tables, charts, and infographics. NeMo Retriever Library parses documents, creates embeddings, optionally stores embeddings in LanceDB, and performs recall evaluation.
This quick start guide shows how to run NeMo Retriever Library as a library in local Python processes without containers. Choose one inference path:
Local GPU (Linux): Pull and run Nemotron RAG models from Hugging Face on your GPU(s). Requires CUDA 13.x and the [local] extra.
Remote NIM: Call build.nvidia.com hosted or self-hosted NeMo Retriever NIM endpoints over the network. The base package installs on Linux, Windows x64, and macOS Apple Silicon (arm64); no local GPU is required. macOS Intel (x86_64) is not supported.
The steps below cover environment setup, installation, and a first ingestion run. For Kubernetes or container deployments, refer to Deployment at a glance and the Pre-Requisites & Support Matrix .
Deployment at a glance
For Kubernetes deployments, use the nemo_retriever/helm chart to deploy the retriever service and optional in-cluster NIM workloads. Published Helm install and upgrade flows for the full extraction stack are documented in the NeMo Retriever Library ; use those docs together with the chart README for your release.
For standalone service-image builds and local container runs, see docker.md .
Before starting, confirm requirements for your inference path (refer to the Pre-Requisites & Support Matrix ):
Local GPU inference (Linux): CUDA 13.x with libcudart.so.13 available, and GPUs visible to the system.
Remote NIM inference: Python 3.12 and network access to your NIM endpoints; CUDA is not required on the client host.
If optical character recognition (OCR) fails with a libcudart.so.13 error on a local GPU path, install the CUDA 13 runtime for your platform and update LD_LIBRARY_PATH to include the CUDA lib64 directory, then rerun the pipeline.
For example, the following command can be used to update the LD_LIBRARY_PATH value.
Setup your environment
Complete the following steps to set up your environment. You will create and activate isolated Python and project virtual environments, install the NeMo Retriever Library and its dependencies, and then run the provided ingestion snippets to validate your setup.
Create and activate the NeMo Retriever Library environment
Before installing NeMo Retriever Library, create an isolated Python environment so its dependencies do not conflict with other projects on your system. In this step, you set up a new virtual environment and activate it so that all subsequent installs are scoped to NeMo Retriever Library.
In your terminal, run the following commands from any location.
Candidate source upgrade. This branch targets vLLM 0.32.0, Torch 2.13.0, and Torchvision 0.28.0. Its [local] extra requires nemotron-ocr>=2.0.3, =2.0.3, with that version:
Remote NIM (no local GPU)
The base package is sufficient when all inference runs through hosted or self-hosted NIM endpoints:
Install matching ingestion client and ingestion runtime wheels at the same version when your workflow expects them (refer to the NeMo Retriever Library prerequisites for the exact PyPI coordinates for your release).
This creates a dedicated Python environment and installs the nemo-retriever PyPI package, the canonical distribution for the NeMo Retriever Library. The base install includes the lightweight tokenizer dependencies used for TXT/HTML chunking (no Transformers or local model weights).
If your PDF pipeline uses method="nemotron_parse" , install the Nemotron Parse client dependencies with the nemotron-parse extra:
For local GPU inference with Nemotron Parse, combine the extras as nemo-retriever[local,nemotron-parse] .
Note: uv python install 3.12 installs a uv-managed Python that includes development headers ( Python.h ). These headers are required by vLLM, which compiles CUDA kernels at runtime using torch inductor. If you skip this step and use a system Python without headers, vLLM actor initialization will fail with InductorError: fatal error: Python.h: No such file or directory .
Note: uv python install 3.12 installs a uv-managed Python that includes development headers ( Python.h ). These headers are required by vLLM, which compiles CUDA kernels at runtime using torch inductor. If you skip this step and use a system Python without headers, vLLM actor initialization will fail with InductorError: fatal error: Python.h: No such file or directory .
Verify CUDA builds for Torch and Torchvision (local GPU only)
The candidate source upgrade requires Torch 2.13.0 and Torchvision 0.28.0. If you need to replace CPU wheels, reinstall matching CUDA 13.0 builds with the following commands. For a published release, use the versions required by that release instead.
Skip this step if you are using remote NIM inference only.
Local vLLM inference also requires a writable FlashInfer cache and HTTPS access to edge.urm.nvidia.com for missing GPU kernel artifacts. The default artifact cache is ~/.cache/flashinfer/cubins . Before running offline, prefetch artifacts and exercise your intended model on matching GPU hardware. Refer to Local GPU kernel cache for the prefetch command and cache configuration. Model weights require separate caching.
The test PDF contains text, tables, charts, and images. Additional test data resides here .
Note: retriever ingest defaults to local, in-process execution. Use retriever ingest batch ... for Ray Data scale-out on larger workloads. File formats and internal extraction stages are not separate root commands; configure supported behavior through retriever ingest .
Note: retriever ingest defaults to local, in-process execution. Use retriever ingest batch ... for Ray Data scale-out on larger workloads. File formats and internal extraction stages are not separate root commands; configure supported behavior through retriever ingest .
The examples below use default local GPU inference (no invoke_url specified) and require the [local] extra with matching CUDA 13 builds from the setup steps above. For remote NIM inference without a local GPU, refer to Run with remote inference .
Bare .vdb_upload() writes to the default LanceDB table nemo-retriever . Default Retriever() and retriever ingest use that same table.
Python callers can pass raw text documents directly to the same text splitting, embedding, and vector database graph without creating temporary files. Inline text is supported in inprocess , batch , and service run modes.
This batch pipeline ends in the default streaming-capable LanceDB upload, so .ingest() returns a summary with input_rows and submitted_records . Pass return_results=True if you need the embedded rows.
Each string is treated as a raw document and split with TextChunkParams defaults. To override chunking for every text source in the ingest, add .extract(split_config={"text": {"max_tokens": 512, "overlap_tokens": 64}}) . Inline text can be combined with .files(...) and, in modes that support them, .buffers(...) ; each source is routed through its matching extractor before the results enter the shared embedding and sink stages. Inline corpora remain resident in client or driver memory, so prefer file ingestion when the corpus may exceed the available memory.
multimedia — Audio/video extraction and SVG rendering support. Install this extra when using Parakeet ASR through GraphIngestor.extract_audio() so audio decoding and resampling dependencies are available: uv pip install "nemo-retriever[multimedia]" # or, for local GPU inference: uv pip install "nemo-retriever[local,multimedia]"
Run the batch pipeline script and point it at the directory that contains your PDFs using the following command.
Omitting return_results or setting it to None selects the pipeline default. Batch graphs return a summary only with a final streaming-capable VDB upload, error_policy="raise" , and return_failures=False . Other graph configurations return full records. In service mode, .ingest() and .ingest_async() return completion metadata without downloading rows; pass return_results=True to populate ServiceIngestResult.dataframe . .save_to_disk(...) still fetches payloads needed to write files. Refer to ingest result defaults for the complete contract.
Ingest a test corpus (CLI)
retriever ingest accepts a file or a directory and writes a ready-to-query LanceDB table. From a clone of this repository, ./data/multimodal_test.pdf is a valid first-run input. Replace /path/to/file-or-directory below with that PDF or with your own file or directory.
Small corpora are supported. The NeMo Retriever LanceDB adapter requests 16 IVF partitions by default. When the table has fewer rows, the adapter clamps that count to one less than the row count. An ingest that produces 2 through 15 rows still builds an IVF index. A one-row table is stored without a vector index, and ingest succeeds. An ingest that produces zero rows is a separate empty-result error. Use a larger corpus when you want more representative retrieval quality.
Small corpora are supported. The NeMo Retriever LanceDB adapter requests 16 IVF partitions by default. When the table has fewer rows, the adapter clamps that count to one less than the row count. An ingest that produces 2 through 15 rows still builds an IVF index. A one-row table is stored without a vector index, and ingest succeeds. An ingest that produces zero rows is a separate empty-result error. Use a larger corpus when you want more representative retrieval quality.
You do not need to choose a retrieval index mode for the normal workflow. The default index_mode=auto creates a hybrid table (dense vectors plus BM25/full-text ), and query mode auto uses that table automatically. The explicit dense , hybrid , and sparse modes are advanced overrides for experiments or specialized deployments.
Chunks land at ./lancedb/nemo-retriever , which matches the storage settings used in Run a recall query below. Python .vdb_upload() and default Retriever() use the same table. With the [local] extra installed (refer to the setup steps above), defaults point at local-GPU extraction and embedding.
No local GPU? Set NVIDIA_API_KEY (refer to Authentication and API keys ) and route extraction and embedding through build.nvidia.com NIMs instead:
OCR engine default: The default OCR engine is Nemotron OCR v2 . Use --ocr-version v1 to opt into the legacy OCR engine. Local OCR v2 defaults to multilingual mode ( multi ); pass --ocr-lang english for the English-only v2 selector. Remote OCR NIM endpoints decide their own model and language behavior, and the local OCR selectors are not added to remote request payloads.
OCR engine default: The default OCR engine is Nemotron OCR v2 . Use --ocr-version v1 to opt into the legacy OCR engine. Local OCR v2 defaults to multilingual mode ( multi ); pass --ocr-lang english for the English-only v2 selector. Remote OCR NIM endpoints decide their own model and language behavior, and the local OCR selectors are not added to remote request payloads.
When you use a remote embedder, the endpoint and provider prefix remain runtime configuration. The query model is read from LanceDB metadata when available; pass an explicit model only for an override or a legacy table without metadata.
You can inspect how recall accuracy optimized text chunks for various content types were extracted into text representations:
After ingest, those chunks are in the default LanceDB table nemo-retriever . You can query them to retrieve semantically relevant chunks for an LLM:
Default Retriever() also reads lancedb/nemo-retriever . Pass vdb_kwargs only when you wrote a different URI or table name.
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
