Skip to content
Merged

Main #282

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions docs/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,19 @@ You can also download and install SPCTL manually from the Super Protocol [GitHub

## For users

Execute the `./spctl setup` command to initiate the setup dialog. First, provide your Testnet Access Token and then your Testnet Private Key. You can find them in your Testnet invitation email.
Execute the `./spctl setup` command to initiate the setup dialog.

Enter the following Access Token when prompted:

```
eyJhbGciOiJFUzI1NiJ9.eyJhZGRyZXNzIjoiMHhBN0E5NjQ4ZGE2QTg5QjBhNzFhNGMwRDQ2Y2FENDAwMDU3ODI3NGEyIiwiaWF0IjoxNjc5OTk4OTQyLCJleHAiOjE3NDMxMTQxNDJ9.x2lx90D733mToYYdOWhh4hhXn3YowFW4JxFjDFtI7helgp2uqekDHFgekT5yjbBWeHTzRap7SHbDC3VvMIDe0g
```

Then, enter a private key to your testnet EVM wallet.

Further, SPCTL asks if you have a Storj bucket with configured access grants. This step is optional. Select `No` if you do not have them yet. You can configure Storj and provide this information [later in this guide](/cli#set-up-storj-access) or skip this step entirely.

After that, SPCTL creates `config.json` in the SPCTL root directory. If you need to update your account information, execute `./spctl setup` again or modify `config.json` manually in any text editor.
After that, SPCTL creates `config.json` in the SPCTL root directory. If you need to update your account information, execute `./spctl setup` again or modify `config.json` manually in a text editor.

:::note

Expand All @@ -60,7 +68,7 @@ You can also skip the `./spctl setup` command completely and set up SPCTL manual
{
"backend": {
"url": "https://bff.superprotocol.com/graphql",
"accessToken": ""
"accessToken": "eyJhbGciOiJFUzI1NiJ9.eyJhZGRyZXNzIjoiMHhBN0E5NjQ4ZGE2QTg5QjBhNzFhNGMwRDQ2Y2FENDAwMDU3ODI3NGEyIiwiaWF0IjoxNjc5OTk4OTQyLCJleHAiOjE3NDMxMTQxNDJ9.x2lx90D733mToYYdOWhh4hhXn3YowFW4JxFjDFtI7helgp2uqekDHFgekT5yjbBWeHTzRap7SHbDC3VvMIDe0g"
},
"blockchain": {
"rpcUrl": "https://polygon.superprotocol.com/",
Expand All @@ -87,7 +95,6 @@ Do not change the preconfigured parameters and fill in the following ones:

|**Parameter**|**Description**|
|:-|:-|
|accessToken| Your Testnet Access Token from the Testnet invitation email||
|accountPrivateKey| Your Testnet Private Key from the Testnet invitation email|
|key| Private key for order result encryption. Use the [workflows generate-key](/cli/commands/workflows/generate-key) command to create this key|
|bucket| Name of your Storj bucket (optional)|
Expand All @@ -98,7 +105,7 @@ Do not change the preconfigured parameters and fill in the following ones:

This section is for offer providers only. Skip it if you are a regular user.

Offer providers need another copy of SPCTL configured for their provider accounts. If you completed all the necessary steps in the [Providers and Offers] guide, you should have the configuration file created automatically in your Provider Tools directory. Its name looks similar to this:
Offer providers need another copy of SPCTL configured for their provider accounts. If you completed all the necessary steps in the [Providers and Offers] guide, you should have the configuration file created automatically in your Provider Tools directory. Its name looks similar to the following:

```spctl-config-0xB9f0b77BDbAe9fBe3E60BdC567E453f503605BAb.json```

Expand All @@ -122,7 +129,7 @@ Use the following `config.json` template:
{
"backend": {
"url": "https://bff.superprotocol.com/graphql",
"accessToken": ""
"accessToken": "eyJhbGciOiJFUzI1NiJ9.eyJhZGRyZXNzIjoiMHhBN0E5NjQ4ZGE2QTg5QjBhNzFhNGMwRDQ2Y2FENDAwMDU3ODI3NGEyIiwiaWF0IjoxNjc5OTk4OTQyLCJleHAiOjE3NDMxMTQxNDJ9.x2lx90D733mToYYdOWhh4hhXn3YowFW4JxFjDFtI7helgp2uqekDHFgekT5yjbBWeHTzRap7SHbDC3VvMIDe0g"
},
"blockchain": {
"rpcUrl": "https://polygon.superprotocol.com/",
Expand Down Expand Up @@ -150,15 +157,14 @@ Do not change the preconfigured parameters and fill in the following ones:

|**Parameter**|**Description**|
|:-|:-|
|accessToken| Your regular Testnet Access Token from the Testnet invitation email|
|accountPrivateKey| Private Key of your provider's Action Account|
|authorityAccountPrivateKey| Private Key of your provider's Authority Account|
|key| Private key for order result encryption. Use the key from your User Account or generate a new one with the [workflows generate-key](/cli/commands/workflows/generate-key) command|
|bucket| Name of your Storj bucket (optional)|
|writeAccessToken| Storj access grant with **Full** permission (**Read**, **List**, **Write**, **Delete**) for this bucket (optional)|
|readAccessToken| Storj access grant with **Read** permission for this bucket (optional)|

You can find the section with your Authority and Action Accounts Private Keys in `provider-tools-config.json` in the Provider Tools directory:
You can find the section with your Authority and Action Accounts Private Keys in `provider-tools-config.json` in the Provider Tools directory. Example:

```json title="provider-tools-config.json"
"account": {
Expand All @@ -180,7 +186,7 @@ If you use a free Storj account, your files will become unavailable after the en

:::

Create a bucket for your encrypted solutions and data. Refer to the [ Storj documentation](https://docs.storj.io/dcs/getting-started/quickstart-objectbrowser/) for guidance.
Create a bucket for your encrypted solutions and data. Refer to the [Storj documentation](https://docs.storj.io/dcs/getting-started/quickstart-objectbrowser/) for guidance.

Create two access grants for this bucket. One should provide **Full** permission (**Read**, **List**, **Write**, **Delete**), and the other one **Read** permission. Refer to the [Storj guide](https://docs.storj.io/dcs/getting-started/quickstart-uplink-cli/uploading-your-first-object/create-first-access-grant/) to generate access grants.

Expand Down
68 changes: 67 additions & 1 deletion docs/marketplace/guides/deploy-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,70 @@ id: "deploy-model"
title: "Deploy Your Model"
slug: "/guides/deploy-model"
sidebar_position: 4
---
---

This guide provides step-by-step instructions on how to upload and deploy an AI model.

:::note

Uploading models is currently available to Web2 users only.

:::

## 1. Create an offer

1.1. In the **My Offers** screen, click the **New Offer** button.

<img src={require('../images/publish-offer-new-offer.png').default} width="auto" height="auto" border="1"/>
<br/>
<br/>

1.2. Complete all the fields in the appearing window.

<img src={require('../images/new-offer.png').default} width="auto" height="auto" border="1"/>
<br/>
<br/>

- **Name**: Type in the model name. Providing a meaningful name makes it easier to find the model later.
- **Category**: Select the type of task that the model is designed to perform.
- **Engine**: Select compatible engines; it is recommended to select both variants:
+ **GPU-only** engines require CPU+GPU compute offers.
+ **CPU-only** engines can run on both CPU-only and CPU+GPU compute offers. However, models work much slower in this mode.
- **Upload**: Click to upload files or a directory. The selected directory will become the root after upload.

:::note

Due to [Testnet limitations](/marketplace/limitations), the total size of model files should not exceed 13 GB. Support for bigger models will be available in the future.

:::

1.3. Click the **Create Offer** button. Do not close the window until the upload is complete.

## 2. Open the Offer Builder

The created offer is unpublished. You need to configure it in the Offer Builder before publishing to the Marketplace.

To open the offer in the Offer Builder, click **Go to Offer** in the **New Offer** window.

<img src={require('../images/publish-offer-new-offer-go-to-offer.png').default} width="auto" height="auto" border="1"/>
<br/>
<br/>

Or click the **Edit** button next to your offer in the **My Offers** screen.

<img src={require('../images/my-offers-edit.png').default} width="auto" height="auto" border="1"/>
<br/>

## 3. Check the model files

In the **Files** tab, ensure the model format is recognized correctly.

<img src={require('../images/publish-offer-files.png').default} width="auto" height="auto" border="1"/>
<br/>
<br/>

If you need to upload more files related to this model, click the **Add Files** button.

## 4. Deploy the model

Click the **Deploy** button in the bottom-right corner of the screen. This will build an order with your model for a quick deployment.
147 changes: 146 additions & 1 deletion docs/marketplace/guides/publish-offer.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,149 @@ id: "publish-offer"
title: "Publish an Offer"
slug: "/guides/publish-offer"
sidebar_position: 5
---
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

This guide provides step-by-step instructions on how to register a provider and publish an AI model on the Marketplace.

:::note

Creating offers is currently available to Web2 users only.

:::

## 1. Create a provider

1.1. In the [Marketplace web app](https://marketplace.superprotocol.com/), open your account settings.

<img src={require('../images/publish-offer-account.png').default} width="auto" height="auto" border="1"/>
<br/>
<br/>

1.2. Scroll down, type in the desired **Provider Name**, and click **Create Provider**.

<img src={require('../images/publish-offer-create-provider.png').default} width="auto" height="auto" border="1"/>
<br/>

## 2. Create an offer

2.1. In the **My Offers** screen, click the **New Offer** button.

<img src={require('../images/publish-offer-new-offer.png').default} width="auto" height="auto" border="1"/>
<br/>
<br/>

2.2. Complete all the fields in the appearing window.

<img src={require('../images/new-offer.png').default} width="auto" height="auto" border="1"/>
<br/>
<br/>

- **Name**: Type in the model name. Providing a meaningful name makes it easier to find the offer on the Marketplace.
- **Category**: Select the type of task that the model is designed to perform.
- **Engine**: Select compatible engines; it is recommended to select both variants:
+ **GPU-only** engines require CPU+GPU compute offers.
+ **CPU-only** engines can run on both CPU-only and CPU+GPU compute offers. However, models work much slower in this mode.
- **Upload**: Click to upload files or a directory. The selected directory will become the root after upload.

:::note

Due to [Testnet limitations](/marketplace/limitations), the total size of the model files should not exceed 13 GB. Support for bigger models will be available in the future.

:::

2.3. Click the **Create Offer** button. Do not close the window until the upload is complete.

## 3. Open the Offer Builder

The created offer is unpublished. You need to configure it in the Offer Builder before publishing to the Marketplace.

To open the offer in the Offer Builder, click **Go to Offer** in the **New Offer** window.

<img src={require('../images/publish-offer-new-offer-go-to-offer.png').default} width="auto" height="auto" border="1"/>
<br/>
<br/>

Alternatively, click the **Edit** button next to the offer in the **My Offers** screen.

<img src={require('../images/my-offers-edit.png').default} width="auto" height="auto" border="1"/>
<br/>

## 4. Check the model files

In the **Files** tab, ensure the model formats are recognized correctly.

<img src={require('../images/publish-offer-files.png').default} width="auto" height="auto" border="1"/>
<br/>
<br/>

If you need to upload more files related to this model, click the **Add Files** button.

## 5. Provide the offer description

In the **Description** tab, provide information about the offer. It is recommended that you complete all the fields.

<img src={require('../images/offer-builder-description.png').default} width="auto" height="auto" border="1"/>
<br/>
<br/>

- **About\***: Write a general model description. This field supports Markdown. If the model files contain a `README.md` file, the description will be taken from it.
- **Name\***: Change the offer name if you like or leave the name you gave during the offer creation.
- **Category\***: Change the model category if you like or leave the one you selected during the offer creation.
- **Engine\***: Change the engine selection if you like or leave those you selected during the offer creation.
- **Parameters**: Specify the number of model parameters in millions or billions.
- **License\***: State the license under which the model is distributed.
- **Source URL**: Provide a link to the resource with the model files.
- **Languages**: Select supported languages.
- **Libraries**: Select the libraries that the model requires.

Fields required to publish the offer are marked with \*.

## 6. Create requirement slots

In the **Pricing** tab, click the **Add Slot** button to open an editable template for a requirement slot.

<img src={require('../images/offer-builder-pricing.png').default} width="auto" height="auto" border="1"/>
<br/>
<br/>

You can create and configure multiple slots for each offer.

If the offer supports both GPU-only and CPU-only engines, create at least one slot for each type to enable deployment on both.

<Tabs>
<TabItem value="gpu" label="To deploy the model on GPU" default>
Complete the following fieds:

- **Price**: Set the price in SPPI tokens for leasing the model and select the pricing type:
+ **Fixed**: A one-time payment for each order, regardless of the lease duration.
+ **Per Hour**: Payment is based on the number of hours the offer is leased.
- **Disk**: Set the required disk space in gigabytes (GB). It should not be less than the sum of all model files.
- **GPU RAM**: Set the required video RAM in gigabytes (GB).
- **Min Time** and **Max Time**: Set the minimum and maximum lease duration limits, as defined by the provider. `0` means no limit.
- Set all other fields to `0`, including **CPU RAM**.
</TabItem>
<TabItem value="cpu" label="To deploy the model on CPU">
Complete the following fieds:

- **Price**: Set the price in SPPI tokens for leasing the model and select the pricing type:
+ **Fixed**: A one-time payment for each order, regardless of the lease duration.
+ **Per Hour**: Payment is based on the number of hours the offer is leased.
- **Disk**: Set the required disk space in gigabytes (GB). It should not be less than the sum of all model files.
- **CPU RAM**: Set the required RAM in gigabytes (GB).
- **Min Time** and **Max Time**: Set the minimum and maximum lease duration limits, as defined by the provider. `0` means no limit.
- Set all other fields to `0`, including **GPU RAM**.
</TabItem>
</Tabs>

Click **Save** to create a slot.

If the uploaded model exists in several formats, create requirement slots for each of them.

## 7. Publish the offer

Click **Publish Offer** in the bottom-right corner to validate and publish the offer on the Marketplace. If validation is unsuccessful, you will see yellow indicators marking the fields that need to be configured before the offer can be published.

If you want to unpublish the offer, click the **[ ⋮ ]** button in the top-right corner of the screen. Note that offers cannot be completely deleted due to the blockchain immutability. However, unpublished offers do not appear on the Marketplace and cannot be used in orders.
Binary file removed docs/marketplace/images/edit-content.png
Binary file not shown.
Binary file removed docs/marketplace/images/hf-formats.png
Binary file not shown.
Binary file removed docs/marketplace/images/hf-gguf.png
Binary file not shown.
Binary file not shown.
Binary file removed docs/marketplace/images/hf-safetensors.png
Binary file not shown.
Binary file removed docs/marketplace/images/hf-text-generation.png
Binary file not shown.
Binary file removed docs/marketplace/images/hf-text-to-image.png
Binary file not shown.
Binary file removed docs/marketplace/images/info.png
Binary file not shown.
Binary file added docs/marketplace/images/my-offers-edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/marketplace/images/offer-builder-pricing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/marketplace/images/publish-offer-account.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/marketplace/images/publish-offer-files.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/marketplace/images/upload-content-done.png
Binary file not shown.
10 changes: 5 additions & 5 deletions docs/marketplace/my-offers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ slug: "/my-offers"
sidebar_position: 5
---

This screen allows you to browse your offers and deploy your uploaded models.
This screen allows you to browse your offers and deploy uploaded models.

<img src={require('../images/my-offers.png').default} width="auto" height="auto" border="1"/>
<br/>
<br/>

The **New Offer** button opens a [modal window](/marketplace/my-offers/new-offer) where you can upload a model and create an offer. After uploading, you can publish the offer on the Marketplace to lease the model to other users or deploy the model without publishing. Check the guides on how to [Deploy Your Model](/marketplace/guides/deploy-model) and [Publish an Offer](/marketplace/guides/publish-offer) for step-by-step instructions.
The **New Offer** button opens a [modal window](/marketplace/my-offers/new-offer) where you can upload a model and create an offer. After uploading, you can deploy the model. Additionally, you can configure and publish the offer on the Marketplace to lease the uploaded model to other users. Refer to the guides on [Deploying Your Model](/marketplace/guides/deploy-model) and [Publishing an Offer](/marketplace/guides/publish-offer) for step-by-step instructions.

The table in the center of the screen lists all your offers, both published and unpublished.
The table in the center of the screen lists all your offersboth published and unpublished.

The **Edit** button opens the [Offer Builder](/marketplace/my-offers/offer-builder) allowing you to modify and publish an offer to the Marketplace.
The **Edit** button opens the [Offer Builder](/marketplace/my-offers/offer-builder), where you can configure and publish the offer.

The **Deploy** button adds the offer to an order and opens the [Order Builder](/marketplace/order-builder) to quickly deploy the model.
The **Deploy** button adds the offer to an order and opens the [Order Builder](/marketplace/order-builder) for quick deployment.
14 changes: 8 additions & 6 deletions docs/marketplace/my-offers/new-offer.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ slug: "/my-offers/new-offer"
sidebar_position: 1
---

This window allows you to upload a model and create an offer. After uploading, you can publish the offer on the Marketplace to lease the model to other users or deploy the model without publishing.
This window allows you to upload a model and create an offer. After uploading, you can deploy the model. Additionally, you can configure and publish the offer on the Marketplace to lease the uploaded model to other users.

<img src={require('../images/new-offer.png').default} width="auto" height="auto" border="1"/>
<br/>
<br/>

To upload a model, complete all the fields:

- **Name**: Provide any desired name.
- **Category**: Select the type of task that a model is designed to perform.
- **Engine**: Select compatible engines. Engine are required to deploy models and provide a user interface. Each engine exists in two variants, 'CPU only' and 'GPU only'. It is recommended that you choose both and decide how you want to run the model later during order creation.
- **Upload**: Click to select files or directories to upload.
- **Name**: A model name. Providing a meaningful name makes it easier to find the model later.
- **Category**: Type of task that a model is designed to perform.
- **Engine**: A solution to deploy the model and provide a user interface. Each engine has two variants:
+ **GPU-only** engines require CPU+GPU compute offers to run.
+ **CPU-only** engines can run on both CPU-only and CPU+GPU compute offers. However, models work much slower in this mode.
- **Upload**: A directory or files to upload. The uploaded model files are encrypted and accessible only to the Confidential Computing machine that deploys the model.

You can change all this data later, including the uploaded files.
You can modify all of this data later using the [Offer Builder](/marketplace/my-offers/offer-builder), including replacing or adding uploaded files.
Loading