Model Hub

Click Models from the left menu to navigate to the Model Hub. The Model Hub provides a two-panel interface for viewing the SambaStudio models.

Model Hub filters panel

The Model Hub filters in the left panel host a robust set of filter options that refine the display of the model cards panel. In addition to the selectable filter options, you can enter a term or value into the Search field to refine the model card list by that input.

Model cards panel

The right panel model cards section displays a grid layout of the models. The tabs above the grid, All models, Upcoming, and Available, are described in Downloading models.

Selecting a model card from the grid displays additional information about that model including:

  • Application denotes the model’s application type of Speech, Language, or Vision.

  • Languages displays the languages supported by Speech or Language models.

  • Type displays the model type including Base, Finetuned, and Pretrained.

  • Size displays the storage size of the model.

  • Owner denotes the model owner.

Base models do not support inference and cannot be deployed for endpoints. It is recommended to use Base models for training and not inference.

Model Hub section callouts
Figure 1. Model Hub interface

Downloading models

SambaStudio provides the ability for organization administrators (OrgAdmin) to download models to the Model Hub. This allows SambaNova created models to be downloaded and used when new models are released. A model available for download will display a download icon in its model card.

A models' status is designated by three categories and can be selected using the tabs above the model card grid.

  • All models displays every model in the Model Hub, including downloaded models, upcoming models, and models that are ready to be downloaded. These models can be viewed by all users of the organization.

  • Upcoming displays future models that will soon be available in the Model Hub for download and can be viewed by all users of the organization.

    • All users of the organization will receive a notification that a new model is ready to be downloaded.

    • Only organization administrators (OrgAdmin) can download models to the Model Hub. Once downloaded, models will be available in all tenants.

  • Available displays models that have been downloaded by organization administrators (OrgAdmin) to the Model Hub. These models can be viewed by all users of the organization.

    Only organization administrators (OrgAdmin) can download models to the Model Hub.

Add models using the GUI

SambaStudio allows you to add a model from a training job or from local storage.

Add a checkpoint from a training job using the GUI

Follow the steps below to add a checkpoint from a training job using the SambaStudio GUI.

  1. From the Model Hub window, click Add checkpoint. The Add a checkpoint to Model Hub box will open.

  2. Select the From training job tab.

  3. From the Select project drop-down, select the project that contains checkpoint.

  4. Enter a name for the new model-checkpoint in the Model name field.

  5. From the Select job drop-down, select the job that contains the checkpoint.

  6. The Select checkpoint drop-down opens a list of available checkpoints from the specified job. Select the model-checkpoint you wish to add from the list.

  7. Select finetuned or pretrained from the Select model type drop-down.

  8. Click Add checkpoint to Model Hub to confirm adding your selected checkpoint and return to the Model Hub. Click Cancel to close the box and return to the Model Hub.

Add checkpoint training
Figure 2. Add a checkpoint from a training job

Add a checkpoint from storage using the GUI

Adding a checkpoint from storage is an optional feature of SambaStudio. Please contact your administrator or SambaNova representative for more information.

SambaStudio allows you to take a model from a different environment and add it as a new model to the current SambaStudio environment through NFS. Follow the steps below to add a checkpoint to the Model Hub from your local storage using the GUI.

  1. Select Local from the Select storage type drop-down.

  2. Enter a unique name for the new model-checkpoint in the Import model name field.

  3. Provide the checkpoint path from your NFS location in the Import model path field. An example path would be user1/checkpoints/subpath.

  4. Specify the step the training job will resume from by entering it into the Steps field. Steps prior to the specified step will be skipped.

  5. From the Select ML App drop-down, choose the ML App to which the model-checkpoint belongs.

  6. Select finetuned or pretrained from the Select checkpoint type drop-down.

  7. Click Add checkpoint to Model Hub to confirm adding your selected checkpoint and return to the Model Hub. Click Cancel to close the box and return to the Model Hub.

Add checkpoint storage
Figure 3. Add a checkpoint from storage

Insufficient storage message

If the required amount of storage space is not available to add the checkpoint, the Insufficient storage message will display describing the Available space and the Required space to import the model. You will need to free up storage space or contact your administrator. Please choose one of the following options.

  1. Click Cancel to stop the add a checkpoint process. Please free up storage space and then restart the add a checkpoint to the Model Hub process.

  2. Click Add checkpoint to Model Hub to proceed and add the checkpoint. Please free up storage space, otherwise the add a checkpoint to the Model Hub process will fail.

A minimum of 10 minutes is required after sufficient storage space has been cleared before the checkpoint will start successfully saving to the Model Hub.

