> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo-platform/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo-platform/_mcp/server.

# Create a Model FileSet

<a id="ft-create-model-fileset" />

Create a FileSet containing your base model checkpoint before creating a Model Entity.

## Prerequisites

* Obtained the base URL of your NeMo Platform.
* For gated or private HuggingFace models: Created a secret with your HF token. Refer to [Manage Secrets](/documentation/get-started/core-concepts/manage-secrets).
* Set the `NMP_BASE_URL` environment variable.

```bash
export NMP_BASE_URL="https://your-nemo-platform-url"
```

***

## From HuggingFace Hub

The most common method is downloading directly from HuggingFace. The example below uses [Qwen/Qwen3-1.7B](https://huggingface.co/Qwen/Qwen3-1.7B), a public model that requires no token:

```python
import os
from nemo_platform import ConflictError, NeMoPlatform
from nemo_platform.types.files import HuggingfaceStorageConfigParam

client = NeMoPlatform(
    base_url=os.environ.get("NMP_BASE_URL", "http://localhost:8080"),
    workspace="default",
)

HF_REPO_ID = "Qwen/Qwen3-1.7B"
MODEL_NAME = "qwen3-1.7b"

# Create FileSet from HuggingFace
try:
    fileset = client.files.filesets.create(
        workspace="default",
        name=MODEL_NAME,
        description="Qwen3 1.7B from HuggingFace",
        purpose="model",
        storage=HuggingfaceStorageConfigParam(
            type="huggingface",
            repo_id=HF_REPO_ID,
            repo_type="model",
        ),
    )
    print(f"Created FileSet: {fileset.name}")
except ConflictError:
    print(f"FileSet '{MODEL_NAME}' already exists, retrieving...")
    fileset = client.files.filesets.retrieve(workspace="default", name=MODEL_NAME)

print(f"FileSet ready: {fileset.name}")
```

Gated models (such as Llama) require a HuggingFace token. To use one:

1. Accept the model license on the HuggingFace model page.
2. Create a HuggingFace token with read access.
3. Store the token as a secret in the platform (see [Manage Secrets](/documentation/get-started/core-concepts/manage-secrets)), then pass it as `token_secret` in the storage config:

```python
storage=HuggingfaceStorageConfigParam(
    type="huggingface",
    repo_id="meta-llama/Llama-3.2-1B-Instruct",
    repo_type="model",
    token_secret="my-hf-token",
)
```

***

## From NGC

For models from NVIDIA NGC:

```python
import os
from nemo_platform import ConflictError, NeMoPlatform
from nemo_platform.types.files import NGCStorageConfigParam

client = NeMoPlatform(
    base_url=os.environ.get("NMP_BASE_URL", "http://localhost:8080"),
    workspace="default",
)

MODEL_NAME = "nemotron-mini-4b"
NGC_RESOURCE = "nemotron-mini-4b-instruct"
NGC_ORG = "nvidia"
NGC_TEAM = "nemo"
NGC_VERSION = "1.0"
NGC_API_KEY_SECRET = "my-ngc-key"
NGC_API_KEY = os.environ.get("NGC_API_KEY")
if not NGC_API_KEY:
    raise RuntimeError("Set NGC_API_KEY before creating the NGC secret.")

# First, create a secret for your NGC API key (if not already created)
try:
    ngc_secret = client.secrets.create(
        name=NGC_API_KEY_SECRET,
        workspace="default",
        value=NGC_API_KEY,
    )
    print(f"Created secret: {NGC_API_KEY_SECRET}")
except ConflictError:
    print(f"Secret '{NGC_API_KEY_SECRET}' already exists, continuing...")
    ngc_secret = client.secrets.retrieve(name=NGC_API_KEY_SECRET, workspace="default")

# Create FileSet from NGC
try:
    fileset = client.files.filesets.create(
        workspace="default",
        name=MODEL_NAME,
        description="Nemotron Mini 4B from NGC",
        purpose="model",
        storage=NGCStorageConfigParam(
            type="ngc",
            org=NGC_ORG,
            team=NGC_TEAM,
            resource=NGC_RESOURCE,  # NGC resource name
            version=NGC_VERSION,
            api_key_secret=ngc_secret.name,
        ),
    )
    print(f"Created FileSet: {fileset.name}")
except ConflictError:
    print("FileSet already exists, retrieving...")
    fileset = client.files.filesets.retrieve(workspace="default", name=MODEL_NAME)
```

***

## Check FileSet Status

Files are downloaded in the background after you create a FileSet. Check the status:

```python
# List files in the FileSet
files = client.files.list(
    workspace="default",
    fileset="qwen3-1.7b",
)

print(f"Files in FileSet ({len(files)} total):")
for f in files[:10]:  # Show first 10
    print(f" - {f.path} ({f.size:,} bytes)")
```

```json
{
  "data": [
    {
      "file_ref": "/v2/workspaces/default/filesets/qwen3-1.7b/-/config.json",
      "path": "config.json",
      "size": 1234,
      "cache_status": null
    },
    {
      "file_ref": "/v2/workspaces/default/filesets/qwen3-1.7b/-/model.safetensors",
      "path": "model.safetensors",
      "size": 2400000000,
      "cache_status": null
    },
    {
      "file_ref": "/v2/workspaces/default/filesets/qwen3-1.7b/-/tokenizer.json",
      "path": "tokenizer.json",
      "size": 9085657,
      "cache_status": null
    },
    {
      "file_ref": "/v2/workspaces/default/filesets/qwen3-1.7b/-/tokenizer_config.json",
      "path": "tokenizer_config.json",
      "size": 901,
      "cache_status": null
    }
  ]
}
```

***

## Next Steps

Proceed to [create a Model Entity](/documentation/customizer-reference/manage-model-entities/create-a-model-entity).