> For the complete documentation index, see [llms.txt](https://paperspace.gitbook.io/gradient/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://paperspace.gitbook.io/gradient/data/models/create-a-model.md).

# Managing Models

## Create a Model

There are two ways to create a Model in Gradient, and both can be done via the web UI or CLI:

### 1. Run a workload that generates a Model

You can do this via using a [Gradient Action](/gradient/explore-train-deploy/workflows/gradient-actions.md#model-create) or the [SDK](/gradient/more/gradient-python-sdk-1.md). This will place your Model in your Project's [Model Repository](/gradient/data/models.md#model-repository).

{% hint style="info" %}
View the full CLI/SDK Docs for **Models** [here](https://paperspace.github.io/gradient-cli/gradient.cli.html#gradient-models).&#x20;
{% endhint %}

### 2. Upload a Model

{% tabs %}
{% tab title="Web UI" %}
To upload a Model via the Web UI, first navigate to the **Models** page.

From there, click **Upload a Model +**

![](https://3486137344-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-LxSuM4ogzKfBZMsxZZS%2F-LxTANHxJpLUyli4oZbL%2Fclick%20upload.png?alt=media\&token=acad7c02-e8ec-41df-aecb-791514654803)

This will open up a modal to **Upload a Model**, where you can drag 'n' drop a Model file from your local machine (or click to find it locally), as well as select the model **Type** and provide a **Name**, custom **Summary**, and any **Additional Notes** as metadata.  Additionally, you can click "Or Upload a directory" to select a local folder.

![](https://3486137344-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-M9-IgkOl-7wdKf1jRgo%2F-M9-K7ocXj7Tof5Yvc_Z%2FScreen%20Shot%202020-06-04%20at%201.15.11%20PM.png?alt=media\&token=ae3cedfb-8e86-49f3-b40e-11ed336d0488)

Then click **Upload Model**. This will upload and register the Model in Gradient.
{% endtab %}

{% tab title="CLI" %}
You can upload a Model via the CLI with the `gradient models upload` subcommand:

```
gradient models upload downloads/squeezenet1.1.onnx --name squeezenet --modelType ONNX
```

Whether you use the Web UI or CLI, you've now successfully uploaded a Model into Gradient!

*Note: Uploaded Models will not be associated with an Experiment.*&#x20;

Now that you have a Model, whether uploaded or generated by running an Experiment, read on to learn how you can use it to create a Deployment.
{% endtab %}
{% endtabs %}

## View Models in Your Model Repository

You can view your team's Models in your Model Repository via the Web UI or CLI, as seen below.

{% tabs %}
{% tab title="Web UI" %}
Navigate to **Models** in the side nav to see your list of trained Models:

![Models are available within projects](https://3486137344-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-MROCMJIcyoyXw4eBnwX%2F-MROGoWfu1U0GTUplm_x%2FScreen%20Shot%202021-01-18%20at%2010.12.57%20PM.png?alt=media\&token=36e2a6fe-5975-426d-829a-0972a94a6b32)

![A single Model card in your Models list](https://3486137344-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-LiCP3R3Bc82nHuIx-1l%2F-LiCK-FFx6PK9Cnd3_Oy%2FScreen%20Shot%202019-06-25%20at%202.30.08%20AM.png?alt=media\&token=9a5a067b-2fe8-460e-bde5-8f94441cf6ce)

As you can see, the Web UI view shows your Model ID, when the model was created, the S3 bucket location of your model, your metrics summary data, the Experiment ID, the model type, and whether it is currently deployed on Paperspace.

You can click **Deploy Model** to [Create a Deployment](https://docs.paperspace.com/gradient/explore-train-deploy/deployments/managing-deployments#create-a-deployment) with your Model. And you can click **Open Detail** to see a more detailed view of the Model's performance metrics. This will also show a list of all of the checkpoint files (artifacts) generated by the Experiment, as well as the final Model at hand, and you can download any of those files.

![Expanded Model Details showing performance metrics](https://3486137344-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-LiF-dcstyj2mY9jT8XT%2F-LiF-uCALK0e_PS8n3Qs%2FScreen%20Shot%202019-06-25%20at%203.00.52%20PM.png?alt=media\&token=d0ce4b64-89fb-499d-91b1-0777d6ba80fc)

![Expanded Model Details showing model and checkpoint files](https://3486137344-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-LiF-w_oLc9-SDCqCHTb%2F-LiF04evdZaYAwOrR5RP%2FScreen%20Shot%202019-06-25%20at%203.01.13%20PM.png?alt=media\&token=784562b1-45e2-46a6-9738-9c709c4d8168)
{% endtab %}

{% tab title="CLI" %}
Alternately, you can view your Models (currently with less detailed info) via the CLI by running `gradient models list`.

```
$ gradient models list

+------+-----------------+------------+------------+----------------+
| Name | ID              | Model Type | Project ID | Experiment ID  |
+------+-----------------+------------+------------+----------------+
| None | moilact08jpaok  | Tensorflow | prcl68pnk  | eshq20m4egwl8i |
| None | mos2uhkg4yvga0p | Tensorflow | prcl68pnk  | ejuxcxp2zbv0a  |
| None | moc7i8v6bsrhzk  | Custom     | prddziv0z  | e5rxj0aqtgt2   |
```

#### Parameters

The following parameters can be used with the `list` subcommand:

| Argument         | Description                         |
| ---------------- | ----------------------------------- |
| `--experimentId` | Filter models list by Experiment ID |
| `--projectId`    | Filter models list by Project ID    |
| {% endtab %}     |                                     |
| {% endtabs %}    |                                     |

## Renaming a Model

Just click on the name to rename your model.

![](https://3486137344-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-LygOb2w0NtHWbOVkS4J%2F-LybEibfJhiDbdA2kDal%2Fimage.png?generation=1579145399060529\&alt=media)

## Delete a Model

### Delete models in your Model Repository

{% tabs %}
{% tab title="Web UI" %}
Navigate to **Models** in the side nav to see your list of trained Models.  From here you can delete models by clicking the delete button. &#x20;

![](https://3486137344-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-LxxbR-6LbsZOCHDWkP7%2F-LxxdM0SPCudhKSb1aoE%2Fimage.png?alt=media\&token=9a219e16-b00b-4f64-90ff-e18e82922ad3)

![](https://3486137344-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHZRFUkajubOAmgu6Rd%2F-Lxx3XhBFI21yHkthoKm%2F-Lxx4PLYpUu7mkUEVpuf%2FScreen%20Shot%202020-01-06%20at%205.59.03%20PM.png?alt=media\&token=8354ca07-6fa1-4974-8882-a0366d2cebcd)
{% endtab %}

{% tab title="CLI" %}
You can delete a model using the CLI with the following command:

```bash
gradient models delete --id <your model id>
```

{% endtab %}
{% endtabs %}
