---
title: "usdcode"
publisher: "nvidia"
type: "endpoint"
updated: "2025-07-07T07:37:14.945Z"
description: "State-of-the-art LLM that answers OpenUSD knowledge queries and generates USD-Python code."
canonical: "https://build.nvidia.com/nvidia/usdcode"
---

# Model Overview

## Description:
USD Code is an OpenUSD Python code generation and knowledge answering model that helps developers to write OpenUSD code and answer OpenUSD knowledge questions.

The following NIM are used by USD Code:
- [Llama-3.1-70b-instruct](https://build.nvidia.com/meta/llama-3_1-70b-instruct)
- [nv-embedqa-e5-v5](https://build.nvidia.com/nvidia/nv-embedqa-e5-v5/)

Llama-3.1-70b-instruct is used to drive the code generation and the agentic workflow, while NVIDIA Retrieval QA E5 Embedding is used for Retrieval Augmented Generation (RAG) to answer OpenUSD knowledge questions, USD code generation, and high-level Helper Function-based code generation. Helper Functions provide high-level abstractions leveraging the USD API, enabling developers to efficiently manage complex tasks such as creating, modifying, and querying USD scene.

This model is ready for commercial use.

## Licenses:

If you download the software and materials as available from the NVIDIA AI product portfolio, use is governed by the [NVIDIA Software License Agreement](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-software-license-agreement/) and the [Product-Specific Terms for NVIDIA AI Products](https://www.nvidia.com/en-us/agreements/enterprise-software/product-specific-terms-for-ai-products/); except for the model which is governed by the [NVIDIA AI Foundation Models Community License Agreement](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-ai-foundation-models-community-license-agreement/), and the RAG dataset which is governed by the terms of the [NVIDIA Asset License](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/omniverse-usdcode/resources/usdcode_asset_license/files). 

ADDITIONAL INFORMATION: For Llama model, Llama 3.1 Community License Agreement, Built with Llama; for NV-EmbedQA-E5-v5: MIT license; for NV-EmbedQA-Mistral7B-v2: Apache 2.0 license, and Snowflake arctic-embed-l: Apache 2.0 license.

If you download the software and materials as available from the NVIDIA Omniverse portfolio, use is governed by the [NVIDIA Software License Agreement](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-software-license-agreement/) and the [Product-Specific Terms for NVIDIA Omniverse](https://www.nvidia.com/en-us/agreements/enterprise-software/product-specific-terms-for-omniverse/); except for the model which is governed by the [NVIDIA AI Foundation Models Community License Agreement](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-ai-foundation-models-community-license-agreement/), and the RAG dataset which is governed by the terms of the [NVIDIA Asset License](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/omniverse-usdcode/resources/usdcode_asset_license/files). 

ADDITIONAL INFORMATION: For Llama model, Llama 3.1 Community License Agreement, Built with Llama; for NV-EmbedQA-E5-v5: MIT license; for NV-EmbedQA-Mistral7B-v2: Apache 2.0 license, and Snowflake arctic-embed-l: Apache 2.0 license. 

## References:
- Llama-3.1 - https://ai.meta.com/blog/meta-llama-3-1/
- NVIDIA Retrieval QA E5 Embedding - https://build.nvidia.com/nvidia/nv-embedqa-e5-v5/
- OpenUSD - https://www.openusd.org/

## Model Architecture: 

- Llama-3.1-70b-instruct
- **Architecture Type:** Transformer
- **Network Architecture:** Llama-3.1
- NVIDIA Retrieval QA E5 Embedding
- **Architecture Type:** Transformer
- **Network Architecture:** Fine-tuned E5-Large-Unsupervised retriever

## Input
**Input Type(s):** Text
**Input Format(s):** String
**Input Parameter(s):** One Dimentional (1D)
**Other Properties Related to Input:** Max context length of 128k tokens

## Output
**Output Type(s):** Text (Code, Python)
**Output Format:** String
**Output Parameter(s):** One Dimentional (1D)
**Other Properties Related to Output:** Max output length of 128k tokens

## Software Integration:
**Runtime Engine(s):** 
* TensorRT

**Supported Hardware Microarchitecture Compatibility:**
* NVIDIA Ampere
* NVIDIA Hopper

**[Preferred/Supported] Operating System(s):**
* Linux

## Model Version(s):
- Llama-3.1
- llama-3.1-70b-instruct:1.3.0
- NVIDIA Retrieval QA E5 Embedding
- nv-embedqa-e5-v5:1.1.0

## Training Dataset:

- Llama-3.1-70b-instruct
- Llama-3.1-70b-instruct were not trained by NVIDIA.
- **Link**: https://build.nvidia.com/meta/llama-3_1-70b-instruct/modelcard
- **Data Collection Method:** Hybrid: Human, Synthetic
- **Labeling Method:** Unknown
- **Description:** The 70B Llama 3.1 model is trained on a new mix of publicly available online data, supports multilingual text input and output (including code), has a 128k context length, 15T+ tokens, GQA enabled, and a knowledge cutoff of December 2023.

- NVIDIA Retrieval QA E5 Embedding
- **Link**: https://build.nvidia.com/nvidia/nv-embedqa-e5-v5/modelcard
- **Data Collection Method:** Unknown
- **Labeling Method:** Unknown
- **Description:** The model is trained on 400k samples from public datasets licensed for commercial use, focused on English (US) for information retrieval and question answering over text documents, with data collection and labeling methods unspecified.

## Inference:
**Engine:** 
* TensorRT

**Test Hardware:**
* A100
* H100

## Ethical Considerations:
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications.  When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse.
For more detailed information on ethical considerations for this model, please see the Model Card++ Explainability, Bias, Safety & Security, and Privacy Subcards. Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).

## Bias

Field                                                                                               |  Response
:---------------------------------------------------------------------------------------------------|:---------------
Participation considerations from adversely impacted groups [protected classes](https://calcivilrights.ca.gov/disputeresolution/protected-characteristics/) in model design and testing:  |  Not Applicable
Measures taken to mitigate against unwanted bias:                                                   |  None of the Above

## Explainability

Field                                                                                                  |  Response
:------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------
Intended Application & Domain:                                                                         |  USD Code Generation & Knowledge Answering
Model Type:                                                                                            |  Code Generation
Intended Users:                                                                                        |  This model is intended for developers to learn and develop with OpenUSD.
Output:                                                                                                |  Text
Describe how the model works:                                                                          |  Text input is passed into transformer-based language model and output is text.
Name the adversely impacted groups this has been tested to deliver comparable outcomes regardless of:  |  Not Applicable
Technical Limitations:                                                                                 |  This model may not produce accurate OpenUSD code when handling complex scene hierarchies and advanced USD features that require domain-specific knowledge.
Verified to have met prescribed NVIDIA quality standards:                                              |  Yes
Performance Metrics:                                                                                   |  Accuracy
Potential Known Risks:                                                                                 |  This model may produce inaccurate OpenUSD code and/or code outside of OpenUSD.
Licensing:                                                                                             |  GOVERNING TERMS: If you download the software and materials as available from the NVIDIA AI product portfolio, use is governed by the [NVIDIA Software License Agreement](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-software-license-agreement/) and the [Product-Specific Terms for NVIDIA AI Products](https://www.nvidia.com/en-us/agreements/enterprise-software/product-specific-terms-for-ai-products/); except for the model which is governed by the [NVIDIA AI Foundation Models Community License Agreement](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-ai-foundation-models-community-license-agreement/), and the RAG dataset which is governed by the terms of the [NVIDIA Asset License](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/omniverse-usdcode/resources/usdcode_asset_license/files). ADDITIONAL INFORMATION: For Llama model, Llama 3.1 Community License Agreement, Built with Llama; for NV-EmbedQA-E5-v5: MIT license; for NV-EmbedQA-Mistral7B-v2: Apache 2.0 license, and Snowflake arctic-embed-l: Apache 2.0 license. If you download the software and materials as available from the NVIDIA Omniverse portfolio, use is governed by the [NVIDIA Software License Agreement](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-software-license-agreement/) and the [Product-Specific Terms for NVIDIA Omniverse](https://www.nvidia.com/en-us/agreements/enterprise-software/product-specific-terms-for-omniverse/); except for the model which is governed by the [NVIDIA AI Foundation Models Community License Agreement](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-ai-foundation-models-community-license-agreement/), and the RAG dataset which is governed by the terms of the [NVIDIA Asset License](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/omniverse-usdcode/resources/usdcode_asset_license/files). ADDITIONAL INFORMATION: For Llama model, Llama 3.1 Community License Agreement, Built with Llama; for NV-EmbedQA-E5-v5: MIT license; for NV-EmbedQA-Mistral7B-v2: Apache 2.0 license, and Snowflake arctic-embed-l: Apache 2.0 license.

## Privacy

Field                                                                                                                              |  Response
:----------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------
Generatable or reverse engineerable personal data?                                                     |  None
Personal data used to create this model?                                                                                       |  Not Applicable
Was consent obtained for any personal data used?                                                                                             |  Not Applicable (No Personal Data)
How often is dataset reviewed?                                                                                                     |  Before Release
Is a mechanism in place to honor data subject right of access or deletion of personal data?                                        |  Not Applicable
If personal data was collected for the development of the model, was it collected directly by NVIDIA?                                            |  Not Applicable
If personal data was collected for the development of the model by NVIDIA, do you maintain or have access to disclosures made to data subjects?  |  Not Applicable
If personal data was collected for the development of this AI model, was it minimized to only what was required?                                 |  Not Applicable
Is there provenance for all datasets used in training?                                                                                |  Yes
Does data labeling (annotation, metadata) comply with privacy laws?                                                                |  Yes
Is data compliant with data subject requests for data correction or removal, if such a request was made?                           |  Yes

## Safety & Security

Field                                               |  Response
:---------------------------------------------------|:----------------------------------
Model Application(s):                               |  Answering OpenUSD knowledge questions and generating Python USD code
Describe the life critical impact (if present).   |  Not Applicable
Use Case Restrictions:                              |  Abide by [NVIDIA API Trial Terms of Service](https://assets.ngc.nvidia.com/products/api-catalog/legal/NVIDIA%20API%20Trial%20Terms%20of%20Service.pdf), and [AI Foundation Models Community License Agreement](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-ai-foundation-models-community-license-agreement/).
Model and dataset restrictions:            |  The Principle of least privilege (PoLP) is applied limiting access for dataset generation and model development.  Restrictions enforce dataset access during training, and dataset license constraints adhered to.

## Prototype

```python
from openai import OpenAI

client = OpenAI(
base_url = "https://integrate.api.nvidia.com/v1",
api_key = "$NVIDIA_API_KEY"
)

completion = client.chat.completions.create(
model="",
messages=[{"role":"user","content":""}],
temperature=,
top_p=,
max_tokens=,
extra_body={"expert_type":""},
stream=NaN
)

print(completion.choices[0].message)
```

```javascript
import OpenAI from 'openai';

const openai = new OpenAI({
apiKey: '$NVIDIA_API_KEY',
baseURL: 'https://integrate.api.nvidia.com/v1',
})

async function main() {
const completion = await openai.chat.completions.create({
model: "",
messages: [{"role":"user","content":""}],
temperature: ,
top_p: ,
max_tokens: ,
expert_type: "",
stream: 
})

process.stdout.write(completion.choices[0]?.message?.content);

}

main();
```

```bash
curl https://integrate.api.nvidia.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $NVIDIA_API_KEY" \
-d '{
"model": "nvidia/usdcode-llama-3.1-70b-instruct",
"messages": [{"role":"user","content":""}],
"temperature": ,   
"top_p": ,
"max_tokens": ,
"expert_type": "",
"stream":                 
}'
```