Insufficient storage message
Figure 4. Example insufficient storage message for adding a checkpoint

Add models using the CLI

Use the snapi model import command to import a model to the Model Hub. The example below demonstrates how to import a pretrained model from local storage and have it start at step 20. You will need to specify the following:

  • The Model ID for the --model-id input.

  • Provide the relative path to the model from your NFS location for the --import-path input.

  • A name for your model for the --import-model-name input.

Example command for importing a model from local storage
$ snapi model import \
  --model-id '97ea373f-498e-4ede-822e-a34a88693a09' \
  --import-path 'user1/checkpoints/subpath' \
  --import-model-name 'gt_model_imported' \
  --storage-type 'Local'
  --steps 20

Run snapi model import --help to display additional usage and options.

Share models

SambaStudio allows you to share your models with other users in your organization via tenants. You can share a model that you own to be available to your current tenant or all tenants. Follow the steps below to share your model.

A tenant is an allotment of users and resources within an organization. Each tenant will have its own resources, users, and workloads. See Tenants and management for more information.

  1. Select a model that you own and want to share from the left panel of the model card list.

  2. Click Share to the right of the model name. The Model share settings box will open.

  3. From the Share settings drop-down, select the tenant for the model to be shared.

    1. Share with <tenant-name> allows the model to be shared with the current tenant you are using, identified by its name in the drop-down.

    2. Share with all tenants allows the model to be shared across all tenants.

  4. Click Update to complete the process. Click Cancel to stop the process and return to the Model Hub.

Share model
Figure 5. Share model

Export models

SambaStudio allows users to export any checkpoint they have published to the Model Hub.

SambaNova owned models cannot be exported from the platform.

Export a checkpoint using the GUI

Follow the steps below to export a checkpoint using the SambaStudio GUI.

  1. Select your model from the left panel of the model card list.

  2. Click Export to the right of the model name. The Export details box will open.

  3. Click Continue. The Export details box will display the source path to the exported model’s checkpoint. Copy the path displayed in Exported model path.

  4. Click Done to complete the export process.

Export checkpoint
Figure 6. Export checkpoint

Export using the CLI

Use the snapi model export command to export a model as demonstrated below. You will need to provide the Model ID for the --model-id input.

Example snapi model export command
$ snapi model export \
  --model-id '97ea373f-498e-4ede-822e-a34a88693a09' \
  --storage-type 'Local'

Run snapi model export --help to display additional usage and options.

Use the snapi model list-exported command to view a list of exported models. The help command below displays the usage and options for snapi model list-exported --help.

Example snapi model exported list help command
$ snapi model list-exported --help
Usage: snapi model export [OPTIONS]

 Export the model

╭─ Options ────────────────────────────────────────────────────────────────────╮
│    --file                  TEXT                                              │
│ *  --model-id      -m      TEXT  Model ID [default: None] [required]         │
│    --storage-type  -s      TEXT  Supported storage type for export is        │
│                                  'Local'                                     │
│                                  [default: Local]                            │
│    --help                        Show this message and exit.                 │
╰──────────────────────────────────────────────────────────────────────────────╯

Delete models

SambaStudio allows you to delete your models from the Model Hub.

SambaNova owned models cannot be deleted from the platform.

Delete a model using the GUI

Follow the steps below to delete a model using the SambaStudio GUI.

  1. Select your model from the left panel of the model card list.

  2. Click Delete to the right of the model name. The Delete model box will open. A warning message will display informing you that you are about to delete a model.

  3. Click Yes, delete model to confirm that you want to delete the model.

Delete model
Figure 7. Delete model

Delete a model using the CLI

Use the snapi model remove command to remove and delete a model form the Model Hub.

The help command below displays the usage and options for snapi model remove --help.

Example snapi model remove help command
$ snapi model remove --help
Usage: snapi model remove [OPTIONS]

 Remove the model
 Note: For NFS, the model is not copied as a part of export. Deleting the model deletes the contents of the original model.

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│    --file           TEXT                                                                                                 │
│ *  --model  -m      TEXT  Model Name or ID [default: None] [required]                                                    │
│    --help                 Show this message and exit.                                                                    │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Delete an exported model using the CLI

Use the snapi model delete-exported command to delete an exported model as demonstrated below.

Example snapi model delete exported command
$ snapi model delete-exported \
  --model-id '97ea373f-498e-4ede-822e-a34a88693a09' \
  --model-activity-id '9abbec28-c1cf-11ed-afa1-0242ac120002'

Run snapi model delete-exported --help to display additional usage and options.