Contract Minimums As of 11/22/2024:
- "providerMinStake":
200000000000000000
, (0.2 MOR) - "modelMinStake":
100000000000000000
, (0.1 MOR) - "marketplaceBidFee":
300000000000000000
, (0.3 MOR) - "bidPricePerSeconMin
10000000000
, (0.00000001 MOR)
Needed information (samples):
- Provider/Owner:
0x9E26Fea97F7d644BAf62d0e20e4d4b8F836C166c
# Your ERC-20 Wallet with MOR & ETH - Endpoint:
server.domain.com:3333
# Internet publicly accessible server/node access point - Model ID:
0xe1e6e3e77148d140065ef2cd4fba7f4ae59c90e1639184b6df5c84
# Random 32byte/hex that you generate - ipfcCID:
0xc2d3a5e4f9b7c1a2c8f0b1d5e6c78492fa7bcd34e9a3b9c9e18f25d3be47a1f6
# Another 32byte/hex random for future use - Model Name:
CapybaraHermes-v2.5-Mistral-7b
# Human Readable name for the model - Bid Cost:
10000000000
(0.00000001 MOR) # What will the model cost per second to use
-
To complete these steps, you will need to be running the proxy-router and also have access to the API Port (default=8082)for the Swagger API Interface
-
Authorize Diamond Contract to spend on the Provider's behalf
- http://localhost:8082/swagger/index.html#/transactions/post_blockchain_approve
- Spender Address = Diamond Contract
- Authorized Amount = remember that this is in the form
1*10^18
so make sure there's enough MOR granted to cover the contract fees- To become a provider, offer a model and offer a bid based on the current minimums, you will need to authorize the contract to spend at least
600000000000000000
(0.6 MOR) on your behalf
- To become a provider, offer a model and offer a bid based on the current minimums, you will need to authorize the contract to spend at least
- The Diamond Contract is now authorized to spend MOR on provider's behalf
-
Create Provider in the Diamond contract via swagger api:
- http://localhost:8082/swagger/index.html#/providers/post_blockchain_providers
- addStake = Amount of stake for provider to risk
- Minimum Provider stake is
200000000000000000
, (0.2 MOR) - Provider stake to become a subnet is
10000000000000000000000
, (10,000 MOR)
- Minimum Provider stake is
- Endpoint = Your publicly accessible endpoint for the proxy-router provider (ip:port or fqdn:port no protocol) eg:
mycoolmornode.domain.com:3333
- addStake = Amount of stake for provider to risk
- http://localhost:8082/swagger/index.html#/providers/post_blockchain_providers
-
Create Model in the contract:
- Go to http://localhost:8082/swagger/index.html#/models/post_blockchain_models and enter
- modelId: random 32byte/hex that will be used in conjunction with providerId to uniquely identify model (uuid)
- ipfsCID: another random32byte/hex for future use (model library)
- Fee: fee for the model usage
- addStake: "modelMinStake":
100000000000000000
, (0.1 MOR) - Owner: Provider Wallet Address
- name: Human Readable model like "Llama 2.0" or "Mistral 2.5" or "Collective Cognition 1.1"
- tags: array of tag strings for the model
- Capture the
modelID
from the JSON response NOTE The returnedmodelID
is a combination of your requested modelID and your providerID and will be required to update your models-config.json file AND when offering bids
- Go to http://localhost:8082/swagger/index.html#/models/post_blockchain_models and enter
-
Update the models-config.json file with the new modelID and restart the proxy-router
- Navigate to the proxy-router directory and open the
models-config.json
file - Add the new modelID to the JSON array of models
- Save the file and restart the proxy-router
- Navigate to the proxy-router directory and open the
-
Offer Model Bid in the contract:
- Navigate to http://localhost:8082/swagger/index.html#/bids/post_blockchain_bids and enter
- modelID: Model ID Created above
- pricePerSecond: "bidPricePerSeconMin
10000000000
, (0.00000001 MOR) - Click Execute and capture the
bidID
from the JSON response
- Navigate to http://localhost:8082/swagger/index.html#/bids/post_blockchain_bids and enter