Importing external models from NGC Catalog to CML Registry

To use the CML Registry standalone API, the CML registry must have access to the public internet to download the model to the CDP environment Data Lake.

You must configure the firewall to allow traffic. For more information configuring firewall, see Prerequisites to import pretrained Models.

Get the curated list of NGC models

The models listed in the response are curated by Cloudera, those models are pre-compiled and optimized for the specific GPU hardware used by Cloudera AI Inference Service. The repo_id is the identifier for the model import input.

curl -s -H "Authorization: Bearer ${CDP_TOKEN}" ${DOMAIN}/api/v2/modelhub/models

{
  "models": [
    {
      "application": "Other",
      "framework": "NeMo",
      "name": "Llama-2-70b",
      "precision": "float16",
      "repo_id": "ohlfw0olaadg/ea-participants/llama-2-13b:LLAMA-2-13B-4K-FP16-1-A100.24.01",
      "source": "NGC"
    },
    {
      "application": "Other",
      "framework": "Other",
      "name": "Llama-2-70b",
      "precision": "float16",
      "repo_id": "ohlfw0olaadg/ea-participants/llama-2-70b-chat:LLAMA-2-70B-CHAT-4K-FP16-4-A100.24.01",
      "source": "NGC"
    },
    {
      "application": "Other",
      "framework": "Other",
      "name": "Llama-2-70b",
      "precision": "float16",
      "repo_id": "ohlfw0olaadg/ea-participants/llama-2-13b-chat:LLAMA-2-13B-CHAT-4K-FP16-1-A100.24.01",
      "source": "NGC"
    },
    {
      "application": "Other",
      "framework": "NeMo",
      "name": "Llama-2-70b",
      "precision": "FP16",
      "repo_id": "ohlfw0olaadg/ea-participants/mixtral-8x7b:MIXTRAL-8x7b-INSTRUCT-2-A100.24.01",
      "source": "NGC"
    },
    {
      "application": "Other",
      "framework": "Other",
      "name": "Llama-2-70b",
      "precision": "float16",
      "repo_id": "ohlfw0olaadg/ea-participants/nv-gpt-43b-chat:NV-GPT-43B-chat-4K-steerlm-FP16-2-A100.24.01",
      "source": "NGC"
    },
    {
      "application": "Other",
      "framework": "Other",
      "name": "Llama-2-70b",
      "precision": "float16",
      "repo_id": "ohlfw0olaadg/ea-participants/nv-gpt-43b-instruct:NV-GPT-43B-instruct-4K-sft-FP16-2-A100.24.01",
      "source": "NGC"
    },
    {
      "application": "Other",
      "framework": "NeMo",
      "name": "Llama-2-70b",
      "precision": "float16",
      "repo_id": "ohlfw0olaadg/ea-participants/starcoderplus:STARCODERPLUS-15.5B-8K-FP16-1-A100.24.01",
      "source": "NGC"
    },
    {
      "application": "Other",
      "framework": "Other",
      "name": "Llama-2-70b",
      "precision": "FP16",
      "repo_id": "ohlfw0olaadg/ea-participants/mistral-7b-instruct:MISTRAL-7b-INSTRUCT-1-A100.24.01",
      "source": "NGC"
    },
    {
      "application": "NATURAL_LANGUAGE_PROCESSING",
      "framework": "Other",
      "name": "Llama-2-70b",
      "precision": "float16",
      "repo_id": "ohlfw0olaadg/ea-participants/starcoder:STARCODER-15.5B-8K-FP16-1-A100.24.01",
      "source": "NGC"
    },
    {
      "application": "NATURAL_LANGUAGE_PROCESSING",
      "framework": "NeMo",
      "name": "Llama-2-70b",
      "precision": "float16",
      "repo_id": "ohlfw0olaadg/ea-participants/llama-2-7b:LLAMA-2-7B-4K-FP16-1-A100.24.01",
      "source": "NGC"
    },
    {
      "application": "Other",
      "framework": "Other",
      "name": "Llama-2-70b",
      "precision": "float16",
      "repo_id": "ohlfw0olaadg/ea-participants/nv-gpt-8b-base:NV-GPT-8B-base-4K-FP16-1-A100.24.01",
      "source": "NGC"
    },
    {
      "application": "Other",
      "framework": "Other",
      "name": "Llama-2-70b",
      "precision": "float16",
      "repo_id": "ohlfw0olaadg/ea-participants/llama-2-7b-chat:LLAMA-2-7B-CHAT-4K-FP16-1-A100.24.01",
      "source": "NGC"
    },
    {
      "application": "Other",
      "framework": "Other",
      "name": "Llama-2-70b",
      "precision": "float16",
      "repo_id": "ohlfw0olaadg/ea-participants/llama-2-70b:LLAMA-2-70B-4K-FP16-4-A100.24.01",
      "source": "NGC"
    }
  ]
}

Import the selected model to CML Registry

curl -XPOST -H "Content-Type: application/json" -H "Authorization: Bearer ${CDP_TOKEN}" ${DOMAIN}/api/v2/models -d '{
    "name": "llama",
    "createModelVersionRequestPayload": {
        "metadata":{
            "model_repo_type": "NGC"
        },
        "downloadModelRepoRequest": {
            "source": "NGC",
            "repo_id": "ohlfw0olaadg/ea-participants/nv-embed-qa:4_hf"
        }
    }
}'
curl -XPOST -H "Content-Type: application/json" -H "Authorization: Bearer ${CDP_TOKEN}" ${DOMAIN}/api/v2/models -d '{
    "name": "llama",
    "createModelVersionRequestPayload": {
        "metadata":{
            "model_repo_type": "NGC"
        },
        "downloadModelRepoRequest": {
            "source": "NGC",
            "repo_id": "ohlfw0olaadg/ea-participants/llama-2-7b-chat:LLAMA-2-7B-CHAT-4K-FP16-1-A100.24.01"
        }
    }
}'