Condense Tokens

Condense long text sequences of natural language tokens into soft tokens on Subnet 47.


POSTv1/47/organic

Condense text

Condense long text sequences of natural language tokens into soft tokens.

Required attributes

  • Name
    messages
    Type
    array
    Description

    Array of message objects with role (user, assistant, or system) and content.

Optional attributes

  • Name
    tier
    Type
    string
    Description

    Inference tier. Options: inference_0, inference_1, research. Defaults to research.

  • Name
    target_model
    Type
    string
    Description

    Model to use for condensing text. Currently supports mistralai/Mistral-7B-Instruct-v0.2. Defaults to mistralai/Mistral-7B-Instruct-v0.2.

  • Name
    miner_uid
    Type
    integer
    Description

    Miner UID. Defaults to -1.

  • Name
    top_incentive
    Type
    number
    Description

    Top incentive value. Defaults to 0.9.

Request

POST
v1/47/organic
curl -X POST https://api.bitmind.ai/oracle/v1/47/organic \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {
        "role": "user",
        "content": "Tell the user that they need to supply a proper message body"
      }
    ],
    "tier": "research",
    "target_model": "mistralai/Mistral-7B-Instruct-v0.2",
    "miner_uid": -1,
    "top_incentive": 0.9
  }'

Response

{
  "compressed_kv_url": "http://132.145.195.244:10001/1739377231932785714.npy"
}

The condense tokens model

The condense tokens model contains the compressed KV URL.

Properties

  • Name
    compressed_kv_url
    Type
    string
    Description

    The URL of the compressed KV.