v1

latestOpenAPI 3.0.3raw.githubusercontent.com2025-07-15155231.4 KB

Forward pass

Performs a forward pass through the model

post/api/v1/forward

Request body

model_idstring uuid required

Example request

{
  "model_id": "123e4567-e89b-12d3-a456-426614174000",
  "forward_input": {
    "data": [
      {
        "model_input": {
          "chunks": [
            {
              "tokens": [
                1234,
                5678,
                9012
              ]
            }
          ]
        },
        "loss_fn_inputs": {
          "weights": {
            "data": [
              1,
              1,
              1,
              0.5,
              0
            ],
            "dtype": "float32"
          },
          "target_tokens": {
            "data": [
              123,
              456,
              789,
              101,
              202
            ],
            "dtype": "int64"
          }
        }
      }
    ],
    "loss_fn": "cross_entropy"
  }
}

Response

API future for forward completion

request_idstring uuid required
model_idstring uuid

Example response

{
  "request_id": "123e4567-e89b-12d3-a456-426614174000",
  "model_id": "123e4567-e89b-12d3-a456-426614174000"
}
All 15 operations