> This page is for version 0.7.1.
> For other versions, use one of these documentation indexes:
> - Latest (default): https://docs.nvidia.com/nemo-helix/latest/llms.txt
> - 0.8.0: https://docs.nvidia.com/nemo-helix/v0.8.0/llms.txt
> - 0.7.1: https://docs.nvidia.com/nemo-helix/v0.7.1/llms.txt
> - 0.7.0: https://docs.nvidia.com/nemo-helix/v0.7.0/llms.txt
> - 0.6.0: https://docs.nvidia.com/nemo-helix/v0.6.0/llms.txt
> - 0.5.1: https://docs.nvidia.com/nemo-helix/v0.5.1/llms.txt
> - 0.5.0: https://docs.nvidia.com/nemo-helix/v0.5.0/llms.txt
> - 0.4.0: https://docs.nvidia.com/nemo-helix/v0.4.0/llms.txt
> - 0.3.0: https://docs.nvidia.com/nemo-helix/v0.3.0/llms.txt
> - 0.2.0: https://docs.nvidia.com/nemo-helix/v0.2.0/llms.txt

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

# Create a Model FileSet

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

## Prerequisites

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

```bash
export NHX_BASE_URL="https://your-nemo-helix-url"
```

---

## From Hugging Face Hub

The most common method is downloading directly from Hugging Face. 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_helix import NeMoHelix
from nemo_helix_plugin.files.storage_config import HuggingfaceStorageConfig
from nemo_helix_plugin.files.types import CreateFilesetRequest

sdk = NeMoHelix(
    base_url=os.environ.get("NHX_BASE_URL", "http://localhost:8080"),
    workspace="default",
)

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

# Create FileSet from Hugging Face (returns the existing FileSet if it already exists)
fileset = sdk.files.client.create_fileset(
    workspace="default",
    body=CreateFilesetRequest(
        name=MODEL_NAME,
        description="Qwen3 1.7B from Hugging Face",
        purpose="model",
        storage=HuggingfaceStorageConfig(
            type="huggingface",
            repo_id=HF_REPO_ID,
            repo_type="model",
        ),
    ),
    exist_ok=True,
).data()

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

> **Tip**
>
> Gated models (such as Llama) require a Hugging Face token. To use one:
>
> 1. Accept the model license on the Hugging Face model page.
> 2. Create a Hugging Face 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=HuggingfaceStorageConfig(
>     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_helix import ConflictError, NeMoHelix
from nemo_helix_plugin.files.storage_config import NGCStorageConfig
from nemo_helix_plugin.files.types import CreateFilesetRequest

sdk = NeMoHelix(
    base_url=os.environ.get("NHX_BASE_URL", "http://localhost:8080"),
    workspace="default",
)

MODEL_NAME = "nemotron-mini-4b"
NGC_TARGET = "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 = sdk.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 = sdk.secrets.retrieve(name=NGC_API_KEY_SECRET, workspace="default")

# Create FileSet from NGC (returns the existing FileSet if it already exists)
fileset = sdk.files.client.create_fileset(
    workspace="default",
    body=CreateFilesetRequest(
        name=MODEL_NAME,
        description="Nemotron Mini 4B from NGC",
        purpose="model",
        storage=NGCStorageConfig(
            type="ngc",
            org=NGC_ORG,
            team=NGC_TEAM,
            target=NGC_TARGET,  # NGC asset name
            target_type="resource",
            version=NGC_VERSION,
            api_key_secret=ngc_secret.name,
        ),
    ),
    exist_ok=True,
).data()
print(f"FileSet ready: {fileset.name}")
```

---

## Check FileSet Status

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

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

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

#### Example Response

```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).