Skip to main content

Manage models


Recommended tutorials for setting up the local version

1. Add a model

Download a Hugging Face model and save on your disk. In this tutorial, bert-large-uncased-whole-word-masking-finetuned-squad model will be downloaded from the Hugging Face Hub. It is a model finetuned on the SQuAD dataset. If the model is saved in ./bert-squad directory, we can upload it to our registry using the following command:

stochasticx models upload \
--name "bert-squad" \
--dir_path "./bert-squad" \
--type "hf"
  • name: will allow you to identify the model later.
  • dir_path: directory path where your model is located.
  • type: model type. In this case a Hugging Face model

2. List and inspect your models

You can list your models with the following command:

stochasticx models ls
CLI output
[+] Collecting all local models

┃ Id ┃ Name ┃ Directory path ┃ Type ┃ Uploaded ┃
│ 62e3a5aab5beb3002644093e │ bert-squad │ │ hf │ True │

To inspect this model further:

stochasticx models inspect --id "62e3a5aab5beb3002644093e"
CLI output
Model ID: 62e3a5aab5beb3002644093e ; Name: bert-squad ; Directory path: None ; Model type: hf ; Uploaded: True


3. Remove a model

stochasticx models remove \
--model_id "62e3a5aab5beb3002644093e"
  • model_id: id of the model to remove.