Model Profiles and Selection
Every model-specific NIM LLM and VLM container ships with a model manifest — a catalog of one or more profiles that NIM can use to select a model configuration at startup. Each profile represents a specific, pre-validated configuration, defined by a set of tags corresponding to the backend engine, model precision, tensor parallelism size (TP), pipeline parallelism size (PP), and LoRA support.
In the case of model-free NIM LLM and VLM, the model manifest is generated at runtime with a set of generic profiles that can be used to deploy the NIM across a wide range of system configurations.
At container startup, NIM selects exactly one profile from the manifest. The selected profile determines which model files are downloaded and how the inference backend is launched.
Profile Naming Convention
Deployment profiles follow the naming pattern:
Where:
<backend>is the inference engine (vllm,sglang, ortrtllm). The backend must match the inference engine in the container image you run. For example, the SGLang container image only loadssglang-*profiles.<precision>is the quantization format (bf16,fp8,mxfp4, ornvfp4)tp<N>is the tensor parallelism degree (number of GPUs)pp1indicates single-stage pipeline parallelism- The
-lorasuffix indicates the profile supports LoRA adapter loading
For example, vllm-bf16-tp4-pp1-lora uses BF16 precision across four GPUs with LoRA support on the vLLM backend, and sglang-bf16-tp4-pp1 runs the equivalent configuration on the SGLang backend.
Listing Available Profiles
Run the list-model-profiles command to see which profiles are available in a container:
Example output:
The example above shows output from a vLLM container image. The SGLang container image emits profiles with sglang-* descriptions instead (for example, sglang-bf16-tp1-pp1).
Each profile has:
- Profile ID: A unique 64-character profile ID.
- Profile description: A human-readable string constructed by joining tag values with hyphens (for example,
vllm-fp16-tp1-pp1). - Memory annotation: An estimated VRAM requirement per GPU, shown in brackets (for example,
[requires >=18 GB/gpu]).
Memory-Based Profile Classification
NIM estimates the GPU VRAM required by each profile and classifies it into one of three categories based on the available memory on the system:
If a profile is classified as low memory, the listing output includes a suggestion. For example:
You can apply the suggestion by passing the --max-model-len argument:
Reducing --max-model-len limits the maximum sequence length (input + output tokens) per request. Choose a value that fits your use case.
How Profile Selection Works
NIM uses a priority-ordered selection chain to decide which profile to use. The chain is evaluated top-to-bottom; the first selector that produces a match wins.
The memory-aware selector runs automatically as part of the selection chain. It estimates GPU memory requirements for each candidate profile by analyzing model weights, KV cache, activations, and overhead. Profiles that do not fit in available GPU memory are excluded from selection.
Selecting a Profile
The method you use to select a profile depends on your requirements and environment. You can allow NIM to pick a suitable profile automatically, or you can explicitly specify the exact profile you want by ID or by description.
Automatic Selection (Default)
If you do not set NIM_MODEL_PROFILE, NIM automatically selects the best compatible profile from the manifest based on your hardware (GPU device, available VRAM, estimated memory requirements, and parallelism constraints).
Intelligent Default Selection
Setting NIM_MODEL_PROFILE to "default" triggers intelligent default selection. NIM picks the best compatible profile based on:
- Hardware compatibility (GPU device, VRAM)
- Backend priority
- LoRA configuration
Explicit Selection by Profile ID
Specify the full Profile ID for deterministic, version-safe selection — the profile is guaranteed to match even if tags are later modified.
Explicit Selection by Profile Description (Friendly Name)
If the value of NIM_MODEL_PROFILE is not a valid Profile ID, NIM tries to match it against the profile description — a human-readable string constructed from ordered profile tags.
On an SGLang container image, use the matching sglang- profile description (or its hash) instead, for example sglang-fp16-tp1-pp1.
Use list-model-profiles to discover the exact profile IDs and descriptions available in your container.
Configuration Precedence
NIM_MODEL_PROFILE selects a model profile. The following sources override its
settings, from highest to lowest priority:
direct container arguments, NIM_PASSTHROUGH_ARGS, NIM environment variables
that map to backend arguments, and runtime_config.json. For the complete
order, refer to Advanced Configuration.
For example, if a profile specifies tp=2 but the user also passes the backend’s tensor-parallelism flag set to 4 (such as the vLLM --tensor-parallel-size 4 argument), the backend launches with TP=4.
When backend arguments override profile settings, the overridden values are resolved before model download. NIM selects and downloads the profile that matches the final resolved configuration, so the downloaded model files always match the launch configuration.
Using Backend CLI Arguments
You can also control parallelism and other settings by passing backend CLI arguments directly to the container. This works with both vLLM and SGLang, but the argument names are backend-specific. The following example uses vLLM arguments:
Common vLLM CLI arguments include the following:
On an SGLang image, the equivalent flag names differ. Refer to the SGLang
documentation for the corresponding backend arguments. For a Kubernetes
workload, pass the arguments through the container args field. For a NIM
Operator deployment that does not set spec.multiNode, use spec.args. Do not
use spec.args for a multi-node NIMService; the current LeaderWorkerSet path
does not propagate it to the leader or worker NIM containers. The
direct-argument interfaces preserve any
NIM_PASSTHROUGH_ARGS value provided by the image. For details, refer to
Advanced Configuration.
Changes from NIM LLM 1.x
The following profile selection mechanisms from NIM LLM version 1.x are no longer supported:
Use NIM_MODEL_PROFILE with a profile ID or description as a replacement for these deprecated mechanisms. For further guidance, see the 1.x Migration Guide.
Related Topics
- Model Download — Details on NIM model download functionality
- Environment Variables — full reference for
NIM_MODEL_PROFILEand other configuration variables.