> This page is for version 2.1.5.
> For other versions, use one of these documentation indexes:
> - 2.1.6 (Latest) (default): https://docs.nvidia.com/nim/large-language-models/2.1.6/llms.txt
> - 2.1.5: https://docs.nvidia.com/nim/large-language-models/2.1.5/llms.txt
> - 2.1.4: https://docs.nvidia.com/nim/large-language-models/2.1.4/llms.txt
> - 2.0.13: https://docs.nvidia.com/nim/large-language-models/2.0.13/llms.txt
> - 2.0.12: https://docs.nvidia.com/nim/large-language-models/2.0.12/llms.txt
> - 2.0.11: https://docs.nvidia.com/nim/large-language-models/2.0.11/llms.txt
> - 2.0.10: https://docs.nvidia.com/nim/large-language-models/2.0.10/llms.txt
> - 2.0.9: https://docs.nvidia.com/nim/large-language-models/2.0.9/llms.txt
> - 2.0.8: https://docs.nvidia.com/nim/large-language-models/2.0.8/llms.txt
> - 2.0.4-pb6: https://docs.nvidia.com/nim/large-language-models/2.0.4-pb6/llms.txt
> - Archive: https://docs.nvidia.com/nim/large-language-models/archive/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nim/large-language-models/llms.txt.

# Model Signature Verification

> Verify that NGC Catalog model artifacts were published by NVIDIA and have not been tampered with, using OpenSSF Model Signing (OMS).

