Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

6.8 KB
Raw Blame
{
  "name": "nonstring_instructions",
  "state": "Le client demande un remboursement immédiat.",
  "serialized_state": "Le client demande un remboursement immédiat.",
  "questions": {
    "structured_ins": {
      "type": "choice",
      "instructions": {
        "task": "route",
        "hint": "Müller & co <urgent>",
        "n": 2.0
      },
      "criteria": {
        "a": "first",
        "b": "second"
      }
    },
    "list_ins": {
      "type": "noul",
      "instructions": [
        "step one",
        "step two",
        3
      ]
    }
  },
  "per_question": [
    {
      "id": "structured_ins",
      "type": "choice",
      "qtype": 0,
      "instructions": "{\"task\": \"route\", \"hint\": \"Müller & co <urgent>\", \"n\": 2.0}",
      "head_text": "choice question: {\"task\": \"route\", \"hint\": \"Müller & co <urgent>\", \"n\": 2.0}",
      "options": [
        "a: first",
        "b: second"
      ],
      "input_ids": [
        50281,
        22122,
        1953,
        27,
        17579,
        14605,
        1381,
        346,
        25966,
        995,
        346,
        42988,
        1381,
        346,
        46,
        35603,
        708,
        820,
        654,
        3922,
        290,
        43856,
        346,
        79,
        1381,
        374,
        15,
        17,
        94,
        50282,
        50284,
        247,
        27,
        806,
        50284,
        270,
        27,
        1273,
        50282,
        4015,
        5268,
        4831,
        70,
        440,
        867,
        7390,
        339,
        420,
        4293,
        860,
        5168,
        255,
        15,
        50282
      ],
      "markers": [
        30,
        34
      ]
    },
    {
      "id": "list_ins",
      "type": "noul",
      "qtype": 2,
      "instructions": "[\"step one\", \"step two\", 3]",
      "head_text": "noul question: [\"step one\", \"step two\", 3]",
      "options": [
        "false: no, the statement does not hold",
        "true: yes, the statement holds"
      ],
      "input_ids": [
        50281,
        79,
        3941,
        1953,
        27,
        15640,
        10539,
        581,
        995,
        346,
        10539,
        767,
        995,
        495,
        62,
        50282,
        50284,
        3221,
        27,
        642,
        13,
        253,
        3908,
        1057,
        417,
        2186,
        50284,
        2032,
        27,
        4754,
        13,
        253,
        3908,
        6556,
        50282,
        4015,
        5268,
        4831,
        70,
        440,
        867,
        7390,
        339,
        420,
        4293,
        860,
        5168,
        255,
        15,
        50282
      ],
      "markers": [
        16,
        26
      ]
    }
  ],
  "batch": {
    "input_ids": [
      [
        50281,
        22122,
        1953,
        27,
        17579,
        14605,
        1381,
        346,
        25966,
        995,
        346,
        42988,
        1381,
        346,
        46,
        35603,
        708,
        820,
        654,
        3922,
        290,
        43856,
        346,
        79,
        1381,
        374,
        15,
        17,
        94,
        50282,
        50284,
        247,
        27,
        806,
        50284,
        270,
        27,
        1273,
        50282,
        4015,
        5268,
        4831,
        70,
        440,
        867,
        7390,
        339,
        420,
        4293,
        860,
        5168,
        255,
        15,
        50282
      ],
      [
        50281,
        79,
        3941,
        1953,
        27,
        15640,
        10539,
        581,
        995,
        346,
        10539,
        767,
        995,
        495,
        62,
        50282,
        50284,
        3221,
        27,
        642,
        13,
        253,
        3908,
        1057,
        417,
        2186,
        50284,
        2032,
        27,
        4754,
        13,
        253,
        3908,
        6556,
        50282,
        4015,
        5268,
        4831,
        70,
        440,
        867,
        7390,
        339,
        420,
        4293,
        860,
        5168,
        255,
        15,
        50282,
        50283,
        50283,
        50283,
        50283
      ]
    ],
    "attention_mask": [
      [
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1
      ],
      [
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        0,
        0,
        0,
        0
      ]
    ],
    "marker_pos": [
      [
        30,
        34
      ],
      [
        16,
        26
      ]
    ],
    "marker_mask": [
      [
        true,
        true
      ],
      [
        true,
        true
      ]
    ],
    "qtype": [
      0,
      2
    ]
  },
  "marker_axis_padded": false,
  "logits": [
    [
      0.8464770317077637,
      0.3575015962123871
    ],
    [
      3.6893937587738037,
      -0.15227362513542175
    ]
  ],
  "act_logits": [
    [
      4315.3662109375,
      -3523.5693359375
    ],
    [
      4536.42138671875,
      -3702.72509765625
    ]
  ],
  "result": {
    "model": "laya-rl-agent",
    "answers": {
      "structured_ins": {
        "type": "choice",
        "choice": "a",
        "probabilities": {
          "a": 0.5638,
          "b": 0.4362
        },
        "confidence": 0.0118,
        "answer_confidence": 0.5638,
        "action": {
          "act_probability": 1.0
        }
      },
      "list_ins": {
        "type": "noul",
        "noul": 0.126,
        "confidence": 0.874,
        "answer_confidence": 0.874,
        "action": {
          "act_probability": 1.0
        }
      }
    },
    "usage": {
      "input_tokens": 104,
      "output_tokens": 0,
      "state_tokens": 14,
      "state_tokens_dropped": 0,
      "truncated": false,
      "truncated_questions": []
    }
  }
}