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.

24.1 KB
Raw Blame
{
  "name": "lang_size_buckets",
  "state": "Subject: Double charged on invoice 88213\n\nHi, I was billed twice this month for the Pro plan and the second charge has not been refunded. This is the third time I have written in. If it is not fixed today I am cancelling the account.",
  "serialized_state": "Subject: Double charged on invoice 88213\n\nHi, I was billed twice this month for the Pro plan and the second charge has not been refunded. This is the third time I have written in. If it is not fixed today I am cancelling the account.",
  "questions": {
    "pair": {
      "type": "choice",
      "instructions": "Which of the two?",
      "criteria": {
        "first": "the first option",
        "second": "the second option"
      }
    },
    "wide": {
      "type": "choice",
      "instructions": "Which department should handle this?",
      "criteria": {
        "billing": "invoices and payments",
        "technical": "bugs and outages",
        "account": "logins and seats",
        "sales": "quotes and upgrades",
        "legal": "contracts and privacy",
        "shipping": "delivery and returns",
        "other": "anything else"
      }
    },
    "scale": {
      "type": "score",
      "instructions": "How urgent is this request?",
      "criteria": [
        "none",
        "low",
        "mild",
        "high",
        "severe",
        "critical"
      ]
    },
    "flag": {
      "type": "noul",
      "instructions": "The customer threatens to cancel the account."
    }
  },
  "per_question": [
    {
      "id": "pair",
      "type": "choice",
      "qtype": 0,
      "instructions": "Which of the two?",
      "head_text": "choice question: Which of the two?",
      "options": [
        "first: the first option",
        "second: the second option"
      ],
      "input_ids": [
        2,
        6241,
        2872,
        235292,
        12236,
        576,
        573,
        1378,
        235336,
        1,
        4,
        1370,
        235292,
        573,
        1370,
        4984,
        4,
        2257,
        235292,
        573,
        2257,
        4984,
        1,
        28437,
        235292,
        12510,
        12497,
        611,
        42529,
        235248,
        235321,
        235321,
        235284,
        235274,
        235304,
        109,
        11192,
        235269,
        590,
        729,
        100159,
        11594,
        736,
        2514,
        604,
        573,
        1122,
        1780,
        578,
        573,
        2257,
        6256,
        919,
        780,
        1125,
        103147,
        235265,
        1417,
        603,
        573,
        4906,
        1069,
        590,
        791,
        5952,
        575,
        235265,
        1927,
        665,
        603,
        780,
        8115,
        3646,
        590,
        1144,
        132991,
        573,
        3185,
        235265,
        1
      ],
      "markers": [
        10,
        16
      ]
    },
    {
      "id": "wide",
      "type": "choice",
      "qtype": 0,
      "instructions": "Which department should handle this?",
      "head_text": "choice question: Which department should handle this?",
      "options": [
        "billing: invoices and payments",
        "technical: bugs and outages",
        "account: logins and seats",
        "sales: quotes and upgrades",
        "legal: contracts and privacy",
        "shipping: delivery and returns",
        "other: anything else"
      ],
      "input_ids": [
        2,
        6241,
        2872,
        235292,
        12236,
        9888,
        1412,
        6589,
        736,
        235336,
        1,
        4,
        54972,
        235292,
        88220,
        578,
        15598,
        4,
        9838,
        235292,
        30608,
        578,
        142788,
        4,
        3185,
        235292,
        12138,
        235256,
        578,
        18723,
        4,
        7108,
        235292,
        11442,
        578,
        47800,
        4,
        7035,
        235292,
        20078,
        578,
        16961,
        4,
        10928,
        235292,
        8335,
        578,
        8753,
        4,
        1156,
        235292,
        4341,
        1354,
        1,
        28437,
        235292,
        12510,
        12497,
        611,
        42529,
        235248,
        235321,
        235321,
        235284,
        235274,
        235304,
        109,
        11192,
        235269,
        590,
        729,
        100159,
        11594,
        736,
        2514,
        604,
        573,
        1122,
        1780,
        578,
        573,
        2257,
        6256,
        919,
        780,
        1125,
        103147,
        235265,
        1417,
        603,
        573,
        4906,
        1069,
        590,
        791,
        5952,
        575,
        235265,
        1927,
        665,
        603,
        780,
        8115,
        3646,
        590,
        1144,
        132991,
        573,
        3185,
        235265,
        1
      ],
      "markers": [
        11,
        17,
        23,
        30,
        36,
        42,
        48
      ]
    },
    {
      "id": "scale",
      "type": "score",
      "qtype": 1,
      "instructions": "How urgent is this request?",
      "head_text": "score question: How urgent is this request?",
      "options": [
        "level 0: none",
        "level 1: low",
        "level 2: mild",
        "level 3: high",
        "level 4: severe",
        "level 5: critical"
      ],
      "input_ids": [
        2,
        7716,
        2872,
        235292,
        2250,
        34722,
        603,
        736,
        3853,
        235336,
        1,
        4,
        2403,
        235248,
        235276,
        235292,
        8031,
        4,
        2403,
        235248,
        235274,
        235292,
        3178,
        4,
        2403,
        235248,
        235284,
        235292,
        21870,
        4,
        2403,
        235248,
        235304,
        235292,
        1536,
        4,
        2403,
        235248,
        235310,
        235292,
        14586,
        4,
        2403,
        235248,
        235308,
        235292,
        9523,
        1,
        28437,
        235292,
        12510,
        12497,
        611,
        42529,
        235248,
        235321,
        235321,
        235284,
        235274,
        235304,
        109,
        11192,
        235269,
        590,
        729,
        100159,
        11594,
        736,
        2514,
        604,
        573,
        1122,
        1780,
        578,
        573,
        2257,
        6256,
        919,
        780,
        1125,
        103147,
        235265,
        1417,
        603,
        573,
        4906,
        1069,
        590,
        791,
        5952,
        575,
        235265,
        1927,
        665,
        603,
        780,
        8115,
        3646,
        590,
        1144,
        132991,
        573,
        3185,
        235265,
        1
      ],
      "markers": [
        11,
        17,
        23,
        29,
        35,
        41
      ]
    },
    {
      "id": "flag",
      "type": "noul",
      "qtype": 2,
      "instructions": "The customer threatens to cancel the account.",
      "head_text": "noul question: The customer threatens to cancel the account.",
      "options": [
        "false: no, the statement does not hold",
        "true: yes, the statement holds"
      ],
      "input_ids": [
        2,
        552,
        6311,
        2872,
        235292,
        714,
        6650,
        80670,
        577,
        12459,
        573,
        3185,
        235265,
        1,
        4,
        1566,
        235292,
        793,
        235269,
        573,
        6218,
        1721,
        780,
        3385,
        4,
        1382,
        235292,
        7778,
        235269,
        573,
        6218,
        12723,
        1,
        28437,
        235292,
        12510,
        12497,
        611,
        42529,
        235248,
        235321,
        235321,
        235284,
        235274,
        235304,
        109,
        11192,
        235269,
        590,
        729,
        100159,
        11594,
        736,
        2514,
        604,
        573,
        1122,
        1780,
        578,
        573,
        2257,
        6256,
        919,
        780,
        1125,
        103147,
        235265,
        1417,
        603,
        573,
        4906,
        1069,
        590,
        791,
        5952,
        575,
        235265,
        1927,
        665,
        603,
        780,
        8115,
        3646,
        590,
        1144,
        132991,
        573,
        3185,
        235265,
        1
      ],
      "markers": [
        14,
        24
      ]
    }
  ],
  "batch": {
    "input_ids": [
      [
        2,
        6241,
        2872,
        235292,
        12236,
        576,
        573,
        1378,
        235336,
        1,
        4,
        1370,
        235292,
        573,
        1370,
        4984,
        4,
        2257,
        235292,
        573,
        2257,
        4984,
        1,
        28437,
        235292,
        12510,
        12497,
        611,
        42529,
        235248,
        235321,
        235321,
        235284,
        235274,
        235304,
        109,
        11192,
        235269,
        590,
        729,
        100159,
        11594,
        736,
        2514,
        604,
        573,
        1122,
        1780,
        578,
        573,
        2257,
        6256,
        919,
        780,
        1125,
        103147,
        235265,
        1417,
        603,
        573,
        4906,
        1069,
        590,
        791,
        5952,
        575,
        235265,
        1927,
        665,
        603,
        780,
        8115,
        3646,
        590,
        1144,
        132991,
        573,
        3185,
        235265,
        1,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      [
        2,
        6241,
        2872,
        235292,
        12236,
        9888,
        1412,
        6589,
        736,
        235336,
        1,
        4,
        54972,
        235292,
        88220,
        578,
        15598,
        4,
        9838,
        235292,
        30608,
        578,
        142788,
        4,
        3185,
        235292,
        12138,
        235256,
        578,
        18723,
        4,
        7108,
        235292,
        11442,
        578,
        47800,
        4,
        7035,
        235292,
        20078,
        578,
        16961,
        4,
        10928,
        235292,
        8335,
        578,
        8753,
        4,
        1156,
        235292,
        4341,
        1354,
        1,
        28437,
        235292,
        12510,
        12497,
        611,
        42529,
        235248,
        235321,
        235321,
        235284,
        235274,
        235304,
        109,
        11192,
        235269,
        590,
        729,
        100159,
        11594,
        736,
        2514,
        604,
        573,
        1122,
        1780,
        578,
        573,
        2257,
        6256,
        919,
        780,
        1125,
        103147,
        235265,
        1417,
        603,
        573,
        4906,
        1069,
        590,
        791,
        5952,
        575,
        235265,
        1927,
        665,
        603,
        780,
        8115,
        3646,
        590,
        1144,
        132991,
        573,
        3185,
        235265,
        1
      ],
      [
        2,
        7716,
        2872,
        235292,
        2250,
        34722,
        603,
        736,
        3853,
        235336,
        1,
        4,
        2403,
        235248,
        235276,
        235292,
        8031,
        4,
        2403,
        235248,
        235274,
        235292,
        3178,
        4,
        2403,
        235248,
        235284,
        235292,
        21870,
        4,
        2403,
        235248,
        235304,
        235292,
        1536,
        4,
        2403,
        235248,
        235310,
        235292,
        14586,
        4,
        2403,
        235248,
        235308,
        235292,
        9523,
        1,
        28437,
        235292,
        12510,
        12497,
        611,
        42529,
        235248,
        235321,
        235321,
        235284,
        235274,
        235304,
        109,
        11192,
        235269,
        590,
        729,
        100159,
        11594,
        736,
        2514,
        604,
        573,
        1122,
        1780,
        578,
        573,
        2257,
        6256,
        919,
        780,
        1125,
        103147,
        235265,
        1417,
        603,
        573,
        4906,
        1069,
        590,
        791,
        5952,
        575,
        235265,
        1927,
        665,
        603,
        780,
        8115,
        3646,
        590,
        1144,
        132991,
        573,
        3185,
        235265,
        1,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      [
        2,
        552,
        6311,
        2872,
        235292,
        714,
        6650,
        80670,
        577,
        12459,
        573,
        3185,
        235265,
        1,
        4,
        1566,
        235292,
        793,
        235269,
        573,
        6218,
        1721,
        780,
        3385,
        4,
        1382,
        235292,
        7778,
        235269,
        573,
        6218,
        12723,
        1,
        28437,
        235292,
        12510,
        12497,
        611,
        42529,
        235248,
        235321,
        235321,
        235284,
        235274,
        235304,
        109,
        11192,
        235269,
        590,
        729,
        100159,
        11594,
        736,
        2514,
        604,
        573,
        1122,
        1780,
        578,
        573,
        2257,
        6256,
        919,
        780,
        1125,
        103147,
        235265,
        1417,
        603,
        573,
        4906,
        1069,
        590,
        791,
        5952,
        575,
        235265,
        1927,
        665,
        603,
        780,
        8115,
        3646,
        590,
        1144,
        132991,
        573,
        3185,
        235265,
        1,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        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,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      [
        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,
        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,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        1,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      [
        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,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ]
    ],
    "marker_pos": [
      [
        10,
        16,
        0,
        0,
        0,
        0,
        0
      ],
      [
        11,
        17,
        23,
        30,
        36,
        42,
        48
      ],
      [
        11,
        17,
        23,
        29,
        35,
        41,
        0
      ],
      [
        14,
        24,
        0,
        0,
        0,
        0,
        0
      ]
    ],
    "marker_mask": [
      [
        true,
        true,
        false,
        false,
        false,
        false,
        false
      ],
      [
        true,
        true,
        true,
        true,
        true,
        true,
        true
      ],
      [
        true,
        true,
        true,
        true,
        true,
        true,
        false
      ],
      [
        true,
        true,
        false,
        false,
        false,
        false,
        false
      ]
    ],
    "qtype": [
      0,
      0,
      1,
      2
    ]
  },
  "marker_axis_padded": false,
  "logits": [
    [
      -4.589033603668213,
      -1.712645173072815,
      -10000.0,
      -10000.0,
      -10000.0,
      -10000.0,
      -10000.0
    ],
    [
      9.534648895263672,
      -4.572531223297119,
      -1.807616114616394,
      -4.547646522521973,
      -4.577828884124756,
      -3.587461233139038,
      -2.5973122119903564
    ],
    [
      -4.291886806488037,
      -1.200973629951477,
      -2.5810704231262207,
      -0.7046122550964355,
      -2.3639867305755615,
      -1.3314738273620605,
      -10000.0
    ],
    [
      3.0695688724517822,
      -0.07253175973892212,
      -10000.0,
      -10000.0,
      -10000.0,
      -10000.0,
      -10000.0
    ]
  ],
  "act_logits": [
    [
      1125.61669921875,
      -1344.60546875
    ],
    [
      1235.69873046875,
      -1476.586669921875
    ],
    [
      1509.5008544921875,
      -1785.146728515625
    ],
    [
      1234.01416015625,
      -1468.8492431640625
    ]
  ],
  "result": {
    "model": "laya-rl-agent",
    "answers": {
      "pair": {
        "type": "choice",
        "choice": "second",
        "probabilities": {
          "first": 0.2771,
          "second": 0.7229
        },
        "confidence": 0.1485,
        "answer_confidence": 0.7229,
        "action": {
          "act_probability": 1.0
        }
      },
      "wide": {
        "type": "choice",
        "choice": "billing",
        "probabilities": {
          "billing": 1.0,
          "technical": 0.0,
          "account": 0.0,
          "sales": 0.0,
          "legal": 0.0,
          "shipping": 0.0,
          "other": 0.0
        },
        "confidence": 1.0,
        "answer_confidence": 1.0,
        "action": {
          "act_probability": 1.0
        }
      },
      "scale": {
        "type": "score",
        "score": 2.8423,
        "legend": {
          "0": "none",
          "1": "low",
          "2": "mild",
          "3": "high",
          "4": "severe",
          "5": "critical"
        },
        "probabilities": {
          "0": 0.0475,
          "1": 0.2226,
          "2": 0.1116,
          "3": 0.2853,
          "4": 0.1244,
          "5": 0.2085
        },
        "confidence": 0.0691,
        "answer_confidence": 0.2853,
        "action": {
          "act_probability": 1.0
        }
      },
      "flag": {
        "type": "noul",
        "noul": 0.0414,
        "confidence": 0.9586,
        "answer_confidence": 0.9586,
        "action": {
          "act_probability": 1.0
        }
      }
    },
    "usage": {
      "input_tokens": 386,
      "output_tokens": 0,
      "state_tokens": 56,
      "state_tokens_dropped": 0,
      "truncated": false,
      "truncated_questions": []
    }
  },
  "options": {
    "lang": "it"
  },
  "lang_temperatures": {
    "de": {
      "temperature": [
        2.0,
        3.0,
        1.5
      ]
    },
    "fr": null,
    "es": {
      "temperature_by_options": {
        "choice:3-5": 2.5,
        "noul:2": 0.7
      }
    },
    "pt": {
      "temperature": [
        1.2,
        4.0,
        0.8
      ],
      "temperature_by_options": {
        "score:3-5": 2.0,
        "choice:6-10": 3.0
      }
    },
    "it": {
      "temperature": null,
      "temperature_by_options": {
        "choice:2": 3.0,
        "choice:6-10": 0.6,
        "score:6-10": 2.0
      }
    },
    "nl": {
      "temperature": [
        9.0,
        0.1,
        1.0
      ]
    },
    "sv-SE": {
      "temperature": [
        1.5,
        1.5,
        1.5
      ]
    },
    "SV": {
      "temperature": [
        3.5,
        3.5,
        3.5
      ]
    }
  }
}