Environment Variables for NVIDIA NeMo Retriever Embedding NIM#
Use this documentation to learn about the environment variables for NVIDIA NeMo Retriever Embedding NIM.
Environment variables set by a container image also override runtime fallbacks. See Batch Size for Nemotron 3.5 Embed.
Binary Environment Variables#
The following table contains the binary environment variables.
Name |
Default |
Description |
|---|---|---|
|
Pretty |
The log emit format. One of: pretty, json, compact. |
|
false |
Selects latency-oriented ( |
|
error |
The tracing EnvFilter. |
|
false |
True to print env-var help and exit. |
Server Environment Variables#
The following table contains the server environment variables.
Name |
Default |
Description |
|---|---|---|
|
0.0.0.0:8000 |
The HTTP listen address (host:port). |
|
- |
The optional KServe V2 gRPC listen address (host:port). Empty disables gRPC. |
|
- |
The maximum inbound KServe gRPC message size in bytes. Empty uses the effective HTTP body limit. |
|
- |
The HTTP request body limit for |
|
5242880 |
The maximum allowed bytes for an embedded image payload in a single request, for models that support image inputs. The default is 5 MiB. |
|
1024 |
The batcher request queue depth. Must be a positive integer. In version 2.2, setting this value to |
|
1 |
The maximum milliseconds to wait for additional requests before dispatching a batch. The |
|
120 |
The request timeout in seconds. |
|
- |
Comma-separated legacy aliases for the API model name, such as |
|
- |
The path to PEM certificate chain for HTTPS. When set with |
|
- |
The path to PEM private key for HTTPS. Must be set together with |
Pipeline Environment Variables#
The following table contains the pipeline environment variables.
The engine placement settings describe Nemotron 3.5 Embed in the release 2.4 nemotron-embed container.
Earlier models and containers can use different defaults and engine behavior.
Name |
Default |
Description |
|---|---|---|
|
1 |
The number of GPUs requested for implicit placement, not the total number of engine replicas. Valid values: |
|
- |
Comma-separated, unique container-visible CUDA device ordinals, such as |
|
4 |
Engine replicas per selected GPU. The |
|
16 |
The maximum number of sequences per forward pass. The |
|
40960 |
The optional post-tokenization token budget. The |
|
32768 |
The sequence length limit set by the |
The nemotron-embed deployment default changed from 10240 to 32768. For Nemotron 3.5 Embed, you can use a lower limit by adding -e NIM_PIPELINE_MAX_SEQ_LEN=16384 before the image name in your docker run command.
An override does not change the model’s supported maximum. See Sequence Length Limits for model and profile constraints.
Batch Size for Nemotron 3.5 Embed#
The Nemotron 3.5 Embed image sets NIM_PIPELINE_MAX_BATCH_SIZE=16. Omitting this variable from a Docker command or Kubernetes Pod specification preserves the image value in the server’s process environment. Setting only NIM_PERFORMANCE_MODE=1 keeps the maximum batch size at 16; it does not select 64.
The settings take precedence in this order:
A user-provided
NIM_PIPELINE_MAX_BATCH_SIZEin Docker-eor Kubernetesenvoverrides the image value.The image-provided
NIM_PIPELINE_MAX_BATCH_SIZEoverrides the performance-mode fallback.If no batch-size setting is present in the process environment, the runtime uses
1in latency mode or64in throughput mode.
To select throughput mode with a maximum batch size of 64, add both options before the image name in your existing docker run command:
-e NIM_PERFORMANCE_MODE=1 -e NIM_PIPELINE_MAX_BATCH_SIZE=64
For Kubernetes, add these entries to the NIM container’s env list:
env:
- name: NIM_PERFORMANCE_MODE
value: "1"
- name: NIM_PIPELINE_MAX_BATCH_SIZE
value: "64"
The batch-size limit is an upper bound, not a guaranteed dispatch size. GPU memory requirements depend on the batch size, sequence length, and selected model precision. Do not assume that batch size 64 fits at the maximum sequence length on every supported GPU. Check startup and representative requests for your configuration. If memory is insufficient, reduce the batch size or NIM_PIPELINE_MAX_SEQ_LEN within the supported sequence-length limits.
Text Dispatch Token Budget#
For Nemotron 3.5 Embed text inputs, the container uses the following limits:
B = NIM_PIPELINE_MAX_BATCH_SIZE
S = NIM_PIPELINE_MAX_SEQ_LEN
C = NIM_PIPELINE_MAX_BATCH_TOKENS
T = B * S when C = 0
T = min(max(C, S), B * S) when C > 0
T is the effective text token capacity per GPU dispatch, not necessarily the configured value C.
A positive C below S is raised to S so one maximum-length input row still fits.
A value above B * S does not increase the capacity.
Other CUDA shape and memory limits still apply.
Packed text dispatches must fit the sum of row token counts within T.
Padded text dispatches must fit rows * padded sequence length within T, including padding.
Both routes also enforce the maximum of B rows per dispatch.
The container can split the input rows of a single HTTP request across multiple GPU dispatches.
The request is not an indivisible token-budget unit.
Splitting preserves the input rows and their output order.
For example, with B = 8 and S = 32768, setting C to 64 or 1 gives T = 32768.
Eight input rows with 29 tokens each can therefore run together as one packed dispatch of 232 tokens.
Neither value limits that dispatch to 64 or 1 tokens, nor forces one row per dispatch.
To avoid this upward adjustment, configure a positive value for C that is at least equal to S.
Engine Placement and Replicas#
The nemotron-embed deployment sets NIM_ENGINE_STREAM_COUNT=4 regardless of GPU model.
Omitting a user override keeps that deployment value; it does not select the runtime fallback of 0.
Set NIM_ENGINE_STREAM_COUNT=0 explicitly to request automatic selection.
For Nemotron 3.5 Embed, automatic selection uses four replicas only when startup identifies every selected GPU as GB200 or RTX PRO 6000 Blackwell.
Otherwise, including when GPU identification fails, automatic selection uses one replica per selected GPU.
When startup successfully detects at least one visible GPU, placement follows these rules:
When
NIM_ENGINE_DEVICESis unset or blank, the selected GPU count ismin(NIM_ENGINE_COUNT, visible_GPU_count).When
NIM_ENGINE_DEVICESis nonblank, its unique entries select the GPUs, regardless ofNIM_ENGINE_COUNT.total_engines = selected_GPU_count * effective_stream_count, whereeffective_stream_countis the positive setting or the resolved automatic value.
If GPU-count detection fails or returns zero, implicit device selection is not limited.
CUDA ordinals refer to GPUs visible inside the container, not host GPU indices.
The startup engine_devices list contains one entry per engine, with replicas grouped by GPU.
Repeated ordinals in this output represent replicas; do not repeat ordinals in NIM_ENGINE_DEVICES.
The table abbreviates NIM_ENGINE_COUNT, NIM_ENGINE_DEVICES, and NIM_ENGINE_STREAM_COUNT as COUNT, DEVICES, and STREAM_COUNT.
Visible GPUs |
COUNT |
DEVICES |
STREAM_COUNT |
|
Total engines |
|---|---|---|---|---|---|
1 |
1 |
Unset |
4 |
|
4 |
1 |
2 |
Unset |
4 |
|
4 |
1 |
2 |
|
1 |
|
1 |
2 |
2 |
Unset |
4 |
|
8 |
4 |
1 |
|
2 |
|
4 |
Each engine loads a model replica and runtime buffers and uses its own CUDA stream. More replicas require more GPU memory; these settings do not guarantee that the model fits.
Engine Environment Variables#
The following table contains the engine environment variables.
Name |
Default |
Description |
|---|---|---|
|
- |
The Hugging Face token for model download. Passed through to the model downloader. For details, refer to Get Started With NVIDIA NeMo Retriever Embedding NIM. |
|
- |
The NGC API key for model download when |
|
false |
Set to |
|
auto |
The model download provider. One of: |
|
- |
The checkpoint that the NIM loads. The |
|
/model/embed |
The in-container path for staged model artifacts. The directory must contain artifacts for a supported model. For details, refer to Custom Model Artifact Support in NVIDIA NeMo Retriever Embedding NIM. |
|
- |
The inference precision preference. Supported values depend on the model and GPU. For Nemotron 3.5 Embed, use |
|
- |
Compile all CUDA artifacts then exit 0 (passthrough). |