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.4 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": [
        2,
        6241,
        2872,
        235292,
        19946,
        8277,
        1192,
        664,
        11657,
        824,
        664,
        38089,
        1192,
        664,
        185500,
        724,
        910,
        968,
        138437,
        42937,
        664,
        235254,
        1192,
        235248,
        235284,
        235265,
        235276,
        235270,
        1,
        4,
        476,
        235292,
        1370,
        4,
        518,
        235292,
        2257,
        1,
        1709,
        5553,
        28355,
        748,
        130787,
        65681,
        482,
        235265,
        1
      ],
      "markers": [
        29,
        33
      ]
    },
    {
      "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": [
        2,
        552,
        6311,
        2872,
        235292,
        10890,
        8847,
        974,
        824,
        664,
        8847,
        1378,
        824,
        235248,
        235304,
        235307,
        1,
        4,
        1566,
        235292,
        793,
        235269,
        573,
        6218,
        1721,
        780,
        3385,
        4,
        1382,
        235292,
        7778,
        235269,
        573,
        6218,
        12723,
        1,
        1709,
        5553,
        28355,
        748,
        130787,
        65681,
        482,
        235265,
        1
      ],
      "markers": [
        17,
        27
      ]
    }
  ],
  "batch": {
    "input_ids": [
      [
        2,
        6241,
        2872,
        235292,
        19946,
        8277,
        1192,
        664,
        11657,
        824,
        664,
        38089,
        1192,
        664,
        185500,
        724,
        910,
        968,
        138437,
        42937,
        664,
        235254,
        1192,
        235248,
        235284,
        235265,
        235276,
        235270,
        1,
        4,
        476,
        235292,
        1370,
        4,
        518,
        235292,
        2257,
        1,
        1709,
        5553,
        28355,
        748,
        130787,
        65681,
        482,
        235265,
        1
      ],
      [
        2,
        552,
        6311,
        2872,
        235292,
        10890,
        8847,
        974,
        824,
        664,
        8847,
        1378,
        824,
        235248,
        235304,
        235307,
        1,
        4,
        1566,
        235292,
        793,
        235269,
        573,
        6218,
        1721,
        780,
        3385,
        4,
        1382,
        235292,
        7778,
        235269,
        573,
        6218,
        12723,
        1,
        1709,
        5553,
        28355,
        748,
        130787,
        65681,
        482,
        235265,
        1,
        0,
        0
      ]
    ],
    "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,
        0,
        0
      ]
    ],
    "marker_pos": [
      [
        29,
        33
      ],
      [
        17,
        27
      ]
    ],
    "marker_mask": [
      [
        true,
        true
      ],
      [
        true,
        true
      ]
    ],
    "qtype": [
      0,
      2
    ]
  },
  "marker_axis_padded": false,
  "logits": [
    [
      -0.9075420498847961,
      -0.7191608548164368
    ],
    [
      -1.4057300090789795,
      0.24854958057403564
    ]
  ],
  "act_logits": [
    [
      1266.0982666015625,
      -1506.8525390625
    ],
    [
      1164.3819580078125,
      -1387.8626708984375
    ]
  ],
  "result": {
    "model": "laya-rl-agent",
    "answers": {
      "structured_ins": {
        "type": "choice",
        "choice": "b",
        "probabilities": {
          "a": 0.453,
          "b": 0.547
        },
        "confidence": 0.0064,
        "answer_confidence": 0.547,
        "action": {
          "act_probability": 1.0
        }
      },
      "list_ins": {
        "type": "noul",
        "noul": 0.8395,
        "confidence": 0.8395,
        "answer_confidence": 0.8395,
        "action": {
          "act_probability": 1.0
        }
      }
    },
    "usage": {
      "input_tokens": 92,
      "output_tokens": 0,
      "state_tokens": 8,
      "state_tokens_dropped": 0,
      "truncated": false,
      "truncated_questions": []
    }
  }
}