About Model-Free NIM
Model-free NIM lets you run any supported model in NIM LLM and VLM without a model-specific container image.
By default, NIM containers ship with a built-in model manifest that defines which model to serve. In model-free mode, you point a generic NIM container at any supported model, such as a Hugging Face repository, an S3 bucket, or a local directory. NIM then generates a manifest at startup and serves that model.
How It Works
When you start a model-free container, you supply a model location with NIM_MODEL_PATH or with the backend positional argument. NIM generates a runtime manifest for that source, selects a profile, and serves the model.
If you do not set a served name, NIM derives one from the model source by removing the URI scheme and any trailing :<version>, then replacing any : that remains. That derived name is the value to use in the model field of inference requests, and it is what /v1/models reports.
For air-gap redeploys, the first network-connected start can persist the generated manifest in the container cache (NIM_CACHE_PATH). Later starts that mount the same cache reuse the manifest with no outbound network or authentication calls. For the full air-gap workflow, refer to Air-Gap Deployment.
Profile listing, URI schemes, and download behavior are documented in the configuration sections that follow. For profile selection details, refer to Model Profiles and Selection. For source-specific download steps, refer to Model Download.
Related Use Cases
Model-free NIM supports the following capabilities:
- Flexible single-container deployments: One container image can pass security review and serve any supported model.
- Day-zero model support: You can serve newly released models without waiting for a model-specific NIM container.
- Custom and fine-tuned models: You can serve your own models from any supported source.
Limitations and Considerations
The following limits apply when you choose a model-free NIM container.
- Unsupported architectures: The backend in the container (vLLM or SGLang) must support the model architecture.
- Remote URI first deploy: A remote
NIM_MODEL_PATH(for example,ngc://orhf://) requires network access and credentials on the first deployment so NIM can generate and cache the runtime manifest.
Regardless of where the model is hosted, if its architecture is unsupported by the inference backend in your container (vLLM or SGLang), it is also unsupported by NIM.
Configuring the Model-Free NIM Container Image
The latest model-free NIM container images are in the NGC Catalog:
Set NIM_LLM_IMAGE to the image name and tag from the catalog page. Model download commands use this value.
Configuring the Model
Supply the model path and name using either of these methods. If both are provided, the CLI positional argument takes precedence.
NIM_MODEL_PATH Environment Variable
Use NIM_MODEL_PATH to point the container to the model at runtime:
Backend CLI Positional Argument
Use the backend positional argument to pass the model path at runtime. This passthrough works for both the vLLM and SGLang backends; the profile descriptions are prefixed vllm- or sglang- depending on the image you run.
Default Model Name
If you do not set a name, NIM derives one from the model source by removing the URI
scheme and any trailing :<version>, then replacing any : still left. The result is
the name to use in the model field of inference requests, and it is what /v1/models
reports.
The derived name is the same regardless of which inference backend the image uses.
A derived name never contains :. If the model source has one, NIM replaces it, because
some backends read : in the model field as a base-model:lora-adapter separator and
would reject every request.
A name you set yourself is used verbatim and is not adjusted. On a backend that reserves
:, setting one that contains it fails at startup with a message naming the value,
rather than starting and rejecting every request.
NIM_SERVED_MODEL_NAME Environment Variable
Use NIM_SERVED_MODEL_NAME to set the model name used in inference requests:
CLI Argument
Use the CLI argument --served-model-name to pass the model name used in inference requests.
Supported Model Sources
The following table lists the model sources supported by model-free NIM, along with the required URI prefix and authentication method.
For details on downloading models from each source (including URI formats, proxy configuration, and cache management), refer to Model Download.
Configuring Deployment Options
Model-free NIM generates profiles for combinations of tensor parallelism (TP), pipeline parallelism (PP), and LoRA. To select a deployment configuration, use either of the following methods. If both are provided, backend CLI arguments take precedence.
NIM_MODEL_PROFILE Environment Variable
Run list-model-profiles to see available profiles, then select one:
On an SGLang model-free image, use the matching sglang- profile description (or its hash) instead, for example -e NIM_MODEL_PROFILE=sglang-bf16-tp2-pp1. Run list-model-profiles on your chosen image to see whether the generated profiles carry vllm- or sglang- descriptions.
Backend CLI Arguments (passthrough)
Use backend CLI arguments to pass additional runtime options with the model path. The NIM passthrough mechanism is the same for both backends, but the flag names are backend-specific. The following example uses vLLM flags:
The following vLLM CLI arguments are most relevant in the context of model-free NIM:
Flag names differ by backend. On an SGLang image, run list-model-profiles to confirm the available sglang-* profiles and refer to the SGLang documentation for the equivalent passthrough flags.
Listing Profiles
Use the list-model-profiles command to view the profiles generated for a given model:
For more details on profile selection, refer to Model Profiles and Selection.
S3-Specific Environment Variables
The following environment variables authenticate and configure S3 and S3-compatible endpoints:
For complete authentication and configuration details for each source, refer to Model Download.
Air-Gap Deployments
How model-free NIM behaves in an air-gap environment depends on the type of NIM_MODEL_PATH value
you use.
Local Path (/abs/path/to/model)
NIM reads the model directory directly with no network access. No manifest regeneration occurs, and no credentials are needed. This is the simplest air-gap workflow — ensure the model directory is pre-staged and mounted into the container.
Remote URI (ngc://, hf://, s3://, and so on)
NIM generates a runtime manifest from the URI on the first deployment and automatically saves
a copy inside the container’s internal cache directory (NIM_CACHE_PATH). On subsequent restarts, including in a strict air-gap environment,
NIM finds the cached manifest in the same cache volume and reuses it without any outbound
network or authentication calls. No additional environment variables are required.
This enables the following workflow for air-gap redeployment:
- First deploy (network-connected): Run the container with credentials and the remote URI.
NIM downloads the model, generates the manifest, and saves a copy to
NIM_CACHE_PATH. - Transfer: Ensure the NIM cache is on a PVC or persistent volume that survives pod restarts, or transfer the cache directory to the air-gap environment.
- Redeploy (air-gapped): Mount the same cache volume. NIM finds the cached manifest and skips regeneration. No credentials or network access are required.
To force manifest regeneration after an upstream model update, delete nim_runtime_manifest.yaml
from your persistent cache directory (for example, the host machine directory in LOCAL_NIM_CACHE) mounted to /opt/nim/.cache (the default value of NIM_CACHE_PATH inside the container) before restarting.
For a complete walkthrough, refer to Air-Gap Deployment.
Examples
Use the following examples to run model-free NIM with different model sources and profile selection methods. Each example lists the commands in order.
Hugging Face Model with TP=2
Use this example to inspect available profiles for a Hugging Face model and then run the model with TP=2.
-
Set the model path:
-
List the available profiles:
Example output:
The example output above is from a vLLM model-free image. On an SGLang model-free image, the profile descriptions are prefixed sglang- instead (for example, sglang-tp1-pp1-...).
- Start NIM by using one of the following methods:
-
Select a profile with
NIM_MODEL_PROFILE: -
Override the profile through a vLLM CLI argument:
Model Hosted in S3 Using Default Profile from Automatic Profile Selection
Use this example to serve a model from S3 and let NIM select the default compatible profile automatically.
-
Set the model path:
-
Start NIM with the required S3 credentials:
Local Model with TP=8 Profile Specified
Use this example to serve a local model and select a TP=8 profile explicitly.
-
Set the model path:
-
Start NIM with the selected profile: