Managing Models
After creating a model registry, you can manage models in the registry using different methods based on the registry type.
-
Hugging Face Model Registry: Models are stored on the Hugging Face platform. Refer to Hugging Face official documentation to manage models.
-
File System Model Registry: Models are stored locally. Refer to this section to use the Neutree CLI to push, view, or delete models. You can also download models from Hugging Face and push them to file system model registries.
Prerequisites
Section titled “Prerequisites”Before managing models in file system model registries, complete the following prerequisites:
-
Download the Neutree CLI installation file according to your server’s CPU architecture.
-
Grant executable permissions to the CLI installation file.
Terminal window chmod +x neutree-cli-<arch>You can view the tool’s usage help with:
Terminal window neutree-cli model -h -
Create an API key and save it securely.
Push Model
Section titled “Push Model”Use the Neutree CLI to push a local model to a file system model registry:
neutree-cli model push <local_model_dir> \ -n <model_name> \ -d [model_description] \ -v [model_version] \ -r <model_registry> \ -w [workspace] \ --api-key <api_key> \ --server-url <server_url>Parameter descriptions:
| Parameter | Description |
|---|---|
<local_model_dir> | The directory containing the local model. |
<model_name> | The name under which the model will be stored in the registry. File system model registry names currently don’t support /, please use other characters such as _. If creating endpoints using a model catalog, ensure the model name here matches the name in the model catalog. |
[model_description] | Model description, optional. |
[model_version] | Model version, optional. If left empty, the system will auto-generate one. In the model registry, models with the same name can have multiple versions. |
<model_registry> | The name of the target model registry. |
[workspace] | Workspace name, optional. If left empty, defaults to the default workspace. |
<api_key> | The API key created in the prerequisites. |
<server_url> | The control plane access URL, e.g., http://localhost:3000. |
View Models
Section titled “View Models”Use the following command to view models in a file system model registry:
neutree-cli model list -r <model_registry> \ -w [workspace] \ --api-key <api_key> \ --server-url <server_url>Parameter descriptions:
| Parameter | Description |
|---|---|
<model_registry> | The name of the target model registry. |
[workspace] | Workspace name, optional. If left empty, defaults to the default workspace. |
<api_key> | The API key created in the prerequisites. |
<server_url> | The control plane access URL, e.g., http://localhost:3000. |
Delete Model
Section titled “Delete Model”Use the following command to delete a model from a file system model registry:
neutree-cli model delete <model_name>:<model_version> \ -r <model_registry> \ -w [workspace] \ --api-key <api_key> \ --server-url <server_url>Parameter descriptions:
| Parameter | Description |
|---|---|
<model_name> | The name under which the model is stored in the registry. |
<model_version> | Model version. If no version was specified when pushing the model, first view the model version. |
<model_registry> | The name of the target model registry. |
[workspace] | Workspace name, optional. If left empty, defaults to the default workspace. |
<api_key> | The API key created in the prerequisites. |
<server_url> | The control plane access URL, e.g., http://localhost:3000. |
Download Models from Hugging Face
Section titled “Download Models from Hugging Face”Skip this section if you’re only using file system model registries with locally available models.
-
Install the Hugging Face CLI. Refer to Hugging Face official documentation.
-
Log in to Hugging Face:
Terminal window hf auth login -
Use the
hf downloadcommand to download models to a local directory. Here are examples for common scenarios:-
Download Complete Model
Download a complete model from Hugging Face to a local directory. For example, download the
Qwen/Qwen3-0.6Bmodel to the./test-modeldirectory.Terminal window hf download Qwen/Qwen3-0.6B --local-dir ./test-model -
Selectively Download Specific Files
For large model repositories, you can use
--includeand--excludeparameters to precisely control downloads and improve efficiency:-
Download only specific precision models. For example, download only Q8.0 precision GGUF models:
Terminal window hf download microsoft/Phi-3-mini-4k-instruct-gguf \--include "*q8_0.gguf" \--local-dir ./phi3-q8 -
Download multiple types of key files. For example, download Q8.0 precision models and configuration files:
Terminal window hf download microsoft/Phi-3-mini-4k-instruct-gguf \--include "*q8_0.gguf" \--include "*.json" \--include "*.txt" \--local-dir ./phi3-q8 -
Exclude unnecessary large files. For example, download the
Qwen/Qwen3-0.6Bmodel but exclude large weight files:Terminal window hf download Qwen/Qwen3-0.6B \--exclude "*.safetensors" \--exclude "pytorch_model.bin" \--local-dir ./qwen3-lightweight
-
-
After downloading models to a local directory and completing the prerequisites, you can push, view, or delete models as needed.