NVIDIA signs all models published to the NGC Catalog using the [OpenSSF Model Signing (OMS)](https://openssf.org/projects/model-signing/) standard. This lets you independently verify that a model artifact was published by NVIDIA and has not been tampered with—a requirement for organizations that operate under a "Trust, but verify" security model.

> **Note**
>
> NIM automatically performs internal checksum verification of downloaded files. The steps on this page describe *external* cryptographic signature verification, which is separate from and complementary to NIM's built-in checksum validation.

## Prerequisites

Before you start, complete the following prerequisites:

1. Install and configure the [NGC CLI](https://docs.ngc.nvidia.com/cli/index.html) with a valid API key.
2. Install the `model-signing` Python package:

   ```bash
   pip install model-signing
   ```

## Identify the Model Profile

Each NIM container uses a specific model profile identified by a 64-character profile ID. Use `list-model-profiles` to see all available profiles:

```bash
export NIM_LLM_IMAGE="nvcr.io/nim/meta/llama-3.1-70b-instruct:latest"

docker run --rm --gpus=all \
  ${NIM_LLM_IMAGE} \
  list-model-profiles
```

Example output:

```text
MODEL PROFILES
- Compatible with system and runnable:
  - 4f904d571fe60ff24695b5ee2aa42da58cb460787a968f1e8a09f5a7e862728d (vllm-bf16-tp1-pp1) [requires >=18 GB/gpu]
```

> **Note**
>
> This output is from a vLLM-based image. On SGLang-based images, the profile description starts with `sglang-` (for example, `sglang-bf16-tp1-pp1`). Both backends use 64-character profile IDs and the same verification workflow.

Note the 64-character profile ID of the profile you want to verify. To check which profile is active in a running container, inspect the startup logs:

```bash
docker logs ${container_name} | grep "Selected profile"
```

For more details on profile selection, refer to [Model Profiles and Selection](/nim/large-language-models/2.1.5/deployment/model-profiles-and-selection).

## Find the NGC Version Tag

Each NIM profile downloads its model files from a specific version in the NGC model registry. The mapping is stored in the container's model manifest at `/opt/nim/etc/default/model_manifest.yaml`. You need to extract this NGC version tag to download the correct signature in the next step.

First, set your profile ID:

```bash
export PROFILE_ID=${profile_id}
```

For example:

```bash
export PROFILE_ID=4f904d571fe60ff24695b5ee2aa42da58cb460787a968f1e8a09f5a7e862728d
```

Next, inspect the manifest to see the download URI for that profile. The URI contains the NGC version tag:

```bash
docker run --rm --entrypoint bash ${NIM_LLM_IMAGE} -c \
  "grep -A20 '${PROFILE_ID}' /opt/nim/etc/default/model_manifest.yaml \
   | grep -m1 'uri:'"
```

Example output:

```text
uri: ngc://nim/meta/llama-3.1-70b-instruct:bf16-tool-calling-fix?file=LICENSE
```

The URI has the format `ngc://{ORG}/{TEAM}/{MODEL_NAME}:{NGC_TAG}?file=...`. From this example:

* **ORG/TEAM**: `nim/meta`
* **MODEL_NAME**: `llama-3.1-70b-instruct`
* **NGC_TAG**: `bf16-tool-calling-fix`

Extract these into variables by first capturing the full model path, then splitting:

```bash
# Strip ngc:// prefix and ?file=... suffix to get: nim/meta/llama-3.1-70b-instruct:bf16-tool-calling-fix
export MODEL_URI=$(docker run --rm --entrypoint bash ${NIM_LLM_IMAGE} -c \
  "grep -A20 '${PROFILE_ID}' /opt/nim/etc/default/model_manifest.yaml \
   | grep -m1 'uri:' \
   | sed 's|.*uri: ngc://||;s|?.*||'")

export NGC_MODEL_PATH=$(echo ${MODEL_URI} | cut -d':' -f1)  # nim/meta/llama-3.1-70b-instruct
export NGC_TAG=$(echo ${MODEL_URI} | cut -d':' -f2)          # bf16-tool-calling-fix
export MODEL_NAME=$(echo ${NGC_MODEL_PATH} | cut -d'/' -f3)  # llama-3.1-70b-instruct

echo "NGC_MODEL_PATH: ${NGC_MODEL_PATH}"
echo "MODEL_NAME:     ${MODEL_NAME}"
echo "NGC_TAG:        ${NGC_TAG}"
```

Example output:

```text
NGC_MODEL_PATH: nim/meta/llama-3.1-70b-instruct
MODEL_NAME:     llama-3.1-70b-instruct
NGC_TAG:        bf16-tool-calling-fix
```

## Download the Model

Download the model files from NGC using the `NGC_MODEL_PATH` and `NGC_TAG` variables set in the previous step:

```bash
mkdir -p ./model

ngc registry model download-version \
  ${NGC_MODEL_PATH}:${NGC_TAG} \
  --dest ./model
```

The model is downloaded to `./model/${MODEL_NAME}_v${NGC_TAG}/`. For example:

```text
./model/llama-3.1-70b-instruct_vbf16-tool-calling-fix/
```

## Download the Signature File

Create a directory for the signature and use the `NGC_MODEL_PATH` and `NGC_TAG` from the previous step to download the detached signature:

```bash
mkdir -p ./signatures

ngc registry model download-version-signature \
  ${NGC_MODEL_PATH}:${NGC_TAG} \
  --dest ./signatures
```

The signature is downloaded to `./signatures/${MODEL_NAME}_v${NGC_TAG}/result.sigstore`. For example:

```text
./signatures/llama-3.1-70b-instruct_vbf16-tool-calling-fix/result.sigstore
```

## Download the NVIDIA Public Certificate

Download the NVIDIA public certificate that is used to validate model signatures:

```bash
curl https://api.ngc.nvidia.com/v2/catalog/models/public-key -o cert.pem
```

## Verify the Signature

Run `model_signing verify` pointing to the model directory downloaded in the previous step:

```bash
model_signing verify certificate \
  ./model/${MODEL_NAME}_v${NGC_TAG} \
  --signature ./signatures/${MODEL_NAME}_v${NGC_TAG}/result.sigstore \
  --certificate_chain cert.pem \
  --allow_symlinks
```

For example:

```bash
model_signing verify certificate \
  ./model/llama-3.1-70b-instruct_vbf16-tool-calling-fix \
  --signature ./signatures/llama-3.1-70b-instruct_vbf16-tool-calling-fix/result.sigstore \
  --certificate_chain cert.pem \
  --allow_symlinks
```

A successful verification prints a confirmation message. Any mismatch or tampering causes the command to exit with a non-zero status and an error message.

## Next Steps

For more information about model signing and the tools used in this workflow, refer to the following resources:

* [Bringing Verifiable Trust to AI Models: Model Signing in NGC](https://developer.nvidia.com/blog/bringing-verifiable-trust-to-ai-models-model-signing-in-ngc) — NVIDIA Developer Blog
* [NGC CLI Reference: download-version-signature](https://docs.ngc.nvidia.com/cli/cmd.html)
* [model-signing on PyPI](https://pypi.org/project/model-signing/)