File size: 103,564 Bytes
2ffb90d |
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 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 |
1
00:00:01,319 --> 00:00:07,560
um today I want to talk about prompting
2
00:00:03,919 --> 00:00:09,639
and uh prompting is kind of a new uh
3
00:00:07,560 --> 00:00:11,320
Paradigm as of a few years ago with
4
00:00:09,639 --> 00:00:15,120
interacting with models it's now kind of
5
00:00:11,320 --> 00:00:16,880
the standard uh in doing so and
6
00:00:15,120 --> 00:00:19,880
basically what we do is we encourage a
7
00:00:16,880 --> 00:00:21,840
pre-trained model to make predictions by
8
00:00:19,880 --> 00:00:24,039
providing a textual prompt specifying
9
00:00:21,840 --> 00:00:25,960
the task to be done this is how you
10
00:00:24,039 --> 00:00:28,960
always interact with chat GPT or
11
00:00:25,960 --> 00:00:33,200
anything else like this
12
00:00:28,960 --> 00:00:36,200
um so prompting fundamentals uh the way
13
00:00:33,200 --> 00:00:38,360
that basic prompting works is you append
14
00:00:36,200 --> 00:00:42,079
a textual string to the beginning of the
15
00:00:38,360 --> 00:00:44,079
output and you complete it and exactly
16
00:00:42,079 --> 00:00:45,800
how you complete it can be based on any
17
00:00:44,079 --> 00:00:48,800
of the generation methods that we talked
18
00:00:45,800 --> 00:00:51,559
about in the previous class uh you know
19
00:00:48,800 --> 00:00:55,160
beam search it can be uh sampling it can
20
00:00:51,559 --> 00:00:58,480
be MBR or self-consistency or whatever
21
00:00:55,160 --> 00:01:00,960
else um so I I put in when a dog sees a
22
00:00:58,480 --> 00:01:03,680
squirrel it will usually
23
00:01:00,960 --> 00:01:06,280
um into gpt2 small which is a very small
24
00:01:03,680 --> 00:01:08,960
language model says Be Afraid of
25
00:01:06,280 --> 00:01:10,560
Anything unusual as an exception that's
26
00:01:08,960 --> 00:01:13,720
when a squirrel is usually afraid to
27
00:01:10,560 --> 00:01:16,280
bitee um so as you can see if the model
28
00:01:13,720 --> 00:01:19,560
is not super great you get a kind of not
29
00:01:16,280 --> 00:01:24,119
very great response also um but then I
30
00:01:19,560 --> 00:01:25,960
CED it into gp2 XL and uh what it says
31
00:01:24,119 --> 00:01:28,159
when a dog sees a squirrel it will
32
00:01:25,960 --> 00:01:30,640
usually lick the squirrel it will also
33
00:01:28,159 --> 00:01:34,000
touch its nose to the squirrel the tail
34
00:01:30,640 --> 00:01:37,880
and nose if it can um which might be
35
00:01:34,000 --> 00:01:40,280
true um one thing I I should note is
36
00:01:37,880 --> 00:01:43,040
when I generated these I used uh like
37
00:01:40,280 --> 00:01:45,200
actual regular ancestral sampling so I
38
00:01:43,040 --> 00:01:47,159
set the temperature to one I didn't do
39
00:01:45,200 --> 00:01:49,600
top feed didn't do top K or anything
40
00:01:47,159 --> 00:01:51,040
like this so this is a raw view of what
41
00:01:49,600 --> 00:01:53,799
the language model thinks is like
42
00:01:51,040 --> 00:01:58,479
actually a reasonable answer um if I
43
00:01:53,799 --> 00:02:00,159
modified the code to do something else
44
00:01:58,479 --> 00:02:02,560
actually maybe I can I can do that that
45
00:02:00,159 --> 00:02:04,960
right now but if I modified the code to
46
00:02:02,560 --> 00:02:08,879
use a
47
00:02:04,960 --> 00:02:12,119
different output we can actually see uh
48
00:02:08,879 --> 00:02:12,119
the different result that we
49
00:02:13,599 --> 00:02:17,959
get since I I have it here
50
00:02:18,360 --> 00:02:23,879
anyway actually sorry I'll need to
51
00:02:20,360 --> 00:02:27,239
modify the code on my my screen here
52
00:02:23,879 --> 00:02:32,120
um so I will
53
00:02:27,239 --> 00:02:35,040
set uh top K to 50 top P to
54
00:02:32,120 --> 00:02:38,360
0.95 so you see I I changed the
55
00:02:35,040 --> 00:02:38,360
generation parameters
56
00:02:38,760 --> 00:02:46,400
here and I'll uh run all of
57
00:02:43,159 --> 00:02:50,319
them you can see the uh the result that
58
00:02:46,400 --> 00:02:51,840
we get in a little bit but basically um
59
00:02:50,319 --> 00:02:54,800
so this is the standard method for
60
00:02:51,840 --> 00:02:57,319
prompting I intentionally use gpt2 small
61
00:02:54,800 --> 00:02:58,800
and gpt2 XL here because these are raw
62
00:02:57,319 --> 00:03:01,879
based language models they were just
63
00:02:58,800 --> 00:03:05,440
pre-trained as language models and so
64
00:03:01,879 --> 00:03:06,920
when we prompt them we're getting a
65
00:03:05,440 --> 00:03:09,200
language model that was just trained on
66
00:03:06,920 --> 00:03:12,280
lots of texts view of what is likely
67
00:03:09,200 --> 00:03:13,760
next text um there are other ways to
68
00:03:12,280 --> 00:03:15,599
train language models like instruction
69
00:03:13,760 --> 00:03:18,040
tuning and rlf which I'm going to be
70
00:03:15,599 --> 00:03:19,480
talking in future classes and if that's
71
00:03:18,040 --> 00:03:21,760
the case you might get a different
72
00:03:19,480 --> 00:03:23,159
response here so when a dog sees a
73
00:03:21,760 --> 00:03:25,720
squirrel it will usually get angry
74
00:03:23,159 --> 00:03:27,319
scratched the squirrel and run off uh
75
00:03:25,720 --> 00:03:29,080
some dogs may also attempt to capture
76
00:03:27,319 --> 00:03:30,799
the squirrel or attempt to eat it dogs
77
00:03:29,080 --> 00:03:32,599
will often to pick up the squirrel and
78
00:03:30,799 --> 00:03:36,400
eat it
79
00:03:32,599 --> 00:03:40,680
for it was more uh more violent than I
80
00:03:36,400 --> 00:03:44,280
expected any um
81
00:03:40,680 --> 00:03:45,720
so but anyway I think that like actually
82
00:03:44,280 --> 00:03:47,080
you can see that when I used the
83
00:03:45,720 --> 00:03:48,920
different generation parameters it
84
00:03:47,080 --> 00:03:51,480
actually gave me something that was
85
00:03:48,920 --> 00:03:54,319
maybe more typical than lick so lick is
86
00:03:51,480 --> 00:03:56,840
maybe a kind of unusual uh answer here
87
00:03:54,319 --> 00:03:58,680
but anyway
88
00:03:56,840 --> 00:04:03,040
cool
89
00:03:58,680 --> 00:04:05,680
so that's the basic idea of prompting we
90
00:04:03,040 --> 00:04:08,480
tend to use prompting to try to solve
91
00:04:05,680 --> 00:04:10,680
problems also so it's not just to
92
00:04:08,480 --> 00:04:14,200
complete text although completing text
93
00:04:10,680 --> 00:04:17,320
is useful and important like I complete
94
00:04:14,200 --> 00:04:19,199
text in my Gmail all the time uh you
95
00:04:17,320 --> 00:04:20,600
know it it's constantly giving me
96
00:04:19,199 --> 00:04:23,440
suggestions about what I should write
97
00:04:20,600 --> 00:04:24,800
next and I do tab autoc complete um you
98
00:04:23,440 --> 00:04:28,040
know on your phone you're doing that
99
00:04:24,800 --> 00:04:29,919
that's also using a language model um
100
00:04:28,040 --> 00:04:32,320
but very often we'll use prompting to do
101
00:04:29,919 --> 00:04:34,440
things other than just completing Texs
102
00:04:32,320 --> 00:04:36,000
and when we do this uh this is kind of
103
00:04:34,440 --> 00:04:38,199
the standard workflow for how we solve
104
00:04:36,000 --> 00:04:41,280
NLP tasks with prompting the way we do
105
00:04:38,199 --> 00:04:43,360
this is we fill in a prompt template
106
00:04:41,280 --> 00:04:46,080
predict the answer and post-process the
107
00:04:43,360 --> 00:04:46,080
answer in some
108
00:04:46,320 --> 00:04:51,880
way so prompt templates are templates
109
00:04:49,280 --> 00:04:55,280
where you will actually uh that you will
110
00:04:51,880 --> 00:04:57,479
fill in with an actual input and so if
111
00:04:55,280 --> 00:05:00,479
we have an input X which is something
112
00:04:57,479 --> 00:05:04,880
like I love this movie our template will
113
00:05:00,479 --> 00:05:08,360
be something like X overall it was Z or
114
00:05:04,880 --> 00:05:10,680
overall it was and so if we do that when
115
00:05:08,360 --> 00:05:13,320
we actually want to make a prediction we
116
00:05:10,680 --> 00:05:14,840
will uh convert this into the actual
117
00:05:13,320 --> 00:05:16,880
prompt we feed into the language model
118
00:05:14,840 --> 00:05:20,639
by filling in the template um I love
119
00:05:16,880 --> 00:05:24,919
this movie overall it was blank and then
120
00:05:20,639 --> 00:05:24,919
fill this uh continuation
121
00:05:25,840 --> 00:05:31,919
in a particular variety uh
122
00:05:30,000 --> 00:05:34,039
that we use very broadly nowadays
123
00:05:31,919 --> 00:05:36,240
because a lot of models are trained as
124
00:05:34,039 --> 00:05:38,240
chatbots um but actually even if they're
125
00:05:36,240 --> 00:05:41,199
not trained as chatbots this still works
126
00:05:38,240 --> 00:05:46,199
to some extent um is a chat
127
00:05:41,199 --> 00:05:49,919
prompt and so usually the way we we do
128
00:05:46,199 --> 00:05:53,240
this is we specify inputs in a format
129
00:05:49,919 --> 00:05:55,800
called the open AI messages format and
130
00:05:53,240 --> 00:05:58,199
uh this is this is what it looks like
131
00:05:55,800 --> 00:06:03,759
each we have a
132
00:05:58,199 --> 00:06:07,680
list of outputs each list is given a
133
00:06:03,759 --> 00:06:10,280
role and content and here so we have the
134
00:06:07,680 --> 00:06:12,479
role of system and the content is please
135
00:06:10,280 --> 00:06:15,319
classify movie reviews as positive or
136
00:06:12,479 --> 00:06:17,400
negative uh then we have the role user
137
00:06:15,319 --> 00:06:21,039
uh this movie is a
138
00:06:17,400 --> 00:06:24,919
banger um and then we have roles uh
139
00:06:21,039 --> 00:06:27,240
system message uh so is the roles we
140
00:06:24,919 --> 00:06:29,639
have the system and the system is a
141
00:06:27,240 --> 00:06:31,560
message provided to the system to
142
00:06:29,639 --> 00:06:33,560
influence Its Behavior it's to explain
143
00:06:31,560 --> 00:06:39,240
to it
144
00:06:33,560 --> 00:06:40,840
like how it should be working um and so
145
00:06:39,240 --> 00:06:43,199
you can see that this is explaining to
146
00:06:40,840 --> 00:06:46,400
the system how it should be working user
147
00:06:43,199 --> 00:06:48,680
is the message input by the user um and
148
00:06:46,400 --> 00:06:51,160
so this could be just a single message
149
00:06:48,680 --> 00:06:53,520
or if you have a multi-turn dialogue it
150
00:06:51,160 --> 00:06:55,080
can be like user and then assistant and
151
00:06:53,520 --> 00:06:56,680
then user and then assistant and then
152
00:06:55,080 --> 00:06:59,400
user and then assistant and that makes
153
00:06:56,680 --> 00:07:00,680
it clear that it's a multi-term dialogue
154
00:06:59,400 --> 00:07:02,800
so if you have a multi-term dialogue in
155
00:07:00,680 --> 00:07:06,319
chat GPT that's how they're feeding it
156
00:07:02,800 --> 00:07:06,319
in um into the
157
00:07:06,479 --> 00:07:12,440
system so what's happening behind the
158
00:07:08,840 --> 00:07:14,160
scenes with these chat prompts basically
159
00:07:12,440 --> 00:07:17,720
they're being converted into token
160
00:07:14,160 --> 00:07:19,680
strings and then fed into the model so
161
00:07:17,720 --> 00:07:21,800
despite the fact that this is fed in in
162
00:07:19,680 --> 00:07:23,560
this format and it makes you think that
163
00:07:21,800 --> 00:07:25,120
maybe something special is going on
164
00:07:23,560 --> 00:07:28,360
actually in most cases these are just
165
00:07:25,120 --> 00:07:30,199
being fed into the model uh as a prompt
166
00:07:28,360 --> 00:07:34,560
so these are just kind of special
167
00:07:30,199 --> 00:07:36,879
version of a uh of a template so here we
168
00:07:34,560 --> 00:07:40,560
have um this is what the Llama template
169
00:07:36,879 --> 00:07:43,319
looks like so basically you have um
170
00:07:40,560 --> 00:07:46,560
square bracket ins and then for the
171
00:07:43,319 --> 00:07:49,280
system message it's like um like angle
172
00:07:46,560 --> 00:07:51,240
bracket uh angle bracket sis uh close
173
00:07:49,280 --> 00:07:53,720
angle bracket close angle bracket and
174
00:07:51,240 --> 00:07:55,759
then the actual system message and then
175
00:07:53,720 --> 00:07:58,479
you have uh this closing out the system
176
00:07:55,759 --> 00:08:01,240
message this closing out the instruction
177
00:07:58,479 --> 00:08:04,120
then the user is surrounded by inst and
178
00:08:01,240 --> 00:08:06,599
then the assistant is just like a
179
00:08:04,120 --> 00:08:08,400
regular string so this is what the
180
00:08:06,599 --> 00:08:12,319
actual textual string that's fed into
181
00:08:08,400 --> 00:08:14,199
llama chat models is we can contrast
182
00:08:12,319 --> 00:08:19,440
that to some other models so alpaka
183
00:08:14,199 --> 00:08:22,400
looks like this um uh so we have like
184
00:08:19,440 --> 00:08:24,879
hash instruction colon and then the
185
00:08:22,400 --> 00:08:26,639
instruction for the user there there's
186
00:08:24,879 --> 00:08:28,879
no distinction between system and user
187
00:08:26,639 --> 00:08:31,960
so it's like hash instruction and then
188
00:08:28,879 --> 00:08:35,240
the user message and then hash response
189
00:08:31,960 --> 00:08:37,760
and then be assistant so it's not super
190
00:08:35,240 --> 00:08:39,640
important which one we use here um the
191
00:08:37,760 --> 00:08:41,919
important thing is that this matches
192
00:08:39,640 --> 00:08:44,039
with what uh the model is trained and
193
00:08:41,919 --> 00:08:46,640
I'll show you some example uh you know
194
00:08:44,039 --> 00:08:50,680
I'll talk about that in more detail
195
00:08:46,640 --> 00:08:52,880
later and we have a reference uh that I
196
00:08:50,680 --> 00:08:56,600
got this uh
197
00:08:52,880 --> 00:08:58,519
from and there's this toolkit that I um
198
00:08:56,600 --> 00:09:02,680
I rather like recently it's called light
199
00:08:58,519 --> 00:09:05,079
llm it makes it very easy to uh query
200
00:09:02,680 --> 00:09:07,240
different llms uh and kind of like
201
00:09:05,079 --> 00:09:09,320
unified things so basically you can
202
00:09:07,240 --> 00:09:11,800
query many different types of LMS like
203
00:09:09,320 --> 00:09:14,440
open AI or open source models or other
204
00:09:11,800 --> 00:09:17,079
things like that and what happens behind
205
00:09:14,440 --> 00:09:19,120
the scene is it basically takes um the
206
00:09:17,079 --> 00:09:20,839
open AI messages format and converts it
207
00:09:19,120 --> 00:09:22,880
into the appropriate prompt format for
208
00:09:20,839 --> 00:09:24,680
whatever model you're using or the
209
00:09:22,880 --> 00:09:27,120
appropriate API calls for whatever thing
210
00:09:24,680 --> 00:09:29,800
you're using but
211
00:09:27,120 --> 00:09:31,399
um this here basically
212
00:09:29,800 --> 00:09:33,800
um if you click through this link shows
213
00:09:31,399 --> 00:09:35,959
you okay this is what it looks like for
214
00:09:33,800 --> 00:09:37,880
alpaca um so you have the instruction
215
00:09:35,959 --> 00:09:40,920
instruction response this is what it
216
00:09:37,880 --> 00:09:44,880
looks like for llama 2 chat this is what
217
00:09:40,920 --> 00:09:48,480
it looks like for the oama um for AMA
218
00:09:44,880 --> 00:09:49,920
this is what it looks like for mistol
219
00:09:48,480 --> 00:09:52,160
and other things like that so you see
220
00:09:49,920 --> 00:09:53,440
all of these are very similar but
221
00:09:52,160 --> 00:09:55,000
they're like slightly different and
222
00:09:53,440 --> 00:09:58,120
getting these right is actually kind of
223
00:09:55,000 --> 00:10:01,120
important for the model doing a good
224
00:09:58,120 --> 00:10:01,120
job
225
00:10:03,640 --> 00:10:10,399
um any questions about
226
00:10:05,880 --> 00:10:15,360
this yeah like say you start PR with
227
00:10:10,399 --> 00:10:18,160
this um inut and then you started simar
228
00:10:15,360 --> 00:10:21,320
without
229
00:10:18,160 --> 00:10:24,640
model could you give an example yeah so
230
00:10:21,320 --> 00:10:28,040
say um my account is a great movie or
231
00:10:24,640 --> 00:10:31,040
this movie is great in front of I put
232
00:10:28,040 --> 00:10:31,040
UMR
233
00:10:34,279 --> 00:10:39,519
model
234
00:10:36,399 --> 00:10:42,440
so depend it depends a lot on the
235
00:10:39,519 --> 00:10:45,959
bottle the reason why this system
236
00:10:42,440 --> 00:10:48,720
message was input here in the first
237
00:10:45,959 --> 00:10:52,440
place was this wasn't originally a
238
00:10:48,720 --> 00:10:54,240
feature of open AI models uh open AI was
239
00:10:52,440 --> 00:10:56,440
the first place to introduce this which
240
00:10:54,240 --> 00:10:58,519
is why I I'm calling it open ey messages
241
00:10:56,440 --> 00:10:59,800
formul they didn't originally have
242
00:10:58,519 --> 00:11:02,360
something like this but they were having
243
00:10:59,800 --> 00:11:04,360
lots of trouble with um people trying to
244
00:11:02,360 --> 00:11:07,600
reveal the prompts that were given to
245
00:11:04,360 --> 00:11:09,680
systems uh like called like prompt
246
00:11:07,600 --> 00:11:12,040
injection attacks or like jailbreaking
247
00:11:09,680 --> 00:11:15,399
attacks or stff like that and so the
248
00:11:12,040 --> 00:11:17,079
models would basically reveal this
249
00:11:15,399 --> 00:11:19,600
prompt that was being used behind the
250
00:11:17,079 --> 00:11:22,760
scenes by whatever customer of open a
251
00:11:19,600 --> 00:11:26,120
was like deploying a system and so in
252
00:11:22,760 --> 00:11:29,120
order to fix this basically what open AI
253
00:11:26,120 --> 00:11:30,480
did I believe I believe like they're
254
00:11:29,120 --> 00:11:32,279
don't actually tell you exactly what
255
00:11:30,480 --> 00:11:36,040
they did ever but I'm assuming what they
256
00:11:32,279 --> 00:11:37,680
did is they trained uh their models so
257
00:11:36,040 --> 00:11:39,240
that the models would not output
258
00:11:37,680 --> 00:11:41,639
anything that's included in the system
259
00:11:39,240 --> 00:11:43,839
message so the system message is used to
260
00:11:41,639 --> 00:11:46,120
influence behavior but it like they're
261
00:11:43,839 --> 00:11:48,200
explicitly trained to not output things
262
00:11:46,120 --> 00:11:49,880
that are included in there and so if you
263
00:11:48,200 --> 00:11:53,360
put the
264
00:11:49,880 --> 00:11:56,200
actual if you put the actual thing that
265
00:11:53,360 --> 00:11:59,639
you wanted to evaluate within the system
266
00:11:56,200 --> 00:12:01,839
message it might still predict
267
00:11:59,639 --> 00:12:04,839
the sentiment correctly but it won't
268
00:12:01,839 --> 00:12:06,920
repeat the the stuff that was in system
269
00:12:04,839 --> 00:12:09,920
message
270
00:12:06,920 --> 00:12:09,920
B
271
00:12:14,160 --> 00:12:20,480
yeah after we give it the yeah yeah so
272
00:12:18,320 --> 00:12:23,040
the that's a great question so typically
273
00:12:20,480 --> 00:12:26,480
this is hand created so you you create
274
00:12:23,040 --> 00:12:29,680
something like this um I I have a a
275
00:12:26,480 --> 00:12:32,120
bracket X here but another way people
276
00:12:29,680 --> 00:12:33,800
typically specify this is you just have
277
00:12:32,120 --> 00:12:36,880
a
278
00:12:33,800 --> 00:12:41,199
big um you just have a big python string
279
00:12:36,880 --> 00:12:41,199
which is like um you know
280
00:12:42,040 --> 00:12:46,480
please um please
281
00:12:49,279 --> 00:12:55,440
specify and then you
282
00:12:52,440 --> 00:12:55,440
have
283
00:12:56,160 --> 00:13:02,240
um and then you substitute in uh like
284
00:12:59,880 --> 00:13:04,440
the input into this place here so you
285
00:13:02,240 --> 00:13:07,760
usually handw write it I'm going to
286
00:13:04,440 --> 00:13:07,760
talk excuse
287
00:13:07,800 --> 00:13:14,120
me and to end about some methods to
288
00:13:10,320 --> 00:13:16,120
learn these also but um I'd say like 90
289
00:13:14,120 --> 00:13:18,320
95% of the time people are just writing
290
00:13:16,120 --> 00:13:18,320
the
291
00:13:19,959 --> 00:13:24,560
man yep I would
292
00:13:25,920 --> 00:13:31,639
write
293
00:13:27,760 --> 00:13:31,639
and real input that
294
00:13:33,240 --> 00:13:38,040
I yeah so typically the template is
295
00:13:36,360 --> 00:13:39,800
written when you decide what system you
296
00:13:38,040 --> 00:13:41,839
want to create so you decide you want to
297
00:13:39,800 --> 00:13:44,519
create a sentiment analysis system so
298
00:13:41,839 --> 00:13:46,760
you create a template that either says
299
00:13:44,519 --> 00:13:48,079
like please classify the topic in the
300
00:13:46,760 --> 00:13:50,959
case of a model that was trained to
301
00:13:48,079 --> 00:13:52,240
follow instructions or if you have a
302
00:13:50,959 --> 00:13:54,240
base model that was not trained to
303
00:13:52,240 --> 00:13:58,079
follow instructions which is rare rare
304
00:13:54,240 --> 00:14:00,279
nowadays but gpd2 or La llama 2 without
305
00:13:58,079 --> 00:14:02,320
chat tuning is as an example of that
306
00:14:00,279 --> 00:14:05,600
then you would need to create a template
307
00:14:02,320 --> 00:14:10,040
that looks like this um where
308
00:14:05,600 --> 00:14:11,360
you put the model in a situation where
309
00:14:10,040 --> 00:14:13,839
the
310
00:14:11,360 --> 00:14:15,240
next word that follows up should be
311
00:14:13,839 --> 00:14:17,120
indicative of the answer to your
312
00:14:15,240 --> 00:14:20,120
question so like positive or negative or
313
00:14:17,120 --> 00:14:21,800
something like that so um but either way
314
00:14:20,120 --> 00:14:24,639
like usually you handw write this when
315
00:14:21,800 --> 00:14:27,199
you decide what task is you want to do
316
00:14:24,639 --> 00:14:29,000
then this input X this comes at test
317
00:14:27,199 --> 00:14:32,920
time this comes when you actually Dey
318
00:14:29,000 --> 00:14:34,240
your system um so this would be like an
319
00:14:32,920 --> 00:14:37,040
Amazon review that you wanted to
320
00:14:34,240 --> 00:14:37,040
classify using an
321
00:14:37,720 --> 00:14:42,720
image cool any other
322
00:14:40,519 --> 00:14:46,480
questions okay let's
323
00:14:42,720 --> 00:14:48,160
move um so basically this is what is
324
00:14:46,480 --> 00:14:49,920
happening behind the scenes I don't know
325
00:14:48,160 --> 00:14:53,040
what open AI format is because they
326
00:14:49,920 --> 00:14:54,639
won't tell us of course um but you know
327
00:14:53,040 --> 00:14:56,000
I'm assuming that that's similar to
328
00:14:54,639 --> 00:14:59,399
what's happening in
329
00:14:56,000 --> 00:15:01,959
op okay um so the next thing that we do
330
00:14:59,399 --> 00:15:05,360
is answer prediction so given uh The
331
00:15:01,959 --> 00:15:08,320
Prompt we predict the answer um and so
332
00:15:05,360 --> 00:15:11,880
using whatever algorithm we want to use
333
00:15:08,320 --> 00:15:14,880
uh we predict you know fantastic
334
00:15:11,880 --> 00:15:14,880
here
335
00:15:15,120 --> 00:15:21,639
um and actually it might not predict
336
00:15:19,959 --> 00:15:26,399
fantastic it might predict something
337
00:15:21,639 --> 00:15:28,120
else like overall it was um a really
338
00:15:26,399 --> 00:15:30,000
fantastic movie that I liked a lot or
339
00:15:28,120 --> 00:15:33,839
something like so it might also do
340
00:15:30,000 --> 00:15:36,880
something like that so based on that we
341
00:15:33,839 --> 00:15:39,600
want to select the actual output out of
342
00:15:36,880 --> 00:15:41,160
the generated uh outputs and I'm calling
343
00:15:39,600 --> 00:15:43,639
this uh
344
00:15:41,160 --> 00:15:45,959
postprocessing so for instance we might
345
00:15:43,639 --> 00:15:48,240
take the output as is so for something
346
00:15:45,959 --> 00:15:50,880
like just you interacting with chat
347
00:15:48,240 --> 00:15:53,360
jpt um or interacting with a chat model
348
00:15:50,880 --> 00:15:55,639
you might be looking at the text as is
349
00:15:53,360 --> 00:15:58,319
or it might be formatting the output for
350
00:15:55,639 --> 00:16:00,079
easy Vis visualization selecting only
351
00:15:58,319 --> 00:16:02,440
parts of the output that you want to use
352
00:16:00,079 --> 00:16:04,560
or mapping the output to other
353
00:16:02,440 --> 00:16:07,600
actions so to give an example of
354
00:16:04,560 --> 00:16:10,079
formatting this is a feature of uh chat
355
00:16:07,600 --> 00:16:13,440
GPT or Bard or any that you interact
356
00:16:10,079 --> 00:16:14,920
with but um I wrote please write a table
357
00:16:13,440 --> 00:16:18,759
with the last five presidents and their
358
00:16:14,920 --> 00:16:20,319
birth dates and chat GPT is happy to do
359
00:16:18,759 --> 00:16:22,000
this for me it says here is a table with
360
00:16:20,319 --> 00:16:24,920
the last five US presidents and their
361
00:16:22,000 --> 00:16:27,639
birth dates um Joe Biden Donald Trump
362
00:16:24,920 --> 00:16:31,720
Barack Obama George W wish Bill Clinton
363
00:16:27,639 --> 00:16:33,600
um but this is written in markdown um or
364
00:16:31,720 --> 00:16:35,079
I assume it's written in markdown so it
365
00:16:33,600 --> 00:16:37,880
basically makes this table and then
366
00:16:35,079 --> 00:16:39,319
renders it in an easy to view way so
367
00:16:37,880 --> 00:16:41,000
this is really important if you're
368
00:16:39,319 --> 00:16:42,440
building a user facing system because
369
00:16:41,000 --> 00:16:44,279
you want to be able to render these
370
00:16:42,440 --> 00:16:46,279
things but the only thing a large
371
00:16:44,279 --> 00:16:48,880
language model can output is text right
372
00:16:46,279 --> 00:16:50,279
it can output a string of tokens so uh
373
00:16:48,880 --> 00:16:54,000
this is a really good way to interact
374
00:16:50,279 --> 00:16:55,759
with it um I I followed by saying output
375
00:16:54,000 --> 00:16:58,720
that in Json format so it says here's
376
00:16:55,759 --> 00:17:00,360
the information in Json format and
377
00:16:58,720 --> 00:17:02,000
instead of just giving me a big Json
378
00:17:00,360 --> 00:17:04,199
string it gives me syntax highlighting
379
00:17:02,000 --> 00:17:06,880
and all the other stuff like this um
380
00:17:04,199 --> 00:17:09,760
presumably what it's doing here is it's
381
00:17:06,880 --> 00:17:12,839
outputting um like a triple hash or
382
00:17:09,760 --> 00:17:15,160
something like this um the reason why I
383
00:17:12,839 --> 00:17:17,600
know that is because
384
00:17:15,160 --> 00:17:21,079
like seems to be making a mistake down
385
00:17:17,600 --> 00:17:23,280
here for some reason um like uh
386
00:17:21,079 --> 00:17:25,079
outputting a weird Le formatted thing at
387
00:17:23,280 --> 00:17:26,160
that and so even chat GPT makes mistakes
388
00:17:25,079 --> 00:17:30,320
some of the
389
00:17:26,160 --> 00:17:32,400
time um
390
00:17:30,320 --> 00:17:33,960
cool um another thing that you might
391
00:17:32,400 --> 00:17:35,520
want to do is especially if you're not
392
00:17:33,960 --> 00:17:37,360
using it in like a a directly
393
00:17:35,520 --> 00:17:40,200
user-facing application but you want to
394
00:17:37,360 --> 00:17:41,840
use it to extract some information or
395
00:17:40,200 --> 00:17:45,440
make some classification decision or
396
00:17:41,840 --> 00:17:47,280
something like that um you often select
397
00:17:45,440 --> 00:17:49,880
information that's indicative of the
398
00:17:47,280 --> 00:17:52,360
answer and so I love this movie overall
399
00:17:49,880 --> 00:17:53,960
it was a movie that was simply fantastic
400
00:17:52,360 --> 00:17:56,600
um you can do things like extract
401
00:17:53,960 --> 00:17:59,440
keywords like fantastic and use that to
402
00:17:56,600 --> 00:18:01,360
indicate positive sentiment
403
00:17:59,440 --> 00:18:04,080
there's various methods for doing this
404
00:18:01,360 --> 00:18:05,919
and these are also used in the
405
00:18:04,080 --> 00:18:08,679
benchmarks that are used to evaluate
406
00:18:05,919 --> 00:18:09,799
language models so it's you know like
407
00:18:08,679 --> 00:18:11,039
even if you're not building an
408
00:18:09,799 --> 00:18:12,679
application directly but you're just
409
00:18:11,039 --> 00:18:14,120
trying to do well in this class and get
410
00:18:12,679 --> 00:18:15,679
like a high score on a leaderboard or
411
00:18:14,120 --> 00:18:20,320
something it's still useful to know
412
00:18:15,679 --> 00:18:22,159
about these things so um for things like
413
00:18:20,320 --> 00:18:24,039
classification um you can identify
414
00:18:22,159 --> 00:18:27,159
keywords like fantastic that might be
415
00:18:24,039 --> 00:18:29,120
indicative of the class another thing
416
00:18:27,159 --> 00:18:31,559
that's uh pretty common is for
417
00:18:29,120 --> 00:18:34,480
regression or numerical problems you
418
00:18:31,559 --> 00:18:37,440
identify numbers and pull out the
419
00:18:34,480 --> 00:18:40,400
numbers and use those numbers as the
420
00:18:37,440 --> 00:18:42,360
answer um for code uh you can pull out
421
00:18:40,400 --> 00:18:45,080
code Snippets and triple back ticks and
422
00:18:42,360 --> 00:18:46,960
then execute the code for example so all
423
00:18:45,080 --> 00:18:48,600
of these things are basically heuristic
424
00:18:46,960 --> 00:18:50,159
methods but they can be used to pull out
425
00:18:48,600 --> 00:18:53,440
the actual answer that you want from the
426
00:18:50,159 --> 00:18:53,440
text that's generated di
427
00:18:54,480 --> 00:19:00,320
know cool uh any questions about that
428
00:19:02,280 --> 00:19:07,880
the final thing is output mapping um
429
00:19:04,640 --> 00:19:11,120
given an answer uh map it into a class
430
00:19:07,880 --> 00:19:13,360
label or a continuous value and so this
431
00:19:11,120 --> 00:19:16,000
is doing something like taking fantastic
432
00:19:13,360 --> 00:19:18,480
and mapping it into the class
433
00:19:16,000 --> 00:19:21,000
positive uh and so you know if we want
434
00:19:18,480 --> 00:19:23,000
to extract fi one to five star ratings
435
00:19:21,000 --> 00:19:25,559
from reviews this is something you would
436
00:19:23,000 --> 00:19:29,360
need to do and very often it's like a
437
00:19:25,559 --> 00:19:33,880
one to um one class to
438
00:19:29,360 --> 00:19:35,720
many um many word mapping and uh by
439
00:19:33,880 --> 00:19:37,400
doing this you can basically get a more
440
00:19:35,720 --> 00:19:38,720
robust mapping onto the number that you
441
00:19:37,400 --> 00:19:42,400
actually
442
00:19:38,720 --> 00:19:42,400
want I actually
443
00:19:42,720 --> 00:19:48,919
coincidentally on uh on Twitter saw a
444
00:19:45,280 --> 00:19:48,919
really good example of this like a week
445
00:19:55,880 --> 00:20:00,520
ago and yeah I don't know if I'm going
446
00:19:59,120 --> 00:20:05,440
to be able to find it in a reasonable
447
00:20:00,520 --> 00:20:08,520
time frame but basically um there was
448
00:20:05,440 --> 00:20:11,080
a person who was using gp4 to create a
449
00:20:08,520 --> 00:20:14,120
model uh to like reward open source
450
00:20:11,080 --> 00:20:15,880
models for good and bad you know
451
00:20:14,120 --> 00:20:18,320
responses
452
00:20:15,880 --> 00:20:20,799
and they started out with giving it a
453
00:20:18,320 --> 00:20:24,480
one to five star rating and then they
454
00:20:20,799 --> 00:20:28,360
switched it into very good good okay bad
455
00:20:24,480 --> 00:20:31,280
very bad and then um then asked to
456
00:20:28,360 --> 00:20:34,520
generate you know those like very good
457
00:20:31,280 --> 00:20:37,039
good bad okay bad very bad instead of
458
00:20:34,520 --> 00:20:40,360
one to five and that worked a lot better
459
00:20:37,039 --> 00:20:43,480
like the GPT model was a lot more uh
460
00:20:40,360 --> 00:20:46,039
like likely to get the answer correct um
461
00:20:43,480 --> 00:20:48,880
than it was if you gave a one to five
462
00:20:46,039 --> 00:20:50,799
star rating so this is something you
463
00:20:48,880 --> 00:20:54,280
should think about pretty seriously and
464
00:20:50,799 --> 00:20:57,440
the way you can think about it is How
465
00:20:54,280 --> 00:20:59,679
likely was this data to appear in a
466
00:20:57,440 --> 00:21:02,520
large Corp of data on the
467
00:20:59,679 --> 00:21:04,760
internet and it might be like a lot less
468
00:21:02,520 --> 00:21:08,679
likely that it's like how good is this
469
00:21:04,760 --> 00:21:11,400
movie five then how good is this movie
470
00:21:08,679 --> 00:21:13,960
really good like just think of like the
471
00:21:11,400 --> 00:21:16,200
occurrence probability and you can even
472
00:21:13,960 --> 00:21:18,600
um like mine this data from the the web
473
00:21:16,200 --> 00:21:21,320
if you want to to try to find out the
474
00:21:18,600 --> 00:21:24,520
best you know
475
00:21:21,320 --> 00:21:30,039
like the best things
476
00:21:24,520 --> 00:21:30,039
there cool um any questions about this
477
00:21:35,360 --> 00:21:39,480
yeah how is
478
00:21:37,720 --> 00:21:43,039
it
479
00:21:39,480 --> 00:21:45,919
learning so the model the model is
480
00:21:43,039 --> 00:21:47,600
predicting txt and like accurately it's
481
00:21:45,919 --> 00:21:50,200
not even predicting the word fantastic
482
00:21:47,600 --> 00:21:54,480
it's predicting the token ID like
483
00:21:50,200 --> 00:21:57,600
73521 or something like that um but you
484
00:21:54,480 --> 00:21:58,679
know if it has seen that token ID more
485
00:21:57,600 --> 00:22:00,840
frequent
486
00:21:58,679 --> 00:22:04,240
after reviews than it has seen the token
487
00:22:00,840 --> 00:22:06,000
ID for the number one or the number five
488
00:22:04,240 --> 00:22:07,520
then it's more likely to predict that
489
00:22:06,000 --> 00:22:10,279
accurately right it's more likely to
490
00:22:07,520 --> 00:22:11,880
predict fantastic than it is to predict
491
00:22:10,279 --> 00:22:14,679
five star or something like that just
492
00:22:11,880 --> 00:22:16,720
because fantastic is more frequent and
493
00:22:14,679 --> 00:22:18,880
so because of that if you think about
494
00:22:16,720 --> 00:22:22,120
like what has it seen in all of the data
495
00:22:18,880 --> 00:22:24,240
on the internet and like model your um
496
00:22:22,120 --> 00:22:26,960
model your answers here appropriately
497
00:22:24,240 --> 00:22:28,520
then that can give you
498
00:22:26,960 --> 00:22:30,320
betters
499
00:22:28,520 --> 00:22:32,120
this is a very important rule of thumb
500
00:22:30,320 --> 00:22:33,400
like don't try to make a language model
501
00:22:32,120 --> 00:22:35,039
do something it's never seen in the
502
00:22:33,400 --> 00:22:38,200
pre-training data and it will make your
503
00:22:35,039 --> 00:22:40,240
life a lot easier so um you can think
504
00:22:38,200 --> 00:22:41,880
that going forward
505
00:22:40,240 --> 00:22:44,679
to
506
00:22:41,880 --> 00:22:48,559
cool so next I want to move into fat
507
00:22:44,679 --> 00:22:49,679
prompting or in context learning um so
508
00:22:48,559 --> 00:22:52,159
fat
509
00:22:49,679 --> 00:22:54,440
prompting basically what we do is we
510
00:22:52,159 --> 00:22:55,799
provide a few examples of the task
511
00:22:54,440 --> 00:22:58,440
together with the
512
00:22:55,799 --> 00:23:00,080
instruction and the way this work works
513
00:22:58,440 --> 00:23:02,360
is you write an instruction like please
514
00:23:00,080 --> 00:23:05,919
classify movie reviews as positive or
515
00:23:02,360 --> 00:23:08,120
negative and add like input uh I really
516
00:23:05,919 --> 00:23:10,320
don't like this movie output negative uh
517
00:23:08,120 --> 00:23:12,480
input this movie is great output
518
00:23:10,320 --> 00:23:16,640
positive
519
00:23:12,480 --> 00:23:18,880
and this is um pretty effective the
520
00:23:16,640 --> 00:23:21,799
thing it's most effective for are
521
00:23:18,880 --> 00:23:24,400
twofold it's most effective for making
522
00:23:21,799 --> 00:23:26,360
sure that you get the formatting right
523
00:23:24,400 --> 00:23:27,640
uh because if you have a few examples
524
00:23:26,360 --> 00:23:28,679
the model will tend to follow those
525
00:23:27,640 --> 00:23:30,840
examples
526
00:23:28,679 --> 00:23:34,440
with respect to formatting especially if
527
00:23:30,840 --> 00:23:37,320
we're talking about like gp4 models um
528
00:23:34,440 --> 00:23:40,400
or strong GPT models it's also effective
529
00:23:37,320 --> 00:23:42,400
if you're using weaker models so like
530
00:23:40,400 --> 00:23:44,720
stronger models like gp4 tend to be
531
00:23:42,400 --> 00:23:46,720
pretty good at following instructions so
532
00:23:44,720 --> 00:23:49,520
if you say
533
00:23:46,720 --> 00:23:51,640
um please classify movie reviews as
534
00:23:49,520 --> 00:23:54,000
positive or negative it will be more
535
00:23:51,640 --> 00:23:56,279
likely to just output positive or
536
00:23:54,000 --> 00:23:58,760
negative um but if you have weaker
537
00:23:56,279 --> 00:24:01,720
models it might say I really don't like
538
00:23:58,760 --> 00:24:03,559
this movie output uh I think I think
539
00:24:01,720 --> 00:24:05,640
this is probably negative or something
540
00:24:03,559 --> 00:24:07,240
like that it will you know it might not
541
00:24:05,640 --> 00:24:10,080
follow the instructions as well and it's
542
00:24:07,240 --> 00:24:14,240
more effective to provide as in context
543
00:24:10,080 --> 00:24:17,600
examples um so so this is a one uh
544
00:24:14,240 --> 00:24:19,480
one uh thing to remember one thing I
545
00:24:17,600 --> 00:24:22,120
should mention also is when I say F shot
546
00:24:19,480 --> 00:24:25,720
prompting and in context learning these
547
00:24:22,120 --> 00:24:27,880
are basically the same thing uh they
548
00:24:25,720 --> 00:24:29,720
basically refer to the same concept but
549
00:24:27,880 --> 00:24:31,919
just from slightly different
550
00:24:29,720 --> 00:24:34,799
examples uh from sorry slightly
551
00:24:31,919 --> 00:24:36,919
different angles PE shot is in contrast
552
00:24:34,799 --> 00:24:39,320
to zero shot so zero shot means you're
553
00:24:36,919 --> 00:24:43,039
providing no examples so zero shot
554
00:24:39,320 --> 00:24:45,720
prompting you would have none uh few
555
00:24:43,039 --> 00:24:47,240
shot you have several examples in
556
00:24:45,720 --> 00:24:49,679
context learning means that you're
557
00:24:47,240 --> 00:24:51,640
learning how to do a task but instead of
558
00:24:49,679 --> 00:24:54,320
providing the model with fine-tuning
559
00:24:51,640 --> 00:24:56,679
data you're providing the examples in
560
00:24:54,320 --> 00:24:58,080
the language models context so they both
561
00:24:56,679 --> 00:25:00,919
basically mean the same thing but
562
00:24:58,080 --> 00:25:03,159
they're they're just contrasting to like
563
00:25:00,919 --> 00:25:06,559
either a zero shot or fine tuning which
564
00:25:03,159 --> 00:25:06,559
is why the terminology is
565
00:25:06,880 --> 00:25:13,520
different so they usering interface
566
00:25:11,320 --> 00:25:16,080
and for the
567
00:25:13,520 --> 00:25:17,760
rendering uh yes you can definitely do F
568
00:25:16,080 --> 00:25:20,039
shot prompting I'm actually going to
569
00:25:17,760 --> 00:25:23,440
talk exactly about exactly how you do
570
00:25:20,039 --> 00:25:26,320
this in like an open AI model um here
571
00:25:23,440 --> 00:25:28,240
which is for open AI models there's a
572
00:25:26,320 --> 00:25:31,320
couple ways that you could do this one
573
00:25:28,240 --> 00:25:33,640
way you could do this is you could um
574
00:25:31,320 --> 00:25:36,279
you could have the role be user and the
575
00:25:33,640 --> 00:25:39,279
role be assistant and just add like
576
00:25:36,279 --> 00:25:41,159
additional conversational history into
577
00:25:39,279 --> 00:25:43,159
the the messages that you're sending to
578
00:25:41,159 --> 00:25:46,240
the language model but actually the
579
00:25:43,159 --> 00:25:49,120
recommended way of doing this um which
580
00:25:46,240 --> 00:25:51,880
is in the openi cookbook uh which is in
581
00:25:49,120 --> 00:25:53,919
the reference is that you send this as a
582
00:25:51,880 --> 00:25:58,200
system message but you provide this like
583
00:25:53,919 --> 00:26:00,840
additional name variable here um with
584
00:25:58,200 --> 00:26:02,840
example user and example assistant the
585
00:26:00,840 --> 00:26:06,200
main reason why you do this is just
586
00:26:02,840 --> 00:26:08,080
because if you don't um if you send it
587
00:26:06,200 --> 00:26:10,600
in as the like user and assistant the
588
00:26:08,080 --> 00:26:12,799
model might refer back to the few shot
589
00:26:10,600 --> 00:26:14,320
examples as something that happened
590
00:26:12,799 --> 00:26:15,760
previously in the conversation whereas
591
00:26:14,320 --> 00:26:18,200
if you send it in the system message
592
00:26:15,760 --> 00:26:19,799
it's guaranteed to not do that so I
593
00:26:18,200 --> 00:26:23,600
think it's like less of an accuracy
594
00:26:19,799 --> 00:26:26,360
thing it's more of a like it's more of a
595
00:26:23,600 --> 00:26:29,120
privacy prompt privacy thing uh than
596
00:26:26,360 --> 00:26:30,880
anything else so this is a recommended
597
00:26:29,120 --> 00:26:33,159
way of doing this on the other hand if
598
00:26:30,880 --> 00:26:34,600
you're using like an open source model
599
00:26:33,159 --> 00:26:36,600
uh you need to be careful because this
600
00:26:34,600 --> 00:26:38,279
name might not even be included in the
601
00:26:36,600 --> 00:26:40,080
prompt template like for example in the
602
00:26:38,279 --> 00:26:41,840
light llm prompt templates that I was
603
00:26:40,080 --> 00:26:44,080
sending in this is not even included at
604
00:26:41,840 --> 00:26:46,480
all so you might just get a weird system
605
00:26:44,080 --> 00:26:49,720
message that uh is poorly fored so you
606
00:26:46,480 --> 00:26:53,600
need to be a little bit conscious
607
00:26:49,720 --> 00:26:55,799
this um cool any questions here does
608
00:26:53,600 --> 00:26:58,880
that answer the
609
00:26:55,799 --> 00:27:02,279
question okay
610
00:26:58,880 --> 00:27:05,000
um so one one thing to be aware of is
611
00:27:02,279 --> 00:27:07,039
llms are sensitive to small changes and
612
00:27:05,000 --> 00:27:12,080
in context examples that you provide to
613
00:27:07,039 --> 00:27:14,600
them so uh previous work has examined
614
00:27:12,080 --> 00:27:19,399
this from a number of angles there's a
615
00:27:14,600 --> 00:27:22,679
paper by Luol and they examine the
616
00:27:19,399 --> 00:27:25,000
sensitivity to example ordering so like
617
00:27:22,679 --> 00:27:28,399
if you take the same examples and you
618
00:27:25,000 --> 00:27:30,840
just order them in different orders um
619
00:27:28,399 --> 00:27:32,679
you can actually get very wildly
620
00:27:30,840 --> 00:27:35,600
different
621
00:27:32,679 --> 00:27:37,520
results um and this is especially true
622
00:27:35,600 --> 00:27:40,320
for smaller models so the smaller models
623
00:27:37,520 --> 00:27:42,720
here are like the gpt2 models the larger
624
00:27:40,320 --> 00:27:47,440
models here are like the GPT the larger
625
00:27:42,720 --> 00:27:47,440
model here is GPT 3.5 uh I
626
00:27:48,399 --> 00:27:54,120
believe other things that people have
627
00:27:50,559 --> 00:27:56,760
looked at are label balance so um how
628
00:27:54,120 --> 00:27:58,559
important is it for the labels to be
629
00:27:56,760 --> 00:28:01,440
balanced
630
00:27:58,559 --> 00:28:02,799
um and if you're doing sentiment
631
00:28:01,440 --> 00:28:05,240
classification for example you might
632
00:28:02,799 --> 00:28:07,519
have only positive examples or only
633
00:28:05,240 --> 00:28:10,000
negative examples and if you have only
634
00:28:07,519 --> 00:28:13,279
positive or negative examples this can
635
00:28:10,000 --> 00:28:15,559
uh help or hurt your accuracy uh for
636
00:28:13,279 --> 00:28:17,200
example on this Amazon review data set
637
00:28:15,559 --> 00:28:18,679
most of the reviews are positive so you
638
00:28:17,200 --> 00:28:20,840
actually do better by having lots of
639
00:28:18,679 --> 00:28:23,640
positive examples in your in context
640
00:28:20,840 --> 00:28:26,600
examples on the other hand for sst2 this
641
00:28:23,640 --> 00:28:29,159
is label balanced so having only
642
00:28:26,600 --> 00:28:31,799
positive or negative is worse on average
643
00:28:29,159 --> 00:28:34,279
than having three positive and one
644
00:28:31,799 --> 00:28:36,679
negative another thing is label coverage
645
00:28:34,279 --> 00:28:38,679
so if we're talking about multi class
646
00:28:36,679 --> 00:28:41,120
classification um
647
00:28:38,679 --> 00:28:42,919
having good coverage of all of the
648
00:28:41,120 --> 00:28:45,919
classes that you want to include in your
649
00:28:42,919 --> 00:28:49,120
multiclass classification is important
650
00:28:45,919 --> 00:28:51,720
um to some extent but if you have uh
651
00:28:49,120 --> 00:28:53,440
more uh you can also confuse some model
652
00:28:51,720 --> 00:28:55,840
especially if they're minority labels so
653
00:28:53,440 --> 00:28:57,799
if you have a whole bunch of like random
654
00:28:55,840 --> 00:28:59,080
minority labels and that can cause so
655
00:28:57,799 --> 00:29:01,399
this is something important to think
656
00:28:59,080 --> 00:29:04,640
about if you're planning on solving kind
657
00:29:01,399 --> 00:29:08,640
of like classification tests um I I've
658
00:29:04,640 --> 00:29:11,000
also had my own experience with uh using
659
00:29:08,640 --> 00:29:13,159
GPT for evaluation for machine
660
00:29:11,000 --> 00:29:14,760
translation and when we use GPT for
661
00:29:13,159 --> 00:29:18,559
evaluation for machine translation it
662
00:29:14,760 --> 00:29:20,799
was very important to add um like high
663
00:29:18,559 --> 00:29:22,760
uh high scoring values low score high
664
00:29:20,799 --> 00:29:26,320
scoring outputs low scoring outputs some
665
00:29:22,760 --> 00:29:27,840
in the middle um and so it's also the
666
00:29:26,320 --> 00:29:30,760
case for regression
667
00:29:27,840 --> 00:29:30,760
uh problems as
668
00:29:32,600 --> 00:29:37,320
well cool um any questions
669
00:29:38,159 --> 00:29:45,000
here um however this is not super
670
00:29:42,240 --> 00:29:46,600
predictable um so there's not like any
671
00:29:45,000 --> 00:29:48,399
rule of thumb that tells you like this
672
00:29:46,600 --> 00:29:49,720
is or as far as I know there's not any
673
00:29:48,399 --> 00:29:51,640
rule of thumb that tells you this is the
674
00:29:49,720 --> 00:29:54,000
way you should construct in context
675
00:29:51,640 --> 00:29:55,880
examples uh there are lots of papers
676
00:29:54,000 --> 00:29:57,799
that say they have methods that work
677
00:29:55,880 --> 00:30:01,000
better but I don't know if there's any
678
00:29:57,799 --> 00:30:02,559
like gold standard IND indry practice
679
00:30:01,000 --> 00:30:05,799
for doing something like this at the
680
00:30:02,559 --> 00:30:07,799
moment so just to give an example uh
681
00:30:05,799 --> 00:30:10,399
this paper it's a really nice paper
682
00:30:07,799 --> 00:30:13,440
examining why uh in context Learning
683
00:30:10,399 --> 00:30:17,279
Works one thing one interesting finding
684
00:30:13,440 --> 00:30:19,760
that they have is they output they take
685
00:30:17,279 --> 00:30:22,720
in context examples but they randomize
686
00:30:19,760 --> 00:30:27,320
the labels they make the labels wrong
687
00:30:22,720 --> 00:30:29,519
some of the time so even with completely
688
00:30:27,320 --> 00:30:32,120
wrong labels even with labels that are
689
00:30:29,519 --> 00:30:34,399
correct 0% of the time you still get
690
00:30:32,120 --> 00:30:37,360
much much better accuracy than if you
691
00:30:34,399 --> 00:30:39,440
use no Inc context examples and why is
692
00:30:37,360 --> 00:30:41,640
this probably you know it's getting the
693
00:30:39,440 --> 00:30:44,600
model formatting correct it's getting
694
00:30:41,640 --> 00:30:47,679
like the names of the labels correct
695
00:30:44,600 --> 00:30:49,039
even if it's not uh accurate so it seems
696
00:30:47,679 --> 00:30:50,519
like it's not really using these for
697
00:30:49,039 --> 00:30:52,640
training data it's using them more just
698
00:30:50,519 --> 00:30:56,240
to know the formatting
699
00:30:52,640 --> 00:30:59,399
appropriate like
700
00:30:56,240 --> 00:31:01,399
you so you already
701
00:30:59,399 --> 00:31:03,760
have
702
00:31:01,399 --> 00:31:08,840
right how is it
703
00:31:03,760 --> 00:31:11,240
Ma like is it just y one y i gu I'm just
704
00:31:08,840 --> 00:31:15,000
ask how you would inter
705
00:31:11,240 --> 00:31:16,480
that so this is you're not training the
706
00:31:15,000 --> 00:31:17,880
model at the moment we're going to talk
707
00:31:16,480 --> 00:31:19,360
about that next class but right now
708
00:31:17,880 --> 00:31:21,279
you're taking a model that has already
709
00:31:19,360 --> 00:31:22,840
been trained and you're providing it
710
00:31:21,279 --> 00:31:25,519
with a few examples and then you're
711
00:31:22,840 --> 00:31:28,679
asking it to fill in um the following
712
00:31:25,519 --> 00:31:30,880
examples just examples
713
00:31:28,679 --> 00:31:32,960
yes
714
00:31:30,880 --> 00:31:34,679
exactly and it's pretty amazing that
715
00:31:32,960 --> 00:31:36,440
that works in the first place especially
716
00:31:34,679 --> 00:31:39,840
with a model that hasn't been explicitly
717
00:31:36,440 --> 00:31:41,200
trained that way but um there's a a fair
718
00:31:39,840 --> 00:31:42,320
amount of research that I think we're
719
00:31:41,200 --> 00:31:43,960
probably going to be talking about in
720
00:31:42,320 --> 00:31:47,000
the interpretability class about why
721
00:31:43,960 --> 00:31:49,600
this happens but um
722
00:31:47,000 --> 00:31:51,279
basically my my interpretation for why
723
00:31:49,600 --> 00:31:53,679
this happens is because there's so much
724
00:31:51,279 --> 00:31:56,000
repetitive stuff on the internet right
725
00:31:53,679 --> 00:31:58,240
there's a bunch of examples of math
726
00:31:56,000 --> 00:32:00,399
problems which is like
727
00:31:58,240 --> 00:32:02,279
question one and then the math problem
728
00:32:00,399 --> 00:32:04,320
and then the answer question two math
729
00:32:02,279 --> 00:32:06,440
problem and then the answer so in order
730
00:32:04,320 --> 00:32:08,320
to model the text on the internet it
731
00:32:06,440 --> 00:32:12,120
needs to learn how to be able to do
732
00:32:08,320 --> 00:32:15,399
these things but so um
733
00:32:12,120 --> 00:32:17,760
cool the second thing is uh more
734
00:32:15,399 --> 00:32:20,000
demonstrations can sometimes hurt
735
00:32:17,760 --> 00:32:22,120
accuracy so this is like binary
736
00:32:20,000 --> 00:32:25,080
classification versus multiple choice
737
00:32:22,120 --> 00:32:27,440
question answering um and actually with
738
00:32:25,080 --> 00:32:30,919
binary classification the model ends up
739
00:32:27,440 --> 00:32:33,159
getting worse um with uh more examples
740
00:32:30,919 --> 00:32:36,799
probably just because the longer context
741
00:32:33,159 --> 00:32:39,320
uh you know confuses the model or moves
742
00:32:36,799 --> 00:32:41,320
the instructions that are provided to
743
00:32:39,320 --> 00:32:44,279
the model farther away in the context so
744
00:32:41,320 --> 00:32:48,120
it starts forgetting them so
745
00:32:44,279 --> 00:32:50,240
um basically what I want to say is uh
746
00:32:48,120 --> 00:32:51,760
you know this is more of an art than a
747
00:32:50,240 --> 00:32:53,279
science you might not get entirely
748
00:32:51,760 --> 00:32:55,840
predictable results but don't worry it's
749
00:32:53,279 --> 00:32:59,320
not just
750
00:32:55,840 --> 00:32:59,320
you cool cool
751
00:33:09,200 --> 00:33:15,320
yeah it can't so the question is if the
752
00:33:12,639 --> 00:33:17,039
in context examples reflect the data
753
00:33:15,320 --> 00:33:18,919
distribution well would that boost the
754
00:33:17,039 --> 00:33:24,240
accuracy I think the answer is probably
755
00:33:18,919 --> 00:33:26,039
yes yeah um I don't know if that it's
756
00:33:24,240 --> 00:33:27,679
that clear because like what I would
757
00:33:26,039 --> 00:33:29,919
expect
758
00:33:27,679 --> 00:33:33,559
is better
759
00:33:29,919 --> 00:33:37,240
coverage is probably more
760
00:33:33,559 --> 00:33:39,760
important than better representativeness
761
00:33:37,240 --> 00:33:41,960
so like even if you have some minority
762
00:33:39,760 --> 00:33:43,639
labels um it's probably better for the
763
00:33:41,960 --> 00:33:44,880
model to know what those minority labels
764
00:33:43,639 --> 00:33:47,279
look like and that's going to be
765
00:33:44,880 --> 00:33:49,120
especially true for like stronger models
766
00:33:47,279 --> 00:33:50,679
um I think
767
00:33:49,120 --> 00:33:54,320
so
768
00:33:50,679 --> 00:33:56,440
cool okay so uh next I want to talk
769
00:33:54,320 --> 00:33:59,000
about Chain of Thought prompting um so
770
00:33:56,440 --> 00:34:01,320
Chain of Thought prompting is a very
771
00:33:59,000 --> 00:34:04,080
popular way of prompting
772
00:34:01,320 --> 00:34:06,080
models and the way it works is you get
773
00:34:04,080 --> 00:34:07,839
the model to explain its reasoning
774
00:34:06,080 --> 00:34:12,679
before making an
775
00:34:07,839 --> 00:34:14,520
answer um and so sorry this example is a
776
00:34:12,679 --> 00:34:18,879
little bit small but like the standard
777
00:34:14,520 --> 00:34:20,480
prompting method is uh like Roger has
778
00:34:18,879 --> 00:34:22,000
five tennis balls he buys two more cans
779
00:34:20,480 --> 00:34:23,480
of tennis balls each can has three
780
00:34:22,000 --> 00:34:28,200
tennis balls how many tennis balls does
781
00:34:23,480 --> 00:34:29,359
he have now um the answer is 11 and so
782
00:34:28,200 --> 00:34:32,119
um this
783
00:34:29,359 --> 00:34:34,320
is an in context example and then you
784
00:34:32,119 --> 00:34:37,240
have your input which has a different
785
00:34:34,320 --> 00:34:39,000
problem uh the cafeteria has 23 apples
786
00:34:37,240 --> 00:34:40,639
if they Ed 20 to make lunch and bought
787
00:34:39,000 --> 00:34:41,800
six more how many apples do they have
788
00:34:40,639 --> 00:34:46,720
the answer is
789
00:34:41,800 --> 00:34:49,000
27 um and so this is wrong so what Chain
790
00:34:46,720 --> 00:34:52,000
of Thought prompting does is instead of
791
00:34:49,000 --> 00:34:54,960
just giving the answer it gives you an
792
00:34:52,000 --> 00:34:57,079
additional reasoning chain uh that says
793
00:34:54,960 --> 00:34:59,680
R started with five balls two cans of of
794
00:34:57,079 --> 00:35:01,800
three tennis balls uh each of six tennis
795
00:34:59,680 --> 00:35:04,520
balls 5 plus 6 equals 11 the answer is
796
00:35:01,800 --> 00:35:06,280
11 and so then when you feed this in
797
00:35:04,520 --> 00:35:08,000
basically the model will generate a
798
00:35:06,280 --> 00:35:10,240
similar reasoning chain and then it's
799
00:35:08,000 --> 00:35:13,400
more likely to get the answer correct
800
00:35:10,240 --> 00:35:15,720
and this very robustly works
801
00:35:13,400 --> 00:35:19,440
for many
802
00:35:15,720 --> 00:35:21,440
different problems where a reasoning
803
00:35:19,440 --> 00:35:23,520
chain is
804
00:35:21,440 --> 00:35:27,839
necessary and if you think about the
805
00:35:23,520 --> 00:35:30,359
reason why this uh why this works I
806
00:35:27,839 --> 00:35:33,040
think there's basically two reasons why
807
00:35:30,359 --> 00:35:34,440
um the first reason is I I only wrote
808
00:35:33,040 --> 00:35:36,560
one on the thing here but the first
809
00:35:34,440 --> 00:35:38,760
reason is it allows the model to
810
00:35:36,560 --> 00:35:41,359
decompose harder problems into simpler
811
00:35:38,760 --> 00:35:45,119
problems and simpler problems are easier
812
00:35:41,359 --> 00:35:47,560
right so um instead
813
00:35:45,119 --> 00:35:51,319
of immediately trying to solve the whole
814
00:35:47,560 --> 00:35:53,800
problem in a single go it will first
815
00:35:51,319 --> 00:35:56,520
solve the problem of like what how many
816
00:35:53,800 --> 00:35:58,920
are left after you use buy and so it
817
00:35:56,520 --> 00:36:00,240
gets three and so now it has this three
818
00:35:58,920 --> 00:36:02,480
here so now it can solve the next
819
00:36:00,240 --> 00:36:05,160
problem of adding six that's equal to 9
820
00:36:02,480 --> 00:36:07,880
so it's solving simpler sub problems
821
00:36:05,160 --> 00:36:11,440
than it is and uh compared to harder
822
00:36:07,880 --> 00:36:13,920
ones another reason why is it allows for
823
00:36:11,440 --> 00:36:17,319
adaptive computation time so if you
824
00:36:13,920 --> 00:36:17,319
think about like a Transformer
825
00:36:19,000 --> 00:36:23,119
model um if you think about a
826
00:36:21,280 --> 00:36:25,560
Transformer model a Transformer model
827
00:36:23,119 --> 00:36:27,200
has fixed computation time for
828
00:36:25,560 --> 00:36:29,920
predicting each token right a fixed
829
00:36:27,200 --> 00:36:31,560
number of layers it um and based on that
830
00:36:29,920 --> 00:36:33,839
fixed number of layers it passes all the
831
00:36:31,560 --> 00:36:36,520
information through and makes a
832
00:36:33,839 --> 00:36:38,200
prediction and some problems are harder
833
00:36:36,520 --> 00:36:39,599
than others right so it would be very
834
00:36:38,200 --> 00:36:42,480
wasteful to have a really big
835
00:36:39,599 --> 00:36:45,640
Transformer that could solve you know
836
00:36:42,480 --> 00:36:49,119
really complex math problems in the same
837
00:36:45,640 --> 00:36:53,359
amount of time it takes to predict that
838
00:36:49,119 --> 00:36:55,280
the next word is like uh dog after the
839
00:36:53,359 --> 00:36:57,280
word the big or something like that
840
00:36:55,280 --> 00:36:58,560
right so there are some things that are
841
00:36:57,280 --> 00:37:00,000
easy we can do in a second there are
842
00:36:58,560 --> 00:37:01,839
some things that take us more time and
843
00:37:00,000 --> 00:37:05,880
essentially this Chain of Thought
844
00:37:01,839 --> 00:37:09,280
reasoning is um is doing that it's
845
00:37:05,880 --> 00:37:12,280
giving it more time to solve the harder
846
00:37:09,280 --> 00:37:12,280
problems
847
00:37:17,200 --> 00:37:22,440
yes
848
00:37:18,839 --> 00:37:23,960
okay yeah good good question so so
849
00:37:22,440 --> 00:37:26,200
that's what um that's what this next
850
00:37:23,960 --> 00:37:27,920
paper does so uh the the question was
851
00:37:26,200 --> 00:37:31,160
what what happens if we just ask it to
852
00:37:27,920 --> 00:37:34,800
reason and the answer is it still works
853
00:37:31,160 --> 00:37:37,000
um and this paper was really like I I I
854
00:37:34,800 --> 00:37:39,760
love this paper for its Simplicity and
855
00:37:37,000 --> 00:37:43,160
cleverness and basically uh they
856
00:37:39,760 --> 00:37:45,000
contrast few shot learning few shot
857
00:37:43,160 --> 00:37:49,200
Chain of Thought where you provide Chain
858
00:37:45,000 --> 00:37:52,160
of Thought examples zero shot prompting
859
00:37:49,200 --> 00:37:54,560
basically and zero shot Chain of Thought
860
00:37:52,160 --> 00:37:58,720
So what they do is they just
861
00:37:54,560 --> 00:38:00,280
add uh let's thinks step by step that
862
00:37:58,720 --> 00:38:04,200
they add that phrase to the end of The
863
00:38:00,280 --> 00:38:06,079
Prompt and then that elicits the model
864
00:38:04,200 --> 00:38:08,000
to basically do Chain of Thought
865
00:38:06,079 --> 00:38:09,240
reasoning without any further examples
866
00:38:08,000 --> 00:38:12,599
of how that Chain of Thought reasoning
867
00:38:09,240 --> 00:38:14,440
works why does this work again because
868
00:38:12,599 --> 00:38:16,760
like on the internet there's a bunch of
869
00:38:14,440 --> 00:38:20,240
examples of math problem solving data
870
00:38:16,760 --> 00:38:22,800
sets or QA corpora where it says let
871
00:38:20,240 --> 00:38:24,480
things step by step and after that you
872
00:38:22,800 --> 00:38:28,040
you know consistently have this sort of
873
00:38:24,480 --> 00:38:29,800
resoning chain added there so um good
874
00:38:28,040 --> 00:38:31,200
good intuition uh that this paper
875
00:38:29,800 --> 00:38:32,480
answers the question and this like
876
00:38:31,200 --> 00:38:36,119
actually does
877
00:38:32,480 --> 00:38:39,119
work one interesting thing is
878
00:38:36,119 --> 00:38:39,119
um
879
00:38:39,720 --> 00:38:45,200
now if I go to chat
880
00:38:47,319 --> 00:38:52,240
GPT and I say
881
00:38:50,480 --> 00:38:58,520
um
882
00:38:52,240 --> 00:38:58,520
I am teaching a class with 98
883
00:38:58,720 --> 00:39:06,000
students
884
00:39:01,480 --> 00:39:08,400
70% turn in the
885
00:39:06,000 --> 00:39:10,720
assignment hint on
886
00:39:08,400 --> 00:39:17,720
time uh
887
00:39:10,720 --> 00:39:21,880
10% and it in play how many did not ENT
888
00:39:17,720 --> 00:39:21,880
in let's see let's see if this
889
00:39:25,079 --> 00:39:29,200
works okay it's writing code for
890
00:39:29,440 --> 00:39:34,599
me which is that's a feature slide I
891
00:39:32,119 --> 00:39:37,319
kind of didn't uh I kind of didn't
892
00:39:34,599 --> 00:39:37,319
wanted to do
893
00:39:40,040 --> 00:39:44,160
that okay
894
00:39:45,920 --> 00:39:50,359
um I do not
895
00:39:54,280 --> 00:39:59,720
like okay so um
896
00:39:57,040 --> 00:39:59,720
it's a little bit
897
00:40:15,720 --> 00:40:21,839
slow okay so there there that worked but
898
00:40:19,680 --> 00:40:24,640
not that I did not say let's think step
899
00:40:21,839 --> 00:40:27,760
by step I didn't I didn't ask it to do
900
00:40:24,640 --> 00:40:29,240
this um and the reason why is um we're
901
00:40:27,760 --> 00:40:31,119
going to talk about instruction tuning
902
00:40:29,240 --> 00:40:34,359
next time but basically GPT has been
903
00:40:31,119 --> 00:40:36,560
tuned to do this reasoning even if you
904
00:40:34,359 --> 00:40:38,480
don't ask it to do that uh it wouldn't
905
00:40:36,560 --> 00:40:40,839
do that naturally but it's because lots
906
00:40:38,480 --> 00:40:43,880
of supervised data has been added into
907
00:40:40,839 --> 00:40:46,920
this model so like another thing is like
908
00:40:43,880 --> 00:40:48,960
if you are planning on doing anything
909
00:40:46,920 --> 00:40:51,240
about like Chain of Thought reasoning or
910
00:40:48,960 --> 00:40:53,000
or stuff like that as a class project
911
00:40:51,240 --> 00:40:54,960
you need to keep in mind that the like
912
00:40:53,000 --> 00:40:58,280
GPD models have already been trained to
913
00:40:54,960 --> 00:41:00,040
do this and so so if you want to like
914
00:40:58,280 --> 00:41:01,599
try to find out a better way to elicit
915
00:41:00,040 --> 00:41:03,960
this from a raw model you'll need to use
916
00:41:01,599 --> 00:41:07,119
a raw model like llama 2 with no chat
917
00:41:03,960 --> 00:41:10,200
tuning or stuff like that um in order to
918
00:41:07,119 --> 00:41:12,520
uh do that in a neutral in a neutral
919
00:41:10,200 --> 00:41:14,960
setting that hasn't been contaminated by
920
00:41:12,520 --> 00:41:14,960
like super
921
00:41:15,960 --> 00:41:20,520
L cool um any
922
00:41:21,079 --> 00:41:27,720
questions okay um so next I want to talk
923
00:41:24,720 --> 00:41:31,280
about prompting in programs that uh Chad
924
00:41:27,720 --> 00:41:35,560
GPD gave me a good example of uh why why
925
00:41:31,280 --> 00:41:37,160
this is useful or important um so
926
00:41:35,560 --> 00:41:40,640
there's two results actually both of
927
00:41:37,160 --> 00:41:43,440
these are are from my uh collaborators
928
00:41:40,640 --> 00:41:45,839
but the first one is um it demonstrates
929
00:41:43,440 --> 00:41:48,720
that structuring outputs at programs can
930
00:41:45,839 --> 00:41:51,599
help you get better results even if the
931
00:41:48,720 --> 00:41:55,119
task isn't a programmatic task so this
932
00:41:51,599 --> 00:41:57,000
is kind of interesting um so we were
933
00:41:55,119 --> 00:41:59,319
looking at predicting stru structured
934
00:41:57,000 --> 00:42:01,640
outputs and these structured outputs
935
00:41:59,319 --> 00:42:03,839
specifically are procedural knowledge
936
00:42:01,640 --> 00:42:06,920
like this so like how do we cook a pie
937
00:42:03,839 --> 00:42:09,040
or how do we serve pot pies on a plate
938
00:42:06,920 --> 00:42:10,800
and we had this procedural knowledge
939
00:42:09,040 --> 00:42:14,040
like take the pies out to pool open the
940
00:42:10,800 --> 00:42:16,079
cabinet drawer take out several plates
941
00:42:14,040 --> 00:42:17,720
and we wanted to know the dependencies
942
00:42:16,079 --> 00:42:19,520
between these so we could create a
943
00:42:17,720 --> 00:42:22,559
structured like procedural knowledge
944
00:42:19,520 --> 00:42:25,599
base so this is not an inherently code
945
00:42:22,559 --> 00:42:27,200
based task it's not a you know you could
946
00:42:25,599 --> 00:42:28,880
just ask
947
00:42:27,200 --> 00:42:32,160
the model in natural language and that
948
00:42:28,880 --> 00:42:35,000
would work as well so we structured
949
00:42:32,160 --> 00:42:37,720
things in a couple varieties so we had a
950
00:42:35,000 --> 00:42:39,800
textual format we had uh something in
951
00:42:37,720 --> 00:42:43,079
the dot format which is a way to draw
952
00:42:39,800 --> 00:42:45,480
graphs and then we had we also tried
953
00:42:43,079 --> 00:42:47,240
structuring the output in Python so
954
00:42:45,480 --> 00:42:48,960
these are just different ways to format
955
00:42:47,240 --> 00:42:50,720
the output they all say the same thing
956
00:42:48,960 --> 00:42:54,599
and we can extract the answer from all
957
00:42:50,720 --> 00:42:56,920
of them um but we found that structuring
958
00:42:54,599 --> 00:42:58,480
it in in Python basically is the more
959
00:42:56,920 --> 00:43:02,920
effective way of doing
960
00:42:58,480 --> 00:43:04,680
this so why why is it this the case the
961
00:43:02,920 --> 00:43:06,280
answer is essentially the same thing
962
00:43:04,680 --> 00:43:08,680
that I was talking about before with you
963
00:43:06,280 --> 00:43:11,480
know predicting excellent instead of
964
00:43:08,680 --> 00:43:13,319
five right you know it's seen a ton of
965
00:43:11,480 --> 00:43:15,960
python in it's training data so it's
966
00:43:13,319 --> 00:43:17,760
very good at predicting python uh it's
967
00:43:15,960 --> 00:43:20,359
less good at predicting dot format
968
00:43:17,760 --> 00:43:24,240
because it seemed less do format and it
969
00:43:20,359 --> 00:43:26,640
hasn't seen very much text here
970
00:43:24,240 --> 00:43:29,960
um another
971
00:43:26,640 --> 00:43:32,359
comment is code is very highly
972
00:43:29,960 --> 00:43:33,559
structured compared to natural language
973
00:43:32,359 --> 00:43:35,599
and because code is very highly
974
00:43:33,559 --> 00:43:37,520
structured we have things like
975
00:43:35,599 --> 00:43:39,079
dependencies where we refer back to
976
00:43:37,520 --> 00:43:41,079
variables that we defined before and
977
00:43:39,079 --> 00:43:44,119
other things like this so I think when
978
00:43:41,079 --> 00:43:46,760
it starts outputting code the models get
979
00:43:44,119 --> 00:43:48,359
into this mode which say yes please
980
00:43:46,760 --> 00:43:51,280
refer back to the things you've seen
981
00:43:48,359 --> 00:43:53,440
previously more often like attend to
982
00:43:51,280 --> 00:43:57,040
previous stuff more often and don't just
983
00:43:53,440 --> 00:43:59,760
like generate things you know uh
984
00:43:57,040 --> 00:44:02,440
arbitrarily and hallucinate you know new
985
00:43:59,760 --> 00:44:04,119
content and because of this for
986
00:44:02,440 --> 00:44:05,559
generating structured outputs even if
987
00:44:04,119 --> 00:44:08,920
the structured outputs don't need to be
988
00:44:05,559 --> 00:44:11,520
code you can benefit by doing
989
00:44:08,920 --> 00:44:13,200
this another thing that's a really handy
990
00:44:11,520 --> 00:44:16,319
trick is anytime you want to get a
991
00:44:13,200 --> 00:44:19,079
structured output out of a model
992
00:44:16,319 --> 00:44:22,760
um you can ask it to generate something
993
00:44:19,079 --> 00:44:24,839
in Json instead of generating it in uh
994
00:44:22,760 --> 00:44:26,640
in text and the reason why Json is
995
00:44:24,839 --> 00:44:28,079
useful is you can press the on you can
996
00:44:26,640 --> 00:44:32,319
pull out the strings and other stuff
997
00:44:28,079 --> 00:44:34,839
like that um so this can be very
998
00:44:32,319 --> 00:44:37,960
effective because if you just add an
999
00:44:34,839 --> 00:44:40,200
instruction that says please um please
1000
00:44:37,960 --> 00:44:42,440
format things in this particular
1001
00:44:40,200 --> 00:44:43,680
format often the model won't listen to
1002
00:44:42,440 --> 00:44:44,800
you and it will output something in a
1003
00:44:43,680 --> 00:44:46,280
different format you need to write a
1004
00:44:44,800 --> 00:44:48,599
really annoying parser to pull out the
1005
00:44:46,280 --> 00:44:50,280
information that you actually want but
1006
00:44:48,599 --> 00:44:51,960
it gets Json right almost all of the
1007
00:44:50,280 --> 00:44:54,040
time just because it's seen so much Json
1008
00:44:51,960 --> 00:44:57,880
so that's a nice trick if you want to do
1009
00:44:54,040 --> 00:45:01,520
something like that
1010
00:44:57,880 --> 00:45:03,559
another uh thing is a paper uh called
1011
00:45:01,520 --> 00:45:08,079
program AED language models that we did
1012
00:45:03,559 --> 00:45:10,200
about a year ago and the method that we
1013
00:45:08,079 --> 00:45:13,760
proposed here is using a program to
1014
00:45:10,200 --> 00:45:16,480
generate outputs uh using a program to
1015
00:45:13,760 --> 00:45:19,440
generate outputs and this can be more
1016
00:45:16,480 --> 00:45:22,319
precise than asking an LM to do so and
1017
00:45:19,440 --> 00:45:26,720
so instead of doing Chain of Thought
1018
00:45:22,319 --> 00:45:30,640
prompting we created a few F shot
1019
00:45:26,720 --> 00:45:34,319
examples where we wrote like the text
1020
00:45:30,640 --> 00:45:37,160
here and then the text in English and
1021
00:45:34,319 --> 00:45:40,160
then we had code corresponding code the
1022
00:45:37,160 --> 00:45:42,280
text in English corresponding code and
1023
00:45:40,160 --> 00:45:44,960
then the answer is and then the final
1024
00:45:42,280 --> 00:45:48,160
code and then we basically generate this
1025
00:45:44,960 --> 00:45:49,640
code and execute it to get the answer so
1026
00:45:48,160 --> 00:45:52,319
like as you saw this is implemented in
1027
00:45:49,640 --> 00:45:54,280
chat GP now it's uh you write something
1028
00:45:52,319 --> 00:45:56,319
out it will decide whether it wants to
1029
00:45:54,280 --> 00:45:58,599
generate code or generate text depending
1030
00:45:56,319 --> 00:46:00,760
on the type of problem and it's just
1031
00:45:58,599 --> 00:46:03,559
more precise it can solve like actually
1032
00:46:00,760 --> 00:46:05,200
rather complex problems like uh you know
1033
00:46:03,559 --> 00:46:07,880
calculating how much tax you need to be
1034
00:46:05,200 --> 00:46:10,880
paying or something like that
1035
00:46:07,880 --> 00:46:12,480
um it's especially useful for numeric
1036
00:46:10,880 --> 00:46:14,599
questions and it's implemented in things
1037
00:46:12,480 --> 00:46:17,040
like the chat GPT uh code interpreter
1038
00:46:14,599 --> 00:46:18,640
bar to execution other things like that
1039
00:46:17,040 --> 00:46:22,079
it's pretty cool it can actually do
1040
00:46:18,640 --> 00:46:24,440
visualizations for you for papers also
1041
00:46:22,079 --> 00:46:28,000
so if you ask it to visualize data for
1042
00:46:24,440 --> 00:46:30,200
you um chat GPD now does a pretty good
1043
00:46:28,000 --> 00:46:32,640
job of doing this like to give an
1044
00:46:30,200 --> 00:46:34,319
example I asked it I gave it a big
1045
00:46:32,640 --> 00:46:35,760
python list and asked it to generate a
1046
00:46:34,319 --> 00:46:37,839
histogram and it did a really good job
1047
00:46:35,760 --> 00:46:40,240
of it for me it also gives you the code
1048
00:46:37,839 --> 00:46:42,839
so you can go in and modify it later so
1049
00:46:40,240 --> 00:46:44,720
um I would definitely recommend you know
1050
00:46:42,839 --> 00:46:46,200
thinking about using this uh either in
1051
00:46:44,720 --> 00:46:49,200
your research or just to write your
1052
00:46:46,200 --> 00:46:51,480
reports uh for this class so um this
1053
00:46:49,200 --> 00:46:55,839
class is uh generative AI friendly
1054
00:46:51,480 --> 00:46:57,760
mostly so like I do I do want you to
1055
00:46:55,839 --> 00:46:59,880
learn the things we expect you to learn
1056
00:46:57,760 --> 00:47:02,480
which is why I suggest that you don't
1057
00:46:59,880 --> 00:47:04,400
like just write every uh everything for
1058
00:47:02,480 --> 00:47:06,280
assignment number one with chat GP key
1059
00:47:04,400 --> 00:47:07,720
but I think even if you tried to do that
1060
00:47:06,280 --> 00:47:09,640
it'd probably get it wrong in subtle
1061
00:47:07,720 --> 00:47:10,920
ways so you're probably better off
1062
00:47:09,640 --> 00:47:13,880
understanding the content
1063
00:47:10,920 --> 00:47:16,400
anyway um
1064
00:47:13,880 --> 00:47:18,160
cool this can also be expanded a whole
1065
00:47:16,400 --> 00:47:21,559
lot into like agents and tools and I'm
1066
00:47:18,160 --> 00:47:21,559
going to talk about that separately
1067
00:47:22,800 --> 00:47:27,720
later cool uh any any things about this
1068
00:47:29,040 --> 00:47:34,200
okay I'm uh I'm going to go next so
1069
00:47:31,800 --> 00:47:36,079
prompt engineering um when you're
1070
00:47:34,200 --> 00:47:37,280
designing prompts uh there's a number of
1071
00:47:36,079 --> 00:47:38,240
different ways you can do this you can
1072
00:47:37,280 --> 00:47:41,559
do this
1073
00:47:38,240 --> 00:47:42,960
manually uh you to do this you configure
1074
00:47:41,559 --> 00:47:44,520
a manual template based on the
1075
00:47:42,960 --> 00:47:46,160
characteristics of the task using all of
1076
00:47:44,520 --> 00:47:48,880
the knowledge that I told you
1077
00:47:46,160 --> 00:47:50,119
before you can also do automated search
1078
00:47:48,880 --> 00:47:52,079
and there's a number of different ways
1079
00:47:50,119 --> 00:47:55,119
to do automated search for
1080
00:47:52,079 --> 00:47:58,319
prompts uh the first one is doing some
1081
00:47:55,119 --> 00:48:00,599
sort of search discret space uh so you
1082
00:47:58,319 --> 00:48:02,720
find a prompt that is
1083
00:48:00,599 --> 00:48:04,680
essentially
1084
00:48:02,720 --> 00:48:06,640
text the other one is search in
1085
00:48:04,680 --> 00:48:08,559
continuous space so you find a prompt
1086
00:48:06,640 --> 00:48:10,680
that isn't actually comprehensible text
1087
00:48:08,559 --> 00:48:14,760
but nonetheless is a good
1088
00:48:10,680 --> 00:48:16,960
prompt so looking at manual engineering
1089
00:48:14,760 --> 00:48:19,000
um making sure that the format matches
1090
00:48:16,960 --> 00:48:21,680
that of a trained model uh such as the
1091
00:48:19,000 --> 00:48:24,359
chat format is actually really really
1092
00:48:21,680 --> 00:48:26,119
important um and this can have a a large
1093
00:48:24,359 --> 00:48:28,119
effect on models there's a really paper
1094
00:48:26,119 --> 00:48:30,000
that demonstrated this convincingly
1095
00:48:28,119 --> 00:48:33,200
before and also releases some software
1096
00:48:30,000 --> 00:48:35,880
that allows you to do this um kind of in
1097
00:48:33,200 --> 00:48:38,079
an efficient manner and what this is
1098
00:48:35,880 --> 00:48:41,200
showing is
1099
00:48:38,079 --> 00:48:45,079
um this is the original formatting of a
1100
00:48:41,200 --> 00:48:48,400
prompt that was given I I Believe by uh
1101
00:48:45,079 --> 00:48:50,119
some sort of like uh machine reading or
1102
00:48:48,400 --> 00:48:52,799
document based question answering data
1103
00:48:50,119 --> 00:48:55,480
set which was like passage
1104
00:48:52,799 --> 00:48:58,440
answer if you modify the spacing between
1105
00:48:55,480 --> 00:49:01,680
the the fields that increases your score
1106
00:48:58,440 --> 00:49:04,280
by several percentage points um if you
1107
00:49:01,680 --> 00:49:06,880
remove the colons that increases your
1108
00:49:04,280 --> 00:49:08,720
score by a few more percentage points
1109
00:49:06,880 --> 00:49:10,119
it's kind of silly but like little
1110
00:49:08,720 --> 00:49:11,040
things like this actually can make a
1111
00:49:10,119 --> 00:49:14,240
really big
1112
00:49:11,040 --> 00:49:17,599
difference um if you modify the casing
1113
00:49:14,240 --> 00:49:19,960
this decreases by a lot if you modify
1114
00:49:17,599 --> 00:49:22,440
the casing and remove colons so the
1115
00:49:19,960 --> 00:49:25,200
thing that was useful like adding colons
1116
00:49:22,440 --> 00:49:26,720
here remove colons uh that further
1117
00:49:25,200 --> 00:49:29,280
decrease
1118
00:49:26,720 --> 00:49:31,400
if you forget to add a space between the
1119
00:49:29,280 --> 00:49:32,559
passage and the text that really hurts
1120
00:49:31,400 --> 00:49:35,599
your
1121
00:49:32,559 --> 00:49:38,000
accuracy so this is pretty painful right
1122
00:49:35,599 --> 00:49:40,599
like you don't want to be getting uh
1123
00:49:38,000 --> 00:49:44,160
0.036% accuracy when adding a space
1124
00:49:40,599 --> 00:49:48,680
would give you like 75% accuracy
1125
00:49:44,160 --> 00:49:50,799
right um and one interesting thing is um
1126
00:49:48,680 --> 00:49:53,160
this is looking
1127
00:49:50,799 --> 00:49:56,559
at different
1128
00:49:53,160 --> 00:49:58,520
models and um
1129
00:49:56,559 --> 00:50:00,640
with different models it's pretty
1130
00:49:58,520 --> 00:50:03,599
consistent that many different plausible
1131
00:50:00,640 --> 00:50:05,400
formats that you try the average gives
1132
00:50:03,599 --> 00:50:07,240
you a really low accuracy but there's a
1133
00:50:05,400 --> 00:50:08,760
few outliers that give you really good
1134
00:50:07,240 --> 00:50:11,119
accuracy and these probably correspond
1135
00:50:08,760 --> 00:50:13,400
to the things that it was trained on um
1136
00:50:11,119 --> 00:50:15,880
instruction tuned on or or other things
1137
00:50:13,400 --> 00:50:17,480
like this so number one make sure you're
1138
00:50:15,880 --> 00:50:19,799
using like the canonical prompt
1139
00:50:17,480 --> 00:50:21,240
formatting for the model for sure number
1140
00:50:19,799 --> 00:50:22,640
two you might want to do a little bit of
1141
00:50:21,240 --> 00:50:24,720
additional search to see if you can do
1142
00:50:22,640 --> 00:50:26,960
even better than that so um this is
1143
00:50:24,720 --> 00:50:29,480
something to be very aware
1144
00:50:26,960 --> 00:50:32,480
of
1145
00:50:29,480 --> 00:50:32,480
um
1146
00:50:34,200 --> 00:50:37,680
okay do you have a
1147
00:50:39,599 --> 00:50:43,720
question this is dependent on what it
1148
00:50:41,720 --> 00:50:47,680
sees in trading time another thing
1149
00:50:43,720 --> 00:50:51,920
actually is um this will definitely be
1150
00:50:47,680 --> 00:50:53,200
tighter for uh like a chat GPT or GPT 4
1151
00:50:51,920 --> 00:50:56,599
um because it's been trained on many
1152
00:50:53,200 --> 00:50:59,319
different formats at training time um
1153
00:50:56,599 --> 00:51:00,880
and so the better the model has been
1154
00:50:59,319 --> 00:51:03,520
trained on a lot of different formats
1155
00:51:00,880 --> 00:51:05,559
the less this is going to have an
1156
00:51:03,520 --> 00:51:06,920
effect but you know you're probably not
1157
00:51:05,559 --> 00:51:09,440
going to be retraining a model that
1158
00:51:06,920 --> 00:51:10,799
somebody gives you uh so like this is
1159
00:51:09,440 --> 00:51:12,880
something to be very aware of if you're
1160
00:51:10,799 --> 00:51:14,839
just a downstream newer model especially
1161
00:51:12,880 --> 00:51:17,599
an open source
1162
00:51:14,839 --> 00:51:19,359
model um another thing is how do you
1163
00:51:17,599 --> 00:51:22,280
give instructions to
1164
00:51:19,359 --> 00:51:25,000
models um instructions should be clear
1165
00:51:22,280 --> 00:51:29,280
concise and easy to understand one very
1166
00:51:25,000 --> 00:51:31,559
funny thing is um I think now like
1167
00:51:29,280 --> 00:51:33,280
actually prompting language models is
1168
00:51:31,559 --> 00:51:34,960
very similar to prompting humans
1169
00:51:33,280 --> 00:51:37,119
especially if we're talking about like
1170
00:51:34,960 --> 00:51:38,760
gp4 so if you're not very good at
1171
00:51:37,119 --> 00:51:41,599
explaining things to humans that might
1172
00:51:38,760 --> 00:51:45,440
actually be bad um and you might want to
1173
00:51:41,599 --> 00:51:47,359
practice that and explaining things to
1174
00:51:45,440 --> 00:51:50,319
models might be a good way to practice
1175
00:51:47,359 --> 00:51:51,799
that right so you know um it actually
1176
00:51:50,319 --> 00:51:54,040
can give you feedback without annoying
1177
00:51:51,799 --> 00:51:55,359
your friends by having you explain uh
1178
00:51:54,040 --> 00:51:58,160
things to them in several different ways
1179
00:51:55,359 --> 00:52:00,040
way and seeing how they react so um but
1180
00:51:58,160 --> 00:52:03,680
anyway clear concise easy to understand
1181
00:52:00,040 --> 00:52:05,319
is good um there's this prompting guide
1182
00:52:03,680 --> 00:52:08,599
uh which I I can
1183
00:52:05,319 --> 00:52:13,240
open um this has a prompt engineering
1184
00:52:08,599 --> 00:52:14,520
guide I I I like this site but it it
1185
00:52:13,240 --> 00:52:17,400
does have a bit
1186
00:52:14,520 --> 00:52:18,880
of like variance in the importance of
1187
00:52:17,400 --> 00:52:21,760
the information that tells you but like
1188
00:52:18,880 --> 00:52:23,960
this particular page is nice I feel so
1189
00:52:21,760 --> 00:52:26,160
start simple start with simple
1190
00:52:23,960 --> 00:52:29,520
instructions um
1191
00:52:26,160 --> 00:52:32,119
you should tell the model what it should
1192
00:52:29,520 --> 00:52:36,839
be doing so make sure you say write
1193
00:52:32,119 --> 00:52:39,799
classify summarize translate order um
1194
00:52:36,839 --> 00:52:41,960
and things like this uh it also gives
1195
00:52:39,799 --> 00:52:45,440
some good examples of the level of
1196
00:52:41,960 --> 00:52:47,559
specificity that you should be giving so
1197
00:52:45,440 --> 00:52:49,680
something that's less precise is explain
1198
00:52:47,559 --> 00:52:51,559
the concept of prompt engineering keep
1199
00:52:49,680 --> 00:52:53,920
the explanation short only a few
1200
00:52:51,559 --> 00:52:57,119
sentences and don't be too
1201
00:52:53,920 --> 00:52:58,799
descriptive um it use two to three
1202
00:52:57,119 --> 00:53:00,240
sentences to explain the concept of
1203
00:52:58,799 --> 00:53:02,599
prompt engineering to a high school
1204
00:53:00,240 --> 00:53:04,839
student so what this does is this tells
1205
00:53:02,599 --> 00:53:07,839
you the level of read like the reading
1206
00:53:04,839 --> 00:53:07,839
level
1207
00:53:07,960 --> 00:53:12,520
um so this doesn't even tell you the
1208
00:53:10,200 --> 00:53:14,319
reading level I guess um and then two to
1209
00:53:12,520 --> 00:53:16,240
three sentences is more precise than
1210
00:53:14,319 --> 00:53:19,200
keep it a few sentences don't be too
1211
00:53:16,240 --> 00:53:22,440
descriptive so um the more precise you
1212
00:53:19,200 --> 00:53:25,760
can be the the better it is um one
1213
00:53:22,440 --> 00:53:27,040
interesting thing is like if you ask
1214
00:53:25,760 --> 00:53:28,359
your friend to do something and they
1215
00:53:27,040 --> 00:53:32,400
don't know how to do it they'll complain
1216
00:53:28,359 --> 00:53:34,240
to you but right now uh LMS don't
1217
00:53:32,400 --> 00:53:35,720
complain to you they may in the future
1218
00:53:34,240 --> 00:53:38,680
uh that might be like actually an
1219
00:53:35,720 --> 00:53:40,799
interesting thing to find uh the you
1220
00:53:38,680 --> 00:53:42,319
know interesting methodological thing to
1221
00:53:40,799 --> 00:53:45,240
look at for a project or something like
1222
00:53:42,319 --> 00:53:47,960
that but um right now you need to be
1223
00:53:45,240 --> 00:53:49,040
precise and like there's it doesn't give
1224
00:53:47,960 --> 00:53:51,799
you feedback when you're not being
1225
00:53:49,040 --> 00:53:51,799
precise so you need
1226
00:53:52,000 --> 00:53:56,359
to um separately from this there are
1227
00:53:54,200 --> 00:53:59,160
methods for automatic prompt engineering
1228
00:53:56,359 --> 00:54:00,960
so uh prompt paraphrasing gradient based
1229
00:53:59,160 --> 00:54:02,240
discreet prompt search prompt tuning
1230
00:54:00,960 --> 00:54:06,160
prefix
1231
00:54:02,240 --> 00:54:09,880
tuning so prompt paraphrasing um this is
1232
00:54:06,160 --> 00:54:12,559
a method that uh we proposed a while ago
1233
00:54:09,880 --> 00:54:15,760
um to basically paraphrase an existing
1234
00:54:12,559 --> 00:54:17,280
prompt to get other candidates um it's
1235
00:54:15,760 --> 00:54:19,240
rather simple basically you take a
1236
00:54:17,280 --> 00:54:21,960
prompt you put it through a paraphrasing
1237
00:54:19,240 --> 00:54:24,280
model and it will give you new prompts
1238
00:54:21,960 --> 00:54:25,440
and this is good because it will tend to
1239
00:54:24,280 --> 00:54:28,319
give you things that are natural
1240
00:54:25,440 --> 00:54:29,839
language um you can paraphrase 50 times
1241
00:54:28,319 --> 00:54:32,480
try all of them see which one gives you
1242
00:54:29,839 --> 00:54:37,079
the highest accuracy and then use that
1243
00:54:32,480 --> 00:54:39,280
one um there's also an interesting paper
1244
00:54:37,079 --> 00:54:43,079
uh that demonstrates that you can do
1245
00:54:39,280 --> 00:54:45,240
this iteratively so you paraphrase once
1246
00:54:43,079 --> 00:54:46,599
um you filter down all the candidates
1247
00:54:45,240 --> 00:54:48,119
that do well and then you go in and
1248
00:54:46,599 --> 00:54:49,960
paraphrase them again and you just do
1249
00:54:48,119 --> 00:54:51,960
this over and over again and that can
1250
00:54:49,960 --> 00:54:54,079
give you better results than kind of one
1251
00:54:51,960 --> 00:54:57,079
one off
1252
00:54:54,079 --> 00:54:57,079
paraphrasing
1253
00:54:59,240 --> 00:55:02,079
so that's very simple you can even use a
1254
00:55:01,079 --> 00:55:04,160
large language model to do the
1255
00:55:02,079 --> 00:55:06,599
paraphrasing for you um another thing
1256
00:55:04,160 --> 00:55:08,920
that you can do is gradient based search
1257
00:55:06,599 --> 00:55:11,119
so the way this works is you need to
1258
00:55:08,920 --> 00:55:16,319
have a a model that you can calculate
1259
00:55:11,119 --> 00:55:19,920
gradients for and what you do is you
1260
00:55:16,319 --> 00:55:22,240
calculate you create a seed prompt and
1261
00:55:19,920 --> 00:55:26,000
then you calculate gradients into that
1262
00:55:22,240 --> 00:55:29,760
seed prompt so you treat the
1263
00:55:26,000 --> 00:55:33,160
um you treat each of the tokens here
1264
00:55:29,760 --> 00:55:36,680
like T1 T2 T3 T4
1265
00:55:33,160 --> 00:55:38,240
T5 as their own embeddings you do back
1266
00:55:36,680 --> 00:55:39,920
propop into those embeddings and you
1267
00:55:38,240 --> 00:55:42,799
optimize them to get high accuracy on
1268
00:55:39,920 --> 00:55:44,720
your data set then after you're done
1269
00:55:42,799 --> 00:55:47,319
optimizing them to get high accuracy on
1270
00:55:44,720 --> 00:55:49,079
your data set you clamp them onto the
1271
00:55:47,319 --> 00:55:52,160
nearest neighbor embedding that you
1272
00:55:49,079 --> 00:55:53,520
already have so you basically say okay
1273
00:55:52,160 --> 00:55:56,720
the nearest neighbor to the embedding
1274
00:55:53,520 --> 00:55:58,920
that I learned you um is atmosphere then
1275
00:55:56,720 --> 00:56:02,240
a lot dialogue clone
1276
00:55:58,920 --> 00:56:03,799
totally and so this is this will
1277
00:56:02,240 --> 00:56:05,599
actually give you better results than
1278
00:56:03,799 --> 00:56:07,839
paraphrasing in many cases because the
1279
00:56:05,599 --> 00:56:11,520
search space is less constrained you can
1280
00:56:07,839 --> 00:56:12,960
get these very unnatural prompts uh that
1281
00:56:11,520 --> 00:56:16,280
don't seem to make sense but actually
1282
00:56:12,960 --> 00:56:20,280
work well this has particularly been
1283
00:56:16,280 --> 00:56:22,960
widely used in um adversarial attacks on
1284
00:56:20,280 --> 00:56:25,599
language modals so how can you come up
1285
00:56:22,960 --> 00:56:27,720
with um
1286
00:56:25,599 --> 00:56:31,559
with prompts that
1287
00:56:27,720 --> 00:56:33,319
cause language models to uh do things
1288
00:56:31,559 --> 00:56:36,039
that you don't want them to be
1289
00:56:33,319 --> 00:56:38,920
doing and um there's actually this nice
1290
00:56:36,039 --> 00:56:41,440
paper uh also by people at CMU called
1291
00:56:38,920 --> 00:56:42,960
Universal and transferable adversarial
1292
00:56:41,440 --> 00:56:45,400
attacks on line language
1293
00:56:42,960 --> 00:56:50,559
models and basically what they do is
1294
00:56:45,400 --> 00:56:53,880
they try to optimize the uh they try to
1295
00:56:50,559 --> 00:56:56,839
optimize the prompt to create a prompt
1296
00:56:53,880 --> 00:56:58,599
that causes the model to do bad things
1297
00:56:56,839 --> 00:57:00,039
basically and they try to do it even on
1298
00:56:58,599 --> 00:57:03,440
models that have been trying to not do
1299
00:57:00,039 --> 00:57:05,039
bad things and they demonstrate that
1300
00:57:03,440 --> 00:57:07,359
number one you can cause things like
1301
00:57:05,039 --> 00:57:09,599
models like llama to do bad you know bad
1302
00:57:07,359 --> 00:57:12,559
things like output toxic things tell you
1303
00:57:09,599 --> 00:57:15,599
how to build bombs stuff like that but
1304
00:57:12,559 --> 00:57:18,480
also the same prompts also work on like
1305
00:57:15,599 --> 00:57:22,319
GPD models uh which is kind of like
1306
00:57:18,480 --> 00:57:23,839
interesting and and very uh you know
1307
00:57:22,319 --> 00:57:26,520
confusing in a way because you thought
1308
00:57:23,839 --> 00:57:28,160
this might be explo idiosyncrasies of a
1309
00:57:26,520 --> 00:57:32,440
particular language model but actually
1310
00:57:28,160 --> 00:57:32,440
it's not so I I find this kind of
1311
00:57:33,880 --> 00:57:39,520
fascinating
1312
00:57:36,039 --> 00:57:42,240
so if you take that a step further one
1313
00:57:39,520 --> 00:57:44,079
thing that you can do is you can say oh
1314
00:57:42,240 --> 00:57:46,280
actually there's no reason why we need
1315
00:57:44,079 --> 00:57:48,520
to clamp these embeddings back to an
1316
00:57:46,280 --> 00:57:52,240
existing embedding right so we could
1317
00:57:48,520 --> 00:57:56,079
just optimize the prompts the embeddings
1318
00:57:52,240 --> 00:57:57,720
of the prompts that go for a task and
1319
00:57:56,079 --> 00:58:02,000
not clamp them back to embeddings and
1320
00:57:57,720 --> 00:58:03,599
just keep them as is so um what I mean
1321
00:58:02,000 --> 00:58:07,079
by that is like right here it's
1322
00:58:03,599 --> 00:58:09,160
optimizing T1 T2 T3 T4 T5 and then
1323
00:58:07,079 --> 00:58:11,359
clamping that back to Atmosphere a lot
1324
00:58:09,160 --> 00:58:13,960
dialog clone totally but just keep them
1325
00:58:11,359 --> 00:58:16,160
as is and don't worry about them like
1326
00:58:13,960 --> 00:58:18,039
actually being a token in the model
1327
00:58:16,160 --> 00:58:19,400
because if you have control over your
1328
00:58:18,039 --> 00:58:21,200
model you can just add them as new
1329
00:58:19,400 --> 00:58:25,960
elements in the vocabulary and you're
1330
00:58:21,200 --> 00:58:28,440
fine right so what they demonstrate in
1331
00:58:25,960 --> 00:58:31,520
this paper is that instead of taking
1332
00:58:28,440 --> 00:58:33,440
your 11 billion parameter model and
1333
00:58:31,520 --> 00:58:35,920
training the whole 11 billion parameter
1334
00:58:33,440 --> 00:58:38,359
model for many different tasks on many
1335
00:58:35,920 --> 00:58:40,079
different data sets they just train
1336
00:58:38,359 --> 00:58:42,039
these prompts which are like 20K
1337
00:58:40,079 --> 00:58:44,039
parameters each I I forget how long it
1338
00:58:42,039 --> 00:58:46,280
is it's like 10 tokens or 20 tokens or
1339
00:58:44,039 --> 00:58:48,079
something like that um and train it on
1340
00:58:46,280 --> 00:58:49,640
all of the the data sets here and you
1341
00:58:48,079 --> 00:58:50,680
don't actually need to do multitask
1342
00:58:49,640 --> 00:58:52,200
learning you don't need to train on
1343
00:58:50,680 --> 00:58:53,720
multiple tasks at the same time you can
1344
00:58:52,200 --> 00:58:56,119
just train on a single
1345
00:58:53,720 --> 00:58:58,599
task
1346
00:58:56,119 --> 00:59:01,000
so now let's take that even a step
1347
00:58:58,599 --> 00:59:03,640
further so this is only training the
1348
00:59:01,000 --> 00:59:06,359
embeddings that you input into the model
1349
00:59:03,640 --> 00:59:08,160
there's a method called prefix tuning
1350
00:59:06,359 --> 00:59:10,319
and the way prefix tuning works is
1351
00:59:08,160 --> 00:59:12,280
instead of training only the embeddings
1352
00:59:10,319 --> 00:59:14,799
that go into the model they actually
1353
00:59:12,280 --> 00:59:18,920
train a prefix that you then append to
1354
00:59:14,799 --> 00:59:20,839
every layer of the model so prompt
1355
00:59:18,920 --> 00:59:23,319
tuning basically does this for the first
1356
00:59:20,839 --> 00:59:24,839
layer of the model prefix tuning does
1357
00:59:23,319 --> 00:59:28,400
this for every layer of the model you
1358
00:59:24,839 --> 00:59:30,319
append a prefix uh for every day so it's
1359
00:59:28,400 --> 00:59:32,200
just a more expressive version of
1360
00:59:30,319 --> 00:59:36,119
prompting
1361
00:59:32,200 --> 00:59:40,200
essentially so these are all kinds of
1362
00:59:36,119 --> 00:59:43,680
gradual steps from a human created
1363
00:59:40,200 --> 00:59:47,880
prompt into something that is basically
1364
00:59:43,680 --> 00:59:50,839
training a a prompt or a prefix to the
1365
00:59:47,880 --> 00:59:52,960
model so I I would take questions but
1366
00:59:50,839 --> 00:59:55,200
let me get to the end of this section uh
1367
00:59:52,960 --> 00:59:58,839
also because uh I think there's
1368
00:59:55,200 --> 01:00:00,720
interesting analogies here so in the
1369
00:59:58,839 --> 01:00:02,880
next class I'm going to talk about
1370
01:00:00,720 --> 01:00:04,440
parameter efficient fine-tuning methods
1371
01:00:02,880 --> 01:00:06,960
which is kind of a more
1372
01:00:04,440 --> 01:00:10,000
General it's a more
1373
01:00:06,960 --> 01:00:11,480
General version of prompt tuning or
1374
01:00:10,000 --> 01:00:13,280
prefix tuning there are methods that
1375
01:00:11,480 --> 01:00:15,960
tune a small number of parameters to get
1376
01:00:13,280 --> 01:00:17,400
the model to do something and there's a
1377
01:00:15,960 --> 01:00:18,880
bunch of different parameter efficient
1378
01:00:17,400 --> 01:00:21,520
tuning methods many people may have
1379
01:00:18,880 --> 01:00:23,880
heard of something like Laura uh or
1380
01:00:21,520 --> 01:00:25,440
adapters um I just talked about prefix
1381
01:00:23,880 --> 01:00:28,119
tuning
1382
01:00:25,440 --> 01:00:30,960
so essentially prompt tuning and prefix
1383
01:00:28,119 --> 01:00:33,359
tuning are part of this more General
1384
01:00:30,960 --> 01:00:36,680
class of parameter efficient find tuning
1385
01:00:33,359 --> 01:00:39,240
methods and so what we can say is
1386
01:00:36,680 --> 01:00:41,119
actually prompting is fine-tuning
1387
01:00:39,240 --> 01:00:42,920
prompting is a way of fine-tuning the
1388
01:00:41,119 --> 01:00:46,799
model or getting the model to perform a
1389
01:00:42,920 --> 01:00:49,839
particular task um and we have this
1390
01:00:46,799 --> 01:00:53,720
taxonomy of we have prompts in natural
1391
01:00:49,839 --> 01:00:55,160
language that are created uh by humans
1392
01:00:53,720 --> 01:00:57,240
actually maybe I should say manual
1393
01:00:55,160 --> 01:00:59,559
prompt engineering here this was first
1394
01:00:57,240 --> 01:01:01,480
done in the gpd2 paper where they
1395
01:00:59,559 --> 01:01:04,359
demonstrate that models uh models could
1396
01:01:01,480 --> 01:01:06,200
solve tasks by doing it this way prompt
1397
01:01:04,359 --> 01:01:07,760
paraphrasing is a step up from this
1398
01:01:06,200 --> 01:01:09,799
because it's no longer relying on human
1399
01:01:07,760 --> 01:01:12,680
engineering and you can you know expand
1400
01:01:09,799 --> 01:01:15,280
to a broader set of prompts um it can
1401
01:01:12,680 --> 01:01:17,359
always start with human created prompts
1402
01:01:15,280 --> 01:01:20,240
so it's kind of like broader uh than
1403
01:01:17,359 --> 01:01:21,799
that discrete prompt search doesn't
1404
01:01:20,240 --> 01:01:23,599
necessarily need to rely on a
1405
01:01:21,799 --> 01:01:25,559
paraphrasing model it could rely on like
1406
01:01:23,599 --> 01:01:26,760
gradient-based models or something else
1407
01:01:25,559 --> 01:01:29,240
like that to give you something that's
1408
01:01:26,760 --> 01:01:32,559
not actually natural language uh kind of
1409
01:01:29,240 --> 01:01:35,920
just random tokens continuous prompts or
1410
01:01:32,559 --> 01:01:38,119
prompt tuning is a step above that
1411
01:01:35,920 --> 01:01:41,039
multi-layer continuous prompts or prefix
1412
01:01:38,119 --> 01:01:42,520
tuning is a layer above that parameter
1413
01:01:41,039 --> 01:01:43,520
efficient tuning is more General than
1414
01:01:42,520 --> 01:01:45,359
that and then you have all training
1415
01:01:43,520 --> 01:01:49,160
methods so including fine tuning your
1416
01:01:45,359 --> 01:01:52,680
model and so what are the implications
1417
01:01:49,160 --> 01:01:55,760
of this um I think so a lot of people
1418
01:01:52,680 --> 01:01:58,720
when prompting came out they were like
1419
01:01:55,760 --> 01:02:00,640
prompting methods are very hacky I don't
1420
01:01:58,720 --> 01:02:03,839
like how we have to do manual prompt
1421
01:02:00,640 --> 01:02:08,160
engineering um it seems like a dark art
1422
01:02:03,839 --> 01:02:11,000
as opposed to like you know actually you
1423
01:02:08,160 --> 01:02:14,160
know some sort of well understood
1424
01:02:11,000 --> 01:02:16,839
fine-tuning method that we could use um
1425
01:02:14,160 --> 01:02:20,520
but I I actually like them I like
1426
01:02:16,839 --> 01:02:23,920
prompting a lot because um if anybody is
1427
01:02:20,520 --> 01:02:25,960
familiar with like basian basian
1428
01:02:23,920 --> 01:02:27,920
statistics or machine learning we have
1429
01:02:25,960 --> 01:02:28,799
the concept of like a prior probability
1430
01:02:27,920 --> 01:02:31,200
over
1431
01:02:28,799 --> 01:02:32,359
parameters and then a probability that
1432
01:02:31,200 --> 01:02:34,680
we get
1433
01:02:32,359 --> 01:02:37,880
after after fine tuning the model or
1434
01:02:34,680 --> 01:02:40,440
after training the model and prompts in
1435
01:02:37,880 --> 01:02:42,640
a way are our first like good prior over
1436
01:02:40,440 --> 01:02:43,880
neural network models they give us the
1437
01:02:42,640 --> 01:02:46,319
ability to
1438
01:02:43,880 --> 01:02:48,559
specify what task the model should be
1439
01:02:46,319 --> 01:02:51,880
doing or like a general idea of what
1440
01:02:48,559 --> 01:02:54,200
task the model should be doing before we
1441
01:02:51,880 --> 01:02:56,359
ask the model to actually do the task
1442
01:02:54,200 --> 01:02:58,640
and and so we can either use that prior
1443
01:02:56,359 --> 01:03:02,119
Asis we can use a prompted model Asis
1444
01:02:58,640 --> 01:03:04,839
without doing any additional tuning or
1445
01:03:02,119 --> 01:03:06,480
we could take the prior that we have
1446
01:03:04,839 --> 01:03:07,920
given to the model by using a natural
1447
01:03:06,480 --> 01:03:09,039
language description of the task it
1448
01:03:07,920 --> 01:03:12,079
should be
1449
01:03:09,039 --> 01:03:14,799
doing and then combine it with fineing
1450
01:03:12,079 --> 01:03:17,039
so we can take the prompted
1451
01:03:14,799 --> 01:03:19,279
model we can
1452
01:03:17,039 --> 01:03:21,640
initialize we can initialize the
1453
01:03:19,279 --> 01:03:23,960
distribution of this like Cas a prompt
1454
01:03:21,640 --> 01:03:25,720
using the prompt using a human created
1455
01:03:23,960 --> 01:03:28,160
prompt and then go on and fine-tune it
1456
01:03:25,720 --> 01:03:30,960
on lots of training data as well and
1457
01:03:28,160 --> 01:03:33,799
there's a method for doing that um by
1458
01:03:30,960 --> 01:03:35,880
shik and schutza uh called uh pattern
1459
01:03:33,799 --> 01:03:37,559
exploiting training where they do
1460
01:03:35,880 --> 01:03:39,799
exactly that they basically initialize
1461
01:03:37,559 --> 01:03:41,720
with a manually created prompt and then
1462
01:03:39,799 --> 01:03:44,559
they find the model on finding inator
1463
01:03:41,720 --> 01:03:46,400
after that so um that's a reason why I
1464
01:03:44,559 --> 01:03:47,920
like prompting based methods they they
1465
01:03:46,400 --> 01:03:49,720
give us this like really nice way to
1466
01:03:47,920 --> 01:03:53,039
very quickly create a system but we can
1467
01:03:49,720 --> 01:03:56,079
also have you know whatever level of
1468
01:03:53,039 --> 01:03:59,880
additional training on top of that
1469
01:03:56,079 --> 01:03:59,880
cool so that's a little bit early I'm |