File size: 290,429 Bytes
52ab243 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 | program(1.3)
[buildInfo = dict<string, string>({{"coremlc-component-MIL", "3500.14.1"}, {"coremlc-version", "3500.32.1"}, {"coremltools-component-torch", "2.7.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "9.0"}})]
{
func main<ios18>(tensor<fp16, [1, 768, 1]> latent, tensor<fp16, [1, 1, 4, 32]> s0_cos, state<tensor<fp16, [1, 4, 500, 64]>> s0_l0_k, state<tensor<fp16, [1, 4, 500, 64]>> s0_l0_v, state<tensor<fp16, [1, 4, 500, 64]>> s0_l1_k, state<tensor<fp16, [1, 4, 500, 64]>> s0_l1_v, state<tensor<fp16, [1, 4, 500, 64]>> s0_l2_k, state<tensor<fp16, [1, 4, 500, 64]>> s0_l2_v, state<tensor<fp16, [1, 4, 500, 64]>> s0_l3_k, state<tensor<fp16, [1, 4, 500, 64]>> s0_l3_v, tensor<fp16, [1, 1, 4, 500]> s0_mask, tensor<fp16, [1, 1, 4, 32]> s0_sin, tensor<fp16, [1, 1, 8, 32]> s1_cos, state<tensor<fp16, [1, 4, 800, 64]>> s1_l0_k, state<tensor<fp16, [1, 4, 800, 64]>> s1_l0_v, state<tensor<fp16, [1, 4, 800, 64]>> s1_l1_k, state<tensor<fp16, [1, 4, 800, 64]>> s1_l1_v, tensor<fp16, [1, 1, 8, 800]> s1_mask, tensor<fp16, [1, 1, 8, 32]> s1_sin, tensor<fp16, [1, 1, 16, 32]> s2_cos, state<tensor<fp16, [1, 4, 1200, 64]>> s2_l0_k, state<tensor<fp16, [1, 4, 1200, 64]>> s2_l0_v, state<tensor<fp16, [1, 4, 1200, 64]>> s2_l1_k, state<tensor<fp16, [1, 4, 1200, 64]>> s2_l1_v, tensor<fp16, [1, 1, 16, 1200]> s2_mask, tensor<fp16, [1, 1, 16, 32]> s2_sin, tensor<fp16, [1, 1, 32, 32]> s3_cos, state<tensor<fp16, [1, 4, 1600, 64]>> s3_l0_k, state<tensor<fp16, [1, 4, 1600, 64]>> s3_l0_v, state<tensor<fp16, [1, 4, 1600, 64]>> s3_l1_k, state<tensor<fp16, [1, 4, 1600, 64]>> s3_l1_v, state<tensor<fp16, [1, 4, 1600, 64]>> s3_l2_k, state<tensor<fp16, [1, 4, 1600, 64]>> s3_l2_v, state<tensor<fp16, [1, 4, 1600, 64]>> s3_l3_k, state<tensor<fp16, [1, 4, 1600, 64]>> s3_l3_v, tensor<fp16, [1, 1, 32, 1600]> s3_mask, tensor<fp16, [1, 1, 32, 32]> s3_sin) {
tensor<int32, [4]> var_594 = const()[name = string("op_594"), val = tensor<int32, [4]>([1, 192, 4, 1])];
tensor<fp16, [1, 192, 4, 1]> var_595_cast_fp16 = reshape(shape = var_594, x = latent)[name = string("op_595_cast_fp16")];
tensor<int32, [4]> var_600 = const()[name = string("op_600"), val = tensor<int32, [4]>([0, 1, 3, 2])];
tensor<int32, [3]> var_605 = const()[name = string("op_605"), val = tensor<int32, [3]>([1, 192, 4])];
tensor<fp16, [1, 192, 1, 4]> var_601_cast_fp16 = transpose(perm = var_600, x = var_595_cast_fp16)[name = string("transpose_37")];
tensor<fp16, [1, 192, 4]> x_1_cast_fp16 = reshape(shape = var_605, x = var_601_cast_fp16)[name = string("x_1_cast_fp16")];
tensor<int32, [3]> input_1_perm_0 = const()[name = string("input_1_perm_0"), val = tensor<int32, [3]>([0, 2, 1])];
tensor<fp16, [256, 192]> stages_0_input_proj_weight_to_fp16 = const()[name = string("stages_0_input_proj_weight_to_fp16"), val = tensor<fp16, [256, 192]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(64)))];
tensor<fp16, [256]> linear_0_bias_0_to_fp16 = const()[name = string("linear_0_bias_0_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(98432)))];
tensor<fp16, [1, 4, 192]> input_1_cast_fp16 = transpose(perm = input_1_perm_0, x = x_1_cast_fp16)[name = string("transpose_36")];
tensor<fp16, [1, 4, 256]> linear_0_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_0_input_proj_weight_to_fp16, x = input_1_cast_fp16)[name = string("linear_0_cast_fp16")];
tensor<int32, [1]> input_5_axes_0 = const()[name = string("input_5_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_0_transformer_layers_0_norm1_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_0_norm1_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(99008)))];
tensor<fp16, [256]> stages_0_transformer_layers_0_norm1_bias_to_fp16 = const()[name = string("stages_0_transformer_layers_0_norm1_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(99584)))];
fp16 var_614_to_fp16 = const()[name = string("op_614_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 4, 256]> input_5_cast_fp16 = layer_norm(axes = input_5_axes_0, beta = stages_0_transformer_layers_0_norm1_bias_to_fp16, epsilon = var_614_to_fp16, gamma = stages_0_transformer_layers_0_norm1_weight_to_fp16, x = linear_0_cast_fp16)[name = string("input_5_cast_fp16")];
tensor<fp16, [768, 256]> stages_0_transformer_layers_0_self_attn_in_proj_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_0_self_attn_in_proj_weight_to_fp16"), val = tensor<fp16, [768, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(100160)))];
tensor<fp16, [768]> linear_1_bias_0_to_fp16 = const()[name = string("linear_1_bias_0_to_fp16"), val = tensor<fp16, [768]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(493440)))];
tensor<fp16, [1, 4, 768]> linear_1_cast_fp16 = linear(bias = linear_1_bias_0_to_fp16, weight = stages_0_transformer_layers_0_self_attn_in_proj_weight_to_fp16, x = input_5_cast_fp16)[name = string("linear_1_cast_fp16")];
tensor<int32, [5]> var_628 = const()[name = string("op_628"), val = tensor<int32, [5]>([1, 4, 3, 4, 64])];
tensor<fp16, [1, 4, 3, 4, 64]> var_629_cast_fp16 = reshape(shape = var_628, x = linear_1_cast_fp16)[name = string("op_629_cast_fp16")];
tensor<int32, [5]> var_635 = const()[name = string("op_635"), val = tensor<int32, [5]>([2, 0, 3, 1, 4])];
tensor<int32, [5]> query_1_begin_0 = const()[name = string("query_1_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> query_1_end_0 = const()[name = string("query_1_end_0"), val = tensor<int32, [5]>([1, 1, 4, 4, 64])];
tensor<bool, [5]> query_1_end_mask_0 = const()[name = string("query_1_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> query_1_squeeze_mask_0 = const()[name = string("query_1_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [3, 1, 4, 4, 64]> qkv_3_cast_fp16 = transpose(perm = var_635, x = var_629_cast_fp16)[name = string("transpose_35")];
tensor<fp16, [1, 4, 4, 64]> query_1_cast_fp16 = slice_by_index(begin = query_1_begin_0, end = query_1_end_0, end_mask = query_1_end_mask_0, squeeze_mask = query_1_squeeze_mask_0, x = qkv_3_cast_fp16)[name = string("query_1_cast_fp16")];
tensor<int32, [5]> key_1_begin_0 = const()[name = string("key_1_begin_0"), val = tensor<int32, [5]>([1, 0, 0, 0, 0])];
tensor<int32, [5]> key_1_end_0 = const()[name = string("key_1_end_0"), val = tensor<int32, [5]>([2, 1, 4, 4, 64])];
tensor<bool, [5]> key_1_end_mask_0 = const()[name = string("key_1_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> key_1_squeeze_mask_0 = const()[name = string("key_1_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 4, 64]> key_1_cast_fp16 = slice_by_index(begin = key_1_begin_0, end = key_1_end_0, end_mask = key_1_end_mask_0, squeeze_mask = key_1_squeeze_mask_0, x = qkv_3_cast_fp16)[name = string("key_1_cast_fp16")];
tensor<int32, [5]> value_1_begin_0 = const()[name = string("value_1_begin_0"), val = tensor<int32, [5]>([2, 0, 0, 0, 0])];
tensor<int32, [5]> value_1_end_0 = const()[name = string("value_1_end_0"), val = tensor<int32, [5]>([3, 1, 4, 4, 64])];
tensor<bool, [5]> value_1_end_mask_0 = const()[name = string("value_1_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> value_1_squeeze_mask_0 = const()[name = string("value_1_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 4, 64]> value_1_cast_fp16 = slice_by_index(begin = value_1_begin_0, end = value_1_end_0, end_mask = value_1_end_mask_0, squeeze_mask = value_1_squeeze_mask_0, x = qkv_3_cast_fp16)[name = string("value_1_cast_fp16")];
tensor<int32, [5]> var_651 = const()[name = string("op_651"), val = tensor<int32, [5]>([1, 4, 4, 32, 2])];
tensor<fp16, [1, 4, 4, 32, 2]> query_pairs_1_cast_fp16 = reshape(shape = var_651, x = query_1_cast_fp16)[name = string("query_pairs_1_cast_fp16")];
tensor<int32, [5]> var_658 = const()[name = string("op_658"), val = tensor<int32, [5]>([1, 4, 4, 32, 2])];
tensor<fp16, [1, 4, 4, 32, 2]> key_pairs_1_cast_fp16 = reshape(shape = var_658, x = key_1_cast_fp16)[name = string("key_pairs_1_cast_fp16")];
tensor<int32, [5]> qr_1_begin_0 = const()[name = string("qr_1_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> qr_1_end_0 = const()[name = string("qr_1_end_0"), val = tensor<int32, [5]>([1, 4, 4, 32, 1])];
tensor<bool, [5]> qr_1_end_mask_0 = const()[name = string("qr_1_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qr_1_squeeze_mask_0 = const()[name = string("qr_1_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 4, 32]> qr_1_cast_fp16 = slice_by_index(begin = qr_1_begin_0, end = qr_1_end_0, end_mask = qr_1_end_mask_0, squeeze_mask = qr_1_squeeze_mask_0, x = query_pairs_1_cast_fp16)[name = string("qr_1_cast_fp16")];
tensor<int32, [5]> qi_1_begin_0 = const()[name = string("qi_1_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> qi_1_end_0 = const()[name = string("qi_1_end_0"), val = tensor<int32, [5]>([1, 4, 4, 32, 2])];
tensor<bool, [5]> qi_1_end_mask_0 = const()[name = string("qi_1_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qi_1_squeeze_mask_0 = const()[name = string("qi_1_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 4, 32]> qi_1_cast_fp16 = slice_by_index(begin = qi_1_begin_0, end = qi_1_end_0, end_mask = qi_1_end_mask_0, squeeze_mask = qi_1_squeeze_mask_0, x = query_pairs_1_cast_fp16)[name = string("qi_1_cast_fp16")];
tensor<int32, [5]> kr_1_begin_0 = const()[name = string("kr_1_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> kr_1_end_0 = const()[name = string("kr_1_end_0"), val = tensor<int32, [5]>([1, 4, 4, 32, 1])];
tensor<bool, [5]> kr_1_end_mask_0 = const()[name = string("kr_1_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> kr_1_squeeze_mask_0 = const()[name = string("kr_1_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 4, 32]> kr_1_cast_fp16 = slice_by_index(begin = kr_1_begin_0, end = kr_1_end_0, end_mask = kr_1_end_mask_0, squeeze_mask = kr_1_squeeze_mask_0, x = key_pairs_1_cast_fp16)[name = string("kr_1_cast_fp16")];
tensor<int32, [5]> ki_1_begin_0 = const()[name = string("ki_1_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> ki_1_end_0 = const()[name = string("ki_1_end_0"), val = tensor<int32, [5]>([1, 4, 4, 32, 2])];
tensor<bool, [5]> ki_1_end_mask_0 = const()[name = string("ki_1_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> ki_1_squeeze_mask_0 = const()[name = string("ki_1_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 4, 32]> ki_1_cast_fp16 = slice_by_index(begin = ki_1_begin_0, end = ki_1_end_0, end_mask = ki_1_end_mask_0, squeeze_mask = ki_1_squeeze_mask_0, x = key_pairs_1_cast_fp16)[name = string("ki_1_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_672_cast_fp16 = mul(x = qr_1_cast_fp16, y = s0_cos)[name = string("op_672_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_673_cast_fp16 = mul(x = qi_1_cast_fp16, y = s0_sin)[name = string("op_673_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_675_cast_fp16 = sub(x = var_672_cast_fp16, y = var_673_cast_fp16)[name = string("op_675_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_676_cast_fp16 = mul(x = qr_1_cast_fp16, y = s0_sin)[name = string("op_676_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_677_cast_fp16 = mul(x = qi_1_cast_fp16, y = s0_cos)[name = string("op_677_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_679_cast_fp16 = add(x = var_676_cast_fp16, y = var_677_cast_fp16)[name = string("op_679_cast_fp16")];
int32 query_3_axis_0 = const()[name = string("query_3_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 4, 32, 2]> query_3_cast_fp16 = stack(axis = query_3_axis_0, values = (var_675_cast_fp16, var_679_cast_fp16))[name = string("query_3_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_683_cast_fp16 = mul(x = kr_1_cast_fp16, y = s0_cos)[name = string("op_683_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_684_cast_fp16 = mul(x = ki_1_cast_fp16, y = s0_sin)[name = string("op_684_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_686_cast_fp16 = sub(x = var_683_cast_fp16, y = var_684_cast_fp16)[name = string("op_686_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_687_cast_fp16 = mul(x = kr_1_cast_fp16, y = s0_sin)[name = string("op_687_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_688_cast_fp16 = mul(x = ki_1_cast_fp16, y = s0_cos)[name = string("op_688_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_690_cast_fp16 = add(x = var_687_cast_fp16, y = var_688_cast_fp16)[name = string("op_690_cast_fp16")];
int32 key_3_axis_0 = const()[name = string("key_3_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 4, 32, 2]> key_3_cast_fp16 = stack(axis = key_3_axis_0, values = (var_686_cast_fp16, var_690_cast_fp16))[name = string("key_3_cast_fp16")];
tensor<int32, [4]> var_698 = const()[name = string("op_698"), val = tensor<int32, [4]>([1, 4, 4, 64])];
tensor<fp16, [1, 4, 4, 64]> query_5_cast_fp16 = reshape(shape = var_698, x = query_3_cast_fp16)[name = string("query_5_cast_fp16")];
tensor<int32, [4]> var_704 = const()[name = string("op_704"), val = tensor<int32, [4]>([1, 4, 4, 64])];
tensor<fp16, [1, 4, 4, 64]> key_5_cast_fp16 = reshape(shape = var_704, x = key_3_cast_fp16)[name = string("key_5_cast_fp16")];
tensor<fp16, [1, 4, 500, 64]> read_state_0 = read_state(input = s0_l0_k)[name = string("read_state_0")];
tensor<int32, [4]> var_720_begin_0 = const()[name = string("op_720_begin_0"), val = tensor<int32, [4]>([0, 0, 4, 0])];
tensor<int32, [4]> var_720_end_0 = const()[name = string("op_720_end_0"), val = tensor<int32, [4]>([1, 4, 500, 64])];
tensor<bool, [4]> var_720_end_mask_0 = const()[name = string("op_720_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 496, 64]> var_720_cast_fp16 = slice_by_index(begin = var_720_begin_0, end = var_720_end_0, end_mask = var_720_end_mask_0, x = read_state_0)[name = string("op_720_cast_fp16")];
int32 var_727 = const()[name = string("op_727"), val = int32(2)];
bool new_key_1_interleave_0 = const()[name = string("new_key_1_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 500, 64]> new_key_1_cast_fp16 = concat(axis = var_727, interleave = new_key_1_interleave_0, values = (var_720_cast_fp16, key_5_cast_fp16))[name = string("new_key_1_cast_fp16")];
tensor<fp16, [1, 4, 500, 64]> read_state_1 = read_state(input = s0_l0_v)[name = string("read_state_1")];
tensor<int32, [4]> var_743_begin_0 = const()[name = string("op_743_begin_0"), val = tensor<int32, [4]>([0, 0, 4, 0])];
tensor<int32, [4]> var_743_end_0 = const()[name = string("op_743_end_0"), val = tensor<int32, [4]>([1, 4, 500, 64])];
tensor<bool, [4]> var_743_end_mask_0 = const()[name = string("op_743_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 496, 64]> var_743_cast_fp16 = slice_by_index(begin = var_743_begin_0, end = var_743_end_0, end_mask = var_743_end_mask_0, x = read_state_1)[name = string("op_743_cast_fp16")];
int32 var_750 = const()[name = string("op_750"), val = int32(2)];
bool new_value_1_interleave_0 = const()[name = string("new_value_1_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 500, 64]> new_value_1_cast_fp16 = concat(axis = var_750, interleave = new_value_1_interleave_0, values = (var_743_cast_fp16, value_1_cast_fp16))[name = string("new_value_1_cast_fp16")];
tensor<int32, [4]> concat_0 = const()[name = string("concat_0"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_1 = const()[name = string("concat_1"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s0_l0_k_internal_tensor_assign_1_stride_0 = const()[name = string("s0_l0_k_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s0_l0_k_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s0_l0_k_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s0_l0_k_internal_tensor_assign_1_end_mask_0 = const()[name = string("s0_l0_k_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s0_l0_k_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s0_l0_k_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 500, 64]> s0_l0_k_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_0, begin_mask = s0_l0_k_internal_tensor_assign_1_begin_mask_0, end = concat_1, end_mask = s0_l0_k_internal_tensor_assign_1_end_mask_0, squeeze_mask = s0_l0_k_internal_tensor_assign_1_squeeze_mask_0, stride = s0_l0_k_internal_tensor_assign_1_stride_0, update = new_key_1_cast_fp16, x = read_state_0)[name = string("s0_l0_k_internal_tensor_assign_1_cast_fp16")];
write_state(data = s0_l0_k_internal_tensor_assign_1_cast_fp16, input = s0_l0_k)[name = string("coreml_update_state_24_write_state")];
tensor<int32, [4]> concat_2 = const()[name = string("concat_2"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_3 = const()[name = string("concat_3"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s0_l0_v_internal_tensor_assign_1_stride_0 = const()[name = string("s0_l0_v_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s0_l0_v_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s0_l0_v_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s0_l0_v_internal_tensor_assign_1_end_mask_0 = const()[name = string("s0_l0_v_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s0_l0_v_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s0_l0_v_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 500, 64]> s0_l0_v_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_2, begin_mask = s0_l0_v_internal_tensor_assign_1_begin_mask_0, end = concat_3, end_mask = s0_l0_v_internal_tensor_assign_1_end_mask_0, squeeze_mask = s0_l0_v_internal_tensor_assign_1_squeeze_mask_0, stride = s0_l0_v_internal_tensor_assign_1_stride_0, update = new_value_1_cast_fp16, x = read_state_1)[name = string("s0_l0_v_internal_tensor_assign_1_cast_fp16")];
write_state(data = s0_l0_v_internal_tensor_assign_1_cast_fp16, input = s0_l0_v)[name = string("coreml_update_state_25_write_state")];
bool var_769_transpose_x_1 = const()[name = string("op_769_transpose_x_1"), val = bool(false)];
bool var_769_transpose_y_1 = const()[name = string("op_769_transpose_y_1"), val = bool(true)];
tensor<fp16, [1, 4, 4, 500]> var_769_cast_fp16 = matmul(transpose_x = var_769_transpose_x_1, transpose_y = var_769_transpose_y_1, x = query_5_cast_fp16, y = new_key_1_cast_fp16)[name = string("op_769_cast_fp16")];
fp16 var_770_to_fp16 = const()[name = string("op_770_to_fp16"), val = fp16(0x1p-3)];
tensor<fp16, [1, 4, 4, 500]> scores_1_cast_fp16 = mul(x = var_769_cast_fp16, y = var_770_to_fp16)[name = string("scores_1_cast_fp16")];
tensor<fp16, [1, 4, 4, 500]> var_773_cast_fp16 = add(x = scores_1_cast_fp16, y = s0_mask)[name = string("op_773_cast_fp16")];
int32 var_774 = const()[name = string("op_774"), val = int32(-1)];
tensor<fp16, [1, 4, 4, 500]> probabilities_1_cast_fp16 = softmax(axis = var_774, x = var_773_cast_fp16)[name = string("probabilities_1_cast_fp16")];
bool attention_1_transpose_x_0 = const()[name = string("attention_1_transpose_x_0"), val = bool(false)];
bool attention_1_transpose_y_0 = const()[name = string("attention_1_transpose_y_0"), val = bool(false)];
tensor<fp16, [1, 4, 4, 64]> attention_1_cast_fp16 = matmul(transpose_x = attention_1_transpose_x_0, transpose_y = attention_1_transpose_y_0, x = probabilities_1_cast_fp16, y = new_value_1_cast_fp16)[name = string("attention_1_cast_fp16")];
tensor<int32, [4]> var_780_perm_0 = const()[name = string("op_780_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
tensor<int32, [3]> var_784 = const()[name = string("op_784"), val = tensor<int32, [3]>([1, 4, 256])];
tensor<fp16, [1, 4, 4, 64]> var_780_cast_fp16 = transpose(perm = var_780_perm_0, x = attention_1_cast_fp16)[name = string("transpose_34")];
tensor<fp16, [1, 4, 256]> input_7_cast_fp16 = reshape(shape = var_784, x = var_780_cast_fp16)[name = string("input_7_cast_fp16")];
tensor<fp16, [256, 256]> stages_0_transformer_layers_0_self_attn_out_proj_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_0_self_attn_out_proj_weight_to_fp16"), val = tensor<fp16, [256, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(495040)))];
tensor<fp16, [1, 4, 256]> linear_2_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_0_transformer_layers_0_self_attn_out_proj_weight_to_fp16, x = input_7_cast_fp16)[name = string("linear_2_cast_fp16")];
tensor<fp16, [256]> stages_0_transformer_layers_0_layer_scale_1_scale_to_fp16 = const()[name = string("stages_0_transformer_layers_0_layer_scale_1_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(626176)))];
tensor<fp16, [1, 4, 256]> var_790_cast_fp16 = mul(x = stages_0_transformer_layers_0_layer_scale_1_scale_to_fp16, y = linear_2_cast_fp16)[name = string("op_790_cast_fp16")];
tensor<fp16, [1, 4, 256]> input_9_cast_fp16 = add(x = linear_0_cast_fp16, y = var_790_cast_fp16)[name = string("input_9_cast_fp16")];
tensor<int32, [1]> input_11_axes_0 = const()[name = string("input_11_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_0_transformer_layers_0_norm2_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_0_norm2_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(626752)))];
tensor<fp16, [256]> stages_0_transformer_layers_0_norm2_bias_to_fp16 = const()[name = string("stages_0_transformer_layers_0_norm2_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(627328)))];
fp16 var_794_to_fp16 = const()[name = string("op_794_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 4, 256]> input_11_cast_fp16 = layer_norm(axes = input_11_axes_0, beta = stages_0_transformer_layers_0_norm2_bias_to_fp16, epsilon = var_794_to_fp16, gamma = stages_0_transformer_layers_0_norm2_weight_to_fp16, x = input_9_cast_fp16)[name = string("input_11_cast_fp16")];
tensor<fp16, [1024, 256]> stages_0_transformer_layers_0_ffn_0_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_0_ffn_0_weight_to_fp16"), val = tensor<fp16, [1024, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(627904)))];
tensor<fp16, [1024]> linear_3_bias_0_to_fp16 = const()[name = string("linear_3_bias_0_to_fp16"), val = tensor<fp16, [1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(1152256)))];
tensor<fp16, [1, 4, 1024]> linear_3_cast_fp16 = linear(bias = linear_3_bias_0_to_fp16, weight = stages_0_transformer_layers_0_ffn_0_weight_to_fp16, x = input_11_cast_fp16)[name = string("linear_3_cast_fp16")];
string input_15_mode_0 = const()[name = string("input_15_mode_0"), val = string("EXACT")];
tensor<fp16, [1, 4, 1024]> input_15_cast_fp16 = gelu(mode = input_15_mode_0, x = linear_3_cast_fp16)[name = string("input_15_cast_fp16")];
tensor<fp16, [256, 1024]> stages_0_transformer_layers_0_ffn_2_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_0_ffn_2_weight_to_fp16"), val = tensor<fp16, [256, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(1154368)))];
tensor<fp16, [1, 4, 256]> linear_4_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_0_transformer_layers_0_ffn_2_weight_to_fp16, x = input_15_cast_fp16)[name = string("linear_4_cast_fp16")];
tensor<fp16, [256]> stages_0_transformer_layers_0_layer_scale_2_scale_to_fp16 = const()[name = string("stages_0_transformer_layers_0_layer_scale_2_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(1678720)))];
tensor<fp16, [1, 4, 256]> var_810_cast_fp16 = mul(x = stages_0_transformer_layers_0_layer_scale_2_scale_to_fp16, y = linear_4_cast_fp16)[name = string("op_810_cast_fp16")];
tensor<fp16, [1, 4, 256]> input_17_cast_fp16 = add(x = input_9_cast_fp16, y = var_810_cast_fp16)[name = string("input_17_cast_fp16")];
tensor<int32, [1]> input_19_axes_0 = const()[name = string("input_19_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_0_transformer_layers_1_norm1_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_1_norm1_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(1679296)))];
tensor<fp16, [256]> stages_0_transformer_layers_1_norm1_bias_to_fp16 = const()[name = string("stages_0_transformer_layers_1_norm1_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(1679872)))];
fp16 var_814_to_fp16 = const()[name = string("op_814_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 4, 256]> input_19_cast_fp16 = layer_norm(axes = input_19_axes_0, beta = stages_0_transformer_layers_1_norm1_bias_to_fp16, epsilon = var_814_to_fp16, gamma = stages_0_transformer_layers_1_norm1_weight_to_fp16, x = input_17_cast_fp16)[name = string("input_19_cast_fp16")];
tensor<fp16, [768, 256]> stages_0_transformer_layers_1_self_attn_in_proj_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_1_self_attn_in_proj_weight_to_fp16"), val = tensor<fp16, [768, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(1680448)))];
tensor<fp16, [1, 4, 768]> linear_5_cast_fp16 = linear(bias = linear_1_bias_0_to_fp16, weight = stages_0_transformer_layers_1_self_attn_in_proj_weight_to_fp16, x = input_19_cast_fp16)[name = string("linear_5_cast_fp16")];
tensor<int32, [5]> var_828 = const()[name = string("op_828"), val = tensor<int32, [5]>([1, 4, 3, 4, 64])];
tensor<fp16, [1, 4, 3, 4, 64]> var_829_cast_fp16 = reshape(shape = var_828, x = linear_5_cast_fp16)[name = string("op_829_cast_fp16")];
tensor<int32, [5]> var_835 = const()[name = string("op_835"), val = tensor<int32, [5]>([2, 0, 3, 1, 4])];
tensor<int32, [5]> query_7_begin_0 = const()[name = string("query_7_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> query_7_end_0 = const()[name = string("query_7_end_0"), val = tensor<int32, [5]>([1, 1, 4, 4, 64])];
tensor<bool, [5]> query_7_end_mask_0 = const()[name = string("query_7_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> query_7_squeeze_mask_0 = const()[name = string("query_7_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [3, 1, 4, 4, 64]> qkv_7_cast_fp16 = transpose(perm = var_835, x = var_829_cast_fp16)[name = string("transpose_33")];
tensor<fp16, [1, 4, 4, 64]> query_7_cast_fp16 = slice_by_index(begin = query_7_begin_0, end = query_7_end_0, end_mask = query_7_end_mask_0, squeeze_mask = query_7_squeeze_mask_0, x = qkv_7_cast_fp16)[name = string("query_7_cast_fp16")];
tensor<int32, [5]> key_7_begin_0 = const()[name = string("key_7_begin_0"), val = tensor<int32, [5]>([1, 0, 0, 0, 0])];
tensor<int32, [5]> key_7_end_0 = const()[name = string("key_7_end_0"), val = tensor<int32, [5]>([2, 1, 4, 4, 64])];
tensor<bool, [5]> key_7_end_mask_0 = const()[name = string("key_7_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> key_7_squeeze_mask_0 = const()[name = string("key_7_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 4, 64]> key_7_cast_fp16 = slice_by_index(begin = key_7_begin_0, end = key_7_end_0, end_mask = key_7_end_mask_0, squeeze_mask = key_7_squeeze_mask_0, x = qkv_7_cast_fp16)[name = string("key_7_cast_fp16")];
tensor<int32, [5]> value_3_begin_0 = const()[name = string("value_3_begin_0"), val = tensor<int32, [5]>([2, 0, 0, 0, 0])];
tensor<int32, [5]> value_3_end_0 = const()[name = string("value_3_end_0"), val = tensor<int32, [5]>([3, 1, 4, 4, 64])];
tensor<bool, [5]> value_3_end_mask_0 = const()[name = string("value_3_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> value_3_squeeze_mask_0 = const()[name = string("value_3_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 4, 64]> value_3_cast_fp16 = slice_by_index(begin = value_3_begin_0, end = value_3_end_0, end_mask = value_3_end_mask_0, squeeze_mask = value_3_squeeze_mask_0, x = qkv_7_cast_fp16)[name = string("value_3_cast_fp16")];
tensor<int32, [5]> var_851 = const()[name = string("op_851"), val = tensor<int32, [5]>([1, 4, 4, 32, 2])];
tensor<fp16, [1, 4, 4, 32, 2]> query_pairs_3_cast_fp16 = reshape(shape = var_851, x = query_7_cast_fp16)[name = string("query_pairs_3_cast_fp16")];
tensor<int32, [5]> var_858 = const()[name = string("op_858"), val = tensor<int32, [5]>([1, 4, 4, 32, 2])];
tensor<fp16, [1, 4, 4, 32, 2]> key_pairs_3_cast_fp16 = reshape(shape = var_858, x = key_7_cast_fp16)[name = string("key_pairs_3_cast_fp16")];
tensor<int32, [5]> qr_3_begin_0 = const()[name = string("qr_3_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> qr_3_end_0 = const()[name = string("qr_3_end_0"), val = tensor<int32, [5]>([1, 4, 4, 32, 1])];
tensor<bool, [5]> qr_3_end_mask_0 = const()[name = string("qr_3_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qr_3_squeeze_mask_0 = const()[name = string("qr_3_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 4, 32]> qr_3_cast_fp16 = slice_by_index(begin = qr_3_begin_0, end = qr_3_end_0, end_mask = qr_3_end_mask_0, squeeze_mask = qr_3_squeeze_mask_0, x = query_pairs_3_cast_fp16)[name = string("qr_3_cast_fp16")];
tensor<int32, [5]> qi_3_begin_0 = const()[name = string("qi_3_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> qi_3_end_0 = const()[name = string("qi_3_end_0"), val = tensor<int32, [5]>([1, 4, 4, 32, 2])];
tensor<bool, [5]> qi_3_end_mask_0 = const()[name = string("qi_3_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qi_3_squeeze_mask_0 = const()[name = string("qi_3_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 4, 32]> qi_3_cast_fp16 = slice_by_index(begin = qi_3_begin_0, end = qi_3_end_0, end_mask = qi_3_end_mask_0, squeeze_mask = qi_3_squeeze_mask_0, x = query_pairs_3_cast_fp16)[name = string("qi_3_cast_fp16")];
tensor<int32, [5]> kr_3_begin_0 = const()[name = string("kr_3_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> kr_3_end_0 = const()[name = string("kr_3_end_0"), val = tensor<int32, [5]>([1, 4, 4, 32, 1])];
tensor<bool, [5]> kr_3_end_mask_0 = const()[name = string("kr_3_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> kr_3_squeeze_mask_0 = const()[name = string("kr_3_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 4, 32]> kr_3_cast_fp16 = slice_by_index(begin = kr_3_begin_0, end = kr_3_end_0, end_mask = kr_3_end_mask_0, squeeze_mask = kr_3_squeeze_mask_0, x = key_pairs_3_cast_fp16)[name = string("kr_3_cast_fp16")];
tensor<int32, [5]> ki_3_begin_0 = const()[name = string("ki_3_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> ki_3_end_0 = const()[name = string("ki_3_end_0"), val = tensor<int32, [5]>([1, 4, 4, 32, 2])];
tensor<bool, [5]> ki_3_end_mask_0 = const()[name = string("ki_3_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> ki_3_squeeze_mask_0 = const()[name = string("ki_3_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 4, 32]> ki_3_cast_fp16 = slice_by_index(begin = ki_3_begin_0, end = ki_3_end_0, end_mask = ki_3_end_mask_0, squeeze_mask = ki_3_squeeze_mask_0, x = key_pairs_3_cast_fp16)[name = string("ki_3_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_872_cast_fp16 = mul(x = qr_3_cast_fp16, y = s0_cos)[name = string("op_872_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_873_cast_fp16 = mul(x = qi_3_cast_fp16, y = s0_sin)[name = string("op_873_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_875_cast_fp16 = sub(x = var_872_cast_fp16, y = var_873_cast_fp16)[name = string("op_875_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_876_cast_fp16 = mul(x = qr_3_cast_fp16, y = s0_sin)[name = string("op_876_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_877_cast_fp16 = mul(x = qi_3_cast_fp16, y = s0_cos)[name = string("op_877_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_879_cast_fp16 = add(x = var_876_cast_fp16, y = var_877_cast_fp16)[name = string("op_879_cast_fp16")];
int32 query_9_axis_0 = const()[name = string("query_9_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 4, 32, 2]> query_9_cast_fp16 = stack(axis = query_9_axis_0, values = (var_875_cast_fp16, var_879_cast_fp16))[name = string("query_9_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_883_cast_fp16 = mul(x = kr_3_cast_fp16, y = s0_cos)[name = string("op_883_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_884_cast_fp16 = mul(x = ki_3_cast_fp16, y = s0_sin)[name = string("op_884_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_886_cast_fp16 = sub(x = var_883_cast_fp16, y = var_884_cast_fp16)[name = string("op_886_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_887_cast_fp16 = mul(x = kr_3_cast_fp16, y = s0_sin)[name = string("op_887_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_888_cast_fp16 = mul(x = ki_3_cast_fp16, y = s0_cos)[name = string("op_888_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_890_cast_fp16 = add(x = var_887_cast_fp16, y = var_888_cast_fp16)[name = string("op_890_cast_fp16")];
int32 key_9_axis_0 = const()[name = string("key_9_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 4, 32, 2]> key_9_cast_fp16 = stack(axis = key_9_axis_0, values = (var_886_cast_fp16, var_890_cast_fp16))[name = string("key_9_cast_fp16")];
tensor<int32, [4]> var_898 = const()[name = string("op_898"), val = tensor<int32, [4]>([1, 4, 4, 64])];
tensor<fp16, [1, 4, 4, 64]> query_11_cast_fp16 = reshape(shape = var_898, x = query_9_cast_fp16)[name = string("query_11_cast_fp16")];
tensor<int32, [4]> var_904 = const()[name = string("op_904"), val = tensor<int32, [4]>([1, 4, 4, 64])];
tensor<fp16, [1, 4, 4, 64]> key_11_cast_fp16 = reshape(shape = var_904, x = key_9_cast_fp16)[name = string("key_11_cast_fp16")];
tensor<fp16, [1, 4, 500, 64]> read_state_2 = read_state(input = s0_l1_k)[name = string("read_state_2")];
tensor<int32, [4]> var_920_begin_0 = const()[name = string("op_920_begin_0"), val = tensor<int32, [4]>([0, 0, 4, 0])];
tensor<int32, [4]> var_920_end_0 = const()[name = string("op_920_end_0"), val = tensor<int32, [4]>([1, 4, 500, 64])];
tensor<bool, [4]> var_920_end_mask_0 = const()[name = string("op_920_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 496, 64]> var_920_cast_fp16 = slice_by_index(begin = var_920_begin_0, end = var_920_end_0, end_mask = var_920_end_mask_0, x = read_state_2)[name = string("op_920_cast_fp16")];
int32 var_927 = const()[name = string("op_927"), val = int32(2)];
bool new_key_3_interleave_0 = const()[name = string("new_key_3_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 500, 64]> new_key_3_cast_fp16 = concat(axis = var_927, interleave = new_key_3_interleave_0, values = (var_920_cast_fp16, key_11_cast_fp16))[name = string("new_key_3_cast_fp16")];
tensor<fp16, [1, 4, 500, 64]> read_state_3 = read_state(input = s0_l1_v)[name = string("read_state_3")];
tensor<int32, [4]> var_943_begin_0 = const()[name = string("op_943_begin_0"), val = tensor<int32, [4]>([0, 0, 4, 0])];
tensor<int32, [4]> var_943_end_0 = const()[name = string("op_943_end_0"), val = tensor<int32, [4]>([1, 4, 500, 64])];
tensor<bool, [4]> var_943_end_mask_0 = const()[name = string("op_943_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 496, 64]> var_943_cast_fp16 = slice_by_index(begin = var_943_begin_0, end = var_943_end_0, end_mask = var_943_end_mask_0, x = read_state_3)[name = string("op_943_cast_fp16")];
int32 var_950 = const()[name = string("op_950"), val = int32(2)];
bool new_value_3_interleave_0 = const()[name = string("new_value_3_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 500, 64]> new_value_3_cast_fp16 = concat(axis = var_950, interleave = new_value_3_interleave_0, values = (var_943_cast_fp16, value_3_cast_fp16))[name = string("new_value_3_cast_fp16")];
tensor<int32, [4]> concat_4 = const()[name = string("concat_4"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_5 = const()[name = string("concat_5"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s0_l1_k_internal_tensor_assign_1_stride_0 = const()[name = string("s0_l1_k_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s0_l1_k_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s0_l1_k_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s0_l1_k_internal_tensor_assign_1_end_mask_0 = const()[name = string("s0_l1_k_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s0_l1_k_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s0_l1_k_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 500, 64]> s0_l1_k_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_4, begin_mask = s0_l1_k_internal_tensor_assign_1_begin_mask_0, end = concat_5, end_mask = s0_l1_k_internal_tensor_assign_1_end_mask_0, squeeze_mask = s0_l1_k_internal_tensor_assign_1_squeeze_mask_0, stride = s0_l1_k_internal_tensor_assign_1_stride_0, update = new_key_3_cast_fp16, x = read_state_2)[name = string("s0_l1_k_internal_tensor_assign_1_cast_fp16")];
write_state(data = s0_l1_k_internal_tensor_assign_1_cast_fp16, input = s0_l1_k)[name = string("coreml_update_state_26_write_state")];
tensor<int32, [4]> concat_6 = const()[name = string("concat_6"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_7 = const()[name = string("concat_7"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s0_l1_v_internal_tensor_assign_1_stride_0 = const()[name = string("s0_l1_v_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s0_l1_v_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s0_l1_v_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s0_l1_v_internal_tensor_assign_1_end_mask_0 = const()[name = string("s0_l1_v_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s0_l1_v_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s0_l1_v_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 500, 64]> s0_l1_v_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_6, begin_mask = s0_l1_v_internal_tensor_assign_1_begin_mask_0, end = concat_7, end_mask = s0_l1_v_internal_tensor_assign_1_end_mask_0, squeeze_mask = s0_l1_v_internal_tensor_assign_1_squeeze_mask_0, stride = s0_l1_v_internal_tensor_assign_1_stride_0, update = new_value_3_cast_fp16, x = read_state_3)[name = string("s0_l1_v_internal_tensor_assign_1_cast_fp16")];
write_state(data = s0_l1_v_internal_tensor_assign_1_cast_fp16, input = s0_l1_v)[name = string("coreml_update_state_27_write_state")];
bool var_969_transpose_x_1 = const()[name = string("op_969_transpose_x_1"), val = bool(false)];
bool var_969_transpose_y_1 = const()[name = string("op_969_transpose_y_1"), val = bool(true)];
tensor<fp16, [1, 4, 4, 500]> var_969_cast_fp16 = matmul(transpose_x = var_969_transpose_x_1, transpose_y = var_969_transpose_y_1, x = query_11_cast_fp16, y = new_key_3_cast_fp16)[name = string("op_969_cast_fp16")];
fp16 var_970_to_fp16 = const()[name = string("op_970_to_fp16"), val = fp16(0x1p-3)];
tensor<fp16, [1, 4, 4, 500]> scores_3_cast_fp16 = mul(x = var_969_cast_fp16, y = var_970_to_fp16)[name = string("scores_3_cast_fp16")];
tensor<fp16, [1, 4, 4, 500]> var_973_cast_fp16 = add(x = scores_3_cast_fp16, y = s0_mask)[name = string("op_973_cast_fp16")];
int32 var_974 = const()[name = string("op_974"), val = int32(-1)];
tensor<fp16, [1, 4, 4, 500]> probabilities_3_cast_fp16 = softmax(axis = var_974, x = var_973_cast_fp16)[name = string("probabilities_3_cast_fp16")];
bool attention_3_transpose_x_0 = const()[name = string("attention_3_transpose_x_0"), val = bool(false)];
bool attention_3_transpose_y_0 = const()[name = string("attention_3_transpose_y_0"), val = bool(false)];
tensor<fp16, [1, 4, 4, 64]> attention_3_cast_fp16 = matmul(transpose_x = attention_3_transpose_x_0, transpose_y = attention_3_transpose_y_0, x = probabilities_3_cast_fp16, y = new_value_3_cast_fp16)[name = string("attention_3_cast_fp16")];
tensor<int32, [4]> var_980_perm_0 = const()[name = string("op_980_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
tensor<int32, [3]> var_984 = const()[name = string("op_984"), val = tensor<int32, [3]>([1, 4, 256])];
tensor<fp16, [1, 4, 4, 64]> var_980_cast_fp16 = transpose(perm = var_980_perm_0, x = attention_3_cast_fp16)[name = string("transpose_32")];
tensor<fp16, [1, 4, 256]> input_21_cast_fp16 = reshape(shape = var_984, x = var_980_cast_fp16)[name = string("input_21_cast_fp16")];
tensor<fp16, [256, 256]> stages_0_transformer_layers_1_self_attn_out_proj_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_1_self_attn_out_proj_weight_to_fp16"), val = tensor<fp16, [256, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2073728)))];
tensor<fp16, [1, 4, 256]> linear_6_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_0_transformer_layers_1_self_attn_out_proj_weight_to_fp16, x = input_21_cast_fp16)[name = string("linear_6_cast_fp16")];
tensor<fp16, [256]> stages_0_transformer_layers_1_layer_scale_1_scale_to_fp16 = const()[name = string("stages_0_transformer_layers_1_layer_scale_1_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2204864)))];
tensor<fp16, [1, 4, 256]> var_990_cast_fp16 = mul(x = stages_0_transformer_layers_1_layer_scale_1_scale_to_fp16, y = linear_6_cast_fp16)[name = string("op_990_cast_fp16")];
tensor<fp16, [1, 4, 256]> input_23_cast_fp16 = add(x = input_17_cast_fp16, y = var_990_cast_fp16)[name = string("input_23_cast_fp16")];
tensor<int32, [1]> input_25_axes_0 = const()[name = string("input_25_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_0_transformer_layers_1_norm2_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_1_norm2_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2205440)))];
tensor<fp16, [256]> stages_0_transformer_layers_1_norm2_bias_to_fp16 = const()[name = string("stages_0_transformer_layers_1_norm2_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2206016)))];
fp16 var_994_to_fp16 = const()[name = string("op_994_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 4, 256]> input_25_cast_fp16 = layer_norm(axes = input_25_axes_0, beta = stages_0_transformer_layers_1_norm2_bias_to_fp16, epsilon = var_994_to_fp16, gamma = stages_0_transformer_layers_1_norm2_weight_to_fp16, x = input_23_cast_fp16)[name = string("input_25_cast_fp16")];
tensor<fp16, [1024, 256]> stages_0_transformer_layers_1_ffn_0_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_1_ffn_0_weight_to_fp16"), val = tensor<fp16, [1024, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2206592)))];
tensor<fp16, [1, 4, 1024]> linear_7_cast_fp16 = linear(bias = linear_3_bias_0_to_fp16, weight = stages_0_transformer_layers_1_ffn_0_weight_to_fp16, x = input_25_cast_fp16)[name = string("linear_7_cast_fp16")];
string input_29_mode_0 = const()[name = string("input_29_mode_0"), val = string("EXACT")];
tensor<fp16, [1, 4, 1024]> input_29_cast_fp16 = gelu(mode = input_29_mode_0, x = linear_7_cast_fp16)[name = string("input_29_cast_fp16")];
tensor<fp16, [256, 1024]> stages_0_transformer_layers_1_ffn_2_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_1_ffn_2_weight_to_fp16"), val = tensor<fp16, [256, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2730944)))];
tensor<fp16, [1, 4, 256]> linear_8_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_0_transformer_layers_1_ffn_2_weight_to_fp16, x = input_29_cast_fp16)[name = string("linear_8_cast_fp16")];
tensor<fp16, [256]> stages_0_transformer_layers_1_layer_scale_2_scale_to_fp16 = const()[name = string("stages_0_transformer_layers_1_layer_scale_2_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(3255296)))];
tensor<fp16, [1, 4, 256]> var_1010_cast_fp16 = mul(x = stages_0_transformer_layers_1_layer_scale_2_scale_to_fp16, y = linear_8_cast_fp16)[name = string("op_1010_cast_fp16")];
tensor<fp16, [1, 4, 256]> input_31_cast_fp16 = add(x = input_23_cast_fp16, y = var_1010_cast_fp16)[name = string("input_31_cast_fp16")];
tensor<int32, [1]> input_33_axes_0 = const()[name = string("input_33_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_0_transformer_layers_2_norm1_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_2_norm1_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(3255872)))];
tensor<fp16, [256]> stages_0_transformer_layers_2_norm1_bias_to_fp16 = const()[name = string("stages_0_transformer_layers_2_norm1_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(3256448)))];
fp16 var_1014_to_fp16 = const()[name = string("op_1014_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 4, 256]> input_33_cast_fp16 = layer_norm(axes = input_33_axes_0, beta = stages_0_transformer_layers_2_norm1_bias_to_fp16, epsilon = var_1014_to_fp16, gamma = stages_0_transformer_layers_2_norm1_weight_to_fp16, x = input_31_cast_fp16)[name = string("input_33_cast_fp16")];
tensor<fp16, [768, 256]> stages_0_transformer_layers_2_self_attn_in_proj_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_2_self_attn_in_proj_weight_to_fp16"), val = tensor<fp16, [768, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(3257024)))];
tensor<fp16, [1, 4, 768]> linear_9_cast_fp16 = linear(bias = linear_1_bias_0_to_fp16, weight = stages_0_transformer_layers_2_self_attn_in_proj_weight_to_fp16, x = input_33_cast_fp16)[name = string("linear_9_cast_fp16")];
tensor<int32, [5]> var_1028 = const()[name = string("op_1028"), val = tensor<int32, [5]>([1, 4, 3, 4, 64])];
tensor<fp16, [1, 4, 3, 4, 64]> var_1029_cast_fp16 = reshape(shape = var_1028, x = linear_9_cast_fp16)[name = string("op_1029_cast_fp16")];
tensor<int32, [5]> var_1035 = const()[name = string("op_1035"), val = tensor<int32, [5]>([2, 0, 3, 1, 4])];
tensor<int32, [5]> query_13_begin_0 = const()[name = string("query_13_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> query_13_end_0 = const()[name = string("query_13_end_0"), val = tensor<int32, [5]>([1, 1, 4, 4, 64])];
tensor<bool, [5]> query_13_end_mask_0 = const()[name = string("query_13_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> query_13_squeeze_mask_0 = const()[name = string("query_13_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [3, 1, 4, 4, 64]> qkv_11_cast_fp16 = transpose(perm = var_1035, x = var_1029_cast_fp16)[name = string("transpose_31")];
tensor<fp16, [1, 4, 4, 64]> query_13_cast_fp16 = slice_by_index(begin = query_13_begin_0, end = query_13_end_0, end_mask = query_13_end_mask_0, squeeze_mask = query_13_squeeze_mask_0, x = qkv_11_cast_fp16)[name = string("query_13_cast_fp16")];
tensor<int32, [5]> key_13_begin_0 = const()[name = string("key_13_begin_0"), val = tensor<int32, [5]>([1, 0, 0, 0, 0])];
tensor<int32, [5]> key_13_end_0 = const()[name = string("key_13_end_0"), val = tensor<int32, [5]>([2, 1, 4, 4, 64])];
tensor<bool, [5]> key_13_end_mask_0 = const()[name = string("key_13_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> key_13_squeeze_mask_0 = const()[name = string("key_13_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 4, 64]> key_13_cast_fp16 = slice_by_index(begin = key_13_begin_0, end = key_13_end_0, end_mask = key_13_end_mask_0, squeeze_mask = key_13_squeeze_mask_0, x = qkv_11_cast_fp16)[name = string("key_13_cast_fp16")];
tensor<int32, [5]> value_5_begin_0 = const()[name = string("value_5_begin_0"), val = tensor<int32, [5]>([2, 0, 0, 0, 0])];
tensor<int32, [5]> value_5_end_0 = const()[name = string("value_5_end_0"), val = tensor<int32, [5]>([3, 1, 4, 4, 64])];
tensor<bool, [5]> value_5_end_mask_0 = const()[name = string("value_5_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> value_5_squeeze_mask_0 = const()[name = string("value_5_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 4, 64]> value_5_cast_fp16 = slice_by_index(begin = value_5_begin_0, end = value_5_end_0, end_mask = value_5_end_mask_0, squeeze_mask = value_5_squeeze_mask_0, x = qkv_11_cast_fp16)[name = string("value_5_cast_fp16")];
tensor<int32, [5]> var_1051 = const()[name = string("op_1051"), val = tensor<int32, [5]>([1, 4, 4, 32, 2])];
tensor<fp16, [1, 4, 4, 32, 2]> query_pairs_5_cast_fp16 = reshape(shape = var_1051, x = query_13_cast_fp16)[name = string("query_pairs_5_cast_fp16")];
tensor<int32, [5]> var_1058 = const()[name = string("op_1058"), val = tensor<int32, [5]>([1, 4, 4, 32, 2])];
tensor<fp16, [1, 4, 4, 32, 2]> key_pairs_5_cast_fp16 = reshape(shape = var_1058, x = key_13_cast_fp16)[name = string("key_pairs_5_cast_fp16")];
tensor<int32, [5]> qr_5_begin_0 = const()[name = string("qr_5_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> qr_5_end_0 = const()[name = string("qr_5_end_0"), val = tensor<int32, [5]>([1, 4, 4, 32, 1])];
tensor<bool, [5]> qr_5_end_mask_0 = const()[name = string("qr_5_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qr_5_squeeze_mask_0 = const()[name = string("qr_5_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 4, 32]> qr_5_cast_fp16 = slice_by_index(begin = qr_5_begin_0, end = qr_5_end_0, end_mask = qr_5_end_mask_0, squeeze_mask = qr_5_squeeze_mask_0, x = query_pairs_5_cast_fp16)[name = string("qr_5_cast_fp16")];
tensor<int32, [5]> qi_5_begin_0 = const()[name = string("qi_5_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> qi_5_end_0 = const()[name = string("qi_5_end_0"), val = tensor<int32, [5]>([1, 4, 4, 32, 2])];
tensor<bool, [5]> qi_5_end_mask_0 = const()[name = string("qi_5_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qi_5_squeeze_mask_0 = const()[name = string("qi_5_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 4, 32]> qi_5_cast_fp16 = slice_by_index(begin = qi_5_begin_0, end = qi_5_end_0, end_mask = qi_5_end_mask_0, squeeze_mask = qi_5_squeeze_mask_0, x = query_pairs_5_cast_fp16)[name = string("qi_5_cast_fp16")];
tensor<int32, [5]> kr_5_begin_0 = const()[name = string("kr_5_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> kr_5_end_0 = const()[name = string("kr_5_end_0"), val = tensor<int32, [5]>([1, 4, 4, 32, 1])];
tensor<bool, [5]> kr_5_end_mask_0 = const()[name = string("kr_5_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> kr_5_squeeze_mask_0 = const()[name = string("kr_5_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 4, 32]> kr_5_cast_fp16 = slice_by_index(begin = kr_5_begin_0, end = kr_5_end_0, end_mask = kr_5_end_mask_0, squeeze_mask = kr_5_squeeze_mask_0, x = key_pairs_5_cast_fp16)[name = string("kr_5_cast_fp16")];
tensor<int32, [5]> ki_5_begin_0 = const()[name = string("ki_5_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> ki_5_end_0 = const()[name = string("ki_5_end_0"), val = tensor<int32, [5]>([1, 4, 4, 32, 2])];
tensor<bool, [5]> ki_5_end_mask_0 = const()[name = string("ki_5_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> ki_5_squeeze_mask_0 = const()[name = string("ki_5_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 4, 32]> ki_5_cast_fp16 = slice_by_index(begin = ki_5_begin_0, end = ki_5_end_0, end_mask = ki_5_end_mask_0, squeeze_mask = ki_5_squeeze_mask_0, x = key_pairs_5_cast_fp16)[name = string("ki_5_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1072_cast_fp16 = mul(x = qr_5_cast_fp16, y = s0_cos)[name = string("op_1072_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1073_cast_fp16 = mul(x = qi_5_cast_fp16, y = s0_sin)[name = string("op_1073_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1075_cast_fp16 = sub(x = var_1072_cast_fp16, y = var_1073_cast_fp16)[name = string("op_1075_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1076_cast_fp16 = mul(x = qr_5_cast_fp16, y = s0_sin)[name = string("op_1076_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1077_cast_fp16 = mul(x = qi_5_cast_fp16, y = s0_cos)[name = string("op_1077_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1079_cast_fp16 = add(x = var_1076_cast_fp16, y = var_1077_cast_fp16)[name = string("op_1079_cast_fp16")];
int32 query_15_axis_0 = const()[name = string("query_15_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 4, 32, 2]> query_15_cast_fp16 = stack(axis = query_15_axis_0, values = (var_1075_cast_fp16, var_1079_cast_fp16))[name = string("query_15_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1083_cast_fp16 = mul(x = kr_5_cast_fp16, y = s0_cos)[name = string("op_1083_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1084_cast_fp16 = mul(x = ki_5_cast_fp16, y = s0_sin)[name = string("op_1084_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1086_cast_fp16 = sub(x = var_1083_cast_fp16, y = var_1084_cast_fp16)[name = string("op_1086_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1087_cast_fp16 = mul(x = kr_5_cast_fp16, y = s0_sin)[name = string("op_1087_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1088_cast_fp16 = mul(x = ki_5_cast_fp16, y = s0_cos)[name = string("op_1088_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1090_cast_fp16 = add(x = var_1087_cast_fp16, y = var_1088_cast_fp16)[name = string("op_1090_cast_fp16")];
int32 key_15_axis_0 = const()[name = string("key_15_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 4, 32, 2]> key_15_cast_fp16 = stack(axis = key_15_axis_0, values = (var_1086_cast_fp16, var_1090_cast_fp16))[name = string("key_15_cast_fp16")];
tensor<int32, [4]> var_1098 = const()[name = string("op_1098"), val = tensor<int32, [4]>([1, 4, 4, 64])];
tensor<fp16, [1, 4, 4, 64]> query_17_cast_fp16 = reshape(shape = var_1098, x = query_15_cast_fp16)[name = string("query_17_cast_fp16")];
tensor<int32, [4]> var_1104 = const()[name = string("op_1104"), val = tensor<int32, [4]>([1, 4, 4, 64])];
tensor<fp16, [1, 4, 4, 64]> key_17_cast_fp16 = reshape(shape = var_1104, x = key_15_cast_fp16)[name = string("key_17_cast_fp16")];
tensor<fp16, [1, 4, 500, 64]> read_state_4 = read_state(input = s0_l2_k)[name = string("read_state_4")];
tensor<int32, [4]> var_1120_begin_0 = const()[name = string("op_1120_begin_0"), val = tensor<int32, [4]>([0, 0, 4, 0])];
tensor<int32, [4]> var_1120_end_0 = const()[name = string("op_1120_end_0"), val = tensor<int32, [4]>([1, 4, 500, 64])];
tensor<bool, [4]> var_1120_end_mask_0 = const()[name = string("op_1120_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 496, 64]> var_1120_cast_fp16 = slice_by_index(begin = var_1120_begin_0, end = var_1120_end_0, end_mask = var_1120_end_mask_0, x = read_state_4)[name = string("op_1120_cast_fp16")];
int32 var_1127 = const()[name = string("op_1127"), val = int32(2)];
bool new_key_5_interleave_0 = const()[name = string("new_key_5_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 500, 64]> new_key_5_cast_fp16 = concat(axis = var_1127, interleave = new_key_5_interleave_0, values = (var_1120_cast_fp16, key_17_cast_fp16))[name = string("new_key_5_cast_fp16")];
tensor<fp16, [1, 4, 500, 64]> read_state_5 = read_state(input = s0_l2_v)[name = string("read_state_5")];
tensor<int32, [4]> var_1143_begin_0 = const()[name = string("op_1143_begin_0"), val = tensor<int32, [4]>([0, 0, 4, 0])];
tensor<int32, [4]> var_1143_end_0 = const()[name = string("op_1143_end_0"), val = tensor<int32, [4]>([1, 4, 500, 64])];
tensor<bool, [4]> var_1143_end_mask_0 = const()[name = string("op_1143_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 496, 64]> var_1143_cast_fp16 = slice_by_index(begin = var_1143_begin_0, end = var_1143_end_0, end_mask = var_1143_end_mask_0, x = read_state_5)[name = string("op_1143_cast_fp16")];
int32 var_1150 = const()[name = string("op_1150"), val = int32(2)];
bool new_value_5_interleave_0 = const()[name = string("new_value_5_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 500, 64]> new_value_5_cast_fp16 = concat(axis = var_1150, interleave = new_value_5_interleave_0, values = (var_1143_cast_fp16, value_5_cast_fp16))[name = string("new_value_5_cast_fp16")];
tensor<int32, [4]> concat_8 = const()[name = string("concat_8"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_9 = const()[name = string("concat_9"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s0_l2_k_internal_tensor_assign_1_stride_0 = const()[name = string("s0_l2_k_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s0_l2_k_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s0_l2_k_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s0_l2_k_internal_tensor_assign_1_end_mask_0 = const()[name = string("s0_l2_k_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s0_l2_k_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s0_l2_k_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 500, 64]> s0_l2_k_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_8, begin_mask = s0_l2_k_internal_tensor_assign_1_begin_mask_0, end = concat_9, end_mask = s0_l2_k_internal_tensor_assign_1_end_mask_0, squeeze_mask = s0_l2_k_internal_tensor_assign_1_squeeze_mask_0, stride = s0_l2_k_internal_tensor_assign_1_stride_0, update = new_key_5_cast_fp16, x = read_state_4)[name = string("s0_l2_k_internal_tensor_assign_1_cast_fp16")];
write_state(data = s0_l2_k_internal_tensor_assign_1_cast_fp16, input = s0_l2_k)[name = string("coreml_update_state_28_write_state")];
tensor<int32, [4]> concat_10 = const()[name = string("concat_10"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_11 = const()[name = string("concat_11"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s0_l2_v_internal_tensor_assign_1_stride_0 = const()[name = string("s0_l2_v_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s0_l2_v_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s0_l2_v_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s0_l2_v_internal_tensor_assign_1_end_mask_0 = const()[name = string("s0_l2_v_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s0_l2_v_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s0_l2_v_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 500, 64]> s0_l2_v_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_10, begin_mask = s0_l2_v_internal_tensor_assign_1_begin_mask_0, end = concat_11, end_mask = s0_l2_v_internal_tensor_assign_1_end_mask_0, squeeze_mask = s0_l2_v_internal_tensor_assign_1_squeeze_mask_0, stride = s0_l2_v_internal_tensor_assign_1_stride_0, update = new_value_5_cast_fp16, x = read_state_5)[name = string("s0_l2_v_internal_tensor_assign_1_cast_fp16")];
write_state(data = s0_l2_v_internal_tensor_assign_1_cast_fp16, input = s0_l2_v)[name = string("coreml_update_state_29_write_state")];
bool var_1169_transpose_x_1 = const()[name = string("op_1169_transpose_x_1"), val = bool(false)];
bool var_1169_transpose_y_1 = const()[name = string("op_1169_transpose_y_1"), val = bool(true)];
tensor<fp16, [1, 4, 4, 500]> var_1169_cast_fp16 = matmul(transpose_x = var_1169_transpose_x_1, transpose_y = var_1169_transpose_y_1, x = query_17_cast_fp16, y = new_key_5_cast_fp16)[name = string("op_1169_cast_fp16")];
fp16 var_1170_to_fp16 = const()[name = string("op_1170_to_fp16"), val = fp16(0x1p-3)];
tensor<fp16, [1, 4, 4, 500]> scores_5_cast_fp16 = mul(x = var_1169_cast_fp16, y = var_1170_to_fp16)[name = string("scores_5_cast_fp16")];
tensor<fp16, [1, 4, 4, 500]> var_1173_cast_fp16 = add(x = scores_5_cast_fp16, y = s0_mask)[name = string("op_1173_cast_fp16")];
int32 var_1174 = const()[name = string("op_1174"), val = int32(-1)];
tensor<fp16, [1, 4, 4, 500]> probabilities_5_cast_fp16 = softmax(axis = var_1174, x = var_1173_cast_fp16)[name = string("probabilities_5_cast_fp16")];
bool attention_5_transpose_x_0 = const()[name = string("attention_5_transpose_x_0"), val = bool(false)];
bool attention_5_transpose_y_0 = const()[name = string("attention_5_transpose_y_0"), val = bool(false)];
tensor<fp16, [1, 4, 4, 64]> attention_5_cast_fp16 = matmul(transpose_x = attention_5_transpose_x_0, transpose_y = attention_5_transpose_y_0, x = probabilities_5_cast_fp16, y = new_value_5_cast_fp16)[name = string("attention_5_cast_fp16")];
tensor<int32, [4]> var_1180_perm_0 = const()[name = string("op_1180_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
tensor<int32, [3]> var_1184 = const()[name = string("op_1184"), val = tensor<int32, [3]>([1, 4, 256])];
tensor<fp16, [1, 4, 4, 64]> var_1180_cast_fp16 = transpose(perm = var_1180_perm_0, x = attention_5_cast_fp16)[name = string("transpose_30")];
tensor<fp16, [1, 4, 256]> input_35_cast_fp16 = reshape(shape = var_1184, x = var_1180_cast_fp16)[name = string("input_35_cast_fp16")];
tensor<fp16, [256, 256]> stages_0_transformer_layers_2_self_attn_out_proj_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_2_self_attn_out_proj_weight_to_fp16"), val = tensor<fp16, [256, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(3650304)))];
tensor<fp16, [1, 4, 256]> linear_10_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_0_transformer_layers_2_self_attn_out_proj_weight_to_fp16, x = input_35_cast_fp16)[name = string("linear_10_cast_fp16")];
tensor<fp16, [256]> stages_0_transformer_layers_2_layer_scale_1_scale_to_fp16 = const()[name = string("stages_0_transformer_layers_2_layer_scale_1_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(3781440)))];
tensor<fp16, [1, 4, 256]> var_1190_cast_fp16 = mul(x = stages_0_transformer_layers_2_layer_scale_1_scale_to_fp16, y = linear_10_cast_fp16)[name = string("op_1190_cast_fp16")];
tensor<fp16, [1, 4, 256]> input_37_cast_fp16 = add(x = input_31_cast_fp16, y = var_1190_cast_fp16)[name = string("input_37_cast_fp16")];
tensor<int32, [1]> input_39_axes_0 = const()[name = string("input_39_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_0_transformer_layers_2_norm2_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_2_norm2_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(3782016)))];
tensor<fp16, [256]> stages_0_transformer_layers_2_norm2_bias_to_fp16 = const()[name = string("stages_0_transformer_layers_2_norm2_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(3782592)))];
fp16 var_1194_to_fp16 = const()[name = string("op_1194_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 4, 256]> input_39_cast_fp16 = layer_norm(axes = input_39_axes_0, beta = stages_0_transformer_layers_2_norm2_bias_to_fp16, epsilon = var_1194_to_fp16, gamma = stages_0_transformer_layers_2_norm2_weight_to_fp16, x = input_37_cast_fp16)[name = string("input_39_cast_fp16")];
tensor<fp16, [1024, 256]> stages_0_transformer_layers_2_ffn_0_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_2_ffn_0_weight_to_fp16"), val = tensor<fp16, [1024, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(3783168)))];
tensor<fp16, [1, 4, 1024]> linear_11_cast_fp16 = linear(bias = linear_3_bias_0_to_fp16, weight = stages_0_transformer_layers_2_ffn_0_weight_to_fp16, x = input_39_cast_fp16)[name = string("linear_11_cast_fp16")];
string input_43_mode_0 = const()[name = string("input_43_mode_0"), val = string("EXACT")];
tensor<fp16, [1, 4, 1024]> input_43_cast_fp16 = gelu(mode = input_43_mode_0, x = linear_11_cast_fp16)[name = string("input_43_cast_fp16")];
tensor<fp16, [256, 1024]> stages_0_transformer_layers_2_ffn_2_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_2_ffn_2_weight_to_fp16"), val = tensor<fp16, [256, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(4307520)))];
tensor<fp16, [1, 4, 256]> linear_12_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_0_transformer_layers_2_ffn_2_weight_to_fp16, x = input_43_cast_fp16)[name = string("linear_12_cast_fp16")];
tensor<fp16, [256]> stages_0_transformer_layers_2_layer_scale_2_scale_to_fp16 = const()[name = string("stages_0_transformer_layers_2_layer_scale_2_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(4831872)))];
tensor<fp16, [1, 4, 256]> var_1210_cast_fp16 = mul(x = stages_0_transformer_layers_2_layer_scale_2_scale_to_fp16, y = linear_12_cast_fp16)[name = string("op_1210_cast_fp16")];
tensor<fp16, [1, 4, 256]> input_45_cast_fp16 = add(x = input_37_cast_fp16, y = var_1210_cast_fp16)[name = string("input_45_cast_fp16")];
tensor<int32, [1]> input_47_axes_0 = const()[name = string("input_47_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_0_transformer_layers_3_norm1_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_3_norm1_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(4832448)))];
tensor<fp16, [256]> stages_0_transformer_layers_3_norm1_bias_to_fp16 = const()[name = string("stages_0_transformer_layers_3_norm1_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(4833024)))];
fp16 var_1214_to_fp16 = const()[name = string("op_1214_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 4, 256]> input_47_cast_fp16 = layer_norm(axes = input_47_axes_0, beta = stages_0_transformer_layers_3_norm1_bias_to_fp16, epsilon = var_1214_to_fp16, gamma = stages_0_transformer_layers_3_norm1_weight_to_fp16, x = input_45_cast_fp16)[name = string("input_47_cast_fp16")];
tensor<fp16, [768, 256]> stages_0_transformer_layers_3_self_attn_in_proj_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_3_self_attn_in_proj_weight_to_fp16"), val = tensor<fp16, [768, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(4833600)))];
tensor<fp16, [1, 4, 768]> linear_13_cast_fp16 = linear(bias = linear_1_bias_0_to_fp16, weight = stages_0_transformer_layers_3_self_attn_in_proj_weight_to_fp16, x = input_47_cast_fp16)[name = string("linear_13_cast_fp16")];
tensor<int32, [5]> var_1228 = const()[name = string("op_1228"), val = tensor<int32, [5]>([1, 4, 3, 4, 64])];
tensor<fp16, [1, 4, 3, 4, 64]> var_1229_cast_fp16 = reshape(shape = var_1228, x = linear_13_cast_fp16)[name = string("op_1229_cast_fp16")];
tensor<int32, [5]> var_1235 = const()[name = string("op_1235"), val = tensor<int32, [5]>([2, 0, 3, 1, 4])];
tensor<int32, [5]> query_19_begin_0 = const()[name = string("query_19_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> query_19_end_0 = const()[name = string("query_19_end_0"), val = tensor<int32, [5]>([1, 1, 4, 4, 64])];
tensor<bool, [5]> query_19_end_mask_0 = const()[name = string("query_19_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> query_19_squeeze_mask_0 = const()[name = string("query_19_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [3, 1, 4, 4, 64]> qkv_15_cast_fp16 = transpose(perm = var_1235, x = var_1229_cast_fp16)[name = string("transpose_29")];
tensor<fp16, [1, 4, 4, 64]> query_19_cast_fp16 = slice_by_index(begin = query_19_begin_0, end = query_19_end_0, end_mask = query_19_end_mask_0, squeeze_mask = query_19_squeeze_mask_0, x = qkv_15_cast_fp16)[name = string("query_19_cast_fp16")];
tensor<int32, [5]> key_19_begin_0 = const()[name = string("key_19_begin_0"), val = tensor<int32, [5]>([1, 0, 0, 0, 0])];
tensor<int32, [5]> key_19_end_0 = const()[name = string("key_19_end_0"), val = tensor<int32, [5]>([2, 1, 4, 4, 64])];
tensor<bool, [5]> key_19_end_mask_0 = const()[name = string("key_19_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> key_19_squeeze_mask_0 = const()[name = string("key_19_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 4, 64]> key_19_cast_fp16 = slice_by_index(begin = key_19_begin_0, end = key_19_end_0, end_mask = key_19_end_mask_0, squeeze_mask = key_19_squeeze_mask_0, x = qkv_15_cast_fp16)[name = string("key_19_cast_fp16")];
tensor<int32, [5]> value_7_begin_0 = const()[name = string("value_7_begin_0"), val = tensor<int32, [5]>([2, 0, 0, 0, 0])];
tensor<int32, [5]> value_7_end_0 = const()[name = string("value_7_end_0"), val = tensor<int32, [5]>([3, 1, 4, 4, 64])];
tensor<bool, [5]> value_7_end_mask_0 = const()[name = string("value_7_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> value_7_squeeze_mask_0 = const()[name = string("value_7_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 4, 64]> value_7_cast_fp16 = slice_by_index(begin = value_7_begin_0, end = value_7_end_0, end_mask = value_7_end_mask_0, squeeze_mask = value_7_squeeze_mask_0, x = qkv_15_cast_fp16)[name = string("value_7_cast_fp16")];
tensor<int32, [5]> var_1251 = const()[name = string("op_1251"), val = tensor<int32, [5]>([1, 4, 4, 32, 2])];
tensor<fp16, [1, 4, 4, 32, 2]> query_pairs_7_cast_fp16 = reshape(shape = var_1251, x = query_19_cast_fp16)[name = string("query_pairs_7_cast_fp16")];
tensor<int32, [5]> var_1258 = const()[name = string("op_1258"), val = tensor<int32, [5]>([1, 4, 4, 32, 2])];
tensor<fp16, [1, 4, 4, 32, 2]> key_pairs_7_cast_fp16 = reshape(shape = var_1258, x = key_19_cast_fp16)[name = string("key_pairs_7_cast_fp16")];
tensor<int32, [5]> qr_7_begin_0 = const()[name = string("qr_7_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> qr_7_end_0 = const()[name = string("qr_7_end_0"), val = tensor<int32, [5]>([1, 4, 4, 32, 1])];
tensor<bool, [5]> qr_7_end_mask_0 = const()[name = string("qr_7_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qr_7_squeeze_mask_0 = const()[name = string("qr_7_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 4, 32]> qr_7_cast_fp16 = slice_by_index(begin = qr_7_begin_0, end = qr_7_end_0, end_mask = qr_7_end_mask_0, squeeze_mask = qr_7_squeeze_mask_0, x = query_pairs_7_cast_fp16)[name = string("qr_7_cast_fp16")];
tensor<int32, [5]> qi_7_begin_0 = const()[name = string("qi_7_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> qi_7_end_0 = const()[name = string("qi_7_end_0"), val = tensor<int32, [5]>([1, 4, 4, 32, 2])];
tensor<bool, [5]> qi_7_end_mask_0 = const()[name = string("qi_7_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qi_7_squeeze_mask_0 = const()[name = string("qi_7_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 4, 32]> qi_7_cast_fp16 = slice_by_index(begin = qi_7_begin_0, end = qi_7_end_0, end_mask = qi_7_end_mask_0, squeeze_mask = qi_7_squeeze_mask_0, x = query_pairs_7_cast_fp16)[name = string("qi_7_cast_fp16")];
tensor<int32, [5]> kr_7_begin_0 = const()[name = string("kr_7_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> kr_7_end_0 = const()[name = string("kr_7_end_0"), val = tensor<int32, [5]>([1, 4, 4, 32, 1])];
tensor<bool, [5]> kr_7_end_mask_0 = const()[name = string("kr_7_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> kr_7_squeeze_mask_0 = const()[name = string("kr_7_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 4, 32]> kr_7_cast_fp16 = slice_by_index(begin = kr_7_begin_0, end = kr_7_end_0, end_mask = kr_7_end_mask_0, squeeze_mask = kr_7_squeeze_mask_0, x = key_pairs_7_cast_fp16)[name = string("kr_7_cast_fp16")];
tensor<int32, [5]> ki_7_begin_0 = const()[name = string("ki_7_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> ki_7_end_0 = const()[name = string("ki_7_end_0"), val = tensor<int32, [5]>([1, 4, 4, 32, 2])];
tensor<bool, [5]> ki_7_end_mask_0 = const()[name = string("ki_7_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> ki_7_squeeze_mask_0 = const()[name = string("ki_7_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 4, 32]> ki_7_cast_fp16 = slice_by_index(begin = ki_7_begin_0, end = ki_7_end_0, end_mask = ki_7_end_mask_0, squeeze_mask = ki_7_squeeze_mask_0, x = key_pairs_7_cast_fp16)[name = string("ki_7_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1272_cast_fp16 = mul(x = qr_7_cast_fp16, y = s0_cos)[name = string("op_1272_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1273_cast_fp16 = mul(x = qi_7_cast_fp16, y = s0_sin)[name = string("op_1273_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1275_cast_fp16 = sub(x = var_1272_cast_fp16, y = var_1273_cast_fp16)[name = string("op_1275_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1276_cast_fp16 = mul(x = qr_7_cast_fp16, y = s0_sin)[name = string("op_1276_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1277_cast_fp16 = mul(x = qi_7_cast_fp16, y = s0_cos)[name = string("op_1277_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1279_cast_fp16 = add(x = var_1276_cast_fp16, y = var_1277_cast_fp16)[name = string("op_1279_cast_fp16")];
int32 query_21_axis_0 = const()[name = string("query_21_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 4, 32, 2]> query_21_cast_fp16 = stack(axis = query_21_axis_0, values = (var_1275_cast_fp16, var_1279_cast_fp16))[name = string("query_21_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1283_cast_fp16 = mul(x = kr_7_cast_fp16, y = s0_cos)[name = string("op_1283_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1284_cast_fp16 = mul(x = ki_7_cast_fp16, y = s0_sin)[name = string("op_1284_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1286_cast_fp16 = sub(x = var_1283_cast_fp16, y = var_1284_cast_fp16)[name = string("op_1286_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1287_cast_fp16 = mul(x = kr_7_cast_fp16, y = s0_sin)[name = string("op_1287_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1288_cast_fp16 = mul(x = ki_7_cast_fp16, y = s0_cos)[name = string("op_1288_cast_fp16")];
tensor<fp16, [1, 4, 4, 32]> var_1290_cast_fp16 = add(x = var_1287_cast_fp16, y = var_1288_cast_fp16)[name = string("op_1290_cast_fp16")];
int32 key_21_axis_0 = const()[name = string("key_21_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 4, 32, 2]> key_21_cast_fp16 = stack(axis = key_21_axis_0, values = (var_1286_cast_fp16, var_1290_cast_fp16))[name = string("key_21_cast_fp16")];
tensor<int32, [4]> var_1298 = const()[name = string("op_1298"), val = tensor<int32, [4]>([1, 4, 4, 64])];
tensor<fp16, [1, 4, 4, 64]> query_23_cast_fp16 = reshape(shape = var_1298, x = query_21_cast_fp16)[name = string("query_23_cast_fp16")];
tensor<int32, [4]> var_1304 = const()[name = string("op_1304"), val = tensor<int32, [4]>([1, 4, 4, 64])];
tensor<fp16, [1, 4, 4, 64]> key_23_cast_fp16 = reshape(shape = var_1304, x = key_21_cast_fp16)[name = string("key_23_cast_fp16")];
tensor<fp16, [1, 4, 500, 64]> read_state_6 = read_state(input = s0_l3_k)[name = string("read_state_6")];
tensor<int32, [4]> var_1320_begin_0 = const()[name = string("op_1320_begin_0"), val = tensor<int32, [4]>([0, 0, 4, 0])];
tensor<int32, [4]> var_1320_end_0 = const()[name = string("op_1320_end_0"), val = tensor<int32, [4]>([1, 4, 500, 64])];
tensor<bool, [4]> var_1320_end_mask_0 = const()[name = string("op_1320_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 496, 64]> var_1320_cast_fp16 = slice_by_index(begin = var_1320_begin_0, end = var_1320_end_0, end_mask = var_1320_end_mask_0, x = read_state_6)[name = string("op_1320_cast_fp16")];
int32 var_1327 = const()[name = string("op_1327"), val = int32(2)];
bool new_key_7_interleave_0 = const()[name = string("new_key_7_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 500, 64]> new_key_7_cast_fp16 = concat(axis = var_1327, interleave = new_key_7_interleave_0, values = (var_1320_cast_fp16, key_23_cast_fp16))[name = string("new_key_7_cast_fp16")];
tensor<fp16, [1, 4, 500, 64]> read_state_7 = read_state(input = s0_l3_v)[name = string("read_state_7")];
tensor<int32, [4]> var_1343_begin_0 = const()[name = string("op_1343_begin_0"), val = tensor<int32, [4]>([0, 0, 4, 0])];
tensor<int32, [4]> var_1343_end_0 = const()[name = string("op_1343_end_0"), val = tensor<int32, [4]>([1, 4, 500, 64])];
tensor<bool, [4]> var_1343_end_mask_0 = const()[name = string("op_1343_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 496, 64]> var_1343_cast_fp16 = slice_by_index(begin = var_1343_begin_0, end = var_1343_end_0, end_mask = var_1343_end_mask_0, x = read_state_7)[name = string("op_1343_cast_fp16")];
int32 var_1350 = const()[name = string("op_1350"), val = int32(2)];
bool new_value_7_interleave_0 = const()[name = string("new_value_7_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 500, 64]> new_value_7_cast_fp16 = concat(axis = var_1350, interleave = new_value_7_interleave_0, values = (var_1343_cast_fp16, value_7_cast_fp16))[name = string("new_value_7_cast_fp16")];
tensor<int32, [4]> concat_12 = const()[name = string("concat_12"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_13 = const()[name = string("concat_13"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s0_l3_k_internal_tensor_assign_1_stride_0 = const()[name = string("s0_l3_k_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s0_l3_k_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s0_l3_k_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s0_l3_k_internal_tensor_assign_1_end_mask_0 = const()[name = string("s0_l3_k_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s0_l3_k_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s0_l3_k_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 500, 64]> s0_l3_k_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_12, begin_mask = s0_l3_k_internal_tensor_assign_1_begin_mask_0, end = concat_13, end_mask = s0_l3_k_internal_tensor_assign_1_end_mask_0, squeeze_mask = s0_l3_k_internal_tensor_assign_1_squeeze_mask_0, stride = s0_l3_k_internal_tensor_assign_1_stride_0, update = new_key_7_cast_fp16, x = read_state_6)[name = string("s0_l3_k_internal_tensor_assign_1_cast_fp16")];
write_state(data = s0_l3_k_internal_tensor_assign_1_cast_fp16, input = s0_l3_k)[name = string("coreml_update_state_30_write_state")];
tensor<int32, [4]> concat_14 = const()[name = string("concat_14"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_15 = const()[name = string("concat_15"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s0_l3_v_internal_tensor_assign_1_stride_0 = const()[name = string("s0_l3_v_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s0_l3_v_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s0_l3_v_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s0_l3_v_internal_tensor_assign_1_end_mask_0 = const()[name = string("s0_l3_v_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s0_l3_v_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s0_l3_v_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 500, 64]> s0_l3_v_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_14, begin_mask = s0_l3_v_internal_tensor_assign_1_begin_mask_0, end = concat_15, end_mask = s0_l3_v_internal_tensor_assign_1_end_mask_0, squeeze_mask = s0_l3_v_internal_tensor_assign_1_squeeze_mask_0, stride = s0_l3_v_internal_tensor_assign_1_stride_0, update = new_value_7_cast_fp16, x = read_state_7)[name = string("s0_l3_v_internal_tensor_assign_1_cast_fp16")];
write_state(data = s0_l3_v_internal_tensor_assign_1_cast_fp16, input = s0_l3_v)[name = string("coreml_update_state_31_write_state")];
bool var_1369_transpose_x_1 = const()[name = string("op_1369_transpose_x_1"), val = bool(false)];
bool var_1369_transpose_y_1 = const()[name = string("op_1369_transpose_y_1"), val = bool(true)];
tensor<fp16, [1, 4, 4, 500]> var_1369_cast_fp16 = matmul(transpose_x = var_1369_transpose_x_1, transpose_y = var_1369_transpose_y_1, x = query_23_cast_fp16, y = new_key_7_cast_fp16)[name = string("op_1369_cast_fp16")];
fp16 var_1370_to_fp16 = const()[name = string("op_1370_to_fp16"), val = fp16(0x1p-3)];
tensor<fp16, [1, 4, 4, 500]> scores_7_cast_fp16 = mul(x = var_1369_cast_fp16, y = var_1370_to_fp16)[name = string("scores_7_cast_fp16")];
tensor<fp16, [1, 4, 4, 500]> var_1373_cast_fp16 = add(x = scores_7_cast_fp16, y = s0_mask)[name = string("op_1373_cast_fp16")];
int32 var_1374 = const()[name = string("op_1374"), val = int32(-1)];
tensor<fp16, [1, 4, 4, 500]> probabilities_7_cast_fp16 = softmax(axis = var_1374, x = var_1373_cast_fp16)[name = string("probabilities_7_cast_fp16")];
bool attention_7_transpose_x_0 = const()[name = string("attention_7_transpose_x_0"), val = bool(false)];
bool attention_7_transpose_y_0 = const()[name = string("attention_7_transpose_y_0"), val = bool(false)];
tensor<fp16, [1, 4, 4, 64]> attention_7_cast_fp16 = matmul(transpose_x = attention_7_transpose_x_0, transpose_y = attention_7_transpose_y_0, x = probabilities_7_cast_fp16, y = new_value_7_cast_fp16)[name = string("attention_7_cast_fp16")];
tensor<int32, [4]> var_1380_perm_0 = const()[name = string("op_1380_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
tensor<int32, [3]> var_1384 = const()[name = string("op_1384"), val = tensor<int32, [3]>([1, 4, 256])];
tensor<fp16, [1, 4, 4, 64]> var_1380_cast_fp16 = transpose(perm = var_1380_perm_0, x = attention_7_cast_fp16)[name = string("transpose_28")];
tensor<fp16, [1, 4, 256]> input_49_cast_fp16 = reshape(shape = var_1384, x = var_1380_cast_fp16)[name = string("input_49_cast_fp16")];
tensor<fp16, [256, 256]> stages_0_transformer_layers_3_self_attn_out_proj_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_3_self_attn_out_proj_weight_to_fp16"), val = tensor<fp16, [256, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(5226880)))];
tensor<fp16, [1, 4, 256]> linear_14_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_0_transformer_layers_3_self_attn_out_proj_weight_to_fp16, x = input_49_cast_fp16)[name = string("linear_14_cast_fp16")];
tensor<fp16, [256]> stages_0_transformer_layers_3_layer_scale_1_scale_to_fp16 = const()[name = string("stages_0_transformer_layers_3_layer_scale_1_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(5358016)))];
tensor<fp16, [1, 4, 256]> var_1390_cast_fp16 = mul(x = stages_0_transformer_layers_3_layer_scale_1_scale_to_fp16, y = linear_14_cast_fp16)[name = string("op_1390_cast_fp16")];
tensor<fp16, [1, 4, 256]> input_51_cast_fp16 = add(x = input_45_cast_fp16, y = var_1390_cast_fp16)[name = string("input_51_cast_fp16")];
tensor<int32, [1]> input_53_axes_0 = const()[name = string("input_53_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_0_transformer_layers_3_norm2_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_3_norm2_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(5358592)))];
tensor<fp16, [256]> stages_0_transformer_layers_3_norm2_bias_to_fp16 = const()[name = string("stages_0_transformer_layers_3_norm2_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(5359168)))];
fp16 var_1394_to_fp16 = const()[name = string("op_1394_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 4, 256]> input_53_cast_fp16 = layer_norm(axes = input_53_axes_0, beta = stages_0_transformer_layers_3_norm2_bias_to_fp16, epsilon = var_1394_to_fp16, gamma = stages_0_transformer_layers_3_norm2_weight_to_fp16, x = input_51_cast_fp16)[name = string("input_53_cast_fp16")];
tensor<fp16, [1024, 256]> stages_0_transformer_layers_3_ffn_0_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_3_ffn_0_weight_to_fp16"), val = tensor<fp16, [1024, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(5359744)))];
tensor<fp16, [1, 4, 1024]> linear_15_cast_fp16 = linear(bias = linear_3_bias_0_to_fp16, weight = stages_0_transformer_layers_3_ffn_0_weight_to_fp16, x = input_53_cast_fp16)[name = string("linear_15_cast_fp16")];
string input_57_mode_0 = const()[name = string("input_57_mode_0"), val = string("EXACT")];
tensor<fp16, [1, 4, 1024]> input_57_cast_fp16 = gelu(mode = input_57_mode_0, x = linear_15_cast_fp16)[name = string("input_57_cast_fp16")];
tensor<fp16, [256, 1024]> stages_0_transformer_layers_3_ffn_2_weight_to_fp16 = const()[name = string("stages_0_transformer_layers_3_ffn_2_weight_to_fp16"), val = tensor<fp16, [256, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(5884096)))];
tensor<fp16, [1, 4, 256]> linear_16_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_0_transformer_layers_3_ffn_2_weight_to_fp16, x = input_57_cast_fp16)[name = string("linear_16_cast_fp16")];
tensor<fp16, [256]> stages_0_transformer_layers_3_layer_scale_2_scale_to_fp16 = const()[name = string("stages_0_transformer_layers_3_layer_scale_2_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(6408448)))];
tensor<fp16, [1, 4, 256]> var_1410_cast_fp16 = mul(x = stages_0_transformer_layers_3_layer_scale_2_scale_to_fp16, y = linear_16_cast_fp16)[name = string("op_1410_cast_fp16")];
tensor<fp16, [1, 4, 256]> input_59_cast_fp16 = add(x = input_51_cast_fp16, y = var_1410_cast_fp16)[name = string("input_59_cast_fp16")];
tensor<fp16, [768, 256]> stages_0_output_proj_weight_to_fp16 = const()[name = string("stages_0_output_proj_weight_to_fp16"), val = tensor<fp16, [768, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(6409024)))];
tensor<fp16, [1, 4, 768]> linear_17_cast_fp16 = linear(bias = linear_1_bias_0_to_fp16, weight = stages_0_output_proj_weight_to_fp16, x = input_59_cast_fp16)[name = string("linear_17_cast_fp16")];
tensor<int32, [3]> x_19_perm_0 = const()[name = string("x_19_perm_0"), val = tensor<int32, [3]>([0, 2, 1])];
tensor<int32, [4]> var_1423 = const()[name = string("op_1423"), val = tensor<int32, [4]>([1, 384, 2, 4])];
tensor<fp16, [1, 768, 4]> x_19_cast_fp16 = transpose(perm = x_19_perm_0, x = linear_17_cast_fp16)[name = string("transpose_27")];
tensor<fp16, [1, 384, 2, 4]> var_1424_cast_fp16 = reshape(shape = var_1423, x = x_19_cast_fp16)[name = string("op_1424_cast_fp16")];
tensor<int32, [4]> var_1429 = const()[name = string("op_1429"), val = tensor<int32, [4]>([0, 1, 3, 2])];
tensor<int32, [3]> var_1434 = const()[name = string("op_1434"), val = tensor<int32, [3]>([1, 384, 8])];
tensor<fp16, [1, 384, 4, 2]> var_1430_cast_fp16 = transpose(perm = var_1429, x = var_1424_cast_fp16)[name = string("transpose_26")];
tensor<fp16, [1, 384, 8]> x_21_cast_fp16 = reshape(shape = var_1434, x = var_1430_cast_fp16)[name = string("x_21_cast_fp16")];
tensor<int32, [3]> input_61_perm_0 = const()[name = string("input_61_perm_0"), val = tensor<int32, [3]>([0, 2, 1])];
tensor<fp16, [256, 384]> stages_1_input_proj_weight_to_fp16 = const()[name = string("stages_1_input_proj_weight_to_fp16"), val = tensor<fp16, [256, 384]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(6802304)))];
tensor<fp16, [1, 8, 384]> input_61_cast_fp16 = transpose(perm = input_61_perm_0, x = x_21_cast_fp16)[name = string("transpose_25")];
tensor<fp16, [1, 8, 256]> linear_18_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_1_input_proj_weight_to_fp16, x = input_61_cast_fp16)[name = string("linear_18_cast_fp16")];
tensor<int32, [1]> input_65_axes_0 = const()[name = string("input_65_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_1_transformer_layers_0_norm1_weight_to_fp16 = const()[name = string("stages_1_transformer_layers_0_norm1_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(6998976)))];
tensor<fp16, [256]> stages_1_transformer_layers_0_norm1_bias_to_fp16 = const()[name = string("stages_1_transformer_layers_0_norm1_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(6999552)))];
fp16 var_1443_to_fp16 = const()[name = string("op_1443_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 8, 256]> input_65_cast_fp16 = layer_norm(axes = input_65_axes_0, beta = stages_1_transformer_layers_0_norm1_bias_to_fp16, epsilon = var_1443_to_fp16, gamma = stages_1_transformer_layers_0_norm1_weight_to_fp16, x = linear_18_cast_fp16)[name = string("input_65_cast_fp16")];
tensor<fp16, [768, 256]> stages_1_transformer_layers_0_self_attn_in_proj_weight_to_fp16 = const()[name = string("stages_1_transformer_layers_0_self_attn_in_proj_weight_to_fp16"), val = tensor<fp16, [768, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(7000128)))];
tensor<fp16, [1, 8, 768]> linear_19_cast_fp16 = linear(bias = linear_1_bias_0_to_fp16, weight = stages_1_transformer_layers_0_self_attn_in_proj_weight_to_fp16, x = input_65_cast_fp16)[name = string("linear_19_cast_fp16")];
tensor<int32, [5]> var_1457 = const()[name = string("op_1457"), val = tensor<int32, [5]>([1, 8, 3, 4, 64])];
tensor<fp16, [1, 8, 3, 4, 64]> var_1458_cast_fp16 = reshape(shape = var_1457, x = linear_19_cast_fp16)[name = string("op_1458_cast_fp16")];
tensor<int32, [5]> var_1464 = const()[name = string("op_1464"), val = tensor<int32, [5]>([2, 0, 3, 1, 4])];
tensor<int32, [5]> query_25_begin_0 = const()[name = string("query_25_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> query_25_end_0 = const()[name = string("query_25_end_0"), val = tensor<int32, [5]>([1, 1, 4, 8, 64])];
tensor<bool, [5]> query_25_end_mask_0 = const()[name = string("query_25_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> query_25_squeeze_mask_0 = const()[name = string("query_25_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [3, 1, 4, 8, 64]> qkv_19_cast_fp16 = transpose(perm = var_1464, x = var_1458_cast_fp16)[name = string("transpose_24")];
tensor<fp16, [1, 4, 8, 64]> query_25_cast_fp16 = slice_by_index(begin = query_25_begin_0, end = query_25_end_0, end_mask = query_25_end_mask_0, squeeze_mask = query_25_squeeze_mask_0, x = qkv_19_cast_fp16)[name = string("query_25_cast_fp16")];
tensor<int32, [5]> key_25_begin_0 = const()[name = string("key_25_begin_0"), val = tensor<int32, [5]>([1, 0, 0, 0, 0])];
tensor<int32, [5]> key_25_end_0 = const()[name = string("key_25_end_0"), val = tensor<int32, [5]>([2, 1, 4, 8, 64])];
tensor<bool, [5]> key_25_end_mask_0 = const()[name = string("key_25_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> key_25_squeeze_mask_0 = const()[name = string("key_25_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 8, 64]> key_25_cast_fp16 = slice_by_index(begin = key_25_begin_0, end = key_25_end_0, end_mask = key_25_end_mask_0, squeeze_mask = key_25_squeeze_mask_0, x = qkv_19_cast_fp16)[name = string("key_25_cast_fp16")];
tensor<int32, [5]> value_9_begin_0 = const()[name = string("value_9_begin_0"), val = tensor<int32, [5]>([2, 0, 0, 0, 0])];
tensor<int32, [5]> value_9_end_0 = const()[name = string("value_9_end_0"), val = tensor<int32, [5]>([3, 1, 4, 8, 64])];
tensor<bool, [5]> value_9_end_mask_0 = const()[name = string("value_9_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> value_9_squeeze_mask_0 = const()[name = string("value_9_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 8, 64]> value_9_cast_fp16 = slice_by_index(begin = value_9_begin_0, end = value_9_end_0, end_mask = value_9_end_mask_0, squeeze_mask = value_9_squeeze_mask_0, x = qkv_19_cast_fp16)[name = string("value_9_cast_fp16")];
tensor<int32, [5]> var_1480 = const()[name = string("op_1480"), val = tensor<int32, [5]>([1, 4, 8, 32, 2])];
tensor<fp16, [1, 4, 8, 32, 2]> query_pairs_9_cast_fp16 = reshape(shape = var_1480, x = query_25_cast_fp16)[name = string("query_pairs_9_cast_fp16")];
tensor<int32, [5]> var_1487 = const()[name = string("op_1487"), val = tensor<int32, [5]>([1, 4, 8, 32, 2])];
tensor<fp16, [1, 4, 8, 32, 2]> key_pairs_9_cast_fp16 = reshape(shape = var_1487, x = key_25_cast_fp16)[name = string("key_pairs_9_cast_fp16")];
tensor<int32, [5]> qr_9_begin_0 = const()[name = string("qr_9_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> qr_9_end_0 = const()[name = string("qr_9_end_0"), val = tensor<int32, [5]>([1, 4, 8, 32, 1])];
tensor<bool, [5]> qr_9_end_mask_0 = const()[name = string("qr_9_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qr_9_squeeze_mask_0 = const()[name = string("qr_9_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 8, 32]> qr_9_cast_fp16 = slice_by_index(begin = qr_9_begin_0, end = qr_9_end_0, end_mask = qr_9_end_mask_0, squeeze_mask = qr_9_squeeze_mask_0, x = query_pairs_9_cast_fp16)[name = string("qr_9_cast_fp16")];
tensor<int32, [5]> qi_9_begin_0 = const()[name = string("qi_9_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> qi_9_end_0 = const()[name = string("qi_9_end_0"), val = tensor<int32, [5]>([1, 4, 8, 32, 2])];
tensor<bool, [5]> qi_9_end_mask_0 = const()[name = string("qi_9_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qi_9_squeeze_mask_0 = const()[name = string("qi_9_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 8, 32]> qi_9_cast_fp16 = slice_by_index(begin = qi_9_begin_0, end = qi_9_end_0, end_mask = qi_9_end_mask_0, squeeze_mask = qi_9_squeeze_mask_0, x = query_pairs_9_cast_fp16)[name = string("qi_9_cast_fp16")];
tensor<int32, [5]> kr_9_begin_0 = const()[name = string("kr_9_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> kr_9_end_0 = const()[name = string("kr_9_end_0"), val = tensor<int32, [5]>([1, 4, 8, 32, 1])];
tensor<bool, [5]> kr_9_end_mask_0 = const()[name = string("kr_9_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> kr_9_squeeze_mask_0 = const()[name = string("kr_9_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 8, 32]> kr_9_cast_fp16 = slice_by_index(begin = kr_9_begin_0, end = kr_9_end_0, end_mask = kr_9_end_mask_0, squeeze_mask = kr_9_squeeze_mask_0, x = key_pairs_9_cast_fp16)[name = string("kr_9_cast_fp16")];
tensor<int32, [5]> ki_9_begin_0 = const()[name = string("ki_9_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> ki_9_end_0 = const()[name = string("ki_9_end_0"), val = tensor<int32, [5]>([1, 4, 8, 32, 2])];
tensor<bool, [5]> ki_9_end_mask_0 = const()[name = string("ki_9_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> ki_9_squeeze_mask_0 = const()[name = string("ki_9_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 8, 32]> ki_9_cast_fp16 = slice_by_index(begin = ki_9_begin_0, end = ki_9_end_0, end_mask = ki_9_end_mask_0, squeeze_mask = ki_9_squeeze_mask_0, x = key_pairs_9_cast_fp16)[name = string("ki_9_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1501_cast_fp16 = mul(x = qr_9_cast_fp16, y = s1_cos)[name = string("op_1501_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1502_cast_fp16 = mul(x = qi_9_cast_fp16, y = s1_sin)[name = string("op_1502_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1504_cast_fp16 = sub(x = var_1501_cast_fp16, y = var_1502_cast_fp16)[name = string("op_1504_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1505_cast_fp16 = mul(x = qr_9_cast_fp16, y = s1_sin)[name = string("op_1505_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1506_cast_fp16 = mul(x = qi_9_cast_fp16, y = s1_cos)[name = string("op_1506_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1508_cast_fp16 = add(x = var_1505_cast_fp16, y = var_1506_cast_fp16)[name = string("op_1508_cast_fp16")];
int32 query_27_axis_0 = const()[name = string("query_27_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 8, 32, 2]> query_27_cast_fp16 = stack(axis = query_27_axis_0, values = (var_1504_cast_fp16, var_1508_cast_fp16))[name = string("query_27_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1512_cast_fp16 = mul(x = kr_9_cast_fp16, y = s1_cos)[name = string("op_1512_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1513_cast_fp16 = mul(x = ki_9_cast_fp16, y = s1_sin)[name = string("op_1513_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1515_cast_fp16 = sub(x = var_1512_cast_fp16, y = var_1513_cast_fp16)[name = string("op_1515_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1516_cast_fp16 = mul(x = kr_9_cast_fp16, y = s1_sin)[name = string("op_1516_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1517_cast_fp16 = mul(x = ki_9_cast_fp16, y = s1_cos)[name = string("op_1517_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1519_cast_fp16 = add(x = var_1516_cast_fp16, y = var_1517_cast_fp16)[name = string("op_1519_cast_fp16")];
int32 key_27_axis_0 = const()[name = string("key_27_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 8, 32, 2]> key_27_cast_fp16 = stack(axis = key_27_axis_0, values = (var_1515_cast_fp16, var_1519_cast_fp16))[name = string("key_27_cast_fp16")];
tensor<int32, [4]> var_1527 = const()[name = string("op_1527"), val = tensor<int32, [4]>([1, 4, 8, 64])];
tensor<fp16, [1, 4, 8, 64]> query_29_cast_fp16 = reshape(shape = var_1527, x = query_27_cast_fp16)[name = string("query_29_cast_fp16")];
tensor<int32, [4]> var_1533 = const()[name = string("op_1533"), val = tensor<int32, [4]>([1, 4, 8, 64])];
tensor<fp16, [1, 4, 8, 64]> key_29_cast_fp16 = reshape(shape = var_1533, x = key_27_cast_fp16)[name = string("key_29_cast_fp16")];
tensor<fp16, [1, 4, 800, 64]> read_state_8 = read_state(input = s1_l0_k)[name = string("read_state_8")];
tensor<int32, [4]> var_1549_begin_0 = const()[name = string("op_1549_begin_0"), val = tensor<int32, [4]>([0, 0, 8, 0])];
tensor<int32, [4]> var_1549_end_0 = const()[name = string("op_1549_end_0"), val = tensor<int32, [4]>([1, 4, 800, 64])];
tensor<bool, [4]> var_1549_end_mask_0 = const()[name = string("op_1549_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 792, 64]> var_1549_cast_fp16 = slice_by_index(begin = var_1549_begin_0, end = var_1549_end_0, end_mask = var_1549_end_mask_0, x = read_state_8)[name = string("op_1549_cast_fp16")];
int32 var_1556 = const()[name = string("op_1556"), val = int32(2)];
bool new_key_9_interleave_0 = const()[name = string("new_key_9_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 800, 64]> new_key_9_cast_fp16 = concat(axis = var_1556, interleave = new_key_9_interleave_0, values = (var_1549_cast_fp16, key_29_cast_fp16))[name = string("new_key_9_cast_fp16")];
tensor<fp16, [1, 4, 800, 64]> read_state_9 = read_state(input = s1_l0_v)[name = string("read_state_9")];
tensor<int32, [4]> var_1572_begin_0 = const()[name = string("op_1572_begin_0"), val = tensor<int32, [4]>([0, 0, 8, 0])];
tensor<int32, [4]> var_1572_end_0 = const()[name = string("op_1572_end_0"), val = tensor<int32, [4]>([1, 4, 800, 64])];
tensor<bool, [4]> var_1572_end_mask_0 = const()[name = string("op_1572_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 792, 64]> var_1572_cast_fp16 = slice_by_index(begin = var_1572_begin_0, end = var_1572_end_0, end_mask = var_1572_end_mask_0, x = read_state_9)[name = string("op_1572_cast_fp16")];
int32 var_1579 = const()[name = string("op_1579"), val = int32(2)];
bool new_value_9_interleave_0 = const()[name = string("new_value_9_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 800, 64]> new_value_9_cast_fp16 = concat(axis = var_1579, interleave = new_value_9_interleave_0, values = (var_1572_cast_fp16, value_9_cast_fp16))[name = string("new_value_9_cast_fp16")];
tensor<int32, [4]> concat_16 = const()[name = string("concat_16"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_17 = const()[name = string("concat_17"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s1_l0_k_internal_tensor_assign_1_stride_0 = const()[name = string("s1_l0_k_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s1_l0_k_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s1_l0_k_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s1_l0_k_internal_tensor_assign_1_end_mask_0 = const()[name = string("s1_l0_k_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s1_l0_k_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s1_l0_k_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 800, 64]> s1_l0_k_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_16, begin_mask = s1_l0_k_internal_tensor_assign_1_begin_mask_0, end = concat_17, end_mask = s1_l0_k_internal_tensor_assign_1_end_mask_0, squeeze_mask = s1_l0_k_internal_tensor_assign_1_squeeze_mask_0, stride = s1_l0_k_internal_tensor_assign_1_stride_0, update = new_key_9_cast_fp16, x = read_state_8)[name = string("s1_l0_k_internal_tensor_assign_1_cast_fp16")];
write_state(data = s1_l0_k_internal_tensor_assign_1_cast_fp16, input = s1_l0_k)[name = string("coreml_update_state_32_write_state")];
tensor<int32, [4]> concat_18 = const()[name = string("concat_18"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_19 = const()[name = string("concat_19"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s1_l0_v_internal_tensor_assign_1_stride_0 = const()[name = string("s1_l0_v_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s1_l0_v_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s1_l0_v_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s1_l0_v_internal_tensor_assign_1_end_mask_0 = const()[name = string("s1_l0_v_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s1_l0_v_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s1_l0_v_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 800, 64]> s1_l0_v_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_18, begin_mask = s1_l0_v_internal_tensor_assign_1_begin_mask_0, end = concat_19, end_mask = s1_l0_v_internal_tensor_assign_1_end_mask_0, squeeze_mask = s1_l0_v_internal_tensor_assign_1_squeeze_mask_0, stride = s1_l0_v_internal_tensor_assign_1_stride_0, update = new_value_9_cast_fp16, x = read_state_9)[name = string("s1_l0_v_internal_tensor_assign_1_cast_fp16")];
write_state(data = s1_l0_v_internal_tensor_assign_1_cast_fp16, input = s1_l0_v)[name = string("coreml_update_state_33_write_state")];
bool var_1598_transpose_x_1 = const()[name = string("op_1598_transpose_x_1"), val = bool(false)];
bool var_1598_transpose_y_1 = const()[name = string("op_1598_transpose_y_1"), val = bool(true)];
tensor<fp16, [1, 4, 8, 800]> var_1598_cast_fp16 = matmul(transpose_x = var_1598_transpose_x_1, transpose_y = var_1598_transpose_y_1, x = query_29_cast_fp16, y = new_key_9_cast_fp16)[name = string("op_1598_cast_fp16")];
fp16 var_1599_to_fp16 = const()[name = string("op_1599_to_fp16"), val = fp16(0x1p-3)];
tensor<fp16, [1, 4, 8, 800]> scores_9_cast_fp16 = mul(x = var_1598_cast_fp16, y = var_1599_to_fp16)[name = string("scores_9_cast_fp16")];
tensor<fp16, [1, 4, 8, 800]> var_1602_cast_fp16 = add(x = scores_9_cast_fp16, y = s1_mask)[name = string("op_1602_cast_fp16")];
int32 var_1603 = const()[name = string("op_1603"), val = int32(-1)];
tensor<fp16, [1, 4, 8, 800]> probabilities_9_cast_fp16 = softmax(axis = var_1603, x = var_1602_cast_fp16)[name = string("probabilities_9_cast_fp16")];
bool attention_9_transpose_x_0 = const()[name = string("attention_9_transpose_x_0"), val = bool(false)];
bool attention_9_transpose_y_0 = const()[name = string("attention_9_transpose_y_0"), val = bool(false)];
tensor<fp16, [1, 4, 8, 64]> attention_9_cast_fp16 = matmul(transpose_x = attention_9_transpose_x_0, transpose_y = attention_9_transpose_y_0, x = probabilities_9_cast_fp16, y = new_value_9_cast_fp16)[name = string("attention_9_cast_fp16")];
tensor<int32, [4]> var_1609_perm_0 = const()[name = string("op_1609_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
tensor<int32, [3]> var_1613 = const()[name = string("op_1613"), val = tensor<int32, [3]>([1, 8, 256])];
tensor<fp16, [1, 8, 4, 64]> var_1609_cast_fp16 = transpose(perm = var_1609_perm_0, x = attention_9_cast_fp16)[name = string("transpose_23")];
tensor<fp16, [1, 8, 256]> input_67_cast_fp16 = reshape(shape = var_1613, x = var_1609_cast_fp16)[name = string("input_67_cast_fp16")];
tensor<fp16, [256, 256]> stages_1_transformer_layers_0_self_attn_out_proj_weight_to_fp16 = const()[name = string("stages_1_transformer_layers_0_self_attn_out_proj_weight_to_fp16"), val = tensor<fp16, [256, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(7393408)))];
tensor<fp16, [1, 8, 256]> linear_20_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_1_transformer_layers_0_self_attn_out_proj_weight_to_fp16, x = input_67_cast_fp16)[name = string("linear_20_cast_fp16")];
tensor<fp16, [256]> stages_1_transformer_layers_0_layer_scale_1_scale_to_fp16 = const()[name = string("stages_1_transformer_layers_0_layer_scale_1_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(7524544)))];
tensor<fp16, [1, 8, 256]> var_1619_cast_fp16 = mul(x = stages_1_transformer_layers_0_layer_scale_1_scale_to_fp16, y = linear_20_cast_fp16)[name = string("op_1619_cast_fp16")];
tensor<fp16, [1, 8, 256]> input_69_cast_fp16 = add(x = linear_18_cast_fp16, y = var_1619_cast_fp16)[name = string("input_69_cast_fp16")];
tensor<int32, [1]> input_71_axes_0 = const()[name = string("input_71_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_1_transformer_layers_0_norm2_weight_to_fp16 = const()[name = string("stages_1_transformer_layers_0_norm2_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(7525120)))];
tensor<fp16, [256]> stages_1_transformer_layers_0_norm2_bias_to_fp16 = const()[name = string("stages_1_transformer_layers_0_norm2_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(7525696)))];
fp16 var_1623_to_fp16 = const()[name = string("op_1623_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 8, 256]> input_71_cast_fp16 = layer_norm(axes = input_71_axes_0, beta = stages_1_transformer_layers_0_norm2_bias_to_fp16, epsilon = var_1623_to_fp16, gamma = stages_1_transformer_layers_0_norm2_weight_to_fp16, x = input_69_cast_fp16)[name = string("input_71_cast_fp16")];
tensor<fp16, [1024, 256]> stages_1_transformer_layers_0_ffn_0_weight_to_fp16 = const()[name = string("stages_1_transformer_layers_0_ffn_0_weight_to_fp16"), val = tensor<fp16, [1024, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(7526272)))];
tensor<fp16, [1, 8, 1024]> linear_21_cast_fp16 = linear(bias = linear_3_bias_0_to_fp16, weight = stages_1_transformer_layers_0_ffn_0_weight_to_fp16, x = input_71_cast_fp16)[name = string("linear_21_cast_fp16")];
string input_75_mode_0 = const()[name = string("input_75_mode_0"), val = string("EXACT")];
tensor<fp16, [1, 8, 1024]> input_75_cast_fp16 = gelu(mode = input_75_mode_0, x = linear_21_cast_fp16)[name = string("input_75_cast_fp16")];
tensor<fp16, [256, 1024]> stages_1_transformer_layers_0_ffn_2_weight_to_fp16 = const()[name = string("stages_1_transformer_layers_0_ffn_2_weight_to_fp16"), val = tensor<fp16, [256, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(8050624)))];
tensor<fp16, [1, 8, 256]> linear_22_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_1_transformer_layers_0_ffn_2_weight_to_fp16, x = input_75_cast_fp16)[name = string("linear_22_cast_fp16")];
tensor<fp16, [256]> stages_1_transformer_layers_0_layer_scale_2_scale_to_fp16 = const()[name = string("stages_1_transformer_layers_0_layer_scale_2_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(8574976)))];
tensor<fp16, [1, 8, 256]> var_1639_cast_fp16 = mul(x = stages_1_transformer_layers_0_layer_scale_2_scale_to_fp16, y = linear_22_cast_fp16)[name = string("op_1639_cast_fp16")];
tensor<fp16, [1, 8, 256]> input_77_cast_fp16 = add(x = input_69_cast_fp16, y = var_1639_cast_fp16)[name = string("input_77_cast_fp16")];
tensor<int32, [1]> input_79_axes_0 = const()[name = string("input_79_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_1_transformer_layers_1_norm1_weight_to_fp16 = const()[name = string("stages_1_transformer_layers_1_norm1_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(8575552)))];
tensor<fp16, [256]> stages_1_transformer_layers_1_norm1_bias_to_fp16 = const()[name = string("stages_1_transformer_layers_1_norm1_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(8576128)))];
fp16 var_1643_to_fp16 = const()[name = string("op_1643_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 8, 256]> input_79_cast_fp16 = layer_norm(axes = input_79_axes_0, beta = stages_1_transformer_layers_1_norm1_bias_to_fp16, epsilon = var_1643_to_fp16, gamma = stages_1_transformer_layers_1_norm1_weight_to_fp16, x = input_77_cast_fp16)[name = string("input_79_cast_fp16")];
tensor<fp16, [768, 256]> stages_1_transformer_layers_1_self_attn_in_proj_weight_to_fp16 = const()[name = string("stages_1_transformer_layers_1_self_attn_in_proj_weight_to_fp16"), val = tensor<fp16, [768, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(8576704)))];
tensor<fp16, [1, 8, 768]> linear_23_cast_fp16 = linear(bias = linear_1_bias_0_to_fp16, weight = stages_1_transformer_layers_1_self_attn_in_proj_weight_to_fp16, x = input_79_cast_fp16)[name = string("linear_23_cast_fp16")];
tensor<int32, [5]> var_1657 = const()[name = string("op_1657"), val = tensor<int32, [5]>([1, 8, 3, 4, 64])];
tensor<fp16, [1, 8, 3, 4, 64]> var_1658_cast_fp16 = reshape(shape = var_1657, x = linear_23_cast_fp16)[name = string("op_1658_cast_fp16")];
tensor<int32, [5]> var_1664 = const()[name = string("op_1664"), val = tensor<int32, [5]>([2, 0, 3, 1, 4])];
tensor<int32, [5]> query_31_begin_0 = const()[name = string("query_31_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> query_31_end_0 = const()[name = string("query_31_end_0"), val = tensor<int32, [5]>([1, 1, 4, 8, 64])];
tensor<bool, [5]> query_31_end_mask_0 = const()[name = string("query_31_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> query_31_squeeze_mask_0 = const()[name = string("query_31_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [3, 1, 4, 8, 64]> qkv_23_cast_fp16 = transpose(perm = var_1664, x = var_1658_cast_fp16)[name = string("transpose_22")];
tensor<fp16, [1, 4, 8, 64]> query_31_cast_fp16 = slice_by_index(begin = query_31_begin_0, end = query_31_end_0, end_mask = query_31_end_mask_0, squeeze_mask = query_31_squeeze_mask_0, x = qkv_23_cast_fp16)[name = string("query_31_cast_fp16")];
tensor<int32, [5]> key_31_begin_0 = const()[name = string("key_31_begin_0"), val = tensor<int32, [5]>([1, 0, 0, 0, 0])];
tensor<int32, [5]> key_31_end_0 = const()[name = string("key_31_end_0"), val = tensor<int32, [5]>([2, 1, 4, 8, 64])];
tensor<bool, [5]> key_31_end_mask_0 = const()[name = string("key_31_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> key_31_squeeze_mask_0 = const()[name = string("key_31_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 8, 64]> key_31_cast_fp16 = slice_by_index(begin = key_31_begin_0, end = key_31_end_0, end_mask = key_31_end_mask_0, squeeze_mask = key_31_squeeze_mask_0, x = qkv_23_cast_fp16)[name = string("key_31_cast_fp16")];
tensor<int32, [5]> value_11_begin_0 = const()[name = string("value_11_begin_0"), val = tensor<int32, [5]>([2, 0, 0, 0, 0])];
tensor<int32, [5]> value_11_end_0 = const()[name = string("value_11_end_0"), val = tensor<int32, [5]>([3, 1, 4, 8, 64])];
tensor<bool, [5]> value_11_end_mask_0 = const()[name = string("value_11_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> value_11_squeeze_mask_0 = const()[name = string("value_11_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 8, 64]> value_11_cast_fp16 = slice_by_index(begin = value_11_begin_0, end = value_11_end_0, end_mask = value_11_end_mask_0, squeeze_mask = value_11_squeeze_mask_0, x = qkv_23_cast_fp16)[name = string("value_11_cast_fp16")];
tensor<int32, [5]> var_1680 = const()[name = string("op_1680"), val = tensor<int32, [5]>([1, 4, 8, 32, 2])];
tensor<fp16, [1, 4, 8, 32, 2]> query_pairs_11_cast_fp16 = reshape(shape = var_1680, x = query_31_cast_fp16)[name = string("query_pairs_11_cast_fp16")];
tensor<int32, [5]> var_1687 = const()[name = string("op_1687"), val = tensor<int32, [5]>([1, 4, 8, 32, 2])];
tensor<fp16, [1, 4, 8, 32, 2]> key_pairs_11_cast_fp16 = reshape(shape = var_1687, x = key_31_cast_fp16)[name = string("key_pairs_11_cast_fp16")];
tensor<int32, [5]> qr_11_begin_0 = const()[name = string("qr_11_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> qr_11_end_0 = const()[name = string("qr_11_end_0"), val = tensor<int32, [5]>([1, 4, 8, 32, 1])];
tensor<bool, [5]> qr_11_end_mask_0 = const()[name = string("qr_11_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qr_11_squeeze_mask_0 = const()[name = string("qr_11_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 8, 32]> qr_11_cast_fp16 = slice_by_index(begin = qr_11_begin_0, end = qr_11_end_0, end_mask = qr_11_end_mask_0, squeeze_mask = qr_11_squeeze_mask_0, x = query_pairs_11_cast_fp16)[name = string("qr_11_cast_fp16")];
tensor<int32, [5]> qi_11_begin_0 = const()[name = string("qi_11_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> qi_11_end_0 = const()[name = string("qi_11_end_0"), val = tensor<int32, [5]>([1, 4, 8, 32, 2])];
tensor<bool, [5]> qi_11_end_mask_0 = const()[name = string("qi_11_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qi_11_squeeze_mask_0 = const()[name = string("qi_11_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 8, 32]> qi_11_cast_fp16 = slice_by_index(begin = qi_11_begin_0, end = qi_11_end_0, end_mask = qi_11_end_mask_0, squeeze_mask = qi_11_squeeze_mask_0, x = query_pairs_11_cast_fp16)[name = string("qi_11_cast_fp16")];
tensor<int32, [5]> kr_11_begin_0 = const()[name = string("kr_11_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> kr_11_end_0 = const()[name = string("kr_11_end_0"), val = tensor<int32, [5]>([1, 4, 8, 32, 1])];
tensor<bool, [5]> kr_11_end_mask_0 = const()[name = string("kr_11_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> kr_11_squeeze_mask_0 = const()[name = string("kr_11_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 8, 32]> kr_11_cast_fp16 = slice_by_index(begin = kr_11_begin_0, end = kr_11_end_0, end_mask = kr_11_end_mask_0, squeeze_mask = kr_11_squeeze_mask_0, x = key_pairs_11_cast_fp16)[name = string("kr_11_cast_fp16")];
tensor<int32, [5]> ki_11_begin_0 = const()[name = string("ki_11_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> ki_11_end_0 = const()[name = string("ki_11_end_0"), val = tensor<int32, [5]>([1, 4, 8, 32, 2])];
tensor<bool, [5]> ki_11_end_mask_0 = const()[name = string("ki_11_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> ki_11_squeeze_mask_0 = const()[name = string("ki_11_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 8, 32]> ki_11_cast_fp16 = slice_by_index(begin = ki_11_begin_0, end = ki_11_end_0, end_mask = ki_11_end_mask_0, squeeze_mask = ki_11_squeeze_mask_0, x = key_pairs_11_cast_fp16)[name = string("ki_11_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1701_cast_fp16 = mul(x = qr_11_cast_fp16, y = s1_cos)[name = string("op_1701_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1702_cast_fp16 = mul(x = qi_11_cast_fp16, y = s1_sin)[name = string("op_1702_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1704_cast_fp16 = sub(x = var_1701_cast_fp16, y = var_1702_cast_fp16)[name = string("op_1704_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1705_cast_fp16 = mul(x = qr_11_cast_fp16, y = s1_sin)[name = string("op_1705_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1706_cast_fp16 = mul(x = qi_11_cast_fp16, y = s1_cos)[name = string("op_1706_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1708_cast_fp16 = add(x = var_1705_cast_fp16, y = var_1706_cast_fp16)[name = string("op_1708_cast_fp16")];
int32 query_33_axis_0 = const()[name = string("query_33_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 8, 32, 2]> query_33_cast_fp16 = stack(axis = query_33_axis_0, values = (var_1704_cast_fp16, var_1708_cast_fp16))[name = string("query_33_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1712_cast_fp16 = mul(x = kr_11_cast_fp16, y = s1_cos)[name = string("op_1712_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1713_cast_fp16 = mul(x = ki_11_cast_fp16, y = s1_sin)[name = string("op_1713_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1715_cast_fp16 = sub(x = var_1712_cast_fp16, y = var_1713_cast_fp16)[name = string("op_1715_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1716_cast_fp16 = mul(x = kr_11_cast_fp16, y = s1_sin)[name = string("op_1716_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1717_cast_fp16 = mul(x = ki_11_cast_fp16, y = s1_cos)[name = string("op_1717_cast_fp16")];
tensor<fp16, [1, 4, 8, 32]> var_1719_cast_fp16 = add(x = var_1716_cast_fp16, y = var_1717_cast_fp16)[name = string("op_1719_cast_fp16")];
int32 key_33_axis_0 = const()[name = string("key_33_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 8, 32, 2]> key_33_cast_fp16 = stack(axis = key_33_axis_0, values = (var_1715_cast_fp16, var_1719_cast_fp16))[name = string("key_33_cast_fp16")];
tensor<int32, [4]> var_1727 = const()[name = string("op_1727"), val = tensor<int32, [4]>([1, 4, 8, 64])];
tensor<fp16, [1, 4, 8, 64]> query_35_cast_fp16 = reshape(shape = var_1727, x = query_33_cast_fp16)[name = string("query_35_cast_fp16")];
tensor<int32, [4]> var_1733 = const()[name = string("op_1733"), val = tensor<int32, [4]>([1, 4, 8, 64])];
tensor<fp16, [1, 4, 8, 64]> key_35_cast_fp16 = reshape(shape = var_1733, x = key_33_cast_fp16)[name = string("key_35_cast_fp16")];
tensor<fp16, [1, 4, 800, 64]> read_state_10 = read_state(input = s1_l1_k)[name = string("read_state_10")];
tensor<int32, [4]> var_1749_begin_0 = const()[name = string("op_1749_begin_0"), val = tensor<int32, [4]>([0, 0, 8, 0])];
tensor<int32, [4]> var_1749_end_0 = const()[name = string("op_1749_end_0"), val = tensor<int32, [4]>([1, 4, 800, 64])];
tensor<bool, [4]> var_1749_end_mask_0 = const()[name = string("op_1749_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 792, 64]> var_1749_cast_fp16 = slice_by_index(begin = var_1749_begin_0, end = var_1749_end_0, end_mask = var_1749_end_mask_0, x = read_state_10)[name = string("op_1749_cast_fp16")];
int32 var_1756 = const()[name = string("op_1756"), val = int32(2)];
bool new_key_11_interleave_0 = const()[name = string("new_key_11_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 800, 64]> new_key_11_cast_fp16 = concat(axis = var_1756, interleave = new_key_11_interleave_0, values = (var_1749_cast_fp16, key_35_cast_fp16))[name = string("new_key_11_cast_fp16")];
tensor<fp16, [1, 4, 800, 64]> read_state_11 = read_state(input = s1_l1_v)[name = string("read_state_11")];
tensor<int32, [4]> var_1772_begin_0 = const()[name = string("op_1772_begin_0"), val = tensor<int32, [4]>([0, 0, 8, 0])];
tensor<int32, [4]> var_1772_end_0 = const()[name = string("op_1772_end_0"), val = tensor<int32, [4]>([1, 4, 800, 64])];
tensor<bool, [4]> var_1772_end_mask_0 = const()[name = string("op_1772_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 792, 64]> var_1772_cast_fp16 = slice_by_index(begin = var_1772_begin_0, end = var_1772_end_0, end_mask = var_1772_end_mask_0, x = read_state_11)[name = string("op_1772_cast_fp16")];
int32 var_1779 = const()[name = string("op_1779"), val = int32(2)];
bool new_value_11_interleave_0 = const()[name = string("new_value_11_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 800, 64]> new_value_11_cast_fp16 = concat(axis = var_1779, interleave = new_value_11_interleave_0, values = (var_1772_cast_fp16, value_11_cast_fp16))[name = string("new_value_11_cast_fp16")];
tensor<int32, [4]> concat_20 = const()[name = string("concat_20"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_21 = const()[name = string("concat_21"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s1_l1_k_internal_tensor_assign_1_stride_0 = const()[name = string("s1_l1_k_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s1_l1_k_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s1_l1_k_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s1_l1_k_internal_tensor_assign_1_end_mask_0 = const()[name = string("s1_l1_k_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s1_l1_k_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s1_l1_k_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 800, 64]> s1_l1_k_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_20, begin_mask = s1_l1_k_internal_tensor_assign_1_begin_mask_0, end = concat_21, end_mask = s1_l1_k_internal_tensor_assign_1_end_mask_0, squeeze_mask = s1_l1_k_internal_tensor_assign_1_squeeze_mask_0, stride = s1_l1_k_internal_tensor_assign_1_stride_0, update = new_key_11_cast_fp16, x = read_state_10)[name = string("s1_l1_k_internal_tensor_assign_1_cast_fp16")];
write_state(data = s1_l1_k_internal_tensor_assign_1_cast_fp16, input = s1_l1_k)[name = string("coreml_update_state_34_write_state")];
tensor<int32, [4]> concat_22 = const()[name = string("concat_22"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_23 = const()[name = string("concat_23"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s1_l1_v_internal_tensor_assign_1_stride_0 = const()[name = string("s1_l1_v_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s1_l1_v_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s1_l1_v_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s1_l1_v_internal_tensor_assign_1_end_mask_0 = const()[name = string("s1_l1_v_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s1_l1_v_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s1_l1_v_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 800, 64]> s1_l1_v_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_22, begin_mask = s1_l1_v_internal_tensor_assign_1_begin_mask_0, end = concat_23, end_mask = s1_l1_v_internal_tensor_assign_1_end_mask_0, squeeze_mask = s1_l1_v_internal_tensor_assign_1_squeeze_mask_0, stride = s1_l1_v_internal_tensor_assign_1_stride_0, update = new_value_11_cast_fp16, x = read_state_11)[name = string("s1_l1_v_internal_tensor_assign_1_cast_fp16")];
write_state(data = s1_l1_v_internal_tensor_assign_1_cast_fp16, input = s1_l1_v)[name = string("coreml_update_state_35_write_state")];
bool var_1798_transpose_x_1 = const()[name = string("op_1798_transpose_x_1"), val = bool(false)];
bool var_1798_transpose_y_1 = const()[name = string("op_1798_transpose_y_1"), val = bool(true)];
tensor<fp16, [1, 4, 8, 800]> var_1798_cast_fp16 = matmul(transpose_x = var_1798_transpose_x_1, transpose_y = var_1798_transpose_y_1, x = query_35_cast_fp16, y = new_key_11_cast_fp16)[name = string("op_1798_cast_fp16")];
fp16 var_1799_to_fp16 = const()[name = string("op_1799_to_fp16"), val = fp16(0x1p-3)];
tensor<fp16, [1, 4, 8, 800]> scores_11_cast_fp16 = mul(x = var_1798_cast_fp16, y = var_1799_to_fp16)[name = string("scores_11_cast_fp16")];
tensor<fp16, [1, 4, 8, 800]> var_1802_cast_fp16 = add(x = scores_11_cast_fp16, y = s1_mask)[name = string("op_1802_cast_fp16")];
int32 var_1803 = const()[name = string("op_1803"), val = int32(-1)];
tensor<fp16, [1, 4, 8, 800]> probabilities_11_cast_fp16 = softmax(axis = var_1803, x = var_1802_cast_fp16)[name = string("probabilities_11_cast_fp16")];
bool attention_11_transpose_x_0 = const()[name = string("attention_11_transpose_x_0"), val = bool(false)];
bool attention_11_transpose_y_0 = const()[name = string("attention_11_transpose_y_0"), val = bool(false)];
tensor<fp16, [1, 4, 8, 64]> attention_11_cast_fp16 = matmul(transpose_x = attention_11_transpose_x_0, transpose_y = attention_11_transpose_y_0, x = probabilities_11_cast_fp16, y = new_value_11_cast_fp16)[name = string("attention_11_cast_fp16")];
tensor<int32, [4]> var_1809_perm_0 = const()[name = string("op_1809_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
tensor<int32, [3]> var_1813 = const()[name = string("op_1813"), val = tensor<int32, [3]>([1, 8, 256])];
tensor<fp16, [1, 8, 4, 64]> var_1809_cast_fp16 = transpose(perm = var_1809_perm_0, x = attention_11_cast_fp16)[name = string("transpose_21")];
tensor<fp16, [1, 8, 256]> input_81_cast_fp16 = reshape(shape = var_1813, x = var_1809_cast_fp16)[name = string("input_81_cast_fp16")];
tensor<fp16, [256, 256]> stages_1_transformer_layers_1_self_attn_out_proj_weight_to_fp16 = const()[name = string("stages_1_transformer_layers_1_self_attn_out_proj_weight_to_fp16"), val = tensor<fp16, [256, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(8969984)))];
tensor<fp16, [1, 8, 256]> linear_24_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_1_transformer_layers_1_self_attn_out_proj_weight_to_fp16, x = input_81_cast_fp16)[name = string("linear_24_cast_fp16")];
tensor<fp16, [256]> stages_1_transformer_layers_1_layer_scale_1_scale_to_fp16 = const()[name = string("stages_1_transformer_layers_1_layer_scale_1_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(9101120)))];
tensor<fp16, [1, 8, 256]> var_1819_cast_fp16 = mul(x = stages_1_transformer_layers_1_layer_scale_1_scale_to_fp16, y = linear_24_cast_fp16)[name = string("op_1819_cast_fp16")];
tensor<fp16, [1, 8, 256]> input_83_cast_fp16 = add(x = input_77_cast_fp16, y = var_1819_cast_fp16)[name = string("input_83_cast_fp16")];
tensor<int32, [1]> input_85_axes_0 = const()[name = string("input_85_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_1_transformer_layers_1_norm2_weight_to_fp16 = const()[name = string("stages_1_transformer_layers_1_norm2_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(9101696)))];
tensor<fp16, [256]> stages_1_transformer_layers_1_norm2_bias_to_fp16 = const()[name = string("stages_1_transformer_layers_1_norm2_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(9102272)))];
fp16 var_1823_to_fp16 = const()[name = string("op_1823_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 8, 256]> input_85_cast_fp16 = layer_norm(axes = input_85_axes_0, beta = stages_1_transformer_layers_1_norm2_bias_to_fp16, epsilon = var_1823_to_fp16, gamma = stages_1_transformer_layers_1_norm2_weight_to_fp16, x = input_83_cast_fp16)[name = string("input_85_cast_fp16")];
tensor<fp16, [1024, 256]> stages_1_transformer_layers_1_ffn_0_weight_to_fp16 = const()[name = string("stages_1_transformer_layers_1_ffn_0_weight_to_fp16"), val = tensor<fp16, [1024, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(9102848)))];
tensor<fp16, [1, 8, 1024]> linear_25_cast_fp16 = linear(bias = linear_3_bias_0_to_fp16, weight = stages_1_transformer_layers_1_ffn_0_weight_to_fp16, x = input_85_cast_fp16)[name = string("linear_25_cast_fp16")];
string input_89_mode_0 = const()[name = string("input_89_mode_0"), val = string("EXACT")];
tensor<fp16, [1, 8, 1024]> input_89_cast_fp16 = gelu(mode = input_89_mode_0, x = linear_25_cast_fp16)[name = string("input_89_cast_fp16")];
tensor<fp16, [256, 1024]> stages_1_transformer_layers_1_ffn_2_weight_to_fp16 = const()[name = string("stages_1_transformer_layers_1_ffn_2_weight_to_fp16"), val = tensor<fp16, [256, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(9627200)))];
tensor<fp16, [1, 8, 256]> linear_26_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_1_transformer_layers_1_ffn_2_weight_to_fp16, x = input_89_cast_fp16)[name = string("linear_26_cast_fp16")];
tensor<fp16, [256]> stages_1_transformer_layers_1_layer_scale_2_scale_to_fp16 = const()[name = string("stages_1_transformer_layers_1_layer_scale_2_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(10151552)))];
tensor<fp16, [1, 8, 256]> var_1839_cast_fp16 = mul(x = stages_1_transformer_layers_1_layer_scale_2_scale_to_fp16, y = linear_26_cast_fp16)[name = string("op_1839_cast_fp16")];
tensor<fp16, [1, 8, 256]> input_91_cast_fp16 = add(x = input_83_cast_fp16, y = var_1839_cast_fp16)[name = string("input_91_cast_fp16")];
tensor<fp16, [768, 256]> stages_1_output_proj_weight_to_fp16 = const()[name = string("stages_1_output_proj_weight_to_fp16"), val = tensor<fp16, [768, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(10152128)))];
tensor<fp16, [1, 8, 768]> linear_27_cast_fp16 = linear(bias = linear_1_bias_0_to_fp16, weight = stages_1_output_proj_weight_to_fp16, x = input_91_cast_fp16)[name = string("linear_27_cast_fp16")];
tensor<int32, [3]> x_31_perm_0 = const()[name = string("x_31_perm_0"), val = tensor<int32, [3]>([0, 2, 1])];
tensor<int32, [4]> var_1852 = const()[name = string("op_1852"), val = tensor<int32, [4]>([1, 384, 2, 8])];
tensor<fp16, [1, 768, 8]> x_31_cast_fp16 = transpose(perm = x_31_perm_0, x = linear_27_cast_fp16)[name = string("transpose_20")];
tensor<fp16, [1, 384, 2, 8]> var_1853_cast_fp16 = reshape(shape = var_1852, x = x_31_cast_fp16)[name = string("op_1853_cast_fp16")];
tensor<int32, [4]> var_1858 = const()[name = string("op_1858"), val = tensor<int32, [4]>([0, 1, 3, 2])];
tensor<int32, [3]> var_1863 = const()[name = string("op_1863"), val = tensor<int32, [3]>([1, 384, 16])];
tensor<fp16, [1, 384, 8, 2]> var_1859_cast_fp16 = transpose(perm = var_1858, x = var_1853_cast_fp16)[name = string("transpose_19")];
tensor<fp16, [1, 384, 16]> x_33_cast_fp16 = reshape(shape = var_1863, x = var_1859_cast_fp16)[name = string("x_33_cast_fp16")];
tensor<int32, [3]> input_93_perm_0 = const()[name = string("input_93_perm_0"), val = tensor<int32, [3]>([0, 2, 1])];
tensor<fp16, [256, 384]> stages_2_input_proj_weight_to_fp16 = const()[name = string("stages_2_input_proj_weight_to_fp16"), val = tensor<fp16, [256, 384]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(10545408)))];
tensor<fp16, [1, 16, 384]> input_93_cast_fp16 = transpose(perm = input_93_perm_0, x = x_33_cast_fp16)[name = string("transpose_18")];
tensor<fp16, [1, 16, 256]> linear_28_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_2_input_proj_weight_to_fp16, x = input_93_cast_fp16)[name = string("linear_28_cast_fp16")];
tensor<int32, [1]> input_97_axes_0 = const()[name = string("input_97_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_2_transformer_layers_0_norm1_weight_to_fp16 = const()[name = string("stages_2_transformer_layers_0_norm1_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(10742080)))];
tensor<fp16, [256]> stages_2_transformer_layers_0_norm1_bias_to_fp16 = const()[name = string("stages_2_transformer_layers_0_norm1_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(10742656)))];
fp16 var_1872_to_fp16 = const()[name = string("op_1872_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 16, 256]> input_97_cast_fp16 = layer_norm(axes = input_97_axes_0, beta = stages_2_transformer_layers_0_norm1_bias_to_fp16, epsilon = var_1872_to_fp16, gamma = stages_2_transformer_layers_0_norm1_weight_to_fp16, x = linear_28_cast_fp16)[name = string("input_97_cast_fp16")];
tensor<fp16, [768, 256]> stages_2_transformer_layers_0_self_attn_in_proj_weight_to_fp16 = const()[name = string("stages_2_transformer_layers_0_self_attn_in_proj_weight_to_fp16"), val = tensor<fp16, [768, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(10743232)))];
tensor<fp16, [1, 16, 768]> linear_29_cast_fp16 = linear(bias = linear_1_bias_0_to_fp16, weight = stages_2_transformer_layers_0_self_attn_in_proj_weight_to_fp16, x = input_97_cast_fp16)[name = string("linear_29_cast_fp16")];
tensor<int32, [5]> var_1886 = const()[name = string("op_1886"), val = tensor<int32, [5]>([1, 16, 3, 4, 64])];
tensor<fp16, [1, 16, 3, 4, 64]> var_1887_cast_fp16 = reshape(shape = var_1886, x = linear_29_cast_fp16)[name = string("op_1887_cast_fp16")];
tensor<int32, [5]> var_1893 = const()[name = string("op_1893"), val = tensor<int32, [5]>([2, 0, 3, 1, 4])];
tensor<int32, [5]> query_37_begin_0 = const()[name = string("query_37_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> query_37_end_0 = const()[name = string("query_37_end_0"), val = tensor<int32, [5]>([1, 1, 4, 16, 64])];
tensor<bool, [5]> query_37_end_mask_0 = const()[name = string("query_37_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> query_37_squeeze_mask_0 = const()[name = string("query_37_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [3, 1, 4, 16, 64]> qkv_27_cast_fp16 = transpose(perm = var_1893, x = var_1887_cast_fp16)[name = string("transpose_17")];
tensor<fp16, [1, 4, 16, 64]> query_37_cast_fp16 = slice_by_index(begin = query_37_begin_0, end = query_37_end_0, end_mask = query_37_end_mask_0, squeeze_mask = query_37_squeeze_mask_0, x = qkv_27_cast_fp16)[name = string("query_37_cast_fp16")];
tensor<int32, [5]> key_37_begin_0 = const()[name = string("key_37_begin_0"), val = tensor<int32, [5]>([1, 0, 0, 0, 0])];
tensor<int32, [5]> key_37_end_0 = const()[name = string("key_37_end_0"), val = tensor<int32, [5]>([2, 1, 4, 16, 64])];
tensor<bool, [5]> key_37_end_mask_0 = const()[name = string("key_37_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> key_37_squeeze_mask_0 = const()[name = string("key_37_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 16, 64]> key_37_cast_fp16 = slice_by_index(begin = key_37_begin_0, end = key_37_end_0, end_mask = key_37_end_mask_0, squeeze_mask = key_37_squeeze_mask_0, x = qkv_27_cast_fp16)[name = string("key_37_cast_fp16")];
tensor<int32, [5]> value_13_begin_0 = const()[name = string("value_13_begin_0"), val = tensor<int32, [5]>([2, 0, 0, 0, 0])];
tensor<int32, [5]> value_13_end_0 = const()[name = string("value_13_end_0"), val = tensor<int32, [5]>([3, 1, 4, 16, 64])];
tensor<bool, [5]> value_13_end_mask_0 = const()[name = string("value_13_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> value_13_squeeze_mask_0 = const()[name = string("value_13_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 16, 64]> value_13_cast_fp16 = slice_by_index(begin = value_13_begin_0, end = value_13_end_0, end_mask = value_13_end_mask_0, squeeze_mask = value_13_squeeze_mask_0, x = qkv_27_cast_fp16)[name = string("value_13_cast_fp16")];
tensor<int32, [5]> var_1909 = const()[name = string("op_1909"), val = tensor<int32, [5]>([1, 4, 16, 32, 2])];
tensor<fp16, [1, 4, 16, 32, 2]> query_pairs_13_cast_fp16 = reshape(shape = var_1909, x = query_37_cast_fp16)[name = string("query_pairs_13_cast_fp16")];
tensor<int32, [5]> var_1916 = const()[name = string("op_1916"), val = tensor<int32, [5]>([1, 4, 16, 32, 2])];
tensor<fp16, [1, 4, 16, 32, 2]> key_pairs_13_cast_fp16 = reshape(shape = var_1916, x = key_37_cast_fp16)[name = string("key_pairs_13_cast_fp16")];
tensor<int32, [5]> qr_13_begin_0 = const()[name = string("qr_13_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> qr_13_end_0 = const()[name = string("qr_13_end_0"), val = tensor<int32, [5]>([1, 4, 16, 32, 1])];
tensor<bool, [5]> qr_13_end_mask_0 = const()[name = string("qr_13_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qr_13_squeeze_mask_0 = const()[name = string("qr_13_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 16, 32]> qr_13_cast_fp16 = slice_by_index(begin = qr_13_begin_0, end = qr_13_end_0, end_mask = qr_13_end_mask_0, squeeze_mask = qr_13_squeeze_mask_0, x = query_pairs_13_cast_fp16)[name = string("qr_13_cast_fp16")];
tensor<int32, [5]> qi_13_begin_0 = const()[name = string("qi_13_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> qi_13_end_0 = const()[name = string("qi_13_end_0"), val = tensor<int32, [5]>([1, 4, 16, 32, 2])];
tensor<bool, [5]> qi_13_end_mask_0 = const()[name = string("qi_13_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qi_13_squeeze_mask_0 = const()[name = string("qi_13_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 16, 32]> qi_13_cast_fp16 = slice_by_index(begin = qi_13_begin_0, end = qi_13_end_0, end_mask = qi_13_end_mask_0, squeeze_mask = qi_13_squeeze_mask_0, x = query_pairs_13_cast_fp16)[name = string("qi_13_cast_fp16")];
tensor<int32, [5]> kr_13_begin_0 = const()[name = string("kr_13_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> kr_13_end_0 = const()[name = string("kr_13_end_0"), val = tensor<int32, [5]>([1, 4, 16, 32, 1])];
tensor<bool, [5]> kr_13_end_mask_0 = const()[name = string("kr_13_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> kr_13_squeeze_mask_0 = const()[name = string("kr_13_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 16, 32]> kr_13_cast_fp16 = slice_by_index(begin = kr_13_begin_0, end = kr_13_end_0, end_mask = kr_13_end_mask_0, squeeze_mask = kr_13_squeeze_mask_0, x = key_pairs_13_cast_fp16)[name = string("kr_13_cast_fp16")];
tensor<int32, [5]> ki_13_begin_0 = const()[name = string("ki_13_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> ki_13_end_0 = const()[name = string("ki_13_end_0"), val = tensor<int32, [5]>([1, 4, 16, 32, 2])];
tensor<bool, [5]> ki_13_end_mask_0 = const()[name = string("ki_13_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> ki_13_squeeze_mask_0 = const()[name = string("ki_13_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 16, 32]> ki_13_cast_fp16 = slice_by_index(begin = ki_13_begin_0, end = ki_13_end_0, end_mask = ki_13_end_mask_0, squeeze_mask = ki_13_squeeze_mask_0, x = key_pairs_13_cast_fp16)[name = string("ki_13_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_1930_cast_fp16 = mul(x = qr_13_cast_fp16, y = s2_cos)[name = string("op_1930_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_1931_cast_fp16 = mul(x = qi_13_cast_fp16, y = s2_sin)[name = string("op_1931_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_1933_cast_fp16 = sub(x = var_1930_cast_fp16, y = var_1931_cast_fp16)[name = string("op_1933_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_1934_cast_fp16 = mul(x = qr_13_cast_fp16, y = s2_sin)[name = string("op_1934_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_1935_cast_fp16 = mul(x = qi_13_cast_fp16, y = s2_cos)[name = string("op_1935_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_1937_cast_fp16 = add(x = var_1934_cast_fp16, y = var_1935_cast_fp16)[name = string("op_1937_cast_fp16")];
int32 query_39_axis_0 = const()[name = string("query_39_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 16, 32, 2]> query_39_cast_fp16 = stack(axis = query_39_axis_0, values = (var_1933_cast_fp16, var_1937_cast_fp16))[name = string("query_39_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_1941_cast_fp16 = mul(x = kr_13_cast_fp16, y = s2_cos)[name = string("op_1941_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_1942_cast_fp16 = mul(x = ki_13_cast_fp16, y = s2_sin)[name = string("op_1942_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_1944_cast_fp16 = sub(x = var_1941_cast_fp16, y = var_1942_cast_fp16)[name = string("op_1944_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_1945_cast_fp16 = mul(x = kr_13_cast_fp16, y = s2_sin)[name = string("op_1945_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_1946_cast_fp16 = mul(x = ki_13_cast_fp16, y = s2_cos)[name = string("op_1946_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_1948_cast_fp16 = add(x = var_1945_cast_fp16, y = var_1946_cast_fp16)[name = string("op_1948_cast_fp16")];
int32 key_39_axis_0 = const()[name = string("key_39_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 16, 32, 2]> key_39_cast_fp16 = stack(axis = key_39_axis_0, values = (var_1944_cast_fp16, var_1948_cast_fp16))[name = string("key_39_cast_fp16")];
tensor<int32, [4]> var_1956 = const()[name = string("op_1956"), val = tensor<int32, [4]>([1, 4, 16, 64])];
tensor<fp16, [1, 4, 16, 64]> query_41_cast_fp16 = reshape(shape = var_1956, x = query_39_cast_fp16)[name = string("query_41_cast_fp16")];
tensor<int32, [4]> var_1962 = const()[name = string("op_1962"), val = tensor<int32, [4]>([1, 4, 16, 64])];
tensor<fp16, [1, 4, 16, 64]> key_41_cast_fp16 = reshape(shape = var_1962, x = key_39_cast_fp16)[name = string("key_41_cast_fp16")];
tensor<fp16, [1, 4, 1200, 64]> read_state_12 = read_state(input = s2_l0_k)[name = string("read_state_12")];
tensor<int32, [4]> var_1978_begin_0 = const()[name = string("op_1978_begin_0"), val = tensor<int32, [4]>([0, 0, 16, 0])];
tensor<int32, [4]> var_1978_end_0 = const()[name = string("op_1978_end_0"), val = tensor<int32, [4]>([1, 4, 1200, 64])];
tensor<bool, [4]> var_1978_end_mask_0 = const()[name = string("op_1978_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 1184, 64]> var_1978_cast_fp16 = slice_by_index(begin = var_1978_begin_0, end = var_1978_end_0, end_mask = var_1978_end_mask_0, x = read_state_12)[name = string("op_1978_cast_fp16")];
int32 var_1985 = const()[name = string("op_1985"), val = int32(2)];
bool new_key_13_interleave_0 = const()[name = string("new_key_13_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 1200, 64]> new_key_13_cast_fp16 = concat(axis = var_1985, interleave = new_key_13_interleave_0, values = (var_1978_cast_fp16, key_41_cast_fp16))[name = string("new_key_13_cast_fp16")];
tensor<fp16, [1, 4, 1200, 64]> read_state_13 = read_state(input = s2_l0_v)[name = string("read_state_13")];
tensor<int32, [4]> var_2001_begin_0 = const()[name = string("op_2001_begin_0"), val = tensor<int32, [4]>([0, 0, 16, 0])];
tensor<int32, [4]> var_2001_end_0 = const()[name = string("op_2001_end_0"), val = tensor<int32, [4]>([1, 4, 1200, 64])];
tensor<bool, [4]> var_2001_end_mask_0 = const()[name = string("op_2001_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 1184, 64]> var_2001_cast_fp16 = slice_by_index(begin = var_2001_begin_0, end = var_2001_end_0, end_mask = var_2001_end_mask_0, x = read_state_13)[name = string("op_2001_cast_fp16")];
int32 var_2008 = const()[name = string("op_2008"), val = int32(2)];
bool new_value_13_interleave_0 = const()[name = string("new_value_13_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 1200, 64]> new_value_13_cast_fp16 = concat(axis = var_2008, interleave = new_value_13_interleave_0, values = (var_2001_cast_fp16, value_13_cast_fp16))[name = string("new_value_13_cast_fp16")];
tensor<int32, [4]> concat_24 = const()[name = string("concat_24"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_25 = const()[name = string("concat_25"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s2_l0_k_internal_tensor_assign_1_stride_0 = const()[name = string("s2_l0_k_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s2_l0_k_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s2_l0_k_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s2_l0_k_internal_tensor_assign_1_end_mask_0 = const()[name = string("s2_l0_k_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s2_l0_k_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s2_l0_k_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 1200, 64]> s2_l0_k_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_24, begin_mask = s2_l0_k_internal_tensor_assign_1_begin_mask_0, end = concat_25, end_mask = s2_l0_k_internal_tensor_assign_1_end_mask_0, squeeze_mask = s2_l0_k_internal_tensor_assign_1_squeeze_mask_0, stride = s2_l0_k_internal_tensor_assign_1_stride_0, update = new_key_13_cast_fp16, x = read_state_12)[name = string("s2_l0_k_internal_tensor_assign_1_cast_fp16")];
write_state(data = s2_l0_k_internal_tensor_assign_1_cast_fp16, input = s2_l0_k)[name = string("coreml_update_state_36_write_state")];
tensor<int32, [4]> concat_26 = const()[name = string("concat_26"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_27 = const()[name = string("concat_27"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s2_l0_v_internal_tensor_assign_1_stride_0 = const()[name = string("s2_l0_v_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s2_l0_v_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s2_l0_v_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s2_l0_v_internal_tensor_assign_1_end_mask_0 = const()[name = string("s2_l0_v_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s2_l0_v_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s2_l0_v_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 1200, 64]> s2_l0_v_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_26, begin_mask = s2_l0_v_internal_tensor_assign_1_begin_mask_0, end = concat_27, end_mask = s2_l0_v_internal_tensor_assign_1_end_mask_0, squeeze_mask = s2_l0_v_internal_tensor_assign_1_squeeze_mask_0, stride = s2_l0_v_internal_tensor_assign_1_stride_0, update = new_value_13_cast_fp16, x = read_state_13)[name = string("s2_l0_v_internal_tensor_assign_1_cast_fp16")];
write_state(data = s2_l0_v_internal_tensor_assign_1_cast_fp16, input = s2_l0_v)[name = string("coreml_update_state_37_write_state")];
bool var_2027_transpose_x_1 = const()[name = string("op_2027_transpose_x_1"), val = bool(false)];
bool var_2027_transpose_y_1 = const()[name = string("op_2027_transpose_y_1"), val = bool(true)];
tensor<fp16, [1, 4, 16, 1200]> var_2027_cast_fp16 = matmul(transpose_x = var_2027_transpose_x_1, transpose_y = var_2027_transpose_y_1, x = query_41_cast_fp16, y = new_key_13_cast_fp16)[name = string("op_2027_cast_fp16")];
fp16 var_2028_to_fp16 = const()[name = string("op_2028_to_fp16"), val = fp16(0x1p-3)];
tensor<fp16, [1, 4, 16, 1200]> scores_13_cast_fp16 = mul(x = var_2027_cast_fp16, y = var_2028_to_fp16)[name = string("scores_13_cast_fp16")];
tensor<fp16, [1, 4, 16, 1200]> var_2031_cast_fp16 = add(x = scores_13_cast_fp16, y = s2_mask)[name = string("op_2031_cast_fp16")];
int32 var_2032 = const()[name = string("op_2032"), val = int32(-1)];
tensor<fp16, [1, 4, 16, 1200]> probabilities_13_cast_fp16 = softmax(axis = var_2032, x = var_2031_cast_fp16)[name = string("probabilities_13_cast_fp16")];
bool attention_13_transpose_x_0 = const()[name = string("attention_13_transpose_x_0"), val = bool(false)];
bool attention_13_transpose_y_0 = const()[name = string("attention_13_transpose_y_0"), val = bool(false)];
tensor<fp16, [1, 4, 16, 64]> attention_13_cast_fp16 = matmul(transpose_x = attention_13_transpose_x_0, transpose_y = attention_13_transpose_y_0, x = probabilities_13_cast_fp16, y = new_value_13_cast_fp16)[name = string("attention_13_cast_fp16")];
tensor<int32, [4]> var_2038_perm_0 = const()[name = string("op_2038_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
tensor<int32, [3]> var_2042 = const()[name = string("op_2042"), val = tensor<int32, [3]>([1, 16, 256])];
tensor<fp16, [1, 16, 4, 64]> var_2038_cast_fp16 = transpose(perm = var_2038_perm_0, x = attention_13_cast_fp16)[name = string("transpose_16")];
tensor<fp16, [1, 16, 256]> input_99_cast_fp16 = reshape(shape = var_2042, x = var_2038_cast_fp16)[name = string("input_99_cast_fp16")];
tensor<fp16, [256, 256]> stages_2_transformer_layers_0_self_attn_out_proj_weight_to_fp16 = const()[name = string("stages_2_transformer_layers_0_self_attn_out_proj_weight_to_fp16"), val = tensor<fp16, [256, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(11136512)))];
tensor<fp16, [1, 16, 256]> linear_30_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_2_transformer_layers_0_self_attn_out_proj_weight_to_fp16, x = input_99_cast_fp16)[name = string("linear_30_cast_fp16")];
tensor<fp16, [256]> stages_2_transformer_layers_0_layer_scale_1_scale_to_fp16 = const()[name = string("stages_2_transformer_layers_0_layer_scale_1_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(11267648)))];
tensor<fp16, [1, 16, 256]> var_2048_cast_fp16 = mul(x = stages_2_transformer_layers_0_layer_scale_1_scale_to_fp16, y = linear_30_cast_fp16)[name = string("op_2048_cast_fp16")];
tensor<fp16, [1, 16, 256]> input_101_cast_fp16 = add(x = linear_28_cast_fp16, y = var_2048_cast_fp16)[name = string("input_101_cast_fp16")];
tensor<int32, [1]> input_103_axes_0 = const()[name = string("input_103_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_2_transformer_layers_0_norm2_weight_to_fp16 = const()[name = string("stages_2_transformer_layers_0_norm2_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(11268224)))];
tensor<fp16, [256]> stages_2_transformer_layers_0_norm2_bias_to_fp16 = const()[name = string("stages_2_transformer_layers_0_norm2_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(11268800)))];
fp16 var_2052_to_fp16 = const()[name = string("op_2052_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 16, 256]> input_103_cast_fp16 = layer_norm(axes = input_103_axes_0, beta = stages_2_transformer_layers_0_norm2_bias_to_fp16, epsilon = var_2052_to_fp16, gamma = stages_2_transformer_layers_0_norm2_weight_to_fp16, x = input_101_cast_fp16)[name = string("input_103_cast_fp16")];
tensor<fp16, [1024, 256]> stages_2_transformer_layers_0_ffn_0_weight_to_fp16 = const()[name = string("stages_2_transformer_layers_0_ffn_0_weight_to_fp16"), val = tensor<fp16, [1024, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(11269376)))];
tensor<fp16, [1, 16, 1024]> linear_31_cast_fp16 = linear(bias = linear_3_bias_0_to_fp16, weight = stages_2_transformer_layers_0_ffn_0_weight_to_fp16, x = input_103_cast_fp16)[name = string("linear_31_cast_fp16")];
string input_107_mode_0 = const()[name = string("input_107_mode_0"), val = string("EXACT")];
tensor<fp16, [1, 16, 1024]> input_107_cast_fp16 = gelu(mode = input_107_mode_0, x = linear_31_cast_fp16)[name = string("input_107_cast_fp16")];
tensor<fp16, [256, 1024]> stages_2_transformer_layers_0_ffn_2_weight_to_fp16 = const()[name = string("stages_2_transformer_layers_0_ffn_2_weight_to_fp16"), val = tensor<fp16, [256, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(11793728)))];
tensor<fp16, [1, 16, 256]> linear_32_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_2_transformer_layers_0_ffn_2_weight_to_fp16, x = input_107_cast_fp16)[name = string("linear_32_cast_fp16")];
tensor<fp16, [256]> stages_2_transformer_layers_0_layer_scale_2_scale_to_fp16 = const()[name = string("stages_2_transformer_layers_0_layer_scale_2_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(12318080)))];
tensor<fp16, [1, 16, 256]> var_2068_cast_fp16 = mul(x = stages_2_transformer_layers_0_layer_scale_2_scale_to_fp16, y = linear_32_cast_fp16)[name = string("op_2068_cast_fp16")];
tensor<fp16, [1, 16, 256]> input_109_cast_fp16 = add(x = input_101_cast_fp16, y = var_2068_cast_fp16)[name = string("input_109_cast_fp16")];
tensor<int32, [1]> input_111_axes_0 = const()[name = string("input_111_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_2_transformer_layers_1_norm1_weight_to_fp16 = const()[name = string("stages_2_transformer_layers_1_norm1_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(12318656)))];
tensor<fp16, [256]> stages_2_transformer_layers_1_norm1_bias_to_fp16 = const()[name = string("stages_2_transformer_layers_1_norm1_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(12319232)))];
fp16 var_2072_to_fp16 = const()[name = string("op_2072_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 16, 256]> input_111_cast_fp16 = layer_norm(axes = input_111_axes_0, beta = stages_2_transformer_layers_1_norm1_bias_to_fp16, epsilon = var_2072_to_fp16, gamma = stages_2_transformer_layers_1_norm1_weight_to_fp16, x = input_109_cast_fp16)[name = string("input_111_cast_fp16")];
tensor<fp16, [768, 256]> stages_2_transformer_layers_1_self_attn_in_proj_weight_to_fp16 = const()[name = string("stages_2_transformer_layers_1_self_attn_in_proj_weight_to_fp16"), val = tensor<fp16, [768, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(12319808)))];
tensor<fp16, [1, 16, 768]> linear_33_cast_fp16 = linear(bias = linear_1_bias_0_to_fp16, weight = stages_2_transformer_layers_1_self_attn_in_proj_weight_to_fp16, x = input_111_cast_fp16)[name = string("linear_33_cast_fp16")];
tensor<int32, [5]> var_2086 = const()[name = string("op_2086"), val = tensor<int32, [5]>([1, 16, 3, 4, 64])];
tensor<fp16, [1, 16, 3, 4, 64]> var_2087_cast_fp16 = reshape(shape = var_2086, x = linear_33_cast_fp16)[name = string("op_2087_cast_fp16")];
tensor<int32, [5]> var_2093 = const()[name = string("op_2093"), val = tensor<int32, [5]>([2, 0, 3, 1, 4])];
tensor<int32, [5]> query_43_begin_0 = const()[name = string("query_43_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> query_43_end_0 = const()[name = string("query_43_end_0"), val = tensor<int32, [5]>([1, 1, 4, 16, 64])];
tensor<bool, [5]> query_43_end_mask_0 = const()[name = string("query_43_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> query_43_squeeze_mask_0 = const()[name = string("query_43_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [3, 1, 4, 16, 64]> qkv_31_cast_fp16 = transpose(perm = var_2093, x = var_2087_cast_fp16)[name = string("transpose_15")];
tensor<fp16, [1, 4, 16, 64]> query_43_cast_fp16 = slice_by_index(begin = query_43_begin_0, end = query_43_end_0, end_mask = query_43_end_mask_0, squeeze_mask = query_43_squeeze_mask_0, x = qkv_31_cast_fp16)[name = string("query_43_cast_fp16")];
tensor<int32, [5]> key_43_begin_0 = const()[name = string("key_43_begin_0"), val = tensor<int32, [5]>([1, 0, 0, 0, 0])];
tensor<int32, [5]> key_43_end_0 = const()[name = string("key_43_end_0"), val = tensor<int32, [5]>([2, 1, 4, 16, 64])];
tensor<bool, [5]> key_43_end_mask_0 = const()[name = string("key_43_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> key_43_squeeze_mask_0 = const()[name = string("key_43_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 16, 64]> key_43_cast_fp16 = slice_by_index(begin = key_43_begin_0, end = key_43_end_0, end_mask = key_43_end_mask_0, squeeze_mask = key_43_squeeze_mask_0, x = qkv_31_cast_fp16)[name = string("key_43_cast_fp16")];
tensor<int32, [5]> value_15_begin_0 = const()[name = string("value_15_begin_0"), val = tensor<int32, [5]>([2, 0, 0, 0, 0])];
tensor<int32, [5]> value_15_end_0 = const()[name = string("value_15_end_0"), val = tensor<int32, [5]>([3, 1, 4, 16, 64])];
tensor<bool, [5]> value_15_end_mask_0 = const()[name = string("value_15_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> value_15_squeeze_mask_0 = const()[name = string("value_15_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 16, 64]> value_15_cast_fp16 = slice_by_index(begin = value_15_begin_0, end = value_15_end_0, end_mask = value_15_end_mask_0, squeeze_mask = value_15_squeeze_mask_0, x = qkv_31_cast_fp16)[name = string("value_15_cast_fp16")];
tensor<int32, [5]> var_2109 = const()[name = string("op_2109"), val = tensor<int32, [5]>([1, 4, 16, 32, 2])];
tensor<fp16, [1, 4, 16, 32, 2]> query_pairs_15_cast_fp16 = reshape(shape = var_2109, x = query_43_cast_fp16)[name = string("query_pairs_15_cast_fp16")];
tensor<int32, [5]> var_2116 = const()[name = string("op_2116"), val = tensor<int32, [5]>([1, 4, 16, 32, 2])];
tensor<fp16, [1, 4, 16, 32, 2]> key_pairs_15_cast_fp16 = reshape(shape = var_2116, x = key_43_cast_fp16)[name = string("key_pairs_15_cast_fp16")];
tensor<int32, [5]> qr_15_begin_0 = const()[name = string("qr_15_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> qr_15_end_0 = const()[name = string("qr_15_end_0"), val = tensor<int32, [5]>([1, 4, 16, 32, 1])];
tensor<bool, [5]> qr_15_end_mask_0 = const()[name = string("qr_15_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qr_15_squeeze_mask_0 = const()[name = string("qr_15_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 16, 32]> qr_15_cast_fp16 = slice_by_index(begin = qr_15_begin_0, end = qr_15_end_0, end_mask = qr_15_end_mask_0, squeeze_mask = qr_15_squeeze_mask_0, x = query_pairs_15_cast_fp16)[name = string("qr_15_cast_fp16")];
tensor<int32, [5]> qi_15_begin_0 = const()[name = string("qi_15_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> qi_15_end_0 = const()[name = string("qi_15_end_0"), val = tensor<int32, [5]>([1, 4, 16, 32, 2])];
tensor<bool, [5]> qi_15_end_mask_0 = const()[name = string("qi_15_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qi_15_squeeze_mask_0 = const()[name = string("qi_15_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 16, 32]> qi_15_cast_fp16 = slice_by_index(begin = qi_15_begin_0, end = qi_15_end_0, end_mask = qi_15_end_mask_0, squeeze_mask = qi_15_squeeze_mask_0, x = query_pairs_15_cast_fp16)[name = string("qi_15_cast_fp16")];
tensor<int32, [5]> kr_15_begin_0 = const()[name = string("kr_15_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> kr_15_end_0 = const()[name = string("kr_15_end_0"), val = tensor<int32, [5]>([1, 4, 16, 32, 1])];
tensor<bool, [5]> kr_15_end_mask_0 = const()[name = string("kr_15_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> kr_15_squeeze_mask_0 = const()[name = string("kr_15_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 16, 32]> kr_15_cast_fp16 = slice_by_index(begin = kr_15_begin_0, end = kr_15_end_0, end_mask = kr_15_end_mask_0, squeeze_mask = kr_15_squeeze_mask_0, x = key_pairs_15_cast_fp16)[name = string("kr_15_cast_fp16")];
tensor<int32, [5]> ki_15_begin_0 = const()[name = string("ki_15_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> ki_15_end_0 = const()[name = string("ki_15_end_0"), val = tensor<int32, [5]>([1, 4, 16, 32, 2])];
tensor<bool, [5]> ki_15_end_mask_0 = const()[name = string("ki_15_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> ki_15_squeeze_mask_0 = const()[name = string("ki_15_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 16, 32]> ki_15_cast_fp16 = slice_by_index(begin = ki_15_begin_0, end = ki_15_end_0, end_mask = ki_15_end_mask_0, squeeze_mask = ki_15_squeeze_mask_0, x = key_pairs_15_cast_fp16)[name = string("ki_15_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_2130_cast_fp16 = mul(x = qr_15_cast_fp16, y = s2_cos)[name = string("op_2130_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_2131_cast_fp16 = mul(x = qi_15_cast_fp16, y = s2_sin)[name = string("op_2131_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_2133_cast_fp16 = sub(x = var_2130_cast_fp16, y = var_2131_cast_fp16)[name = string("op_2133_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_2134_cast_fp16 = mul(x = qr_15_cast_fp16, y = s2_sin)[name = string("op_2134_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_2135_cast_fp16 = mul(x = qi_15_cast_fp16, y = s2_cos)[name = string("op_2135_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_2137_cast_fp16 = add(x = var_2134_cast_fp16, y = var_2135_cast_fp16)[name = string("op_2137_cast_fp16")];
int32 query_45_axis_0 = const()[name = string("query_45_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 16, 32, 2]> query_45_cast_fp16 = stack(axis = query_45_axis_0, values = (var_2133_cast_fp16, var_2137_cast_fp16))[name = string("query_45_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_2141_cast_fp16 = mul(x = kr_15_cast_fp16, y = s2_cos)[name = string("op_2141_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_2142_cast_fp16 = mul(x = ki_15_cast_fp16, y = s2_sin)[name = string("op_2142_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_2144_cast_fp16 = sub(x = var_2141_cast_fp16, y = var_2142_cast_fp16)[name = string("op_2144_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_2145_cast_fp16 = mul(x = kr_15_cast_fp16, y = s2_sin)[name = string("op_2145_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_2146_cast_fp16 = mul(x = ki_15_cast_fp16, y = s2_cos)[name = string("op_2146_cast_fp16")];
tensor<fp16, [1, 4, 16, 32]> var_2148_cast_fp16 = add(x = var_2145_cast_fp16, y = var_2146_cast_fp16)[name = string("op_2148_cast_fp16")];
int32 key_45_axis_0 = const()[name = string("key_45_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 16, 32, 2]> key_45_cast_fp16 = stack(axis = key_45_axis_0, values = (var_2144_cast_fp16, var_2148_cast_fp16))[name = string("key_45_cast_fp16")];
tensor<int32, [4]> var_2156 = const()[name = string("op_2156"), val = tensor<int32, [4]>([1, 4, 16, 64])];
tensor<fp16, [1, 4, 16, 64]> query_47_cast_fp16 = reshape(shape = var_2156, x = query_45_cast_fp16)[name = string("query_47_cast_fp16")];
tensor<int32, [4]> var_2162 = const()[name = string("op_2162"), val = tensor<int32, [4]>([1, 4, 16, 64])];
tensor<fp16, [1, 4, 16, 64]> key_47_cast_fp16 = reshape(shape = var_2162, x = key_45_cast_fp16)[name = string("key_47_cast_fp16")];
tensor<fp16, [1, 4, 1200, 64]> read_state_14 = read_state(input = s2_l1_k)[name = string("read_state_14")];
tensor<int32, [4]> var_2178_begin_0 = const()[name = string("op_2178_begin_0"), val = tensor<int32, [4]>([0, 0, 16, 0])];
tensor<int32, [4]> var_2178_end_0 = const()[name = string("op_2178_end_0"), val = tensor<int32, [4]>([1, 4, 1200, 64])];
tensor<bool, [4]> var_2178_end_mask_0 = const()[name = string("op_2178_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 1184, 64]> var_2178_cast_fp16 = slice_by_index(begin = var_2178_begin_0, end = var_2178_end_0, end_mask = var_2178_end_mask_0, x = read_state_14)[name = string("op_2178_cast_fp16")];
int32 var_2185 = const()[name = string("op_2185"), val = int32(2)];
bool new_key_15_interleave_0 = const()[name = string("new_key_15_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 1200, 64]> new_key_15_cast_fp16 = concat(axis = var_2185, interleave = new_key_15_interleave_0, values = (var_2178_cast_fp16, key_47_cast_fp16))[name = string("new_key_15_cast_fp16")];
tensor<fp16, [1, 4, 1200, 64]> read_state_15 = read_state(input = s2_l1_v)[name = string("read_state_15")];
tensor<int32, [4]> var_2201_begin_0 = const()[name = string("op_2201_begin_0"), val = tensor<int32, [4]>([0, 0, 16, 0])];
tensor<int32, [4]> var_2201_end_0 = const()[name = string("op_2201_end_0"), val = tensor<int32, [4]>([1, 4, 1200, 64])];
tensor<bool, [4]> var_2201_end_mask_0 = const()[name = string("op_2201_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 1184, 64]> var_2201_cast_fp16 = slice_by_index(begin = var_2201_begin_0, end = var_2201_end_0, end_mask = var_2201_end_mask_0, x = read_state_15)[name = string("op_2201_cast_fp16")];
int32 var_2208 = const()[name = string("op_2208"), val = int32(2)];
bool new_value_15_interleave_0 = const()[name = string("new_value_15_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 1200, 64]> new_value_15_cast_fp16 = concat(axis = var_2208, interleave = new_value_15_interleave_0, values = (var_2201_cast_fp16, value_15_cast_fp16))[name = string("new_value_15_cast_fp16")];
tensor<int32, [4]> concat_28 = const()[name = string("concat_28"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_29 = const()[name = string("concat_29"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s2_l1_k_internal_tensor_assign_1_stride_0 = const()[name = string("s2_l1_k_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s2_l1_k_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s2_l1_k_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s2_l1_k_internal_tensor_assign_1_end_mask_0 = const()[name = string("s2_l1_k_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s2_l1_k_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s2_l1_k_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 1200, 64]> s2_l1_k_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_28, begin_mask = s2_l1_k_internal_tensor_assign_1_begin_mask_0, end = concat_29, end_mask = s2_l1_k_internal_tensor_assign_1_end_mask_0, squeeze_mask = s2_l1_k_internal_tensor_assign_1_squeeze_mask_0, stride = s2_l1_k_internal_tensor_assign_1_stride_0, update = new_key_15_cast_fp16, x = read_state_14)[name = string("s2_l1_k_internal_tensor_assign_1_cast_fp16")];
write_state(data = s2_l1_k_internal_tensor_assign_1_cast_fp16, input = s2_l1_k)[name = string("coreml_update_state_38_write_state")];
tensor<int32, [4]> concat_30 = const()[name = string("concat_30"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_31 = const()[name = string("concat_31"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s2_l1_v_internal_tensor_assign_1_stride_0 = const()[name = string("s2_l1_v_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s2_l1_v_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s2_l1_v_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s2_l1_v_internal_tensor_assign_1_end_mask_0 = const()[name = string("s2_l1_v_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s2_l1_v_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s2_l1_v_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 1200, 64]> s2_l1_v_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_30, begin_mask = s2_l1_v_internal_tensor_assign_1_begin_mask_0, end = concat_31, end_mask = s2_l1_v_internal_tensor_assign_1_end_mask_0, squeeze_mask = s2_l1_v_internal_tensor_assign_1_squeeze_mask_0, stride = s2_l1_v_internal_tensor_assign_1_stride_0, update = new_value_15_cast_fp16, x = read_state_15)[name = string("s2_l1_v_internal_tensor_assign_1_cast_fp16")];
write_state(data = s2_l1_v_internal_tensor_assign_1_cast_fp16, input = s2_l1_v)[name = string("coreml_update_state_39_write_state")];
bool var_2227_transpose_x_1 = const()[name = string("op_2227_transpose_x_1"), val = bool(false)];
bool var_2227_transpose_y_1 = const()[name = string("op_2227_transpose_y_1"), val = bool(true)];
tensor<fp16, [1, 4, 16, 1200]> var_2227_cast_fp16 = matmul(transpose_x = var_2227_transpose_x_1, transpose_y = var_2227_transpose_y_1, x = query_47_cast_fp16, y = new_key_15_cast_fp16)[name = string("op_2227_cast_fp16")];
fp16 var_2228_to_fp16 = const()[name = string("op_2228_to_fp16"), val = fp16(0x1p-3)];
tensor<fp16, [1, 4, 16, 1200]> scores_15_cast_fp16 = mul(x = var_2227_cast_fp16, y = var_2228_to_fp16)[name = string("scores_15_cast_fp16")];
tensor<fp16, [1, 4, 16, 1200]> var_2231_cast_fp16 = add(x = scores_15_cast_fp16, y = s2_mask)[name = string("op_2231_cast_fp16")];
int32 var_2232 = const()[name = string("op_2232"), val = int32(-1)];
tensor<fp16, [1, 4, 16, 1200]> probabilities_15_cast_fp16 = softmax(axis = var_2232, x = var_2231_cast_fp16)[name = string("probabilities_15_cast_fp16")];
bool attention_15_transpose_x_0 = const()[name = string("attention_15_transpose_x_0"), val = bool(false)];
bool attention_15_transpose_y_0 = const()[name = string("attention_15_transpose_y_0"), val = bool(false)];
tensor<fp16, [1, 4, 16, 64]> attention_15_cast_fp16 = matmul(transpose_x = attention_15_transpose_x_0, transpose_y = attention_15_transpose_y_0, x = probabilities_15_cast_fp16, y = new_value_15_cast_fp16)[name = string("attention_15_cast_fp16")];
tensor<int32, [4]> var_2238_perm_0 = const()[name = string("op_2238_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
tensor<int32, [3]> var_2242 = const()[name = string("op_2242"), val = tensor<int32, [3]>([1, 16, 256])];
tensor<fp16, [1, 16, 4, 64]> var_2238_cast_fp16 = transpose(perm = var_2238_perm_0, x = attention_15_cast_fp16)[name = string("transpose_14")];
tensor<fp16, [1, 16, 256]> input_113_cast_fp16 = reshape(shape = var_2242, x = var_2238_cast_fp16)[name = string("input_113_cast_fp16")];
tensor<fp16, [256, 256]> stages_2_transformer_layers_1_self_attn_out_proj_weight_to_fp16 = const()[name = string("stages_2_transformer_layers_1_self_attn_out_proj_weight_to_fp16"), val = tensor<fp16, [256, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(12713088)))];
tensor<fp16, [1, 16, 256]> linear_34_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_2_transformer_layers_1_self_attn_out_proj_weight_to_fp16, x = input_113_cast_fp16)[name = string("linear_34_cast_fp16")];
tensor<fp16, [256]> stages_2_transformer_layers_1_layer_scale_1_scale_to_fp16 = const()[name = string("stages_2_transformer_layers_1_layer_scale_1_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(12844224)))];
tensor<fp16, [1, 16, 256]> var_2248_cast_fp16 = mul(x = stages_2_transformer_layers_1_layer_scale_1_scale_to_fp16, y = linear_34_cast_fp16)[name = string("op_2248_cast_fp16")];
tensor<fp16, [1, 16, 256]> input_115_cast_fp16 = add(x = input_109_cast_fp16, y = var_2248_cast_fp16)[name = string("input_115_cast_fp16")];
tensor<int32, [1]> input_117_axes_0 = const()[name = string("input_117_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_2_transformer_layers_1_norm2_weight_to_fp16 = const()[name = string("stages_2_transformer_layers_1_norm2_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(12844800)))];
tensor<fp16, [256]> stages_2_transformer_layers_1_norm2_bias_to_fp16 = const()[name = string("stages_2_transformer_layers_1_norm2_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(12845376)))];
fp16 var_2252_to_fp16 = const()[name = string("op_2252_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 16, 256]> input_117_cast_fp16 = layer_norm(axes = input_117_axes_0, beta = stages_2_transformer_layers_1_norm2_bias_to_fp16, epsilon = var_2252_to_fp16, gamma = stages_2_transformer_layers_1_norm2_weight_to_fp16, x = input_115_cast_fp16)[name = string("input_117_cast_fp16")];
tensor<fp16, [1024, 256]> stages_2_transformer_layers_1_ffn_0_weight_to_fp16 = const()[name = string("stages_2_transformer_layers_1_ffn_0_weight_to_fp16"), val = tensor<fp16, [1024, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(12845952)))];
tensor<fp16, [1, 16, 1024]> linear_35_cast_fp16 = linear(bias = linear_3_bias_0_to_fp16, weight = stages_2_transformer_layers_1_ffn_0_weight_to_fp16, x = input_117_cast_fp16)[name = string("linear_35_cast_fp16")];
string input_121_mode_0 = const()[name = string("input_121_mode_0"), val = string("EXACT")];
tensor<fp16, [1, 16, 1024]> input_121_cast_fp16 = gelu(mode = input_121_mode_0, x = linear_35_cast_fp16)[name = string("input_121_cast_fp16")];
tensor<fp16, [256, 1024]> stages_2_transformer_layers_1_ffn_2_weight_to_fp16 = const()[name = string("stages_2_transformer_layers_1_ffn_2_weight_to_fp16"), val = tensor<fp16, [256, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(13370304)))];
tensor<fp16, [1, 16, 256]> linear_36_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_2_transformer_layers_1_ffn_2_weight_to_fp16, x = input_121_cast_fp16)[name = string("linear_36_cast_fp16")];
tensor<fp16, [256]> stages_2_transformer_layers_1_layer_scale_2_scale_to_fp16 = const()[name = string("stages_2_transformer_layers_1_layer_scale_2_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(13894656)))];
tensor<fp16, [1, 16, 256]> var_2268_cast_fp16 = mul(x = stages_2_transformer_layers_1_layer_scale_2_scale_to_fp16, y = linear_36_cast_fp16)[name = string("op_2268_cast_fp16")];
tensor<fp16, [1, 16, 256]> input_123_cast_fp16 = add(x = input_115_cast_fp16, y = var_2268_cast_fp16)[name = string("input_123_cast_fp16")];
tensor<fp16, [768, 256]> stages_2_output_proj_weight_to_fp16 = const()[name = string("stages_2_output_proj_weight_to_fp16"), val = tensor<fp16, [768, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(13895232)))];
tensor<fp16, [1, 16, 768]> linear_37_cast_fp16 = linear(bias = linear_1_bias_0_to_fp16, weight = stages_2_output_proj_weight_to_fp16, x = input_123_cast_fp16)[name = string("linear_37_cast_fp16")];
tensor<int32, [3]> x_43_perm_0 = const()[name = string("x_43_perm_0"), val = tensor<int32, [3]>([0, 2, 1])];
tensor<int32, [4]> var_2281 = const()[name = string("op_2281"), val = tensor<int32, [4]>([1, 384, 2, 16])];
tensor<fp16, [1, 768, 16]> x_43_cast_fp16 = transpose(perm = x_43_perm_0, x = linear_37_cast_fp16)[name = string("transpose_13")];
tensor<fp16, [1, 384, 2, 16]> var_2282_cast_fp16 = reshape(shape = var_2281, x = x_43_cast_fp16)[name = string("op_2282_cast_fp16")];
tensor<int32, [4]> var_2287 = const()[name = string("op_2287"), val = tensor<int32, [4]>([0, 1, 3, 2])];
tensor<int32, [3]> var_2292 = const()[name = string("op_2292"), val = tensor<int32, [3]>([1, 384, 32])];
tensor<fp16, [1, 384, 16, 2]> var_2288_cast_fp16 = transpose(perm = var_2287, x = var_2282_cast_fp16)[name = string("transpose_12")];
tensor<fp16, [1, 384, 32]> x_45_cast_fp16 = reshape(shape = var_2292, x = var_2288_cast_fp16)[name = string("x_45_cast_fp16")];
tensor<int32, [3]> input_125_perm_0 = const()[name = string("input_125_perm_0"), val = tensor<int32, [3]>([0, 2, 1])];
tensor<fp16, [256, 384]> stages_3_input_proj_weight_to_fp16 = const()[name = string("stages_3_input_proj_weight_to_fp16"), val = tensor<fp16, [256, 384]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(14288512)))];
tensor<fp16, [1, 32, 384]> input_125_cast_fp16 = transpose(perm = input_125_perm_0, x = x_45_cast_fp16)[name = string("transpose_11")];
tensor<fp16, [1, 32, 256]> linear_38_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_3_input_proj_weight_to_fp16, x = input_125_cast_fp16)[name = string("linear_38_cast_fp16")];
tensor<int32, [1]> input_129_axes_0 = const()[name = string("input_129_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_3_transformer_layers_0_norm1_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_0_norm1_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(14485184)))];
tensor<fp16, [256]> stages_3_transformer_layers_0_norm1_bias_to_fp16 = const()[name = string("stages_3_transformer_layers_0_norm1_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(14485760)))];
fp16 var_2301_to_fp16 = const()[name = string("op_2301_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 32, 256]> input_129_cast_fp16 = layer_norm(axes = input_129_axes_0, beta = stages_3_transformer_layers_0_norm1_bias_to_fp16, epsilon = var_2301_to_fp16, gamma = stages_3_transformer_layers_0_norm1_weight_to_fp16, x = linear_38_cast_fp16)[name = string("input_129_cast_fp16")];
tensor<fp16, [768, 256]> stages_3_transformer_layers_0_self_attn_in_proj_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_0_self_attn_in_proj_weight_to_fp16"), val = tensor<fp16, [768, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(14486336)))];
tensor<fp16, [1, 32, 768]> linear_39_cast_fp16 = linear(bias = linear_1_bias_0_to_fp16, weight = stages_3_transformer_layers_0_self_attn_in_proj_weight_to_fp16, x = input_129_cast_fp16)[name = string("linear_39_cast_fp16")];
tensor<int32, [5]> var_2315 = const()[name = string("op_2315"), val = tensor<int32, [5]>([1, 32, 3, 4, 64])];
tensor<fp16, [1, 32, 3, 4, 64]> var_2316_cast_fp16 = reshape(shape = var_2315, x = linear_39_cast_fp16)[name = string("op_2316_cast_fp16")];
tensor<int32, [5]> var_2322 = const()[name = string("op_2322"), val = tensor<int32, [5]>([2, 0, 3, 1, 4])];
tensor<int32, [5]> query_49_begin_0 = const()[name = string("query_49_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> query_49_end_0 = const()[name = string("query_49_end_0"), val = tensor<int32, [5]>([1, 1, 4, 32, 64])];
tensor<bool, [5]> query_49_end_mask_0 = const()[name = string("query_49_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> query_49_squeeze_mask_0 = const()[name = string("query_49_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [3, 1, 4, 32, 64]> qkv_35_cast_fp16 = transpose(perm = var_2322, x = var_2316_cast_fp16)[name = string("transpose_10")];
tensor<fp16, [1, 4, 32, 64]> query_49_cast_fp16 = slice_by_index(begin = query_49_begin_0, end = query_49_end_0, end_mask = query_49_end_mask_0, squeeze_mask = query_49_squeeze_mask_0, x = qkv_35_cast_fp16)[name = string("query_49_cast_fp16")];
tensor<int32, [5]> key_49_begin_0 = const()[name = string("key_49_begin_0"), val = tensor<int32, [5]>([1, 0, 0, 0, 0])];
tensor<int32, [5]> key_49_end_0 = const()[name = string("key_49_end_0"), val = tensor<int32, [5]>([2, 1, 4, 32, 64])];
tensor<bool, [5]> key_49_end_mask_0 = const()[name = string("key_49_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> key_49_squeeze_mask_0 = const()[name = string("key_49_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 32, 64]> key_49_cast_fp16 = slice_by_index(begin = key_49_begin_0, end = key_49_end_0, end_mask = key_49_end_mask_0, squeeze_mask = key_49_squeeze_mask_0, x = qkv_35_cast_fp16)[name = string("key_49_cast_fp16")];
tensor<int32, [5]> value_17_begin_0 = const()[name = string("value_17_begin_0"), val = tensor<int32, [5]>([2, 0, 0, 0, 0])];
tensor<int32, [5]> value_17_end_0 = const()[name = string("value_17_end_0"), val = tensor<int32, [5]>([3, 1, 4, 32, 64])];
tensor<bool, [5]> value_17_end_mask_0 = const()[name = string("value_17_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> value_17_squeeze_mask_0 = const()[name = string("value_17_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 32, 64]> value_17_cast_fp16 = slice_by_index(begin = value_17_begin_0, end = value_17_end_0, end_mask = value_17_end_mask_0, squeeze_mask = value_17_squeeze_mask_0, x = qkv_35_cast_fp16)[name = string("value_17_cast_fp16")];
tensor<int32, [5]> var_2338 = const()[name = string("op_2338"), val = tensor<int32, [5]>([1, 4, 32, 32, 2])];
tensor<fp16, [1, 4, 32, 32, 2]> query_pairs_17_cast_fp16 = reshape(shape = var_2338, x = query_49_cast_fp16)[name = string("query_pairs_17_cast_fp16")];
tensor<int32, [5]> var_2345 = const()[name = string("op_2345"), val = tensor<int32, [5]>([1, 4, 32, 32, 2])];
tensor<fp16, [1, 4, 32, 32, 2]> key_pairs_17_cast_fp16 = reshape(shape = var_2345, x = key_49_cast_fp16)[name = string("key_pairs_17_cast_fp16")];
tensor<int32, [5]> qr_17_begin_0 = const()[name = string("qr_17_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> qr_17_end_0 = const()[name = string("qr_17_end_0"), val = tensor<int32, [5]>([1, 4, 32, 32, 1])];
tensor<bool, [5]> qr_17_end_mask_0 = const()[name = string("qr_17_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qr_17_squeeze_mask_0 = const()[name = string("qr_17_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 32, 32]> qr_17_cast_fp16 = slice_by_index(begin = qr_17_begin_0, end = qr_17_end_0, end_mask = qr_17_end_mask_0, squeeze_mask = qr_17_squeeze_mask_0, x = query_pairs_17_cast_fp16)[name = string("qr_17_cast_fp16")];
tensor<int32, [5]> qi_17_begin_0 = const()[name = string("qi_17_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> qi_17_end_0 = const()[name = string("qi_17_end_0"), val = tensor<int32, [5]>([1, 4, 32, 32, 2])];
tensor<bool, [5]> qi_17_end_mask_0 = const()[name = string("qi_17_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qi_17_squeeze_mask_0 = const()[name = string("qi_17_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 32, 32]> qi_17_cast_fp16 = slice_by_index(begin = qi_17_begin_0, end = qi_17_end_0, end_mask = qi_17_end_mask_0, squeeze_mask = qi_17_squeeze_mask_0, x = query_pairs_17_cast_fp16)[name = string("qi_17_cast_fp16")];
tensor<int32, [5]> kr_17_begin_0 = const()[name = string("kr_17_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> kr_17_end_0 = const()[name = string("kr_17_end_0"), val = tensor<int32, [5]>([1, 4, 32, 32, 1])];
tensor<bool, [5]> kr_17_end_mask_0 = const()[name = string("kr_17_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> kr_17_squeeze_mask_0 = const()[name = string("kr_17_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 32, 32]> kr_17_cast_fp16 = slice_by_index(begin = kr_17_begin_0, end = kr_17_end_0, end_mask = kr_17_end_mask_0, squeeze_mask = kr_17_squeeze_mask_0, x = key_pairs_17_cast_fp16)[name = string("kr_17_cast_fp16")];
tensor<int32, [5]> ki_17_begin_0 = const()[name = string("ki_17_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> ki_17_end_0 = const()[name = string("ki_17_end_0"), val = tensor<int32, [5]>([1, 4, 32, 32, 2])];
tensor<bool, [5]> ki_17_end_mask_0 = const()[name = string("ki_17_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> ki_17_squeeze_mask_0 = const()[name = string("ki_17_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 32, 32]> ki_17_cast_fp16 = slice_by_index(begin = ki_17_begin_0, end = ki_17_end_0, end_mask = ki_17_end_mask_0, squeeze_mask = ki_17_squeeze_mask_0, x = key_pairs_17_cast_fp16)[name = string("ki_17_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2359_cast_fp16 = mul(x = qr_17_cast_fp16, y = s3_cos)[name = string("op_2359_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2360_cast_fp16 = mul(x = qi_17_cast_fp16, y = s3_sin)[name = string("op_2360_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2362_cast_fp16 = sub(x = var_2359_cast_fp16, y = var_2360_cast_fp16)[name = string("op_2362_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2363_cast_fp16 = mul(x = qr_17_cast_fp16, y = s3_sin)[name = string("op_2363_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2364_cast_fp16 = mul(x = qi_17_cast_fp16, y = s3_cos)[name = string("op_2364_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2366_cast_fp16 = add(x = var_2363_cast_fp16, y = var_2364_cast_fp16)[name = string("op_2366_cast_fp16")];
int32 query_51_axis_0 = const()[name = string("query_51_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 32, 32, 2]> query_51_cast_fp16 = stack(axis = query_51_axis_0, values = (var_2362_cast_fp16, var_2366_cast_fp16))[name = string("query_51_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2370_cast_fp16 = mul(x = kr_17_cast_fp16, y = s3_cos)[name = string("op_2370_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2371_cast_fp16 = mul(x = ki_17_cast_fp16, y = s3_sin)[name = string("op_2371_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2373_cast_fp16 = sub(x = var_2370_cast_fp16, y = var_2371_cast_fp16)[name = string("op_2373_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2374_cast_fp16 = mul(x = kr_17_cast_fp16, y = s3_sin)[name = string("op_2374_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2375_cast_fp16 = mul(x = ki_17_cast_fp16, y = s3_cos)[name = string("op_2375_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2377_cast_fp16 = add(x = var_2374_cast_fp16, y = var_2375_cast_fp16)[name = string("op_2377_cast_fp16")];
int32 key_51_axis_0 = const()[name = string("key_51_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 32, 32, 2]> key_51_cast_fp16 = stack(axis = key_51_axis_0, values = (var_2373_cast_fp16, var_2377_cast_fp16))[name = string("key_51_cast_fp16")];
tensor<int32, [4]> var_2385 = const()[name = string("op_2385"), val = tensor<int32, [4]>([1, 4, 32, 64])];
tensor<fp16, [1, 4, 32, 64]> query_53_cast_fp16 = reshape(shape = var_2385, x = query_51_cast_fp16)[name = string("query_53_cast_fp16")];
tensor<int32, [4]> var_2391 = const()[name = string("op_2391"), val = tensor<int32, [4]>([1, 4, 32, 64])];
tensor<fp16, [1, 4, 32, 64]> key_53_cast_fp16 = reshape(shape = var_2391, x = key_51_cast_fp16)[name = string("key_53_cast_fp16")];
tensor<fp16, [1, 4, 1600, 64]> read_state_16 = read_state(input = s3_l0_k)[name = string("read_state_16")];
tensor<int32, [4]> var_2407_begin_0 = const()[name = string("op_2407_begin_0"), val = tensor<int32, [4]>([0, 0, 32, 0])];
tensor<int32, [4]> var_2407_end_0 = const()[name = string("op_2407_end_0"), val = tensor<int32, [4]>([1, 4, 1600, 64])];
tensor<bool, [4]> var_2407_end_mask_0 = const()[name = string("op_2407_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 1568, 64]> var_2407_cast_fp16 = slice_by_index(begin = var_2407_begin_0, end = var_2407_end_0, end_mask = var_2407_end_mask_0, x = read_state_16)[name = string("op_2407_cast_fp16")];
int32 var_2414 = const()[name = string("op_2414"), val = int32(2)];
bool new_key_17_interleave_0 = const()[name = string("new_key_17_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 1600, 64]> new_key_17_cast_fp16 = concat(axis = var_2414, interleave = new_key_17_interleave_0, values = (var_2407_cast_fp16, key_53_cast_fp16))[name = string("new_key_17_cast_fp16")];
tensor<fp16, [1, 4, 1600, 64]> read_state_17 = read_state(input = s3_l0_v)[name = string("read_state_17")];
tensor<int32, [4]> var_2430_begin_0 = const()[name = string("op_2430_begin_0"), val = tensor<int32, [4]>([0, 0, 32, 0])];
tensor<int32, [4]> var_2430_end_0 = const()[name = string("op_2430_end_0"), val = tensor<int32, [4]>([1, 4, 1600, 64])];
tensor<bool, [4]> var_2430_end_mask_0 = const()[name = string("op_2430_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 1568, 64]> var_2430_cast_fp16 = slice_by_index(begin = var_2430_begin_0, end = var_2430_end_0, end_mask = var_2430_end_mask_0, x = read_state_17)[name = string("op_2430_cast_fp16")];
int32 var_2437 = const()[name = string("op_2437"), val = int32(2)];
bool new_value_17_interleave_0 = const()[name = string("new_value_17_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 1600, 64]> new_value_17_cast_fp16 = concat(axis = var_2437, interleave = new_value_17_interleave_0, values = (var_2430_cast_fp16, value_17_cast_fp16))[name = string("new_value_17_cast_fp16")];
tensor<int32, [4]> concat_32 = const()[name = string("concat_32"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_33 = const()[name = string("concat_33"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s3_l0_k_internal_tensor_assign_1_stride_0 = const()[name = string("s3_l0_k_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s3_l0_k_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s3_l0_k_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s3_l0_k_internal_tensor_assign_1_end_mask_0 = const()[name = string("s3_l0_k_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s3_l0_k_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s3_l0_k_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 1600, 64]> s3_l0_k_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_32, begin_mask = s3_l0_k_internal_tensor_assign_1_begin_mask_0, end = concat_33, end_mask = s3_l0_k_internal_tensor_assign_1_end_mask_0, squeeze_mask = s3_l0_k_internal_tensor_assign_1_squeeze_mask_0, stride = s3_l0_k_internal_tensor_assign_1_stride_0, update = new_key_17_cast_fp16, x = read_state_16)[name = string("s3_l0_k_internal_tensor_assign_1_cast_fp16")];
write_state(data = s3_l0_k_internal_tensor_assign_1_cast_fp16, input = s3_l0_k)[name = string("coreml_update_state_40_write_state")];
tensor<int32, [4]> concat_34 = const()[name = string("concat_34"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_35 = const()[name = string("concat_35"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s3_l0_v_internal_tensor_assign_1_stride_0 = const()[name = string("s3_l0_v_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s3_l0_v_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s3_l0_v_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s3_l0_v_internal_tensor_assign_1_end_mask_0 = const()[name = string("s3_l0_v_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s3_l0_v_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s3_l0_v_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 1600, 64]> s3_l0_v_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_34, begin_mask = s3_l0_v_internal_tensor_assign_1_begin_mask_0, end = concat_35, end_mask = s3_l0_v_internal_tensor_assign_1_end_mask_0, squeeze_mask = s3_l0_v_internal_tensor_assign_1_squeeze_mask_0, stride = s3_l0_v_internal_tensor_assign_1_stride_0, update = new_value_17_cast_fp16, x = read_state_17)[name = string("s3_l0_v_internal_tensor_assign_1_cast_fp16")];
write_state(data = s3_l0_v_internal_tensor_assign_1_cast_fp16, input = s3_l0_v)[name = string("coreml_update_state_41_write_state")];
bool var_2456_transpose_x_1 = const()[name = string("op_2456_transpose_x_1"), val = bool(false)];
bool var_2456_transpose_y_1 = const()[name = string("op_2456_transpose_y_1"), val = bool(true)];
tensor<fp16, [1, 4, 32, 1600]> var_2456_cast_fp16 = matmul(transpose_x = var_2456_transpose_x_1, transpose_y = var_2456_transpose_y_1, x = query_53_cast_fp16, y = new_key_17_cast_fp16)[name = string("op_2456_cast_fp16")];
fp16 var_2457_to_fp16 = const()[name = string("op_2457_to_fp16"), val = fp16(0x1p-3)];
tensor<fp16, [1, 4, 32, 1600]> scores_17_cast_fp16 = mul(x = var_2456_cast_fp16, y = var_2457_to_fp16)[name = string("scores_17_cast_fp16")];
tensor<fp16, [1, 4, 32, 1600]> var_2460_cast_fp16 = add(x = scores_17_cast_fp16, y = s3_mask)[name = string("op_2460_cast_fp16")];
int32 var_2461 = const()[name = string("op_2461"), val = int32(-1)];
tensor<fp16, [1, 4, 32, 1600]> probabilities_17_cast_fp16 = softmax(axis = var_2461, x = var_2460_cast_fp16)[name = string("probabilities_17_cast_fp16")];
bool attention_17_transpose_x_0 = const()[name = string("attention_17_transpose_x_0"), val = bool(false)];
bool attention_17_transpose_y_0 = const()[name = string("attention_17_transpose_y_0"), val = bool(false)];
tensor<fp16, [1, 4, 32, 64]> attention_17_cast_fp16 = matmul(transpose_x = attention_17_transpose_x_0, transpose_y = attention_17_transpose_y_0, x = probabilities_17_cast_fp16, y = new_value_17_cast_fp16)[name = string("attention_17_cast_fp16")];
tensor<int32, [4]> var_2467_perm_0 = const()[name = string("op_2467_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
tensor<int32, [3]> var_2471 = const()[name = string("op_2471"), val = tensor<int32, [3]>([1, 32, 256])];
tensor<fp16, [1, 32, 4, 64]> var_2467_cast_fp16 = transpose(perm = var_2467_perm_0, x = attention_17_cast_fp16)[name = string("transpose_9")];
tensor<fp16, [1, 32, 256]> input_131_cast_fp16 = reshape(shape = var_2471, x = var_2467_cast_fp16)[name = string("input_131_cast_fp16")];
tensor<fp16, [256, 256]> stages_3_transformer_layers_0_self_attn_out_proj_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_0_self_attn_out_proj_weight_to_fp16"), val = tensor<fp16, [256, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(14879616)))];
tensor<fp16, [1, 32, 256]> linear_40_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_3_transformer_layers_0_self_attn_out_proj_weight_to_fp16, x = input_131_cast_fp16)[name = string("linear_40_cast_fp16")];
tensor<fp16, [256]> stages_3_transformer_layers_0_layer_scale_1_scale_to_fp16 = const()[name = string("stages_3_transformer_layers_0_layer_scale_1_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(15010752)))];
tensor<fp16, [1, 32, 256]> var_2477_cast_fp16 = mul(x = stages_3_transformer_layers_0_layer_scale_1_scale_to_fp16, y = linear_40_cast_fp16)[name = string("op_2477_cast_fp16")];
tensor<fp16, [1, 32, 256]> input_133_cast_fp16 = add(x = linear_38_cast_fp16, y = var_2477_cast_fp16)[name = string("input_133_cast_fp16")];
tensor<int32, [1]> input_135_axes_0 = const()[name = string("input_135_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_3_transformer_layers_0_norm2_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_0_norm2_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(15011328)))];
tensor<fp16, [256]> stages_3_transformer_layers_0_norm2_bias_to_fp16 = const()[name = string("stages_3_transformer_layers_0_norm2_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(15011904)))];
fp16 var_2481_to_fp16 = const()[name = string("op_2481_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 32, 256]> input_135_cast_fp16 = layer_norm(axes = input_135_axes_0, beta = stages_3_transformer_layers_0_norm2_bias_to_fp16, epsilon = var_2481_to_fp16, gamma = stages_3_transformer_layers_0_norm2_weight_to_fp16, x = input_133_cast_fp16)[name = string("input_135_cast_fp16")];
tensor<fp16, [1024, 256]> stages_3_transformer_layers_0_ffn_0_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_0_ffn_0_weight_to_fp16"), val = tensor<fp16, [1024, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(15012480)))];
tensor<fp16, [1, 32, 1024]> linear_41_cast_fp16 = linear(bias = linear_3_bias_0_to_fp16, weight = stages_3_transformer_layers_0_ffn_0_weight_to_fp16, x = input_135_cast_fp16)[name = string("linear_41_cast_fp16")];
string input_139_mode_0 = const()[name = string("input_139_mode_0"), val = string("EXACT")];
tensor<fp16, [1, 32, 1024]> input_139_cast_fp16 = gelu(mode = input_139_mode_0, x = linear_41_cast_fp16)[name = string("input_139_cast_fp16")];
tensor<fp16, [256, 1024]> stages_3_transformer_layers_0_ffn_2_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_0_ffn_2_weight_to_fp16"), val = tensor<fp16, [256, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(15536832)))];
tensor<fp16, [1, 32, 256]> linear_42_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_3_transformer_layers_0_ffn_2_weight_to_fp16, x = input_139_cast_fp16)[name = string("linear_42_cast_fp16")];
tensor<fp16, [256]> stages_3_transformer_layers_0_layer_scale_2_scale_to_fp16 = const()[name = string("stages_3_transformer_layers_0_layer_scale_2_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(16061184)))];
tensor<fp16, [1, 32, 256]> var_2497_cast_fp16 = mul(x = stages_3_transformer_layers_0_layer_scale_2_scale_to_fp16, y = linear_42_cast_fp16)[name = string("op_2497_cast_fp16")];
tensor<fp16, [1, 32, 256]> input_141_cast_fp16 = add(x = input_133_cast_fp16, y = var_2497_cast_fp16)[name = string("input_141_cast_fp16")];
tensor<int32, [1]> input_143_axes_0 = const()[name = string("input_143_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_3_transformer_layers_1_norm1_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_1_norm1_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(16061760)))];
tensor<fp16, [256]> stages_3_transformer_layers_1_norm1_bias_to_fp16 = const()[name = string("stages_3_transformer_layers_1_norm1_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(16062336)))];
fp16 var_2501_to_fp16 = const()[name = string("op_2501_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 32, 256]> input_143_cast_fp16 = layer_norm(axes = input_143_axes_0, beta = stages_3_transformer_layers_1_norm1_bias_to_fp16, epsilon = var_2501_to_fp16, gamma = stages_3_transformer_layers_1_norm1_weight_to_fp16, x = input_141_cast_fp16)[name = string("input_143_cast_fp16")];
tensor<fp16, [768, 256]> stages_3_transformer_layers_1_self_attn_in_proj_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_1_self_attn_in_proj_weight_to_fp16"), val = tensor<fp16, [768, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(16062912)))];
tensor<fp16, [1, 32, 768]> linear_43_cast_fp16 = linear(bias = linear_1_bias_0_to_fp16, weight = stages_3_transformer_layers_1_self_attn_in_proj_weight_to_fp16, x = input_143_cast_fp16)[name = string("linear_43_cast_fp16")];
tensor<int32, [5]> var_2515 = const()[name = string("op_2515"), val = tensor<int32, [5]>([1, 32, 3, 4, 64])];
tensor<fp16, [1, 32, 3, 4, 64]> var_2516_cast_fp16 = reshape(shape = var_2515, x = linear_43_cast_fp16)[name = string("op_2516_cast_fp16")];
tensor<int32, [5]> var_2522 = const()[name = string("op_2522"), val = tensor<int32, [5]>([2, 0, 3, 1, 4])];
tensor<int32, [5]> query_55_begin_0 = const()[name = string("query_55_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> query_55_end_0 = const()[name = string("query_55_end_0"), val = tensor<int32, [5]>([1, 1, 4, 32, 64])];
tensor<bool, [5]> query_55_end_mask_0 = const()[name = string("query_55_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> query_55_squeeze_mask_0 = const()[name = string("query_55_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [3, 1, 4, 32, 64]> qkv_39_cast_fp16 = transpose(perm = var_2522, x = var_2516_cast_fp16)[name = string("transpose_8")];
tensor<fp16, [1, 4, 32, 64]> query_55_cast_fp16 = slice_by_index(begin = query_55_begin_0, end = query_55_end_0, end_mask = query_55_end_mask_0, squeeze_mask = query_55_squeeze_mask_0, x = qkv_39_cast_fp16)[name = string("query_55_cast_fp16")];
tensor<int32, [5]> key_55_begin_0 = const()[name = string("key_55_begin_0"), val = tensor<int32, [5]>([1, 0, 0, 0, 0])];
tensor<int32, [5]> key_55_end_0 = const()[name = string("key_55_end_0"), val = tensor<int32, [5]>([2, 1, 4, 32, 64])];
tensor<bool, [5]> key_55_end_mask_0 = const()[name = string("key_55_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> key_55_squeeze_mask_0 = const()[name = string("key_55_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 32, 64]> key_55_cast_fp16 = slice_by_index(begin = key_55_begin_0, end = key_55_end_0, end_mask = key_55_end_mask_0, squeeze_mask = key_55_squeeze_mask_0, x = qkv_39_cast_fp16)[name = string("key_55_cast_fp16")];
tensor<int32, [5]> value_19_begin_0 = const()[name = string("value_19_begin_0"), val = tensor<int32, [5]>([2, 0, 0, 0, 0])];
tensor<int32, [5]> value_19_end_0 = const()[name = string("value_19_end_0"), val = tensor<int32, [5]>([3, 1, 4, 32, 64])];
tensor<bool, [5]> value_19_end_mask_0 = const()[name = string("value_19_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> value_19_squeeze_mask_0 = const()[name = string("value_19_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 32, 64]> value_19_cast_fp16 = slice_by_index(begin = value_19_begin_0, end = value_19_end_0, end_mask = value_19_end_mask_0, squeeze_mask = value_19_squeeze_mask_0, x = qkv_39_cast_fp16)[name = string("value_19_cast_fp16")];
tensor<int32, [5]> var_2538 = const()[name = string("op_2538"), val = tensor<int32, [5]>([1, 4, 32, 32, 2])];
tensor<fp16, [1, 4, 32, 32, 2]> query_pairs_19_cast_fp16 = reshape(shape = var_2538, x = query_55_cast_fp16)[name = string("query_pairs_19_cast_fp16")];
tensor<int32, [5]> var_2545 = const()[name = string("op_2545"), val = tensor<int32, [5]>([1, 4, 32, 32, 2])];
tensor<fp16, [1, 4, 32, 32, 2]> key_pairs_19_cast_fp16 = reshape(shape = var_2545, x = key_55_cast_fp16)[name = string("key_pairs_19_cast_fp16")];
tensor<int32, [5]> qr_19_begin_0 = const()[name = string("qr_19_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> qr_19_end_0 = const()[name = string("qr_19_end_0"), val = tensor<int32, [5]>([1, 4, 32, 32, 1])];
tensor<bool, [5]> qr_19_end_mask_0 = const()[name = string("qr_19_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qr_19_squeeze_mask_0 = const()[name = string("qr_19_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 32, 32]> qr_19_cast_fp16 = slice_by_index(begin = qr_19_begin_0, end = qr_19_end_0, end_mask = qr_19_end_mask_0, squeeze_mask = qr_19_squeeze_mask_0, x = query_pairs_19_cast_fp16)[name = string("qr_19_cast_fp16")];
tensor<int32, [5]> qi_19_begin_0 = const()[name = string("qi_19_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> qi_19_end_0 = const()[name = string("qi_19_end_0"), val = tensor<int32, [5]>([1, 4, 32, 32, 2])];
tensor<bool, [5]> qi_19_end_mask_0 = const()[name = string("qi_19_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qi_19_squeeze_mask_0 = const()[name = string("qi_19_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 32, 32]> qi_19_cast_fp16 = slice_by_index(begin = qi_19_begin_0, end = qi_19_end_0, end_mask = qi_19_end_mask_0, squeeze_mask = qi_19_squeeze_mask_0, x = query_pairs_19_cast_fp16)[name = string("qi_19_cast_fp16")];
tensor<int32, [5]> kr_19_begin_0 = const()[name = string("kr_19_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> kr_19_end_0 = const()[name = string("kr_19_end_0"), val = tensor<int32, [5]>([1, 4, 32, 32, 1])];
tensor<bool, [5]> kr_19_end_mask_0 = const()[name = string("kr_19_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> kr_19_squeeze_mask_0 = const()[name = string("kr_19_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 32, 32]> kr_19_cast_fp16 = slice_by_index(begin = kr_19_begin_0, end = kr_19_end_0, end_mask = kr_19_end_mask_0, squeeze_mask = kr_19_squeeze_mask_0, x = key_pairs_19_cast_fp16)[name = string("kr_19_cast_fp16")];
tensor<int32, [5]> ki_19_begin_0 = const()[name = string("ki_19_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> ki_19_end_0 = const()[name = string("ki_19_end_0"), val = tensor<int32, [5]>([1, 4, 32, 32, 2])];
tensor<bool, [5]> ki_19_end_mask_0 = const()[name = string("ki_19_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> ki_19_squeeze_mask_0 = const()[name = string("ki_19_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 32, 32]> ki_19_cast_fp16 = slice_by_index(begin = ki_19_begin_0, end = ki_19_end_0, end_mask = ki_19_end_mask_0, squeeze_mask = ki_19_squeeze_mask_0, x = key_pairs_19_cast_fp16)[name = string("ki_19_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2559_cast_fp16 = mul(x = qr_19_cast_fp16, y = s3_cos)[name = string("op_2559_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2560_cast_fp16 = mul(x = qi_19_cast_fp16, y = s3_sin)[name = string("op_2560_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2562_cast_fp16 = sub(x = var_2559_cast_fp16, y = var_2560_cast_fp16)[name = string("op_2562_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2563_cast_fp16 = mul(x = qr_19_cast_fp16, y = s3_sin)[name = string("op_2563_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2564_cast_fp16 = mul(x = qi_19_cast_fp16, y = s3_cos)[name = string("op_2564_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2566_cast_fp16 = add(x = var_2563_cast_fp16, y = var_2564_cast_fp16)[name = string("op_2566_cast_fp16")];
int32 query_57_axis_0 = const()[name = string("query_57_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 32, 32, 2]> query_57_cast_fp16 = stack(axis = query_57_axis_0, values = (var_2562_cast_fp16, var_2566_cast_fp16))[name = string("query_57_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2570_cast_fp16 = mul(x = kr_19_cast_fp16, y = s3_cos)[name = string("op_2570_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2571_cast_fp16 = mul(x = ki_19_cast_fp16, y = s3_sin)[name = string("op_2571_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2573_cast_fp16 = sub(x = var_2570_cast_fp16, y = var_2571_cast_fp16)[name = string("op_2573_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2574_cast_fp16 = mul(x = kr_19_cast_fp16, y = s3_sin)[name = string("op_2574_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2575_cast_fp16 = mul(x = ki_19_cast_fp16, y = s3_cos)[name = string("op_2575_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2577_cast_fp16 = add(x = var_2574_cast_fp16, y = var_2575_cast_fp16)[name = string("op_2577_cast_fp16")];
int32 key_57_axis_0 = const()[name = string("key_57_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 32, 32, 2]> key_57_cast_fp16 = stack(axis = key_57_axis_0, values = (var_2573_cast_fp16, var_2577_cast_fp16))[name = string("key_57_cast_fp16")];
tensor<int32, [4]> var_2585 = const()[name = string("op_2585"), val = tensor<int32, [4]>([1, 4, 32, 64])];
tensor<fp16, [1, 4, 32, 64]> query_59_cast_fp16 = reshape(shape = var_2585, x = query_57_cast_fp16)[name = string("query_59_cast_fp16")];
tensor<int32, [4]> var_2591 = const()[name = string("op_2591"), val = tensor<int32, [4]>([1, 4, 32, 64])];
tensor<fp16, [1, 4, 32, 64]> key_59_cast_fp16 = reshape(shape = var_2591, x = key_57_cast_fp16)[name = string("key_59_cast_fp16")];
tensor<fp16, [1, 4, 1600, 64]> read_state_18 = read_state(input = s3_l1_k)[name = string("read_state_18")];
tensor<int32, [4]> var_2607_begin_0 = const()[name = string("op_2607_begin_0"), val = tensor<int32, [4]>([0, 0, 32, 0])];
tensor<int32, [4]> var_2607_end_0 = const()[name = string("op_2607_end_0"), val = tensor<int32, [4]>([1, 4, 1600, 64])];
tensor<bool, [4]> var_2607_end_mask_0 = const()[name = string("op_2607_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 1568, 64]> var_2607_cast_fp16 = slice_by_index(begin = var_2607_begin_0, end = var_2607_end_0, end_mask = var_2607_end_mask_0, x = read_state_18)[name = string("op_2607_cast_fp16")];
int32 var_2614 = const()[name = string("op_2614"), val = int32(2)];
bool new_key_19_interleave_0 = const()[name = string("new_key_19_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 1600, 64]> new_key_19_cast_fp16 = concat(axis = var_2614, interleave = new_key_19_interleave_0, values = (var_2607_cast_fp16, key_59_cast_fp16))[name = string("new_key_19_cast_fp16")];
tensor<fp16, [1, 4, 1600, 64]> read_state_19 = read_state(input = s3_l1_v)[name = string("read_state_19")];
tensor<int32, [4]> var_2630_begin_0 = const()[name = string("op_2630_begin_0"), val = tensor<int32, [4]>([0, 0, 32, 0])];
tensor<int32, [4]> var_2630_end_0 = const()[name = string("op_2630_end_0"), val = tensor<int32, [4]>([1, 4, 1600, 64])];
tensor<bool, [4]> var_2630_end_mask_0 = const()[name = string("op_2630_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 1568, 64]> var_2630_cast_fp16 = slice_by_index(begin = var_2630_begin_0, end = var_2630_end_0, end_mask = var_2630_end_mask_0, x = read_state_19)[name = string("op_2630_cast_fp16")];
int32 var_2637 = const()[name = string("op_2637"), val = int32(2)];
bool new_value_19_interleave_0 = const()[name = string("new_value_19_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 1600, 64]> new_value_19_cast_fp16 = concat(axis = var_2637, interleave = new_value_19_interleave_0, values = (var_2630_cast_fp16, value_19_cast_fp16))[name = string("new_value_19_cast_fp16")];
tensor<int32, [4]> concat_36 = const()[name = string("concat_36"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_37 = const()[name = string("concat_37"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s3_l1_k_internal_tensor_assign_1_stride_0 = const()[name = string("s3_l1_k_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s3_l1_k_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s3_l1_k_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s3_l1_k_internal_tensor_assign_1_end_mask_0 = const()[name = string("s3_l1_k_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s3_l1_k_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s3_l1_k_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 1600, 64]> s3_l1_k_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_36, begin_mask = s3_l1_k_internal_tensor_assign_1_begin_mask_0, end = concat_37, end_mask = s3_l1_k_internal_tensor_assign_1_end_mask_0, squeeze_mask = s3_l1_k_internal_tensor_assign_1_squeeze_mask_0, stride = s3_l1_k_internal_tensor_assign_1_stride_0, update = new_key_19_cast_fp16, x = read_state_18)[name = string("s3_l1_k_internal_tensor_assign_1_cast_fp16")];
write_state(data = s3_l1_k_internal_tensor_assign_1_cast_fp16, input = s3_l1_k)[name = string("coreml_update_state_42_write_state")];
tensor<int32, [4]> concat_38 = const()[name = string("concat_38"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_39 = const()[name = string("concat_39"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s3_l1_v_internal_tensor_assign_1_stride_0 = const()[name = string("s3_l1_v_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s3_l1_v_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s3_l1_v_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s3_l1_v_internal_tensor_assign_1_end_mask_0 = const()[name = string("s3_l1_v_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s3_l1_v_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s3_l1_v_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 1600, 64]> s3_l1_v_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_38, begin_mask = s3_l1_v_internal_tensor_assign_1_begin_mask_0, end = concat_39, end_mask = s3_l1_v_internal_tensor_assign_1_end_mask_0, squeeze_mask = s3_l1_v_internal_tensor_assign_1_squeeze_mask_0, stride = s3_l1_v_internal_tensor_assign_1_stride_0, update = new_value_19_cast_fp16, x = read_state_19)[name = string("s3_l1_v_internal_tensor_assign_1_cast_fp16")];
write_state(data = s3_l1_v_internal_tensor_assign_1_cast_fp16, input = s3_l1_v)[name = string("coreml_update_state_43_write_state")];
bool var_2656_transpose_x_1 = const()[name = string("op_2656_transpose_x_1"), val = bool(false)];
bool var_2656_transpose_y_1 = const()[name = string("op_2656_transpose_y_1"), val = bool(true)];
tensor<fp16, [1, 4, 32, 1600]> var_2656_cast_fp16 = matmul(transpose_x = var_2656_transpose_x_1, transpose_y = var_2656_transpose_y_1, x = query_59_cast_fp16, y = new_key_19_cast_fp16)[name = string("op_2656_cast_fp16")];
fp16 var_2657_to_fp16 = const()[name = string("op_2657_to_fp16"), val = fp16(0x1p-3)];
tensor<fp16, [1, 4, 32, 1600]> scores_19_cast_fp16 = mul(x = var_2656_cast_fp16, y = var_2657_to_fp16)[name = string("scores_19_cast_fp16")];
tensor<fp16, [1, 4, 32, 1600]> var_2660_cast_fp16 = add(x = scores_19_cast_fp16, y = s3_mask)[name = string("op_2660_cast_fp16")];
int32 var_2661 = const()[name = string("op_2661"), val = int32(-1)];
tensor<fp16, [1, 4, 32, 1600]> probabilities_19_cast_fp16 = softmax(axis = var_2661, x = var_2660_cast_fp16)[name = string("probabilities_19_cast_fp16")];
bool attention_19_transpose_x_0 = const()[name = string("attention_19_transpose_x_0"), val = bool(false)];
bool attention_19_transpose_y_0 = const()[name = string("attention_19_transpose_y_0"), val = bool(false)];
tensor<fp16, [1, 4, 32, 64]> attention_19_cast_fp16 = matmul(transpose_x = attention_19_transpose_x_0, transpose_y = attention_19_transpose_y_0, x = probabilities_19_cast_fp16, y = new_value_19_cast_fp16)[name = string("attention_19_cast_fp16")];
tensor<int32, [4]> var_2667_perm_0 = const()[name = string("op_2667_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
tensor<int32, [3]> var_2671 = const()[name = string("op_2671"), val = tensor<int32, [3]>([1, 32, 256])];
tensor<fp16, [1, 32, 4, 64]> var_2667_cast_fp16 = transpose(perm = var_2667_perm_0, x = attention_19_cast_fp16)[name = string("transpose_7")];
tensor<fp16, [1, 32, 256]> input_145_cast_fp16 = reshape(shape = var_2671, x = var_2667_cast_fp16)[name = string("input_145_cast_fp16")];
tensor<fp16, [256, 256]> stages_3_transformer_layers_1_self_attn_out_proj_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_1_self_attn_out_proj_weight_to_fp16"), val = tensor<fp16, [256, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(16456192)))];
tensor<fp16, [1, 32, 256]> linear_44_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_3_transformer_layers_1_self_attn_out_proj_weight_to_fp16, x = input_145_cast_fp16)[name = string("linear_44_cast_fp16")];
tensor<fp16, [256]> stages_3_transformer_layers_1_layer_scale_1_scale_to_fp16 = const()[name = string("stages_3_transformer_layers_1_layer_scale_1_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(16587328)))];
tensor<fp16, [1, 32, 256]> var_2677_cast_fp16 = mul(x = stages_3_transformer_layers_1_layer_scale_1_scale_to_fp16, y = linear_44_cast_fp16)[name = string("op_2677_cast_fp16")];
tensor<fp16, [1, 32, 256]> input_147_cast_fp16 = add(x = input_141_cast_fp16, y = var_2677_cast_fp16)[name = string("input_147_cast_fp16")];
tensor<int32, [1]> input_149_axes_0 = const()[name = string("input_149_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_3_transformer_layers_1_norm2_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_1_norm2_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(16587904)))];
tensor<fp16, [256]> stages_3_transformer_layers_1_norm2_bias_to_fp16 = const()[name = string("stages_3_transformer_layers_1_norm2_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(16588480)))];
fp16 var_2681_to_fp16 = const()[name = string("op_2681_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 32, 256]> input_149_cast_fp16 = layer_norm(axes = input_149_axes_0, beta = stages_3_transformer_layers_1_norm2_bias_to_fp16, epsilon = var_2681_to_fp16, gamma = stages_3_transformer_layers_1_norm2_weight_to_fp16, x = input_147_cast_fp16)[name = string("input_149_cast_fp16")];
tensor<fp16, [1024, 256]> stages_3_transformer_layers_1_ffn_0_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_1_ffn_0_weight_to_fp16"), val = tensor<fp16, [1024, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(16589056)))];
tensor<fp16, [1, 32, 1024]> linear_45_cast_fp16 = linear(bias = linear_3_bias_0_to_fp16, weight = stages_3_transformer_layers_1_ffn_0_weight_to_fp16, x = input_149_cast_fp16)[name = string("linear_45_cast_fp16")];
string input_153_mode_0 = const()[name = string("input_153_mode_0"), val = string("EXACT")];
tensor<fp16, [1, 32, 1024]> input_153_cast_fp16 = gelu(mode = input_153_mode_0, x = linear_45_cast_fp16)[name = string("input_153_cast_fp16")];
tensor<fp16, [256, 1024]> stages_3_transformer_layers_1_ffn_2_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_1_ffn_2_weight_to_fp16"), val = tensor<fp16, [256, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(17113408)))];
tensor<fp16, [1, 32, 256]> linear_46_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_3_transformer_layers_1_ffn_2_weight_to_fp16, x = input_153_cast_fp16)[name = string("linear_46_cast_fp16")];
tensor<fp16, [256]> stages_3_transformer_layers_1_layer_scale_2_scale_to_fp16 = const()[name = string("stages_3_transformer_layers_1_layer_scale_2_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(17637760)))];
tensor<fp16, [1, 32, 256]> var_2697_cast_fp16 = mul(x = stages_3_transformer_layers_1_layer_scale_2_scale_to_fp16, y = linear_46_cast_fp16)[name = string("op_2697_cast_fp16")];
tensor<fp16, [1, 32, 256]> input_155_cast_fp16 = add(x = input_147_cast_fp16, y = var_2697_cast_fp16)[name = string("input_155_cast_fp16")];
tensor<int32, [1]> input_157_axes_0 = const()[name = string("input_157_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_3_transformer_layers_2_norm1_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_2_norm1_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(17638336)))];
tensor<fp16, [256]> stages_3_transformer_layers_2_norm1_bias_to_fp16 = const()[name = string("stages_3_transformer_layers_2_norm1_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(17638912)))];
fp16 var_2701_to_fp16 = const()[name = string("op_2701_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 32, 256]> input_157_cast_fp16 = layer_norm(axes = input_157_axes_0, beta = stages_3_transformer_layers_2_norm1_bias_to_fp16, epsilon = var_2701_to_fp16, gamma = stages_3_transformer_layers_2_norm1_weight_to_fp16, x = input_155_cast_fp16)[name = string("input_157_cast_fp16")];
tensor<fp16, [768, 256]> stages_3_transformer_layers_2_self_attn_in_proj_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_2_self_attn_in_proj_weight_to_fp16"), val = tensor<fp16, [768, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(17639488)))];
tensor<fp16, [1, 32, 768]> linear_47_cast_fp16 = linear(bias = linear_1_bias_0_to_fp16, weight = stages_3_transformer_layers_2_self_attn_in_proj_weight_to_fp16, x = input_157_cast_fp16)[name = string("linear_47_cast_fp16")];
tensor<int32, [5]> var_2715 = const()[name = string("op_2715"), val = tensor<int32, [5]>([1, 32, 3, 4, 64])];
tensor<fp16, [1, 32, 3, 4, 64]> var_2716_cast_fp16 = reshape(shape = var_2715, x = linear_47_cast_fp16)[name = string("op_2716_cast_fp16")];
tensor<int32, [5]> var_2722 = const()[name = string("op_2722"), val = tensor<int32, [5]>([2, 0, 3, 1, 4])];
tensor<int32, [5]> query_61_begin_0 = const()[name = string("query_61_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> query_61_end_0 = const()[name = string("query_61_end_0"), val = tensor<int32, [5]>([1, 1, 4, 32, 64])];
tensor<bool, [5]> query_61_end_mask_0 = const()[name = string("query_61_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> query_61_squeeze_mask_0 = const()[name = string("query_61_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [3, 1, 4, 32, 64]> qkv_43_cast_fp16 = transpose(perm = var_2722, x = var_2716_cast_fp16)[name = string("transpose_6")];
tensor<fp16, [1, 4, 32, 64]> query_61_cast_fp16 = slice_by_index(begin = query_61_begin_0, end = query_61_end_0, end_mask = query_61_end_mask_0, squeeze_mask = query_61_squeeze_mask_0, x = qkv_43_cast_fp16)[name = string("query_61_cast_fp16")];
tensor<int32, [5]> key_61_begin_0 = const()[name = string("key_61_begin_0"), val = tensor<int32, [5]>([1, 0, 0, 0, 0])];
tensor<int32, [5]> key_61_end_0 = const()[name = string("key_61_end_0"), val = tensor<int32, [5]>([2, 1, 4, 32, 64])];
tensor<bool, [5]> key_61_end_mask_0 = const()[name = string("key_61_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> key_61_squeeze_mask_0 = const()[name = string("key_61_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 32, 64]> key_61_cast_fp16 = slice_by_index(begin = key_61_begin_0, end = key_61_end_0, end_mask = key_61_end_mask_0, squeeze_mask = key_61_squeeze_mask_0, x = qkv_43_cast_fp16)[name = string("key_61_cast_fp16")];
tensor<int32, [5]> value_21_begin_0 = const()[name = string("value_21_begin_0"), val = tensor<int32, [5]>([2, 0, 0, 0, 0])];
tensor<int32, [5]> value_21_end_0 = const()[name = string("value_21_end_0"), val = tensor<int32, [5]>([3, 1, 4, 32, 64])];
tensor<bool, [5]> value_21_end_mask_0 = const()[name = string("value_21_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> value_21_squeeze_mask_0 = const()[name = string("value_21_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 32, 64]> value_21_cast_fp16 = slice_by_index(begin = value_21_begin_0, end = value_21_end_0, end_mask = value_21_end_mask_0, squeeze_mask = value_21_squeeze_mask_0, x = qkv_43_cast_fp16)[name = string("value_21_cast_fp16")];
tensor<int32, [5]> var_2738 = const()[name = string("op_2738"), val = tensor<int32, [5]>([1, 4, 32, 32, 2])];
tensor<fp16, [1, 4, 32, 32, 2]> query_pairs_21_cast_fp16 = reshape(shape = var_2738, x = query_61_cast_fp16)[name = string("query_pairs_21_cast_fp16")];
tensor<int32, [5]> var_2745 = const()[name = string("op_2745"), val = tensor<int32, [5]>([1, 4, 32, 32, 2])];
tensor<fp16, [1, 4, 32, 32, 2]> key_pairs_21_cast_fp16 = reshape(shape = var_2745, x = key_61_cast_fp16)[name = string("key_pairs_21_cast_fp16")];
tensor<int32, [5]> qr_21_begin_0 = const()[name = string("qr_21_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> qr_21_end_0 = const()[name = string("qr_21_end_0"), val = tensor<int32, [5]>([1, 4, 32, 32, 1])];
tensor<bool, [5]> qr_21_end_mask_0 = const()[name = string("qr_21_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qr_21_squeeze_mask_0 = const()[name = string("qr_21_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 32, 32]> qr_21_cast_fp16 = slice_by_index(begin = qr_21_begin_0, end = qr_21_end_0, end_mask = qr_21_end_mask_0, squeeze_mask = qr_21_squeeze_mask_0, x = query_pairs_21_cast_fp16)[name = string("qr_21_cast_fp16")];
tensor<int32, [5]> qi_21_begin_0 = const()[name = string("qi_21_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> qi_21_end_0 = const()[name = string("qi_21_end_0"), val = tensor<int32, [5]>([1, 4, 32, 32, 2])];
tensor<bool, [5]> qi_21_end_mask_0 = const()[name = string("qi_21_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qi_21_squeeze_mask_0 = const()[name = string("qi_21_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 32, 32]> qi_21_cast_fp16 = slice_by_index(begin = qi_21_begin_0, end = qi_21_end_0, end_mask = qi_21_end_mask_0, squeeze_mask = qi_21_squeeze_mask_0, x = query_pairs_21_cast_fp16)[name = string("qi_21_cast_fp16")];
tensor<int32, [5]> kr_21_begin_0 = const()[name = string("kr_21_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> kr_21_end_0 = const()[name = string("kr_21_end_0"), val = tensor<int32, [5]>([1, 4, 32, 32, 1])];
tensor<bool, [5]> kr_21_end_mask_0 = const()[name = string("kr_21_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> kr_21_squeeze_mask_0 = const()[name = string("kr_21_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 32, 32]> kr_21_cast_fp16 = slice_by_index(begin = kr_21_begin_0, end = kr_21_end_0, end_mask = kr_21_end_mask_0, squeeze_mask = kr_21_squeeze_mask_0, x = key_pairs_21_cast_fp16)[name = string("kr_21_cast_fp16")];
tensor<int32, [5]> ki_21_begin_0 = const()[name = string("ki_21_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> ki_21_end_0 = const()[name = string("ki_21_end_0"), val = tensor<int32, [5]>([1, 4, 32, 32, 2])];
tensor<bool, [5]> ki_21_end_mask_0 = const()[name = string("ki_21_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> ki_21_squeeze_mask_0 = const()[name = string("ki_21_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 32, 32]> ki_21_cast_fp16 = slice_by_index(begin = ki_21_begin_0, end = ki_21_end_0, end_mask = ki_21_end_mask_0, squeeze_mask = ki_21_squeeze_mask_0, x = key_pairs_21_cast_fp16)[name = string("ki_21_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2759_cast_fp16 = mul(x = qr_21_cast_fp16, y = s3_cos)[name = string("op_2759_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2760_cast_fp16 = mul(x = qi_21_cast_fp16, y = s3_sin)[name = string("op_2760_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2762_cast_fp16 = sub(x = var_2759_cast_fp16, y = var_2760_cast_fp16)[name = string("op_2762_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2763_cast_fp16 = mul(x = qr_21_cast_fp16, y = s3_sin)[name = string("op_2763_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2764_cast_fp16 = mul(x = qi_21_cast_fp16, y = s3_cos)[name = string("op_2764_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2766_cast_fp16 = add(x = var_2763_cast_fp16, y = var_2764_cast_fp16)[name = string("op_2766_cast_fp16")];
int32 query_63_axis_0 = const()[name = string("query_63_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 32, 32, 2]> query_63_cast_fp16 = stack(axis = query_63_axis_0, values = (var_2762_cast_fp16, var_2766_cast_fp16))[name = string("query_63_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2770_cast_fp16 = mul(x = kr_21_cast_fp16, y = s3_cos)[name = string("op_2770_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2771_cast_fp16 = mul(x = ki_21_cast_fp16, y = s3_sin)[name = string("op_2771_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2773_cast_fp16 = sub(x = var_2770_cast_fp16, y = var_2771_cast_fp16)[name = string("op_2773_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2774_cast_fp16 = mul(x = kr_21_cast_fp16, y = s3_sin)[name = string("op_2774_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2775_cast_fp16 = mul(x = ki_21_cast_fp16, y = s3_cos)[name = string("op_2775_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2777_cast_fp16 = add(x = var_2774_cast_fp16, y = var_2775_cast_fp16)[name = string("op_2777_cast_fp16")];
int32 key_63_axis_0 = const()[name = string("key_63_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 32, 32, 2]> key_63_cast_fp16 = stack(axis = key_63_axis_0, values = (var_2773_cast_fp16, var_2777_cast_fp16))[name = string("key_63_cast_fp16")];
tensor<int32, [4]> var_2785 = const()[name = string("op_2785"), val = tensor<int32, [4]>([1, 4, 32, 64])];
tensor<fp16, [1, 4, 32, 64]> query_65_cast_fp16 = reshape(shape = var_2785, x = query_63_cast_fp16)[name = string("query_65_cast_fp16")];
tensor<int32, [4]> var_2791 = const()[name = string("op_2791"), val = tensor<int32, [4]>([1, 4, 32, 64])];
tensor<fp16, [1, 4, 32, 64]> key_65_cast_fp16 = reshape(shape = var_2791, x = key_63_cast_fp16)[name = string("key_65_cast_fp16")];
tensor<fp16, [1, 4, 1600, 64]> read_state_20 = read_state(input = s3_l2_k)[name = string("read_state_20")];
tensor<int32, [4]> var_2807_begin_0 = const()[name = string("op_2807_begin_0"), val = tensor<int32, [4]>([0, 0, 32, 0])];
tensor<int32, [4]> var_2807_end_0 = const()[name = string("op_2807_end_0"), val = tensor<int32, [4]>([1, 4, 1600, 64])];
tensor<bool, [4]> var_2807_end_mask_0 = const()[name = string("op_2807_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 1568, 64]> var_2807_cast_fp16 = slice_by_index(begin = var_2807_begin_0, end = var_2807_end_0, end_mask = var_2807_end_mask_0, x = read_state_20)[name = string("op_2807_cast_fp16")];
int32 var_2814 = const()[name = string("op_2814"), val = int32(2)];
bool new_key_21_interleave_0 = const()[name = string("new_key_21_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 1600, 64]> new_key_21_cast_fp16 = concat(axis = var_2814, interleave = new_key_21_interleave_0, values = (var_2807_cast_fp16, key_65_cast_fp16))[name = string("new_key_21_cast_fp16")];
tensor<fp16, [1, 4, 1600, 64]> read_state_21 = read_state(input = s3_l2_v)[name = string("read_state_21")];
tensor<int32, [4]> var_2830_begin_0 = const()[name = string("op_2830_begin_0"), val = tensor<int32, [4]>([0, 0, 32, 0])];
tensor<int32, [4]> var_2830_end_0 = const()[name = string("op_2830_end_0"), val = tensor<int32, [4]>([1, 4, 1600, 64])];
tensor<bool, [4]> var_2830_end_mask_0 = const()[name = string("op_2830_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 1568, 64]> var_2830_cast_fp16 = slice_by_index(begin = var_2830_begin_0, end = var_2830_end_0, end_mask = var_2830_end_mask_0, x = read_state_21)[name = string("op_2830_cast_fp16")];
int32 var_2837 = const()[name = string("op_2837"), val = int32(2)];
bool new_value_21_interleave_0 = const()[name = string("new_value_21_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 1600, 64]> new_value_21_cast_fp16 = concat(axis = var_2837, interleave = new_value_21_interleave_0, values = (var_2830_cast_fp16, value_21_cast_fp16))[name = string("new_value_21_cast_fp16")];
tensor<int32, [4]> concat_40 = const()[name = string("concat_40"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_41 = const()[name = string("concat_41"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s3_l2_k_internal_tensor_assign_1_stride_0 = const()[name = string("s3_l2_k_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s3_l2_k_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s3_l2_k_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s3_l2_k_internal_tensor_assign_1_end_mask_0 = const()[name = string("s3_l2_k_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s3_l2_k_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s3_l2_k_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 1600, 64]> s3_l2_k_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_40, begin_mask = s3_l2_k_internal_tensor_assign_1_begin_mask_0, end = concat_41, end_mask = s3_l2_k_internal_tensor_assign_1_end_mask_0, squeeze_mask = s3_l2_k_internal_tensor_assign_1_squeeze_mask_0, stride = s3_l2_k_internal_tensor_assign_1_stride_0, update = new_key_21_cast_fp16, x = read_state_20)[name = string("s3_l2_k_internal_tensor_assign_1_cast_fp16")];
write_state(data = s3_l2_k_internal_tensor_assign_1_cast_fp16, input = s3_l2_k)[name = string("coreml_update_state_44_write_state")];
tensor<int32, [4]> concat_42 = const()[name = string("concat_42"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_43 = const()[name = string("concat_43"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s3_l2_v_internal_tensor_assign_1_stride_0 = const()[name = string("s3_l2_v_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s3_l2_v_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s3_l2_v_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s3_l2_v_internal_tensor_assign_1_end_mask_0 = const()[name = string("s3_l2_v_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s3_l2_v_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s3_l2_v_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 1600, 64]> s3_l2_v_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_42, begin_mask = s3_l2_v_internal_tensor_assign_1_begin_mask_0, end = concat_43, end_mask = s3_l2_v_internal_tensor_assign_1_end_mask_0, squeeze_mask = s3_l2_v_internal_tensor_assign_1_squeeze_mask_0, stride = s3_l2_v_internal_tensor_assign_1_stride_0, update = new_value_21_cast_fp16, x = read_state_21)[name = string("s3_l2_v_internal_tensor_assign_1_cast_fp16")];
write_state(data = s3_l2_v_internal_tensor_assign_1_cast_fp16, input = s3_l2_v)[name = string("coreml_update_state_45_write_state")];
bool var_2856_transpose_x_1 = const()[name = string("op_2856_transpose_x_1"), val = bool(false)];
bool var_2856_transpose_y_1 = const()[name = string("op_2856_transpose_y_1"), val = bool(true)];
tensor<fp16, [1, 4, 32, 1600]> var_2856_cast_fp16 = matmul(transpose_x = var_2856_transpose_x_1, transpose_y = var_2856_transpose_y_1, x = query_65_cast_fp16, y = new_key_21_cast_fp16)[name = string("op_2856_cast_fp16")];
fp16 var_2857_to_fp16 = const()[name = string("op_2857_to_fp16"), val = fp16(0x1p-3)];
tensor<fp16, [1, 4, 32, 1600]> scores_21_cast_fp16 = mul(x = var_2856_cast_fp16, y = var_2857_to_fp16)[name = string("scores_21_cast_fp16")];
tensor<fp16, [1, 4, 32, 1600]> var_2860_cast_fp16 = add(x = scores_21_cast_fp16, y = s3_mask)[name = string("op_2860_cast_fp16")];
int32 var_2861 = const()[name = string("op_2861"), val = int32(-1)];
tensor<fp16, [1, 4, 32, 1600]> probabilities_21_cast_fp16 = softmax(axis = var_2861, x = var_2860_cast_fp16)[name = string("probabilities_21_cast_fp16")];
bool attention_21_transpose_x_0 = const()[name = string("attention_21_transpose_x_0"), val = bool(false)];
bool attention_21_transpose_y_0 = const()[name = string("attention_21_transpose_y_0"), val = bool(false)];
tensor<fp16, [1, 4, 32, 64]> attention_21_cast_fp16 = matmul(transpose_x = attention_21_transpose_x_0, transpose_y = attention_21_transpose_y_0, x = probabilities_21_cast_fp16, y = new_value_21_cast_fp16)[name = string("attention_21_cast_fp16")];
tensor<int32, [4]> var_2867_perm_0 = const()[name = string("op_2867_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
tensor<int32, [3]> var_2871 = const()[name = string("op_2871"), val = tensor<int32, [3]>([1, 32, 256])];
tensor<fp16, [1, 32, 4, 64]> var_2867_cast_fp16 = transpose(perm = var_2867_perm_0, x = attention_21_cast_fp16)[name = string("transpose_5")];
tensor<fp16, [1, 32, 256]> input_159_cast_fp16 = reshape(shape = var_2871, x = var_2867_cast_fp16)[name = string("input_159_cast_fp16")];
tensor<fp16, [256, 256]> stages_3_transformer_layers_2_self_attn_out_proj_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_2_self_attn_out_proj_weight_to_fp16"), val = tensor<fp16, [256, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(18032768)))];
tensor<fp16, [1, 32, 256]> linear_48_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_3_transformer_layers_2_self_attn_out_proj_weight_to_fp16, x = input_159_cast_fp16)[name = string("linear_48_cast_fp16")];
tensor<fp16, [256]> stages_3_transformer_layers_2_layer_scale_1_scale_to_fp16 = const()[name = string("stages_3_transformer_layers_2_layer_scale_1_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(18163904)))];
tensor<fp16, [1, 32, 256]> var_2877_cast_fp16 = mul(x = stages_3_transformer_layers_2_layer_scale_1_scale_to_fp16, y = linear_48_cast_fp16)[name = string("op_2877_cast_fp16")];
tensor<fp16, [1, 32, 256]> input_161_cast_fp16 = add(x = input_155_cast_fp16, y = var_2877_cast_fp16)[name = string("input_161_cast_fp16")];
tensor<int32, [1]> input_163_axes_0 = const()[name = string("input_163_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_3_transformer_layers_2_norm2_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_2_norm2_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(18164480)))];
tensor<fp16, [256]> stages_3_transformer_layers_2_norm2_bias_to_fp16 = const()[name = string("stages_3_transformer_layers_2_norm2_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(18165056)))];
fp16 var_2881_to_fp16 = const()[name = string("op_2881_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 32, 256]> input_163_cast_fp16 = layer_norm(axes = input_163_axes_0, beta = stages_3_transformer_layers_2_norm2_bias_to_fp16, epsilon = var_2881_to_fp16, gamma = stages_3_transformer_layers_2_norm2_weight_to_fp16, x = input_161_cast_fp16)[name = string("input_163_cast_fp16")];
tensor<fp16, [1024, 256]> stages_3_transformer_layers_2_ffn_0_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_2_ffn_0_weight_to_fp16"), val = tensor<fp16, [1024, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(18165632)))];
tensor<fp16, [1, 32, 1024]> linear_49_cast_fp16 = linear(bias = linear_3_bias_0_to_fp16, weight = stages_3_transformer_layers_2_ffn_0_weight_to_fp16, x = input_163_cast_fp16)[name = string("linear_49_cast_fp16")];
string input_167_mode_0 = const()[name = string("input_167_mode_0"), val = string("EXACT")];
tensor<fp16, [1, 32, 1024]> input_167_cast_fp16 = gelu(mode = input_167_mode_0, x = linear_49_cast_fp16)[name = string("input_167_cast_fp16")];
tensor<fp16, [256, 1024]> stages_3_transformer_layers_2_ffn_2_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_2_ffn_2_weight_to_fp16"), val = tensor<fp16, [256, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(18689984)))];
tensor<fp16, [1, 32, 256]> linear_50_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_3_transformer_layers_2_ffn_2_weight_to_fp16, x = input_167_cast_fp16)[name = string("linear_50_cast_fp16")];
tensor<fp16, [256]> stages_3_transformer_layers_2_layer_scale_2_scale_to_fp16 = const()[name = string("stages_3_transformer_layers_2_layer_scale_2_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(19214336)))];
tensor<fp16, [1, 32, 256]> var_2897_cast_fp16 = mul(x = stages_3_transformer_layers_2_layer_scale_2_scale_to_fp16, y = linear_50_cast_fp16)[name = string("op_2897_cast_fp16")];
tensor<fp16, [1, 32, 256]> input_169_cast_fp16 = add(x = input_161_cast_fp16, y = var_2897_cast_fp16)[name = string("input_169_cast_fp16")];
tensor<int32, [1]> input_171_axes_0 = const()[name = string("input_171_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_3_transformer_layers_3_norm1_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_3_norm1_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(19214912)))];
tensor<fp16, [256]> stages_3_transformer_layers_3_norm1_bias_to_fp16 = const()[name = string("stages_3_transformer_layers_3_norm1_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(19215488)))];
fp16 var_2901_to_fp16 = const()[name = string("op_2901_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 32, 256]> input_171_cast_fp16 = layer_norm(axes = input_171_axes_0, beta = stages_3_transformer_layers_3_norm1_bias_to_fp16, epsilon = var_2901_to_fp16, gamma = stages_3_transformer_layers_3_norm1_weight_to_fp16, x = input_169_cast_fp16)[name = string("input_171_cast_fp16")];
tensor<fp16, [768, 256]> stages_3_transformer_layers_3_self_attn_in_proj_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_3_self_attn_in_proj_weight_to_fp16"), val = tensor<fp16, [768, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(19216064)))];
tensor<fp16, [1, 32, 768]> linear_51_cast_fp16 = linear(bias = linear_1_bias_0_to_fp16, weight = stages_3_transformer_layers_3_self_attn_in_proj_weight_to_fp16, x = input_171_cast_fp16)[name = string("linear_51_cast_fp16")];
tensor<int32, [5]> var_2915 = const()[name = string("op_2915"), val = tensor<int32, [5]>([1, 32, 3, 4, 64])];
tensor<fp16, [1, 32, 3, 4, 64]> var_2916_cast_fp16 = reshape(shape = var_2915, x = linear_51_cast_fp16)[name = string("op_2916_cast_fp16")];
tensor<int32, [5]> var_2922 = const()[name = string("op_2922"), val = tensor<int32, [5]>([2, 0, 3, 1, 4])];
tensor<int32, [5]> query_67_begin_0 = const()[name = string("query_67_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> query_67_end_0 = const()[name = string("query_67_end_0"), val = tensor<int32, [5]>([1, 1, 4, 32, 64])];
tensor<bool, [5]> query_67_end_mask_0 = const()[name = string("query_67_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> query_67_squeeze_mask_0 = const()[name = string("query_67_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [3, 1, 4, 32, 64]> qkv_cast_fp16 = transpose(perm = var_2922, x = var_2916_cast_fp16)[name = string("transpose_4")];
tensor<fp16, [1, 4, 32, 64]> query_67_cast_fp16 = slice_by_index(begin = query_67_begin_0, end = query_67_end_0, end_mask = query_67_end_mask_0, squeeze_mask = query_67_squeeze_mask_0, x = qkv_cast_fp16)[name = string("query_67_cast_fp16")];
tensor<int32, [5]> key_67_begin_0 = const()[name = string("key_67_begin_0"), val = tensor<int32, [5]>([1, 0, 0, 0, 0])];
tensor<int32, [5]> key_67_end_0 = const()[name = string("key_67_end_0"), val = tensor<int32, [5]>([2, 1, 4, 32, 64])];
tensor<bool, [5]> key_67_end_mask_0 = const()[name = string("key_67_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> key_67_squeeze_mask_0 = const()[name = string("key_67_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 32, 64]> key_67_cast_fp16 = slice_by_index(begin = key_67_begin_0, end = key_67_end_0, end_mask = key_67_end_mask_0, squeeze_mask = key_67_squeeze_mask_0, x = qkv_cast_fp16)[name = string("key_67_cast_fp16")];
tensor<int32, [5]> value_begin_0 = const()[name = string("value_begin_0"), val = tensor<int32, [5]>([2, 0, 0, 0, 0])];
tensor<int32, [5]> value_end_0 = const()[name = string("value_end_0"), val = tensor<int32, [5]>([3, 1, 4, 32, 64])];
tensor<bool, [5]> value_end_mask_0 = const()[name = string("value_end_mask_0"), val = tensor<bool, [5]>([false, true, true, true, true])];
tensor<bool, [5]> value_squeeze_mask_0 = const()[name = string("value_squeeze_mask_0"), val = tensor<bool, [5]>([true, false, false, false, false])];
tensor<fp16, [1, 4, 32, 64]> value_cast_fp16 = slice_by_index(begin = value_begin_0, end = value_end_0, end_mask = value_end_mask_0, squeeze_mask = value_squeeze_mask_0, x = qkv_cast_fp16)[name = string("value_cast_fp16")];
tensor<int32, [5]> var_2938 = const()[name = string("op_2938"), val = tensor<int32, [5]>([1, 4, 32, 32, 2])];
tensor<fp16, [1, 4, 32, 32, 2]> query_pairs_cast_fp16 = reshape(shape = var_2938, x = query_67_cast_fp16)[name = string("query_pairs_cast_fp16")];
tensor<int32, [5]> var_2945 = const()[name = string("op_2945"), val = tensor<int32, [5]>([1, 4, 32, 32, 2])];
tensor<fp16, [1, 4, 32, 32, 2]> key_pairs_cast_fp16 = reshape(shape = var_2945, x = key_67_cast_fp16)[name = string("key_pairs_cast_fp16")];
tensor<int32, [5]> qr_begin_0 = const()[name = string("qr_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> qr_end_0 = const()[name = string("qr_end_0"), val = tensor<int32, [5]>([1, 4, 32, 32, 1])];
tensor<bool, [5]> qr_end_mask_0 = const()[name = string("qr_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qr_squeeze_mask_0 = const()[name = string("qr_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 32, 32]> qr_cast_fp16 = slice_by_index(begin = qr_begin_0, end = qr_end_0, end_mask = qr_end_mask_0, squeeze_mask = qr_squeeze_mask_0, x = query_pairs_cast_fp16)[name = string("qr_cast_fp16")];
tensor<int32, [5]> qi_begin_0 = const()[name = string("qi_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> qi_end_0 = const()[name = string("qi_end_0"), val = tensor<int32, [5]>([1, 4, 32, 32, 2])];
tensor<bool, [5]> qi_end_mask_0 = const()[name = string("qi_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> qi_squeeze_mask_0 = const()[name = string("qi_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 32, 32]> qi_cast_fp16 = slice_by_index(begin = qi_begin_0, end = qi_end_0, end_mask = qi_end_mask_0, squeeze_mask = qi_squeeze_mask_0, x = query_pairs_cast_fp16)[name = string("qi_cast_fp16")];
tensor<int32, [5]> kr_begin_0 = const()[name = string("kr_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 0])];
tensor<int32, [5]> kr_end_0 = const()[name = string("kr_end_0"), val = tensor<int32, [5]>([1, 4, 32, 32, 1])];
tensor<bool, [5]> kr_end_mask_0 = const()[name = string("kr_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> kr_squeeze_mask_0 = const()[name = string("kr_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 32, 32]> kr_cast_fp16 = slice_by_index(begin = kr_begin_0, end = kr_end_0, end_mask = kr_end_mask_0, squeeze_mask = kr_squeeze_mask_0, x = key_pairs_cast_fp16)[name = string("kr_cast_fp16")];
tensor<int32, [5]> ki_begin_0 = const()[name = string("ki_begin_0"), val = tensor<int32, [5]>([0, 0, 0, 0, 1])];
tensor<int32, [5]> ki_end_0 = const()[name = string("ki_end_0"), val = tensor<int32, [5]>([1, 4, 32, 32, 2])];
tensor<bool, [5]> ki_end_mask_0 = const()[name = string("ki_end_mask_0"), val = tensor<bool, [5]>([true, true, true, true, false])];
tensor<bool, [5]> ki_squeeze_mask_0 = const()[name = string("ki_squeeze_mask_0"), val = tensor<bool, [5]>([false, false, false, false, true])];
tensor<fp16, [1, 4, 32, 32]> ki_cast_fp16 = slice_by_index(begin = ki_begin_0, end = ki_end_0, end_mask = ki_end_mask_0, squeeze_mask = ki_squeeze_mask_0, x = key_pairs_cast_fp16)[name = string("ki_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2959_cast_fp16 = mul(x = qr_cast_fp16, y = s3_cos)[name = string("op_2959_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2960_cast_fp16 = mul(x = qi_cast_fp16, y = s3_sin)[name = string("op_2960_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2962_cast_fp16 = sub(x = var_2959_cast_fp16, y = var_2960_cast_fp16)[name = string("op_2962_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2963_cast_fp16 = mul(x = qr_cast_fp16, y = s3_sin)[name = string("op_2963_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2964_cast_fp16 = mul(x = qi_cast_fp16, y = s3_cos)[name = string("op_2964_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2966_cast_fp16 = add(x = var_2963_cast_fp16, y = var_2964_cast_fp16)[name = string("op_2966_cast_fp16")];
int32 query_69_axis_0 = const()[name = string("query_69_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 32, 32, 2]> query_69_cast_fp16 = stack(axis = query_69_axis_0, values = (var_2962_cast_fp16, var_2966_cast_fp16))[name = string("query_69_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2970_cast_fp16 = mul(x = kr_cast_fp16, y = s3_cos)[name = string("op_2970_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2971_cast_fp16 = mul(x = ki_cast_fp16, y = s3_sin)[name = string("op_2971_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2973_cast_fp16 = sub(x = var_2970_cast_fp16, y = var_2971_cast_fp16)[name = string("op_2973_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2974_cast_fp16 = mul(x = kr_cast_fp16, y = s3_sin)[name = string("op_2974_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2975_cast_fp16 = mul(x = ki_cast_fp16, y = s3_cos)[name = string("op_2975_cast_fp16")];
tensor<fp16, [1, 4, 32, 32]> var_2977_cast_fp16 = add(x = var_2974_cast_fp16, y = var_2975_cast_fp16)[name = string("op_2977_cast_fp16")];
int32 key_69_axis_0 = const()[name = string("key_69_axis_0"), val = int32(-1)];
tensor<fp16, [1, 4, 32, 32, 2]> key_69_cast_fp16 = stack(axis = key_69_axis_0, values = (var_2973_cast_fp16, var_2977_cast_fp16))[name = string("key_69_cast_fp16")];
tensor<int32, [4]> var_2985 = const()[name = string("op_2985"), val = tensor<int32, [4]>([1, 4, 32, 64])];
tensor<fp16, [1, 4, 32, 64]> query_cast_fp16 = reshape(shape = var_2985, x = query_69_cast_fp16)[name = string("query_cast_fp16")];
tensor<int32, [4]> var_2991 = const()[name = string("op_2991"), val = tensor<int32, [4]>([1, 4, 32, 64])];
tensor<fp16, [1, 4, 32, 64]> key_cast_fp16 = reshape(shape = var_2991, x = key_69_cast_fp16)[name = string("key_cast_fp16")];
tensor<fp16, [1, 4, 1600, 64]> read_state_22 = read_state(input = s3_l3_k)[name = string("read_state_22")];
tensor<int32, [4]> var_3007_begin_0 = const()[name = string("op_3007_begin_0"), val = tensor<int32, [4]>([0, 0, 32, 0])];
tensor<int32, [4]> var_3007_end_0 = const()[name = string("op_3007_end_0"), val = tensor<int32, [4]>([1, 4, 1600, 64])];
tensor<bool, [4]> var_3007_end_mask_0 = const()[name = string("op_3007_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 1568, 64]> var_3007_cast_fp16 = slice_by_index(begin = var_3007_begin_0, end = var_3007_end_0, end_mask = var_3007_end_mask_0, x = read_state_22)[name = string("op_3007_cast_fp16")];
int32 var_3014 = const()[name = string("op_3014"), val = int32(2)];
bool new_key_interleave_0 = const()[name = string("new_key_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 1600, 64]> new_key_cast_fp16 = concat(axis = var_3014, interleave = new_key_interleave_0, values = (var_3007_cast_fp16, key_cast_fp16))[name = string("new_key_cast_fp16")];
tensor<fp16, [1, 4, 1600, 64]> read_state_23 = read_state(input = s3_l3_v)[name = string("read_state_23")];
tensor<int32, [4]> var_3030_begin_0 = const()[name = string("op_3030_begin_0"), val = tensor<int32, [4]>([0, 0, 32, 0])];
tensor<int32, [4]> var_3030_end_0 = const()[name = string("op_3030_end_0"), val = tensor<int32, [4]>([1, 4, 1600, 64])];
tensor<bool, [4]> var_3030_end_mask_0 = const()[name = string("op_3030_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<fp16, [1, 4, 1568, 64]> var_3030_cast_fp16 = slice_by_index(begin = var_3030_begin_0, end = var_3030_end_0, end_mask = var_3030_end_mask_0, x = read_state_23)[name = string("op_3030_cast_fp16")];
int32 var_3037 = const()[name = string("op_3037"), val = int32(2)];
bool new_value_interleave_0 = const()[name = string("new_value_interleave_0"), val = bool(false)];
tensor<fp16, [1, 4, 1600, 64]> new_value_cast_fp16 = concat(axis = var_3037, interleave = new_value_interleave_0, values = (var_3030_cast_fp16, value_cast_fp16))[name = string("new_value_cast_fp16")];
tensor<int32, [4]> concat_44 = const()[name = string("concat_44"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_45 = const()[name = string("concat_45"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s3_l3_k_internal_tensor_assign_1_stride_0 = const()[name = string("s3_l3_k_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s3_l3_k_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s3_l3_k_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s3_l3_k_internal_tensor_assign_1_end_mask_0 = const()[name = string("s3_l3_k_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s3_l3_k_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s3_l3_k_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 1600, 64]> s3_l3_k_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_44, begin_mask = s3_l3_k_internal_tensor_assign_1_begin_mask_0, end = concat_45, end_mask = s3_l3_k_internal_tensor_assign_1_end_mask_0, squeeze_mask = s3_l3_k_internal_tensor_assign_1_squeeze_mask_0, stride = s3_l3_k_internal_tensor_assign_1_stride_0, update = new_key_cast_fp16, x = read_state_22)[name = string("s3_l3_k_internal_tensor_assign_1_cast_fp16")];
write_state(data = s3_l3_k_internal_tensor_assign_1_cast_fp16, input = s3_l3_k)[name = string("coreml_update_state_46_write_state")];
tensor<int32, [4]> concat_46 = const()[name = string("concat_46"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> concat_47 = const()[name = string("concat_47"), val = tensor<int32, [4]>([0, 0, 0, 0])];
tensor<int32, [4]> s3_l3_v_internal_tensor_assign_1_stride_0 = const()[name = string("s3_l3_v_internal_tensor_assign_1_stride_0"), val = tensor<int32, [4]>([1, 1, 1, 1])];
tensor<bool, [4]> s3_l3_v_internal_tensor_assign_1_begin_mask_0 = const()[name = string("s3_l3_v_internal_tensor_assign_1_begin_mask_0"), val = tensor<bool, [4]>([false, true, true, true])];
tensor<bool, [4]> s3_l3_v_internal_tensor_assign_1_end_mask_0 = const()[name = string("s3_l3_v_internal_tensor_assign_1_end_mask_0"), val = tensor<bool, [4]>([true, true, true, true])];
tensor<bool, [4]> s3_l3_v_internal_tensor_assign_1_squeeze_mask_0 = const()[name = string("s3_l3_v_internal_tensor_assign_1_squeeze_mask_0"), val = tensor<bool, [4]>([false, false, false, false])];
tensor<fp16, [1, 4, 1600, 64]> s3_l3_v_internal_tensor_assign_1_cast_fp16 = slice_update(begin = concat_46, begin_mask = s3_l3_v_internal_tensor_assign_1_begin_mask_0, end = concat_47, end_mask = s3_l3_v_internal_tensor_assign_1_end_mask_0, squeeze_mask = s3_l3_v_internal_tensor_assign_1_squeeze_mask_0, stride = s3_l3_v_internal_tensor_assign_1_stride_0, update = new_value_cast_fp16, x = read_state_23)[name = string("s3_l3_v_internal_tensor_assign_1_cast_fp16")];
write_state(data = s3_l3_v_internal_tensor_assign_1_cast_fp16, input = s3_l3_v)[name = string("coreml_update_state_47_write_state")];
bool var_3056_transpose_x_1 = const()[name = string("op_3056_transpose_x_1"), val = bool(false)];
bool var_3056_transpose_y_1 = const()[name = string("op_3056_transpose_y_1"), val = bool(true)];
tensor<fp16, [1, 4, 32, 1600]> var_3056_cast_fp16 = matmul(transpose_x = var_3056_transpose_x_1, transpose_y = var_3056_transpose_y_1, x = query_cast_fp16, y = new_key_cast_fp16)[name = string("op_3056_cast_fp16")];
fp16 var_3057_to_fp16 = const()[name = string("op_3057_to_fp16"), val = fp16(0x1p-3)];
tensor<fp16, [1, 4, 32, 1600]> scores_cast_fp16 = mul(x = var_3056_cast_fp16, y = var_3057_to_fp16)[name = string("scores_cast_fp16")];
tensor<fp16, [1, 4, 32, 1600]> var_3060_cast_fp16 = add(x = scores_cast_fp16, y = s3_mask)[name = string("op_3060_cast_fp16")];
int32 var_3061 = const()[name = string("op_3061"), val = int32(-1)];
tensor<fp16, [1, 4, 32, 1600]> probabilities_cast_fp16 = softmax(axis = var_3061, x = var_3060_cast_fp16)[name = string("probabilities_cast_fp16")];
bool attention_transpose_x_0 = const()[name = string("attention_transpose_x_0"), val = bool(false)];
bool attention_transpose_y_0 = const()[name = string("attention_transpose_y_0"), val = bool(false)];
tensor<fp16, [1, 4, 32, 64]> attention_cast_fp16 = matmul(transpose_x = attention_transpose_x_0, transpose_y = attention_transpose_y_0, x = probabilities_cast_fp16, y = new_value_cast_fp16)[name = string("attention_cast_fp16")];
tensor<int32, [4]> var_3067_perm_0 = const()[name = string("op_3067_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
tensor<int32, [3]> var_3071 = const()[name = string("op_3071"), val = tensor<int32, [3]>([1, 32, 256])];
tensor<fp16, [1, 32, 4, 64]> var_3067_cast_fp16 = transpose(perm = var_3067_perm_0, x = attention_cast_fp16)[name = string("transpose_3")];
tensor<fp16, [1, 32, 256]> input_173_cast_fp16 = reshape(shape = var_3071, x = var_3067_cast_fp16)[name = string("input_173_cast_fp16")];
tensor<fp16, [256, 256]> stages_3_transformer_layers_3_self_attn_out_proj_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_3_self_attn_out_proj_weight_to_fp16"), val = tensor<fp16, [256, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(19609344)))];
tensor<fp16, [1, 32, 256]> linear_52_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_3_transformer_layers_3_self_attn_out_proj_weight_to_fp16, x = input_173_cast_fp16)[name = string("linear_52_cast_fp16")];
tensor<fp16, [256]> stages_3_transformer_layers_3_layer_scale_1_scale_to_fp16 = const()[name = string("stages_3_transformer_layers_3_layer_scale_1_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(19740480)))];
tensor<fp16, [1, 32, 256]> var_3077_cast_fp16 = mul(x = stages_3_transformer_layers_3_layer_scale_1_scale_to_fp16, y = linear_52_cast_fp16)[name = string("op_3077_cast_fp16")];
tensor<fp16, [1, 32, 256]> input_175_cast_fp16 = add(x = input_169_cast_fp16, y = var_3077_cast_fp16)[name = string("input_175_cast_fp16")];
tensor<int32, [1]> input_177_axes_0 = const()[name = string("input_177_axes_0"), val = tensor<int32, [1]>([-1])];
tensor<fp16, [256]> stages_3_transformer_layers_3_norm2_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_3_norm2_weight_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(19741056)))];
tensor<fp16, [256]> stages_3_transformer_layers_3_norm2_bias_to_fp16 = const()[name = string("stages_3_transformer_layers_3_norm2_bias_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(19741632)))];
fp16 var_3081_to_fp16 = const()[name = string("op_3081_to_fp16"), val = fp16(0x1.5p-17)];
tensor<fp16, [1, 32, 256]> input_177_cast_fp16 = layer_norm(axes = input_177_axes_0, beta = stages_3_transformer_layers_3_norm2_bias_to_fp16, epsilon = var_3081_to_fp16, gamma = stages_3_transformer_layers_3_norm2_weight_to_fp16, x = input_175_cast_fp16)[name = string("input_177_cast_fp16")];
tensor<fp16, [1024, 256]> stages_3_transformer_layers_3_ffn_0_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_3_ffn_0_weight_to_fp16"), val = tensor<fp16, [1024, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(19742208)))];
tensor<fp16, [1, 32, 1024]> linear_53_cast_fp16 = linear(bias = linear_3_bias_0_to_fp16, weight = stages_3_transformer_layers_3_ffn_0_weight_to_fp16, x = input_177_cast_fp16)[name = string("linear_53_cast_fp16")];
string input_181_mode_0 = const()[name = string("input_181_mode_0"), val = string("EXACT")];
tensor<fp16, [1, 32, 1024]> input_181_cast_fp16 = gelu(mode = input_181_mode_0, x = linear_53_cast_fp16)[name = string("input_181_cast_fp16")];
tensor<fp16, [256, 1024]> stages_3_transformer_layers_3_ffn_2_weight_to_fp16 = const()[name = string("stages_3_transformer_layers_3_ffn_2_weight_to_fp16"), val = tensor<fp16, [256, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(20266560)))];
tensor<fp16, [1, 32, 256]> linear_54_cast_fp16 = linear(bias = linear_0_bias_0_to_fp16, weight = stages_3_transformer_layers_3_ffn_2_weight_to_fp16, x = input_181_cast_fp16)[name = string("linear_54_cast_fp16")];
tensor<fp16, [256]> stages_3_transformer_layers_3_layer_scale_2_scale_to_fp16 = const()[name = string("stages_3_transformer_layers_3_layer_scale_2_scale_to_fp16"), val = tensor<fp16, [256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(20790912)))];
tensor<fp16, [1, 32, 256]> var_3097_cast_fp16 = mul(x = stages_3_transformer_layers_3_layer_scale_2_scale_to_fp16, y = linear_54_cast_fp16)[name = string("op_3097_cast_fp16")];
tensor<fp16, [1, 32, 256]> input_cast_fp16 = add(x = input_175_cast_fp16, y = var_3097_cast_fp16)[name = string("input_cast_fp16")];
tensor<fp16, [240, 256]> stages_3_output_proj_weight_to_fp16 = const()[name = string("stages_3_output_proj_weight_to_fp16"), val = tensor<fp16, [240, 256]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(20791488)))];
tensor<fp16, [240]> linear_55_bias_0_to_fp16 = const()[name = string("linear_55_bias_0_to_fp16"), val = tensor<fp16, [240]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(20914432)))];
tensor<fp16, [1, 32, 240]> linear_55_cast_fp16 = linear(bias = linear_55_bias_0_to_fp16, weight = stages_3_output_proj_weight_to_fp16, x = input_cast_fp16)[name = string("linear_55_cast_fp16")];
tensor<int32, [3]> x_63_perm_0 = const()[name = string("x_63_perm_0"), val = tensor<int32, [3]>([0, 2, 1])];
tensor<int32, [4]> var_3110 = const()[name = string("op_3110"), val = tensor<int32, [4]>([1, 1, 240, 32])];
tensor<fp16, [1, 240, 32]> x_63_cast_fp16 = transpose(perm = x_63_perm_0, x = linear_55_cast_fp16)[name = string("transpose_2")];
tensor<fp16, [1, 1, 240, 32]> var_3111_cast_fp16 = reshape(shape = var_3110, x = x_63_cast_fp16)[name = string("op_3111_cast_fp16")];
tensor<int32, [4]> var_3116 = const()[name = string("op_3116"), val = tensor<int32, [4]>([0, 1, 3, 2])];
tensor<int32, [3]> var_3126 = const()[name = string("op_3126"), val = tensor<int32, [3]>([1, 3840, 2])];
tensor<fp16, [1, 1, 32, 240]> var_3117_cast_fp16 = transpose(perm = var_3116, x = var_3111_cast_fp16)[name = string("transpose_1")];
tensor<fp16, [1, 3840, 2]> var_3127_cast_fp16 = reshape(shape = var_3126, x = var_3117_cast_fp16)[name = string("op_3127_cast_fp16")];
tensor<int32, [3]> var_3130_perm_0 = const()[name = string("op_3130_perm_0"), val = tensor<int32, [3]>([0, 2, 1])];
tensor<fp16, [1, 2, 3840]> audio = transpose(perm = var_3130_perm_0, x = var_3127_cast_fp16)[name = string("transpose_0")];
} -> (audio);
} |