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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
WEBVTT

00:00:00.480 --> 00:00:06.279
so uh I guess we can get started uh

00:00:04.080 --> 00:00:09.880
today I'm going to be talking about code

00:00:06.279 --> 00:00:11.719
generation and uh so this is a a

00:00:09.880 --> 00:00:13.599
research topic that I've uh worked on

00:00:11.719 --> 00:00:15.280
for a long time now I I like a lot it's

00:00:13.599 --> 00:00:17.520
become very useful nowadays which is

00:00:15.280 --> 00:00:20.960
very exciting um so I'd like to talk

00:00:17.520 --> 00:00:23.119
about kind of some of the basics and

00:00:20.960 --> 00:00:28.000
Frontiers uh that we're working on right

00:00:23.119 --> 00:00:28.000
now in this General uh area

00:00:31.719 --> 00:00:36.760
um

00:00:33.360 --> 00:00:38.160
so before I get into code generation

00:00:36.760 --> 00:00:40.719
specifically one thing I'd like to point

00:00:38.160 --> 00:00:43.399
out is for the next four or so classes

00:00:40.719 --> 00:00:45.680
I'm going to be talking about tasks and

00:00:43.399 --> 00:00:48.680
up until now I've been focusing on a lot

00:00:45.680 --> 00:00:52.840
of like General things that weren't as

00:00:48.680 --> 00:00:55.199
much about any specific tasks um

00:00:52.840 --> 00:00:57.000
and I know that not everybody's going to

00:00:55.199 --> 00:00:59.399
be interested in the four tasks that I'm

00:00:57.000 --> 00:01:00.960
talking about in the next you know four

00:00:59.399 --> 00:01:02.480
lectures

00:01:00.960 --> 00:01:04.920
um

00:01:02.480 --> 00:01:06.640
but I'm going to be covering various

00:01:04.920 --> 00:01:08.680
things about different tasks and

00:01:06.640 --> 00:01:10.640
hopefully you can map the same questions

00:01:08.680 --> 00:01:12.040
onto whatever task you are interested in

00:01:10.640 --> 00:01:14.360
if you're not interested in any of the

00:01:12.040 --> 00:01:15.880
ones I talk about here so basically what

00:01:14.360 --> 00:01:18.119
I want to talk about is the task

00:01:15.880 --> 00:01:21.040
objective like why do we do that task

00:01:18.119 --> 00:01:23.479
why is it important um what data sets

00:01:21.040 --> 00:01:26.560
can we use to train or test our models

00:01:23.479 --> 00:01:28.799
on these tasks evaluation metrics and

00:01:26.560 --> 00:01:31.200
how do we evaluate uh both manually and

00:01:28.799 --> 00:01:32.079
automatically with respect to how good

00:01:31.200 --> 00:01:34.960
we're

00:01:32.079 --> 00:01:37.880
doing and finally models and methods so

00:01:34.960 --> 00:01:40.720
you know how do we solve the

00:01:37.880 --> 00:01:42.479
problem and so for code generation first

00:01:40.720 --> 00:01:44.439
I'd like to talk about the overview and

00:01:42.479 --> 00:01:47.040
objectives of code generation so

00:01:44.439 --> 00:01:48.840
basically code generation is the task of

00:01:47.040 --> 00:01:52.439
generating executable code is an

00:01:48.840 --> 00:01:54.479
interface to uh a program or to

00:01:52.439 --> 00:01:58.320
computers and there's a lot of different

00:01:54.479 --> 00:02:01.000
ways we can do this um why do we want to

00:01:58.320 --> 00:02:03.159
do this so

00:02:01.000 --> 00:02:05.000
the first thing is that software

00:02:03.159 --> 00:02:06.759
engineering is really important and

00:02:05.000 --> 00:02:09.640
being able to generate code accelerate

00:02:06.759 --> 00:02:11.560
software engineering uh now code

00:02:09.640 --> 00:02:13.640
generation is practical and I hope that

00:02:11.560 --> 00:02:15.599
everybody in the class is using some

00:02:13.640 --> 00:02:17.840
sort of you know code generation to

00:02:15.599 --> 00:02:20.200
accelerate your own workflow if you're

00:02:17.840 --> 00:02:22.599
not I highly encourage you to to try it

00:02:20.200 --> 00:02:26.200
because it's very

00:02:22.599 --> 00:02:31.040
useful second it also does things like

00:02:26.200 --> 00:02:34.239
enabling models to access tools um

00:02:31.040 --> 00:02:37.440
and even if you're not specifically

00:02:34.239 --> 00:02:39.440
working on a software related task this

00:02:37.440 --> 00:02:41.000
can be helpful but I want to talk about

00:02:39.440 --> 00:02:42.480
this in a later class when we talk about

00:02:41.000 --> 00:02:46.640
llm agents so I'm not going to be

00:02:42.480 --> 00:02:48.319
talking about um that as much this time

00:02:46.640 --> 00:02:50.159
uh one other thing that I I forgot to

00:02:48.319 --> 00:02:52.920
mention here which I'm also going to

00:02:50.159 --> 00:02:55.000
talk about in the later class is even if

00:02:52.920 --> 00:02:58.120
you're not using code at all training on

00:02:55.000 --> 00:03:00.319
code has been shown to cause some

00:02:58.120 --> 00:03:01.920
benefits to learning models uh

00:03:00.319 --> 00:03:03.799
specifically with respect to learning

00:03:01.920 --> 00:03:06.480
like difficult multitask reasoning uh

00:03:03.799 --> 00:03:07.599
sorry multi-step reasoning tasks and so

00:03:06.480 --> 00:03:09.480
that's another reason why you might want

00:03:07.599 --> 00:03:10.840
to worry about codes so I'm going to

00:03:09.480 --> 00:03:12.840
mainly talk about the first one this

00:03:10.840 --> 00:03:14.560
time and leave the other two uh for

00:03:12.840 --> 00:03:17.720
future

00:03:14.560 --> 00:03:21.760
lectures so specifically for this task

00:03:17.720 --> 00:03:25.200
our input um is some sort of

00:03:21.760 --> 00:03:27.360
specification of what we want to do um

00:03:25.200 --> 00:03:30.319
and our output is going to be

00:03:27.360 --> 00:03:33.000
code so

00:03:30.319 --> 00:03:35.920
when you write a

00:03:33.000 --> 00:03:37.239
program how do you describe the thing

00:03:35.920 --> 00:03:40.239
that you want to implement in the

00:03:37.239 --> 00:03:42.000
program before you implement it like uh

00:03:40.239 --> 00:03:44.720
yeah what are some of the specifications

00:03:42.000 --> 00:03:44.720
that people can give

00:03:45.280 --> 00:03:50.720
you what the input and output of the

00:03:47.680 --> 00:03:52.360
functions are uh yes uh sorry what what

00:03:50.720 --> 00:03:54.400
types the inputs and outputs of the

00:03:52.360 --> 00:03:56.239
function are so those would be like type

00:03:54.400 --> 00:03:57.760
in in Python for example yeah that

00:03:56.239 --> 00:03:59.439
that's a good one it's actually not on

00:03:57.760 --> 00:04:02.079
my list of things here but it's it's a

00:03:59.439 --> 00:04:06.040
good Point yeah any any other things

00:04:02.079 --> 00:04:08.680
yeah complexity requirements complexity

00:04:06.040 --> 00:04:11.040
requirements constraints that is also

00:04:08.680 --> 00:04:14.840
not on my list of things here uh that's

00:04:11.040 --> 00:04:17.040
uh that's a good one too um and any uh

00:04:14.840 --> 00:04:20.280
slightly more straight forward

00:04:17.040 --> 00:04:24.040
things pseudo code yeah um in pseudo

00:04:20.280 --> 00:04:26.720
code uh what what is pseudo code written

00:04:24.040 --> 00:04:28.440
in natural natural language yeah so

00:04:26.720 --> 00:04:31.199
natural language inputs are are one

00:04:28.440 --> 00:04:34.520
thing so I will tell you I want I want a

00:04:31.199 --> 00:04:39.160
program that uh I want you to write a

00:04:34.520 --> 00:04:41.479
web interface that allows me to um order

00:04:39.160 --> 00:04:43.560
pizza or something like that that that

00:04:41.479 --> 00:04:46.560
would be one way to do it any other

00:04:43.560 --> 00:04:46.560
ideas

00:04:51.199 --> 00:04:55.840
yeah this is what I have and this is

00:04:53.360 --> 00:04:57.240
what I want yeah so um that's especially

00:04:55.840 --> 00:04:59.880
the case if you're like modifying a

00:04:57.240 --> 00:05:01.400
program um or something like that so

00:04:59.880 --> 00:05:06.280
actually the next one on my list there

00:05:01.400 --> 00:05:06.280
so good good point um any other

00:05:09.759 --> 00:05:15.720
ideas yeah or or a multimodal person you

00:05:12.880 --> 00:05:20.120
know I might say I want a pizza ordering

00:05:15.720 --> 00:05:22.039
I want a pizza ordering app and up here

00:05:20.120 --> 00:05:24.000
it should have your like username so you

00:05:22.039 --> 00:05:25.840
can click through the settings and like

00:05:24.000 --> 00:05:27.080
over here you should have the menu and

00:05:25.840 --> 00:05:28.680
over here you should have your check out

00:05:27.080 --> 00:05:30.400
card or something like that you know

00:05:28.680 --> 00:05:32.440
it's something you do for a programmer

00:05:30.400 --> 00:05:34.680
as well until recently we couldn't

00:05:32.440 --> 00:05:37.680
really use that with like actual models

00:05:34.680 --> 00:05:40.560
but um yeah yeah well that was my fourth

00:05:37.680 --> 00:05:42.639
one but um and then the other one uh

00:05:40.560 --> 00:05:44.960
inputs and outputs this could come in

00:05:42.639 --> 00:05:46.560
the form of like unit tests or something

00:05:44.960 --> 00:05:49.199
like that where it's like yeah this is

00:05:46.560 --> 00:05:51.160
the input this is the expected output so

00:05:49.199 --> 00:05:53.240
these are all things we use both as

00:05:51.160 --> 00:05:55.639
human programmers and in code generation

00:05:53.240 --> 00:05:58.120
models I really like the two other

00:05:55.639 --> 00:06:00.440
points though um

00:05:58.120 --> 00:06:03.759
because typin

00:06:00.440 --> 00:06:05.479
are actually something that you like

00:06:03.759 --> 00:06:06.599
writing writing with typ pints is

00:06:05.479 --> 00:06:09.240
actually something that you can do with

00:06:06.599 --> 00:06:14.120
code generation models and um

00:06:09.240 --> 00:06:16.680
constraints such as like it should it

00:06:14.120 --> 00:06:20.199
should meet certain speed requirements

00:06:16.680 --> 00:06:21.520
or it should um you know use certain

00:06:20.199 --> 00:06:22.960
libraries or something like that are

00:06:21.520 --> 00:06:24.840
also constraints that you could add I

00:06:22.960 --> 00:06:26.120
didn't put that on this slide here that

00:06:24.840 --> 00:06:28.319
might come in the natural language

00:06:26.120 --> 00:06:30.639
description but it could be something

00:06:28.319 --> 00:06:32.759
separate and then you know the output is

00:06:30.639 --> 00:06:36.759
whatever code you want

00:06:32.759 --> 00:06:38.240
to so um how many people are using like

00:06:36.759 --> 00:06:41.000
GitHub

00:06:38.240 --> 00:06:46.160
co-pilot like what

00:06:41.000 --> 00:06:47.759
percentage maybe about half okay um how

00:06:46.160 --> 00:06:49.840
many people are using another like

00:06:47.759 --> 00:06:56.080
assisted coding tool other than GitHub

00:06:49.840 --> 00:06:57.400
coet yeah g gp4 gp4 is an could be an

00:06:56.080 --> 00:06:58.680
assisted coding tool I'm talking more

00:06:57.400 --> 00:07:02.400
like something that's actually in your

00:06:58.680 --> 00:07:04.759
IDE something yeah anybody

00:07:02.400 --> 00:07:07.680
else does anyone use

00:07:04.759 --> 00:07:13.639
cursor no

00:07:07.680 --> 00:07:18.039
um yeah cursor yeah okay so

00:07:13.639 --> 00:07:20.919
yeah Co collab uh Ai and collab yeah so

00:07:18.039 --> 00:07:24.080
um so I think there are a lot of these

00:07:20.919 --> 00:07:26.879
uh going around I I use co-pilot myself

00:07:24.080 --> 00:07:28.639
I have not used cursor I do use GPD 4 um

00:07:26.879 --> 00:07:30.599
and I'll I'll show you an example of how

00:07:28.639 --> 00:07:32.919
I use them different

00:07:30.599 --> 00:07:34.360
um if you haven't used copilot hopefully

00:07:32.919 --> 00:07:39.599
this will

00:07:34.360 --> 00:07:42.599
work um I just made a a simple

00:07:39.599 --> 00:07:42.599
video

00:07:43.280 --> 00:07:49.520
oops okay that's not working but anyway

00:07:46.159 --> 00:07:51.000
you um you type your uh you know you

00:07:49.520 --> 00:07:54.319
type and it basically completes your

00:07:51.000 --> 00:07:56.639
code so this is this is an example here

00:07:54.319 --> 00:07:58.599
and I didn't write any of this code

00:07:56.639 --> 00:08:02.360
actually I just wrote the comments and

00:07:58.599 --> 00:08:04.000
then it filled in the the actual C and

00:08:02.360 --> 00:08:05.639
also I didn't exactly check if it's

00:08:04.000 --> 00:08:08.080
correct or not

00:08:05.639 --> 00:08:11.120
so if there's any mistake it's co

00:08:08.080 --> 00:08:15.159
Pilot's fault not my fault but um I it

00:08:11.120 --> 00:08:15.159
looked correct to me so

00:08:15.759 --> 00:08:21.120
um and oh by the way you get to use it

00:08:18.120 --> 00:08:22.800
for free with your CMU account so if you

00:08:21.120 --> 00:08:24.120
uh if you don't want to use it but don't

00:08:22.800 --> 00:08:25.919
want to pay for it you're and left

00:08:24.120 --> 00:08:31.639
because you can use

00:08:25.919 --> 00:08:36.320
it um another example uh is gd4 or uh

00:08:31.639 --> 00:08:38.519
more recently Cloud 3 um and basically

00:08:36.320 --> 00:08:40.680
this can do a different variety of

00:08:38.519 --> 00:08:43.719
things so we talked about screenshots

00:08:40.680 --> 00:08:45.720
and basically I asked Claude to create a

00:08:43.719 --> 00:08:48.399
react app that replicates the claw

00:08:45.720 --> 00:08:50.240
interface by giving it a screenshot and

00:08:48.399 --> 00:08:52.560
asking it create a react app that looks

00:08:50.240 --> 00:08:55.200
like the screenshot and then it gave me

00:08:52.560 --> 00:09:00.800
a whole bunch of text and in the end it

00:08:55.200 --> 00:09:03.320
started um making this uh container here

00:09:00.800 --> 00:09:08.040
um

00:09:03.320 --> 00:09:11.040
and this uh it basically is skipping

00:09:08.040 --> 00:09:12.800
some of the styling stuff uh because

00:09:11.040 --> 00:09:14.480
large language models I I think they're

00:09:12.800 --> 00:09:16.560
basically trained so that they don't

00:09:14.480 --> 00:09:19.959
give really really long responses

00:09:16.560 --> 00:09:21.320
because like if you uh asked for

00:09:19.959 --> 00:09:23.640
something that would take a really

00:09:21.320 --> 00:09:25.519
really long time and then the model just

00:09:23.640 --> 00:09:26.880
complied and gave that to you for a

00:09:25.519 --> 00:09:29.000
really really long time it would cost

00:09:26.880 --> 00:09:30.680
them a lot of money so I feel like they

00:09:29.000 --> 00:09:32.440
they B try to train the models to only

00:09:30.680 --> 00:09:37.160
out at like a thousand tokens at a time

00:09:32.440 --> 00:09:38.959
or something like that so um it it won't

00:09:37.160 --> 00:09:40.839
actually go out and program the whole

00:09:38.959 --> 00:09:43.120
project for you but with a little

00:09:40.839 --> 00:09:44.680
cajoling if you say okay now implement

00:09:43.120 --> 00:09:48.519
this part now implement this part now

00:09:44.680 --> 00:09:49.959
implement this part um you uh you can

00:09:48.519 --> 00:09:53.040
end up with some pretty interesting

00:09:49.959 --> 00:09:55.680
stuff and let me

00:09:53.040 --> 00:09:57.120
uh let me see if I can I can show you an

00:09:55.680 --> 00:10:01.320
example

00:09:57.120 --> 00:10:01.320
so I I know a little bit of

00:10:01.440 --> 00:10:07.040
react um the front end framework but I

00:10:04.240 --> 00:10:09.839
don't know a whole lot but recently

00:10:07.040 --> 00:10:14.279
we've been um working on an open-source

00:10:09.839 --> 00:10:18.959
assisted coding app and I most of this

00:10:14.279 --> 00:10:21.519
was just written by quad um it's uh I I

00:10:18.959 --> 00:10:23.079
said I want an app that on the left side

00:10:21.519 --> 00:10:26.160
it has a chat window and then on the

00:10:23.079 --> 00:10:28.240
right side it has three uh three panes

00:10:26.160 --> 00:10:30.120
one is a terminal one is a planner and

00:10:28.240 --> 00:10:32.200
one is a code editor

00:10:30.120 --> 00:10:33.880
and um so it gave me something it was

00:10:32.200 --> 00:10:37.399
kind of ugly so I said okay make the

00:10:33.880 --> 00:10:40.639
background black um change the CSS file

00:10:37.399 --> 00:10:43.639
so that um you have like a user icon and

00:10:40.639 --> 00:10:46.040
a robot icon and stuff like that and

00:10:43.639 --> 00:10:49.240
after this I I wrote very little of this

00:10:46.040 --> 00:10:51.079
code I wrote like 1% of this code or

00:10:49.240 --> 00:10:54.480
something like that and it's able to to

00:10:51.079 --> 00:10:57.880
do these sorts of things for you um so

00:10:54.480 --> 00:11:01.000
if you don't like writing front ends

00:10:57.880 --> 00:11:03.880
good luck uh or good good news that you

00:11:01.000 --> 00:11:05.560
uh can come up with a passable front end

00:11:03.880 --> 00:11:07.519
without uh without actually having to

00:11:05.560 --> 00:11:08.720
write it nonetheless you know good front

00:11:07.519 --> 00:11:10.200
end Engineers will come up with

00:11:08.720 --> 00:11:13.639
something much more beautiful than that

00:11:10.200 --> 00:11:15.880
so um so basically why do I why did I

00:11:13.639 --> 00:11:19.959
want to say this I think um GitHub

00:11:15.880 --> 00:11:20.839
co-pilot and Pla or gp4 serve very

00:11:19.959 --> 00:11:25.200
different

00:11:20.839 --> 00:11:27.360
purposes um GitHub co-pilot is code

00:11:25.200 --> 00:11:30.160
completion and it mostly works for

00:11:27.360 --> 00:11:32.440
shorter things so it's like your next

00:11:30.160 --> 00:11:34.760
thought in your code in code that you

00:11:32.440 --> 00:11:37.560
know pretty well something like plot or

00:11:34.760 --> 00:11:40.639
gp4 is much better for really long

00:11:37.560 --> 00:11:44.680
things um where you want to build like a

00:11:40.639 --> 00:11:47.040
full class or something like that and I

00:11:44.680 --> 00:11:48.480
also have found that if you're coding in

00:11:47.040 --> 00:11:50.079
a language that you're very familiar

00:11:48.480 --> 00:11:51.560
with copilot might be more useful

00:11:50.079 --> 00:11:52.959
because you want fine grain control and

00:11:51.560 --> 00:11:55.040
you want it to fill out things to make

00:11:52.959 --> 00:11:56.519
it faster whereas if you're coding in a

00:11:55.040 --> 00:11:58.040
language that you're not very familiar

00:11:56.519 --> 00:11:59.680
with something like Claud is good

00:11:58.040 --> 00:12:01.839
because you can write a whole you know

00:11:59.680 --> 00:12:04.800
program forties so these are the

00:12:01.839 --> 00:12:07.680
differences another thing is GitHub

00:12:04.800 --> 00:12:09.240
co-pilot needs to be frighteningly fast

00:12:07.680 --> 00:12:10.839
because it needs to move at the speed

00:12:09.240 --> 00:12:12.880
that like programmers are thinking in

00:12:10.839 --> 00:12:14.920
programming next whereas something like

00:12:12.880 --> 00:12:16.800
Claud it doesn't you know using it in

00:12:14.920 --> 00:12:18.880
the way that I use cloud here doesn't

00:12:16.800 --> 00:12:22.600
really matter because I can say uh

00:12:18.880 --> 00:12:24.079
programing me a you know a web app and

00:12:22.600 --> 00:12:25.360
then I can go and have dinner and come

00:12:24.079 --> 00:12:28.199
back and have a web app and I'd be

00:12:25.360 --> 00:12:31.720
perfectly happy with that right so um

00:12:28.199 --> 00:12:37.199
the latency request are also

00:12:31.720 --> 00:12:37.199
different cool um any any questions here

00:12:37.399 --> 00:12:42.600
yeah that debugging code they

00:12:43.000 --> 00:12:47.959
are the well so

00:12:45.839 --> 00:12:50.760
co-pilot I haven't actually tried it

00:12:47.959 --> 00:12:52.480
that much um if I wanted to debug code

00:12:50.760 --> 00:12:54.880
I'd probably use something like pla or

00:12:52.480 --> 00:12:56.360
gp4 just because actually I'll I'll

00:12:54.880 --> 00:12:58.320
mention this in a second but co-pilot's

00:12:56.360 --> 00:13:00.360
a much smaller model uh because it needs

00:12:58.320 --> 00:13:01.839
to be very fast or what they're using in

00:13:00.360 --> 00:13:04.040
copilot is a smaller model because it

00:13:01.839 --> 00:13:05.519
needs to be very fast so I would

00:13:04.040 --> 00:13:08.360
probably use a bigger model for anything

00:13:05.519 --> 00:13:10.120
that required like good understanding I

00:13:08.360 --> 00:13:11.480
think it's passable at debugging code

00:13:10.120 --> 00:13:13.079
but it won't find the really difficult

00:13:11.480 --> 00:13:15.639
things and it probably won't find things

00:13:13.079 --> 00:13:18.279
that require spanning across uh multiple

00:13:15.639 --> 00:13:21.240
files but I I'm not 100% sure about that

00:13:18.279 --> 00:13:25.519
like I think it's worth

00:13:21.240 --> 00:13:25.519
testing um any other

00:13:25.880 --> 00:13:30.120
questions okay so if I haven't convinced

00:13:28.360 --> 00:13:32.360
you that as software developers you

00:13:30.120 --> 00:13:34.880
should be using this hopefully this next

00:13:32.360 --> 00:13:37.480
uh this next slide will so this was a

00:13:34.880 --> 00:13:41.199
study that was run by GitHub uh shortly

00:13:37.480 --> 00:13:43.160
after um after co-pilot came out and so

00:13:41.199 --> 00:13:45.440
why do we do code generation why are

00:13:43.160 --> 00:13:47.240
people very excited about it so the

00:13:45.440 --> 00:13:50.240
first is U making software isn't

00:13:47.240 --> 00:13:53.480
important um and I recently calculated

00:13:50.240 --> 00:13:55.920
what from some Labor Statistics and the

00:13:53.480 --> 00:13:59.440
total amount that software developers

00:13:55.920 --> 00:14:01.880
make um in a year is $175 billion so

00:13:59.440 --> 00:14:05.000
that's providing at least that much you

00:14:01.880 --> 00:14:06.800
know value so it's a very high value uh

00:14:05.000 --> 00:14:09.079
profession so if we could make it faster

00:14:06.800 --> 00:14:11.480
you know it would have even more

00:14:09.079 --> 00:14:12.920
value another thing is code generation

00:14:11.480 --> 00:14:15.680
leads to large improvements in

00:14:12.920 --> 00:14:17.160
productivity so uh get Hub ran this

00:14:15.680 --> 00:14:18.680
study where they randomly assigned

00:14:17.160 --> 00:14:21.519
developers to groups who would either

00:14:18.680 --> 00:14:24.440
use co-pilot or not use co-pilot and

00:14:21.519 --> 00:14:26.480
they assigned them the same task and

00:14:24.440 --> 00:14:30.759
basically the people who use copilot

00:14:26.480 --> 00:14:34.199
their rate of um completion went up by

00:14:30.759 --> 00:14:36.320
8% and they finished um in about 40% of

00:14:34.199 --> 00:14:39.279
the time of the people who didn't use it

00:14:36.320 --> 00:14:43.639
and so I think this

00:14:39.279 --> 00:14:45.920
is or uh yeah they say 55% less times so

00:14:43.639 --> 00:14:47.759
this is very impressive but it's also

00:14:45.920 --> 00:14:50.199
not at all surprising if you're using a

00:14:47.759 --> 00:14:52.880
Cod like assisted coding assistant it

00:14:50.199 --> 00:14:54.360
just makes you code faster also if you

00:14:52.880 --> 00:14:56.040
don't like writing doc strings it's

00:14:54.360 --> 00:14:57.519
really good at writing doc strings so

00:14:56.040 --> 00:14:59.680
you can write documentation for your

00:14:57.519 --> 00:15:00.759
code not wor about so

00:14:59.680 --> 00:15:04.399
okay

00:15:00.759 --> 00:15:07.000
cool um

00:15:04.399 --> 00:15:09.720
so there are differences between code

00:15:07.000 --> 00:15:14.000
and natural language uh and I've listed

00:15:09.720 --> 00:15:15.560
a few of them here and the differences

00:15:14.000 --> 00:15:18.120
between code and natural language also

00:15:15.560 --> 00:15:20.160
affect how we build models for this test

00:15:18.120 --> 00:15:23.160
so the first one is that code has strict

00:15:20.160 --> 00:15:26.000
grammar uh if you make a small mistake

00:15:23.160 --> 00:15:27.920
in your code grammar usually it will

00:15:26.000 --> 00:15:29.839
just break and your program won't work

00:15:27.920 --> 00:15:31.319
so you need to be very careful as

00:15:29.839 --> 00:15:32.560
opposed to natural language grammar

00:15:31.319 --> 00:15:33.600
where you can make small mistakes and it

00:15:32.560 --> 00:15:36.120
doesn't make a

00:15:33.600 --> 00:15:40.120
difference another thing is in code you

00:15:36.120 --> 00:15:42.720
know the semantic flow of the code and

00:15:40.120 --> 00:15:44.160
so we know that certain variables

00:15:42.720 --> 00:15:45.560
correspond to each other we know that

00:15:44.160 --> 00:15:48.639
they're flowing through the program in a

00:15:45.560 --> 00:15:50.880
certain way another thing is code is

00:15:48.639 --> 00:15:54.120
executable so we can actually execute it

00:15:50.880 --> 00:15:56.199
and observe the result unlike in natural

00:15:54.120 --> 00:16:00.000
language and another important thing is

00:15:56.199 --> 00:16:03.399
code is created incrementally so code is

00:16:00.000 --> 00:16:05.680
not you know unlike text text is also

00:16:03.399 --> 00:16:07.399
created incrementally but it's not

00:16:05.680 --> 00:16:08.720
usually you write it once you might

00:16:07.399 --> 00:16:11.199
revise it a little bit and then you're

00:16:08.720 --> 00:16:14.040
done and you you don't need to touch it

00:16:11.199 --> 00:16:15.399
again but um in code you touch it over

00:16:14.040 --> 00:16:17.800
and over and over again as you develop a

00:16:15.399 --> 00:16:17.800
sof

00:16:18.040 --> 00:16:23.040
project so if we look at code Generation

00:16:21.079 --> 00:16:27.079
Um I would like to talk a little bit

00:16:23.040 --> 00:16:29.079
about uh subtasks and data sets next so

00:16:27.079 --> 00:16:30.480
the most famous data set for a Cod code

00:16:29.079 --> 00:16:34.279
generation nowadays is something called

00:16:30.480 --> 00:16:38.680
human ofel um this is a very nice data

00:16:34.279 --> 00:16:42.480
set um for a number of reasons uh I

00:16:38.680 --> 00:16:44.240
think it is used too much um nonetheless

00:16:42.480 --> 00:16:46.759
and I I think there are better data sets

00:16:44.240 --> 00:16:51.240
that we maybe should be using more but

00:16:46.759 --> 00:16:54.000
basically human ofel is um it has

00:16:51.240 --> 00:16:55.920
examples of usage of the Python standard

00:16:54.000 --> 00:16:59.360
Library where some are easier some are

00:16:55.920 --> 00:17:02.880
harder and just to give some examples

00:16:59.360 --> 00:17:06.760
uh we're saying given a nonempty list of

00:17:02.880 --> 00:17:10.480
integers return the sum of all the odd

00:17:06.760 --> 00:17:12.959
elements that are in even positions so

00:17:10.480 --> 00:17:16.079
it's kind of like a elite code

00:17:12.959 --> 00:17:19.199
style you know program but maybe one of

00:17:16.079 --> 00:17:22.400
the easier ones and then in order to

00:17:19.199 --> 00:17:25.240
solve that you find all of the put

00:17:22.400 --> 00:17:28.480
elements in even positions and then you

00:17:25.240 --> 00:17:29.679
only return them if uh the value itself

00:17:28.480 --> 00:17:32.799
is

00:17:29.679 --> 00:17:34.200
um so like you can do that in a oneliner

00:17:32.799 --> 00:17:36.600
but you need to think about it a little

00:17:34.200 --> 00:17:38.919
bit um and then you have

00:17:36.600 --> 00:17:43.120
more

00:17:38.919 --> 00:17:43.810
um returns encoded uh sorry takes an

00:17:43.120 --> 00:17:46.910
input

00:17:43.810 --> 00:17:46.910
[Music]

00:17:47.160 --> 00:17:50.919
string yeah actually sorry this is from

00:17:49.320 --> 00:17:53.600
the paper I didn't read it before I copy

00:17:50.919 --> 00:17:57.080
pasted it in here but um yeah that's a

00:17:53.600 --> 00:17:58.880
decoding one and one one thing about

00:17:57.080 --> 00:18:02.240
this uh that's important to know is it

00:17:58.880 --> 00:18:04.200
only has 164 examples so it's actually a

00:18:02.240 --> 00:18:07.600
relatively small number of

00:18:04.200 --> 00:18:09.440
examples um it's also just the python

00:18:07.600 --> 00:18:11.200
standard Library so it's not testing

00:18:09.440 --> 00:18:14.960
usage of any other

00:18:11.200 --> 00:18:17.520
libraries um so these two things

00:18:14.960 --> 00:18:19.720
together make it not the most realistic

00:18:17.520 --> 00:18:21.880
you know examination of your programming

00:18:19.720 --> 00:18:23.640
skills just like leak code is not the

00:18:21.880 --> 00:18:25.640
most realistic examination of your

00:18:23.640 --> 00:18:28.240
programming skills but you know I don't

00:18:25.640 --> 00:18:31.720
know companies use it anyway so maybe

00:18:28.240 --> 00:18:35.159
human devel is reasonable but um so then

00:18:31.720 --> 00:18:37.120
we go um into the inputs and outputs uh

00:18:35.159 --> 00:18:40.679
the inputs and outputs usually include a

00:18:37.120 --> 00:18:43.440
doc string um some input and output

00:18:40.679 --> 00:18:47.640
examples and then they have tests to

00:18:43.440 --> 00:18:47.640
verify the accuracy of your

00:18:47.880 --> 00:18:52.840
outputs so the metric that's used to

00:18:50.559 --> 00:18:58.919
evaluate these systems is something

00:18:52.840 --> 00:19:01.400
called passet K and the basic idea is um

00:18:58.919 --> 00:19:03.400
we generate K examples will at least one

00:19:01.400 --> 00:19:06.960
of them pass the unit

00:19:03.400 --> 00:19:10.720
tests and the idea here is

00:19:06.960 --> 00:19:13.480
that if we have models we might want to

00:19:10.720 --> 00:19:14.960
generate like well there there's a

00:19:13.480 --> 00:19:17.480
couple reasons why we would care about

00:19:14.960 --> 00:19:19.880
this pass it one is kind of obvious

00:19:17.480 --> 00:19:23.200
because we generate one and then we

00:19:19.880 --> 00:19:26.480
measure how um you know how likely it is

00:19:23.200 --> 00:19:29.280
to pass unit tests but pass it five why

00:19:26.480 --> 00:19:30.760
would we care about passet five well

00:19:29.280 --> 00:19:32.159
number one maybe you could show five

00:19:30.760 --> 00:19:34.240
programs to a person and they could

00:19:32.159 --> 00:19:37.039
choose the one that they like the best

00:19:34.240 --> 00:19:39.919
or maybe you could have unit test write

00:19:37.039 --> 00:19:41.720
unit tests in advance and then generate

00:19:39.919 --> 00:19:43.880
five programs check which one pass the

00:19:41.720 --> 00:19:45.480
unit tests and then use the ones only

00:19:43.880 --> 00:19:48.360
that pass the unit test or something

00:19:45.480 --> 00:19:51.000
like that so there's also some interest

00:19:48.360 --> 00:19:53.320
in uh whether you could generate you

00:19:51.000 --> 00:19:54.600
know multiple examples and then pick a

00:19:53.320 --> 00:19:56.919
good

00:19:54.600 --> 00:19:59.080
one there's a little bit of nuance in

00:19:56.919 --> 00:20:02.120
how this is actually calculated so

00:19:59.080 --> 00:20:04.240
basically um if you generate only K like

00:20:02.120 --> 00:20:05.960
if you if you sample only one example

00:20:04.240 --> 00:20:07.400
there's a lot of variance in whether you

00:20:05.960 --> 00:20:10.159
get it right or not so what they

00:20:07.400 --> 00:20:13.440
actually do is they generate like 10

00:20:10.159 --> 00:20:15.600
outputs or 200 outputs and then they

00:20:13.440 --> 00:20:18.159
calculate the expected number of those

00:20:15.600 --> 00:20:20.320
that the expected number of cases where

00:20:18.159 --> 00:20:23.280
that would pass by just doing a little

00:20:20.320 --> 00:20:25.440
bit of uh like math calculating the

00:20:23.280 --> 00:20:28.679
number of combinations where one passes

00:20:25.440 --> 00:20:30.720
or one doesn't and here k n is the total

00:20:28.679 --> 00:20:34.240
number you generate C is the number of

00:20:30.720 --> 00:20:36.520
correct ansers and K is uh your passive

00:20:34.240 --> 00:20:36.520
K

00:20:37.159 --> 00:20:43.360
value

00:20:38.919 --> 00:20:46.280
cool um so any any questions about

00:20:43.360 --> 00:20:47.880
these you'll you'll see a bunch of uh

00:20:46.280 --> 00:20:50.520
people evaluating on this human ofel

00:20:47.880 --> 00:20:52.760
with passive K including all of the you

00:20:50.520 --> 00:20:57.520
know new llms that come out it's a very

00:20:52.760 --> 00:20:57.520
standard Edge yeah

00:21:01.760 --> 00:21:06.039
is yeah that that's a good um question I

00:21:04.919 --> 00:21:07.840
think I'm going to cover that a little

00:21:06.039 --> 00:21:11.039
bit later but I might as well say it now

00:21:07.840 --> 00:21:13.640
so llms

00:21:11.039 --> 00:21:15.080
are llms are good at code because they

00:21:13.640 --> 00:21:16.880
intentionally include a lot of code

00:21:15.080 --> 00:21:19.520
training data in LL training and the

00:21:16.880 --> 00:21:22.679
reason for that is twofold um the first

00:21:19.520 --> 00:21:25.320
one is that code generation is a huge

00:21:22.679 --> 00:21:26.960
application of llms right now and like

00:21:25.320 --> 00:21:28.679
if you had an llm that couldn't do code

00:21:26.960 --> 00:21:32.320
generation it'd be kind of embarrassing

00:21:28.679 --> 00:21:33.960
so um Everybody includes this number two

00:21:32.320 --> 00:21:36.600
uh code has been shown to improve kind

00:21:33.960 --> 00:21:38.080
of the reasoning abilities of llms and

00:21:36.600 --> 00:21:41.640
because of that people include code for

00:21:38.080 --> 00:21:43.440
that purpose so yeah um it's not that

00:21:41.640 --> 00:21:45.600
LMS are inherently good at code or

00:21:43.440 --> 00:21:48.840
anything it's that they have lots of

00:21:45.600 --> 00:21:51.640
lots of code TR and I'll I'll explain

00:21:48.840 --> 00:21:54.279
exactly how they construct this

00:21:51.640 --> 00:21:57.200
St and actually if you remember last

00:21:54.279 --> 00:21:59.640
time uh I talked about the pile which

00:21:57.200 --> 00:22:01.039
was or not last time but uh when I

00:21:59.640 --> 00:22:03.159
talked about the tour of large language

00:22:01.039 --> 00:22:06.360
models I talked about the pile and the

00:22:03.159 --> 00:22:09.799
pile is almost half toe for

00:22:06.360 --> 00:22:12.000
example cool any other

00:22:09.799 --> 00:22:17.240
questions

00:22:12.000 --> 00:22:19.320
okay so another uh a first Improvement

00:22:17.240 --> 00:22:22.080
or at least change that we can make to

00:22:19.320 --> 00:22:23.880
human ofel is uh going to broader

00:22:22.080 --> 00:22:26.720
domains and covering a broader variety

00:22:23.880 --> 00:22:28.559
of libraries and this is a data set that

00:22:26.720 --> 00:22:30.880
we created actually a long time ago but

00:22:28.559 --> 00:22:33.799
but we recently added execution based

00:22:30.880 --> 00:22:36.159
evaluation to it it's called konola and

00:22:33.799 --> 00:22:36.919
the execution based uh evaluation one is

00:22:36.159 --> 00:22:40.360
called

00:22:36.919 --> 00:22:43.039
odex and basically what we did here is

00:22:40.360 --> 00:22:45.720
we scraped data from stack Overflow

00:22:43.039 --> 00:22:48.039
including uh inputs and output uh

00:22:45.720 --> 00:22:50.559
Solutions and then based on this scraped

00:22:48.039 --> 00:22:54.240
data we uh did some manual curation to

00:22:50.559 --> 00:22:57.640
turn these into like actual questions um

00:22:54.240 --> 00:22:59.640
and answers about how you could write uh

00:22:57.640 --> 00:23:01.799
solve programming

00:22:59.640 --> 00:23:04.080
problems and

00:23:01.799 --> 00:23:05.600
um because this is scraped from stack

00:23:04.080 --> 00:23:09.159
Overflow there's no restriction that

00:23:05.600 --> 00:23:10.520
this is from the python standard Library

00:23:09.159 --> 00:23:13.200
which also means that it can cover a

00:23:10.520 --> 00:23:14.919
very wide variety of libraries and it's

00:23:13.200 --> 00:23:16.760
approximately according to the

00:23:14.919 --> 00:23:20.320
popularity of the libraries because we

00:23:16.760 --> 00:23:24.159
took popular posts so um that's a a good

00:23:20.320 --> 00:23:25.400
thing uh you know it it is a reasonable

00:23:24.159 --> 00:23:26.559
way to come up with a realistic

00:23:25.400 --> 00:23:29.520
distribution of libraries that you

00:23:26.559 --> 00:23:31.799
should be looking at um odex adds

00:23:29.520 --> 00:23:34.159
execution based evaluation previously

00:23:31.799 --> 00:23:36.679
what we had was we only had the snippet

00:23:34.159 --> 00:23:40.600
that was able to solve the problem as

00:23:36.679 --> 00:23:42.360
opposed to um as opposed to being able

00:23:40.600 --> 00:23:46.880
to execute unit

00:23:42.360 --> 00:23:49.440
tests and just to show how this has a

00:23:46.880 --> 00:23:52.000
broader variety of libraries on the top

00:23:49.440 --> 00:23:53.919
we have the distribution of odex

00:23:52.000 --> 00:23:57.320
libraries and we can see about half of

00:23:53.919 --> 00:23:59.600
them use libraries and this includes a

00:23:57.320 --> 00:24:01.279
variety of things including pandas

00:23:59.600 --> 00:24:04.799
numpy

00:24:01.279 --> 00:24:06.400
um reg o selections you know all of

00:24:04.799 --> 00:24:09.279
these should be libraries that look

00:24:06.400 --> 00:24:14.559
familiar to you um in contrast if we

00:24:09.279 --> 00:24:17.200
look at human eval human eval is right

00:24:14.559 --> 00:24:18.840
here so you can see almost all of the

00:24:17.200 --> 00:24:20.600
questions require no libraries and all

00:24:18.840 --> 00:24:22.120
of the other ones require libraries that

00:24:20.600 --> 00:24:24.360
were included in the pipe onstead

00:24:22.120 --> 00:24:27.640
libraries so

00:24:24.360 --> 00:24:29.120
um in reality this is probably more what

00:24:27.640 --> 00:24:30.120
your program in queries are going to

00:24:29.120 --> 00:24:31.240
look like they're not going to look like

00:24:30.120 --> 00:24:33.600
lead code they're going to look like

00:24:31.240 --> 00:24:33.600
using

00:24:35.360 --> 00:24:42.080
APS so um originally when we did conal

00:24:40.039 --> 00:24:44.200
we didn't use execution based evaluation

00:24:42.080 --> 00:24:47.480
because creating unit tests uh for lots

00:24:44.200 --> 00:24:51.360
of stack Overflow posts is hard

00:24:47.480 --> 00:24:53.640
um specifically there's two issues the

00:24:51.360 --> 00:24:55.000
first one is that it requires that code

00:24:53.640 --> 00:24:58.880
be easily

00:24:55.000 --> 00:25:02.320
executable um now think about

00:24:58.880 --> 00:25:04.559
how you would do that for Matt plot lib

00:25:02.320 --> 00:25:06.200
for example how would you create a unit

00:25:04.559 --> 00:25:08.080
test to test whether Matt plot lib

00:25:06.200 --> 00:25:10.760
successfully created a bar chart for

00:25:08.080 --> 00:25:12.440
something it's kind of tough right you

00:25:10.760 --> 00:25:13.840
like you would have to get the image and

00:25:12.440 --> 00:25:16.919
you'd have to confirm that the image was

00:25:13.840 --> 00:25:21.200
a bar chart and uh other things like

00:25:16.919 --> 00:25:22.720
that um even worse what if it was uh

00:25:21.200 --> 00:25:25.600
kind of like a server framework like

00:25:22.720 --> 00:25:27.440
ajango how would you confirm that ajango

00:25:25.600 --> 00:25:30.559
you know server is working appropriately

00:25:27.440 --> 00:25:32.600
and that's kind of tricky so um actually

00:25:30.559 --> 00:25:34.480
coming up with realistic unit tests for

00:25:32.600 --> 00:25:36.919
real programs can be

00:25:34.480 --> 00:25:38.840
difficult um another problem with

00:25:36.919 --> 00:25:41.640
execution based evaluation is it ignores

00:25:38.840 --> 00:25:45.320
stylistic considerations so I could

00:25:41.640 --> 00:25:48.279
write very spaghetti like very spaghetti

00:25:45.320 --> 00:25:50.200
code and as long as it executed properly

00:25:48.279 --> 00:25:52.559
it would still be judged as correct and

00:25:50.200 --> 00:25:54.399
sometimes that's actually an issue so

00:25:52.559 --> 00:25:56.360
usually it's not a problem because

00:25:54.399 --> 00:25:58.600
language models write reasonably good

00:25:56.360 --> 00:26:00.600
code but sometimes you want to match the

00:25:58.600 --> 00:26:05.039
or other things like that

00:26:00.600 --> 00:26:06.559
so some alternatives are blue score

00:26:05.039 --> 00:26:09.000
which we've talked about before it's

00:26:06.559 --> 00:26:12.679
basically count calculating the engram

00:26:09.000 --> 00:26:16.919
overlap between a gold standard human uh

00:26:12.679 --> 00:26:20.440
implementation and a uh in the system

00:26:16.919 --> 00:26:24.000
output and there's also specifically

00:26:20.440 --> 00:26:26.480
adapted methods for evaluating code and

00:26:24.000 --> 00:26:29.080
so there's a method called code blue and

00:26:26.480 --> 00:26:31.360
basically the way code blue works is it

00:26:29.080 --> 00:26:35.240
also considers the syntax and semantic

00:26:31.360 --> 00:26:37.080
flow of the code so it measures overlap

00:26:35.240 --> 00:26:40.120
between

00:26:37.080 --> 00:26:42.120
strings in the original code but it also

00:26:40.120 --> 00:26:48.640
considers overlap between the syntax

00:26:42.120 --> 00:26:53.000
trees of the code and uh whether the

00:26:48.640 --> 00:26:56.320
um these like semantic information flow

00:26:53.000 --> 00:26:57.919
graphs look similar so uh all all of

00:26:56.320 --> 00:26:59.440
these things work together to calculate

00:26:57.919 --> 00:27:02.720
the C

00:26:59.440 --> 00:27:04.480
St one thing I I should mention is how

00:27:02.720 --> 00:27:06.840
do we get these syntax trees in the

00:27:04.480 --> 00:27:09.039
first place um for example if we're

00:27:06.840 --> 00:27:12.919
talking about python there's a python

00:27:09.039 --> 00:27:14.760
Library uh for ab abstract syntax tree

00:27:12.919 --> 00:27:16.559
it's just part of the standard library

00:27:14.760 --> 00:27:18.320
and it's necessary to run the python

00:27:16.559 --> 00:27:20.559
interpreter so you can just get these

00:27:18.320 --> 00:27:24.320
trees directly from the python ASD

00:27:20.559 --> 00:27:25.880
Library uh not hard to do uh for this I

00:27:24.320 --> 00:27:27.840
forget what they did in the code blue

00:27:25.880 --> 00:27:30.679
thing but there are uh analyzers that

00:27:27.840 --> 00:27:32.120
allow you to analyze this control FL so

00:27:30.679 --> 00:27:34.159
this is taking advantage of the fact

00:27:32.120 --> 00:27:37.440
that code is you know predictable it has

00:27:34.159 --> 00:27:41.480
predictable syntax and you can you

00:27:37.440 --> 00:27:43.960
can6 um one disadvantage of blue and

00:27:41.480 --> 00:27:45.799
code blue of course is that you know you

00:27:43.960 --> 00:27:47.679
can write two very different looking

00:27:45.799 --> 00:27:49.559
programs that actually are both correct

00:27:47.679 --> 00:27:51.799
and blue will underestimate the goodness

00:27:49.559 --> 00:27:54.440
of those programs so maybe using both of

00:27:51.799 --> 00:27:57.159
them together is uh is

00:27:54.440 --> 00:28:00.120
appropriate uh if if you can write unit

00:27:57.159 --> 00:28:00.120
Test please

00:28:00.559 --> 00:28:04.279
um another one which I'll just cover

00:28:02.600 --> 00:28:05.399
very briefly we talked about BT score

00:28:04.279 --> 00:28:08.159
before when I was talking about

00:28:05.399 --> 00:28:11.120
evaluation of uh you know generated text

00:28:08.159 --> 00:28:13.480
and there's also code BT score which um

00:28:11.120 --> 00:28:15.799
we uh we created here at

00:28:13.480 --> 00:28:20.080
CMU and it's basically an embedding

00:28:15.799 --> 00:28:21.760
based metric uh to compare code and so

00:28:20.080 --> 00:28:23.399
Bert score if you remember basically

00:28:21.760 --> 00:28:25.679
what it did is it calculated the coign

00:28:23.399 --> 00:28:27.840
similarity between each of the tokens uh

00:28:25.679 --> 00:28:30.159
between a generated text and a reference

00:28:27.840 --> 00:28:34.279
text we do exactly the same thing for

00:28:30.159 --> 00:28:36.080
code um so we calculate the Sim cosine

00:28:34.279 --> 00:28:39.200
similarity between tokens for a

00:28:36.080 --> 00:28:42.960
reference code and generated

00:28:39.200 --> 00:28:45.000
code and we released a model called

00:28:42.960 --> 00:28:46.559
codir which was basically Bert but

00:28:45.000 --> 00:28:49.440
continued trained on lots and lots of

00:28:46.559 --> 00:28:51.840
code uh that allowed us to do that and

00:28:49.440 --> 00:28:55.480
um basically we were able to demonstrate

00:28:51.840 --> 00:28:59.200
that this gave better correlation both

00:28:55.480 --> 00:29:01.480
with final execution accuracy and with

00:28:59.200 --> 00:29:05.200
human judgments of whether the the code

00:29:01.480 --> 00:29:08.000
was correct and so um some people uh

00:29:05.200 --> 00:29:09.559
created a data set of human correctness

00:29:08.000 --> 00:29:12.559
judgments and we were able to put a

00:29:09.559 --> 00:29:14.240
little better with that as well um why

00:29:12.559 --> 00:29:15.640
do we care about correlation with

00:29:14.240 --> 00:29:17.399
execution

00:29:15.640 --> 00:29:20.200
accuracy

00:29:17.399 --> 00:29:22.320
um this is important in the cases when

00:29:20.200 --> 00:29:23.559
we can't create unit tests or when

00:29:22.320 --> 00:29:26.120
creating unit test would be too

00:29:23.559 --> 00:29:27.519
expensive so this gives us a better

00:29:26.120 --> 00:29:30.640
approximation for what we would get if

00:29:27.519 --> 00:29:30.640
we ran tests

00:29:39.840 --> 00:29:45.000
in yeah so we did not we did not

00:29:42.600 --> 00:29:46.799
consider code structure here uh would

00:29:45.000 --> 00:29:48.480
different variable names affect it yes

00:29:46.799 --> 00:29:50.159
different variable names would affect it

00:29:48.480 --> 00:29:51.799
but not as much as the other metrics

00:29:50.159 --> 00:29:53.960
which is why it's better why it has

00:29:51.799 --> 00:29:56.720
better

00:29:53.960 --> 00:30:00.000
correlations and like for example

00:29:56.720 --> 00:30:03.679
codir I imagine probably gives very

00:30:00.000 --> 00:30:05.120
similar representations to I and J just

00:30:03.679 --> 00:30:07.960
because they're both used in iterators

00:30:05.120 --> 00:30:09.039
all the time whereas uh a normal Burt

00:30:07.960 --> 00:30:10.960
model would give very different

00:30:09.039 --> 00:30:12.760
representations to I and J right because

00:30:10.960 --> 00:30:14.960
I is like a personal pronoun and J is

00:30:12.760 --> 00:30:17.200
not so um that's the reason why

00:30:14.960 --> 00:30:20.399
continued training would

00:30:17.200 --> 00:30:24.799
help cool any other

00:30:20.399 --> 00:30:26.640
things okay so another um another place

00:30:24.799 --> 00:30:29.480
where code generation can be useful uh

00:30:26.640 --> 00:30:33.440
we had the example of collab uh is in

00:30:29.480 --> 00:30:36.200
collab notebooks and this or in uh data

00:30:33.440 --> 00:30:38.519
science notebooks this paper was by uh

00:30:36.200 --> 00:30:41.440
Google so this might actually even be

00:30:38.519 --> 00:30:43.960
used in the collab thing because collab

00:30:41.440 --> 00:30:45.640
is a Google thing um but data data

00:30:43.960 --> 00:30:47.320
science notebooks allow for incremental

00:30:45.640 --> 00:30:50.519
implementation I'm sure a lot of people

00:30:47.320 --> 00:30:53.559
here or almost everybody here uses them

00:30:50.519 --> 00:30:55.279
um and another interesting thing is say

00:30:53.559 --> 00:30:57.519
allow for evaluation of code generation

00:30:55.279 --> 00:30:58.960
in context uh or incremental code

00:30:57.519 --> 00:31:00.639
generation

00:30:58.960 --> 00:31:02.720
and so you start out with like a

00:31:00.639 --> 00:31:04.880
notebook and then you have AAL

00:31:02.720 --> 00:31:06.600
languageand and then youate the output

00:31:04.880 --> 00:31:09.240
AAL language command you generate the

00:31:06.600 --> 00:31:10.799
output etc etc so this is an extal

00:31:09.240 --> 00:31:14.519
example from the STA

00:31:10.799 --> 00:31:17.519
set um so this paper is very nice it it

00:31:14.519 --> 00:31:20.320
has a lot of uh you know it's a nice

00:31:17.519 --> 00:31:21.720
data set one other thing that was really

00:31:20.320 --> 00:31:24.200
interesting from this paper is it

00:31:21.720 --> 00:31:27.919
demonstrated the problem of data leakage

00:31:24.200 --> 00:31:29.679
in evaluating models and this is a Rel

00:31:27.919 --> 00:31:32.440
relatively large problem I don't know if

00:31:29.679 --> 00:31:33.799
we have a silver bullet solution for

00:31:32.440 --> 00:31:36.120
this but it's an important thing to be

00:31:33.799 --> 00:31:38.120
aware of uh not just for code generation

00:31:36.120 --> 00:31:39.639
but these are examples from code

00:31:38.120 --> 00:31:43.519
generation

00:31:39.639 --> 00:31:45.679
so here um in the arcade data set they

00:31:43.519 --> 00:31:48.519
basically both evaluated existing

00:31:45.679 --> 00:31:51.720
notebooks and they evaluated notebooks

00:31:48.519 --> 00:31:53.279
that um existing notebooks that they got

00:31:51.720 --> 00:31:55.960
from the web and they evaluated

00:31:53.279 --> 00:31:59.000
notebooks that they actually created

00:31:55.960 --> 00:32:00.399
themselves and there's very very Stark

00:31:59.000 --> 00:32:02.600
difference between the notebooks that

00:32:00.399 --> 00:32:04.440
were created on the web and the

00:32:02.600 --> 00:32:07.399
notebooks that they evaluated themselves

00:32:04.440 --> 00:32:10.159
so like most of the code generation

00:32:07.399 --> 00:32:11.679
models except for Palm uh which was the

00:32:10.159 --> 00:32:14.760
best model when they created this data

00:32:11.679 --> 00:32:17.360
set did really poorly or did really well

00:32:14.760 --> 00:32:21.120
on the existing data and quite poorly on

00:32:17.360 --> 00:32:25.279
the new data um which is probably an

00:32:21.120 --> 00:32:28.159
indication of um probably an indication

00:32:25.279 --> 00:32:29.720
of the fact that you know this is to

00:32:28.159 --> 00:32:32.240
some extent leaked into the training

00:32:29.720 --> 00:32:35.320
data of the language models there was

00:32:32.240 --> 00:32:37.760
also a very recent

00:32:35.320 --> 00:32:40.240
um paper actually I think this might be

00:32:37.760 --> 00:32:43.159
2024 there was a very recent paper that

00:32:40.240 --> 00:32:45.880
did a similar thing uh where they

00:32:43.159 --> 00:32:48.440
evaluated on human ofel and then their

00:32:45.880 --> 00:32:52.000
live codebench in live codebench

00:32:48.440 --> 00:32:55.639
basically what they did is they tried to

00:32:52.000 --> 00:32:58.519
pick problems from Le code and other

00:32:55.639 --> 00:33:00.519
websites that were more recent versus

00:32:58.519 --> 00:33:01.960
less recent and they have some really

00:33:00.519 --> 00:33:04.880
nice graphs in their paper where they

00:33:01.960 --> 00:33:06.519
demonstrate that the less recent ones

00:33:04.880 --> 00:33:08.159
before the training cut off have like a

00:33:06.519 --> 00:33:10.080
high accuracy and then suddenly it drops

00:33:08.159 --> 00:33:12.639
right at the trading C off of the the

00:33:10.080 --> 00:33:13.480
models so this is something to to be

00:33:12.639 --> 00:33:17.360
aware

00:33:13.480 --> 00:33:20.519
of and what this figure is showing here

00:33:17.360 --> 00:33:24.039
is this figure is showing on the xaxis

00:33:20.519 --> 00:33:26.840
pass it one on the Live code bench easy

00:33:24.039 --> 00:33:28.679
and then pass it one on human ofel so we

00:33:26.840 --> 00:33:31.480
see this kn

00:33:28.679 --> 00:33:34.039
correlation between

00:33:31.480 --> 00:33:35.919
essentially like passing on life code

00:33:34.039 --> 00:33:37.399
bench easy and passing on human ofel

00:33:35.919 --> 00:33:40.000
then we have this group of models that

00:33:37.399 --> 00:33:42.159
are kind of like up here and these are

00:33:40.000 --> 00:33:43.960
ones where basically it's likely that

00:33:42.159 --> 00:33:46.480
human ofel leaked into the training data

00:33:43.960 --> 00:33:48.840
because they're getting better scores on

00:33:46.480 --> 00:33:50.919
human ofel than you would expect that

00:33:48.840 --> 00:33:53.360
they get uh you know just looking at

00:33:50.919 --> 00:33:55.360
their uh you know performance on another

00:33:53.360 --> 00:33:57.320
data set there's also a nice like

00:33:55.360 --> 00:34:00.000
analogous one for math reasoning

00:33:57.320 --> 00:34:01.519
problems um like this so this is

00:34:00.000 --> 00:34:03.039
definitely something to be aware of if

00:34:01.519 --> 00:34:04.559
you're looking only at like very

00:34:03.039 --> 00:34:06.200
standard benchmarks that people are

00:34:04.559 --> 00:34:11.159
trading

00:34:06.200 --> 00:34:11.159
in cool um any questions about

00:34:12.119 --> 00:34:19.240
this okay um another data set uh that I

00:34:17.720 --> 00:34:20.599
I really like the concept of and

00:34:19.240 --> 00:34:22.919
recently it's gotten a little bit of

00:34:20.599 --> 00:34:25.399
Buzz because it was used in a um an

00:34:22.919 --> 00:34:28.399
evaluation of a new coding assistant

00:34:25.399 --> 00:34:30.480
called Devon but this is um

00:34:28.399 --> 00:34:32.240
something called sbench and it's issues

00:34:30.480 --> 00:34:34.639
from GitHub and code

00:34:32.240 --> 00:34:37.119
bases uh is the input and you want to

00:34:34.639 --> 00:34:39.480
generate a poll request to basically uh

00:34:37.119 --> 00:34:42.919
solve these issues and so your input is

00:34:39.480 --> 00:34:45.800
like data leak in gbdt due to warm start

00:34:42.919 --> 00:34:48.800
this is about non standard then you have

00:34:45.800 --> 00:34:51.159
the code base um it generates a PR for

00:34:48.800 --> 00:34:53.079
you and then it's run through the unit

00:34:51.159 --> 00:34:55.919
tests to see if it passes all the unit

00:34:53.079 --> 00:34:57.160
test post PRS so it's very similar to

00:34:55.919 --> 00:34:59.240
you know what you would be doing in a

00:34:57.160 --> 00:35:01.280
well Main software project you open a

00:34:59.240 --> 00:35:05.240
issue and then you open a poll request

00:35:01.280 --> 00:35:07.800
to fix an issue um this requires things

00:35:05.240 --> 00:35:10.240
like long context understanding um being

00:35:07.800 --> 00:35:13.200
able to do very precise implementations

00:35:10.240 --> 00:35:14.720
based on large software projects and

00:35:13.200 --> 00:35:17.920
right now the state-of-the-art on this

00:35:14.720 --> 00:35:20.680
is at about 14% so it's definitely not a

00:35:17.920 --> 00:35:23.119
solv problem at all um in the original

00:35:20.680 --> 00:35:27.920
paper uh the the state-of-the-art method

00:35:23.119 --> 00:35:29.400
was like 6% or something like that so um

00:35:27.920 --> 00:35:32.079
I imagine that we're not going to get up

00:35:29.400 --> 00:35:33.880
to 90% anytime soon because it's

00:35:32.079 --> 00:35:35.720
probably solving the easier ones and the

00:35:33.880 --> 00:35:37.280
harder ones are you know far beyond the

00:35:35.720 --> 00:35:39.920
ability of any language model we have at

00:35:37.280 --> 00:35:42.320
the moment um but I I really like this

00:35:39.920 --> 00:35:43.960
Benchmark one caveat if you really like

00:35:42.320 --> 00:35:45.520
this Benchmark is that it's kind of

00:35:43.960 --> 00:35:47.760
heavy to run so you need to be a little

00:35:45.520 --> 00:35:51.000
bit careful uh because you need to pull

00:35:47.760 --> 00:35:54.280
in like full repositories to um to run

00:35:51.000 --> 00:35:56.319
on so yeah be a little

00:35:54.280 --> 00:35:57.920
bit sorry there's so many like

00:35:56.319 --> 00:35:59.640
interesting data sets recently in this

00:35:57.920 --> 00:36:01.079
area that I I spent a lot of time on

00:35:59.640 --> 00:36:04.240
data set so I'll try to go a little bit

00:36:01.079 --> 00:36:06.200
more quickly but um uh a final one is

00:36:04.240 --> 00:36:09.359
design to code and this is also a very

00:36:06.200 --> 00:36:11.520
recent data set um basically the idea is

00:36:09.359 --> 00:36:16.359
code generation from websites so your

00:36:11.520 --> 00:36:18.119
input is a website and your output is uh

00:36:16.359 --> 00:36:22.520
like JavaScript code that implements

00:36:18.119 --> 00:36:24.960
that website and or or css or HTML code

00:36:22.520 --> 00:36:26.880
that implements the website so I I

00:36:24.960 --> 00:36:30.119
really like this because you know it's a

00:36:26.880 --> 00:36:32.280
good test bed for multi modal models and

00:36:30.119 --> 00:36:34.040
there aren't a whole lot of strong open

00:36:32.280 --> 00:36:36.160
source multimodal models that can solve

00:36:34.040 --> 00:36:36.960
this at the moment so I think it's kind

00:36:36.160 --> 00:36:39.720
of

00:36:36.960 --> 00:36:41.480
cool um they also proposed a design to

00:36:39.720 --> 00:36:43.480
code model that does the best on this

00:36:41.480 --> 00:36:47.119
data set out of uh you know any of the

00:36:43.480 --> 00:36:47.119
open source models but it's still far

00:36:47.400 --> 00:36:53.040
from and then the question becomes how

00:36:50.680 --> 00:36:56.079
do they um evaluate this in the first

00:36:53.040 --> 00:36:59.440
place and basically the idea is that

00:36:56.079 --> 00:37:01.400
they do highle visual similarity and so

00:36:59.440 --> 00:37:03.920
they calculate visual embeddings of the

00:37:01.400 --> 00:37:06.119
generated sites and then they also do

00:37:03.920 --> 00:37:08.240
lowl element similarity so they try to

00:37:06.119 --> 00:37:10.440
identify all of the elements in the

00:37:08.240 --> 00:37:12.119
generated web page and make sure that uh

00:37:10.440 --> 00:37:15.720
they recall all of the generated

00:37:12.119 --> 00:37:18.760
elements so um I think this is nice one

00:37:15.720 --> 00:37:21.000
thing if you notice um if you use even

00:37:18.760 --> 00:37:25.960
state-ofthe-art like closed models like

00:37:21.000 --> 00:37:28.040
CLA 3 or um GPD 4 is they're really bad

00:37:25.960 --> 00:37:29.440
at this recall they it can generate

00:37:28.040 --> 00:37:31.800
something that looks like maybe a little

00:37:29.440 --> 00:37:33.839
bit similar but it will be missing like

00:37:31.800 --> 00:37:35.720
the elements the design will be off you

00:37:33.839 --> 00:37:37.720
know other stuff like that so I think

00:37:35.720 --> 00:37:41.079
even in the closed like strong models

00:37:37.720 --> 00:37:41.079
this is not a Sol

00:37:41.319 --> 00:37:47.079
problem cool uh

00:37:45.000 --> 00:37:49.880
yeah

00:37:47.079 --> 00:37:51.880
problem um so why is that a hard problem

00:37:49.880 --> 00:37:54.200
for the models I don't actually have a

00:37:51.880 --> 00:37:57.200
really confident answer to that but I

00:37:54.200 --> 00:37:57.200
think

00:38:00.240 --> 00:38:05.200
so one thing I can tell you is that they

00:38:02.839 --> 00:38:08.839
are able to

00:38:05.200 --> 00:38:12.000
improve um so they're able to generate

00:38:08.839 --> 00:38:14.720
something and then I say no that's bad

00:38:12.000 --> 00:38:16.160
please like make it better and it's

00:38:14.720 --> 00:38:17.800
generally better the second time

00:38:16.160 --> 00:38:19.920
especially if you give specific things

00:38:17.800 --> 00:38:22.319
like oh uh but the background on the

00:38:19.920 --> 00:38:25.160
generated site is white but actually it

00:38:22.319 --> 00:38:27.599
should be black and if you think about

00:38:25.160 --> 00:38:31.480
like even a skilled human programmer do

00:38:27.599 --> 00:38:35.119
you think you could write like website

00:38:31.480 --> 00:38:37.680
code and then view it once and then it

00:38:35.119 --> 00:38:40.319
would be correct I think you probably

00:38:37.680 --> 00:38:42.160
couldn't right and so like we're asking

00:38:40.319 --> 00:38:44.040
models to do essentially the same thing

00:38:42.160 --> 00:38:46.920
except they're like even worse than us

00:38:44.040 --> 00:38:48.560
and you know keeping track of all the V

00:38:46.920 --> 00:38:50.720
visual elements and stuff so I think

00:38:48.560 --> 00:38:52.480
it's more like this problem probably

00:38:50.720 --> 00:38:54.720
just needs iterative refinement

00:38:52.480 --> 00:38:58.839
otherwise it's like asking too much of a

00:38:54.720 --> 00:39:02.640
model maybe I don't know

00:38:58.839 --> 00:39:04.520
cool okay so um let's go into methods

00:39:02.640 --> 00:39:06.920
and code generation has some unique

00:39:04.520 --> 00:39:09.400
things um the basic method that you can

00:39:06.920 --> 00:39:11.240
always use is a code generating LM and

00:39:09.400 --> 00:39:13.040
so you feed in previous code or you feed

00:39:11.240 --> 00:39:16.040
in whatever context you have into the LM

00:39:13.040 --> 00:39:18.079
and you generate um uh from it and

00:39:16.040 --> 00:39:20.079
virtually all Serius LMS are trained on

00:39:18.079 --> 00:39:23.079
code nowadays like I I just mentioned

00:39:20.079 --> 00:39:23.079
before

00:39:23.119 --> 00:39:29.920
um one one important thing here is uh

00:39:28.560 --> 00:39:31.240
when you're generating if you're

00:39:29.920 --> 00:39:33.040
generating for something like code

00:39:31.240 --> 00:39:34.480
generation I definitely suggest that you

00:39:33.040 --> 00:39:36.119
modify your temperature settings

00:39:34.480 --> 00:39:38.359
appropriately and set it to a low

00:39:36.119 --> 00:39:42.160
temperature um otherwise you'll get kind

00:39:38.359 --> 00:39:45.079
of crazy uh code but if you set it to a

00:39:42.160 --> 00:39:45.079
low temperature you can get

00:39:46.440 --> 00:39:52.160
better anyway um one really core

00:39:49.640 --> 00:39:54.240
capability of code LMS especially ones

00:39:52.160 --> 00:39:55.599
that you use in your IDE like uh

00:39:54.240 --> 00:39:58.160
co-pilot is

00:39:55.599 --> 00:40:00.000
infilling and um

00:39:58.160 --> 00:40:03.680
the the paper that proposed this is

00:40:00.000 --> 00:40:05.920
actually by Daniel Freed at LTI here and

00:40:03.680 --> 00:40:09.160
um

00:40:05.920 --> 00:40:11.240
the basically what you want to do often

00:40:09.160 --> 00:40:13.000
is you have previous code you have next

00:40:11.240 --> 00:40:14.680
code and you want to just fill in like a

00:40:13.000 --> 00:40:17.960
line that's missing like you want to add

00:40:14.680 --> 00:40:19.040
an extra you know if statement or or

00:40:17.960 --> 00:40:22.720
some sort of

00:40:19.040 --> 00:40:24.880
modification and so the way that at

00:40:22.720 --> 00:40:27.000
least this paper proposed it and the way

00:40:24.880 --> 00:40:29.800
that I think most LMS are actually doing

00:40:27.000 --> 00:40:30.640
this is they take a standard left to

00:40:29.800 --> 00:40:33.200
right

00:40:30.640 --> 00:40:36.040
LM and what they want to do is they want

00:40:33.200 --> 00:40:39.040
to infill this code chunk and so what

00:40:36.040 --> 00:40:40.440
they do is they put a mask in the place

00:40:39.040 --> 00:40:42.119
where they want to fill the chunk which

00:40:40.440 --> 00:40:46.280
would also be where your cursor is in

00:40:42.119 --> 00:40:49.960
your IDE right uh at that point and then

00:40:46.280 --> 00:40:52.680
they have Mas to zero and then at the

00:40:49.960 --> 00:40:57.400
end they put mask to zero again and then

00:40:52.680 --> 00:40:59.000
they output the like you know all of the

00:40:57.400 --> 00:41:01.040
code that you want to generate there and

00:40:59.000 --> 00:41:02.839
so you can just kind of arbitrarily

00:41:01.040 --> 00:41:05.480
generate these trunks by pulling you

00:41:02.839 --> 00:41:07.000
know masking out chunks uh putting in

00:41:05.480 --> 00:41:08.960
The Mask token and then moving it to the

00:41:07.000 --> 00:41:10.440
end of the sequence and then you can

00:41:08.960 --> 00:41:13.160
just use a standard left to right Auto

00:41:10.440 --> 00:41:15.359
regressive language model to solve this

00:41:13.160 --> 00:41:17.040
problem so this is really important if

00:41:15.359 --> 00:41:18.520
you want to build like a co-pilot style

00:41:17.040 --> 00:41:20.160
thing and all of the code language

00:41:18.520 --> 00:41:23.680
models that I talk about at the end of

00:41:20.160 --> 00:41:23.680
this class uh use this

00:41:24.800 --> 00:41:30.440
technique um another thing is there's

00:41:28.160 --> 00:41:33.760
lots of available information uh for

00:41:30.440 --> 00:41:36.040
learning coding things um or for solving

00:41:33.760 --> 00:41:38.880
coding tasks this includes you know the

00:41:36.040 --> 00:41:40.440
current code context of course um also

00:41:38.880 --> 00:41:41.920
the description of the issue that you

00:41:40.440 --> 00:41:45.160
want to be fixing like if you're solving

00:41:41.920 --> 00:41:49.240
a poll request um repo context from

00:41:45.160 --> 00:41:51.880
other files um what tabs you have open

00:41:49.240 --> 00:41:55.920
uh so that that's also an important

00:41:51.880 --> 00:41:58.599
thing and when GitHub co-pilot came out

00:41:55.920 --> 00:42:01.960
they didn't really tell you the details

00:41:58.599 --> 00:42:04.480
of how they were doing this but um

00:42:01.960 --> 00:42:09.079
GitHub co-pilot is written in JavaScript

00:42:04.480 --> 00:42:11.839
and uh there was a p PhD student I think

00:42:09.079 --> 00:42:14.000
from maybe Georgia Tech or something uh

00:42:11.839 --> 00:42:16.839
who or Master student who basically went

00:42:14.000 --> 00:42:19.160
in and took the JavaScript and like Dem

00:42:16.839 --> 00:42:21.839
minified it and like reverse engineered

00:42:19.160 --> 00:42:23.640
what was actually happening um and uh

00:42:21.839 --> 00:42:26.680
wrote A Blog about it and this blog is

00:42:23.640 --> 00:42:28.800
is great uh so basically what uh

00:42:26.680 --> 00:42:32.200
co-pilot was doing which also kind of

00:42:28.800 --> 00:42:33.839
gives you a gold standard um way of uh

00:42:32.200 --> 00:42:36.920
looking

00:42:33.839 --> 00:42:39.440
at uh you know what kind of information

00:42:36.920 --> 00:42:43.440
is necessary to create a good model is

00:42:39.440 --> 00:42:45.240
first they extract um information for

00:42:43.440 --> 00:42:47.400
the prompt given the current document

00:42:45.240 --> 00:42:49.240
and the cursor position so they take the

00:42:47.400 --> 00:42:51.720
current document where is the cursor and

00:42:49.240 --> 00:42:54.640
what is before this and what is after

00:42:51.720 --> 00:42:56.960
this um they identify the relative path

00:42:54.640 --> 00:42:59.960
of the file and what language it's in so

00:42:56.960 --> 00:43:01.760
they they identifi python files or

00:42:59.960 --> 00:43:04.240
JavaScript files or

00:43:01.760 --> 00:43:07.440
whatever they find the most recently

00:43:04.240 --> 00:43:09.800
accessed 20 files in the same language

00:43:07.440 --> 00:43:12.599
so like if you've opened 20 tabs they

00:43:09.800 --> 00:43:15.559
keep track of which tab you had

00:43:12.599 --> 00:43:18.280
open um and then the actual prompt that

00:43:15.559 --> 00:43:22.119
they send over includes text that is

00:43:18.280 --> 00:43:23.640
before text that's after um similar

00:43:22.119 --> 00:43:26.520
files out of the 20 files that you've

00:43:23.640 --> 00:43:29.480
opened recently um also information from

00:43:26.520 --> 00:43:31.760
imported files and metadata about the

00:43:29.480 --> 00:43:33.079
language and the path so all of this is

00:43:31.760 --> 00:43:37.079
sent to the

00:43:33.079 --> 00:43:38.720
model um and so this is just basically

00:43:37.079 --> 00:43:40.160
it's really good prompt engineering

00:43:38.720 --> 00:43:41.760
right they're figuring out a good way to

00:43:40.160 --> 00:43:44.200
get all of the information that would be

00:43:41.760 --> 00:43:45.680
useful uh for getting this model to work

00:43:44.200 --> 00:43:49.559
into the

00:43:45.680 --> 00:43:50.920
prompt um so I there's much much more

00:43:49.559 --> 00:43:52.839
information in this plug it's a really

00:43:50.920 --> 00:43:57.400
nice blog if you uh if you want to see

00:43:52.839 --> 00:43:57.400
about it but um that's the basic

00:43:57.640 --> 00:44:00.240
any any

00:44:01.240 --> 00:44:07.160
questions okay

00:44:03.520 --> 00:44:11.240
cool yeah is this just what gets sent

00:44:07.160 --> 00:44:13.520
over to theot server or does

00:44:11.240 --> 00:44:15.240
copilot this is what gets sent over to

00:44:13.520 --> 00:44:17.920
the co-pilot server but the way they're

00:44:15.240 --> 00:44:20.960
sending it makes me guess that like all

00:44:17.920 --> 00:44:22.839
of this is red so like they also are

00:44:20.960 --> 00:44:24.559
considering I didn't mention it here but

00:44:22.839 --> 00:44:26.000
they're considering the token limit and

00:44:24.559 --> 00:44:27.599
other stuff like that so that kind of

00:44:26.000 --> 00:44:30.760
makes me feel like this is

00:44:27.599 --> 00:44:30.760
actually the

00:44:32.240 --> 00:44:38.440
pr uh cool

00:44:35.359 --> 00:44:41.040
so another uh thing that you can do is

00:44:38.440 --> 00:44:42.520
retrieval based code generation and

00:44:41.040 --> 00:44:45.640
retrieval based code

00:44:42.520 --> 00:44:47.599
generation uh basically what it does is

00:44:45.640 --> 00:44:50.920
it's like rag for code

00:44:47.599 --> 00:44:53.240
Generation Um and this has been around

00:44:50.920 --> 00:44:55.640
for a while including our work that I

00:44:53.240 --> 00:44:57.680
cited here and a few more in in

00:44:55.640 --> 00:44:59.960
2018 um

00:44:57.680 --> 00:45:03.000
and so one way you can do this is you

00:44:59.960 --> 00:45:07.160
can retrieve similar code from online

00:45:03.000 --> 00:45:09.720
and then use it to basically prompt a

00:45:07.160 --> 00:45:11.920
retrieval augmented language model uh

00:45:09.720 --> 00:45:14.480
this is good if you have a model that's

00:45:11.920 --> 00:45:16.920
not super good at code in the first

00:45:14.480 --> 00:45:19.920
place or you know it's making mistakes

00:45:16.920 --> 00:45:21.680
it's also good if you have a large code

00:45:19.920 --> 00:45:23.040
base like that's inter internal and you

00:45:21.680 --> 00:45:24.200
know the language model was not trained

00:45:23.040 --> 00:45:26.359
on it but you still want to use that

00:45:24.200 --> 00:45:27.559
code base for code generation so it's

00:45:26.359 --> 00:45:29.599
really good if you're working at like a

00:45:27.559 --> 00:45:32.160
big company for example that has a very

00:45:29.599 --> 00:45:33.319
constant coding style but hasn't trained

00:45:32.160 --> 00:45:37.160
its own

00:45:33.319 --> 00:45:39.720
LM um also particularly in code there's

00:45:37.160 --> 00:45:43.559
also documentation uh which can be

00:45:39.720 --> 00:45:46.920
retrieved and so we have new libraries

00:45:43.559 --> 00:45:51.359
all the time right and one frustrating

00:45:46.920 --> 00:45:53.119
thing when using like uh chat jpt or CLA

00:45:51.359 --> 00:45:57.400
or something like that when you're

00:45:53.119 --> 00:45:59.559
writing programs is that it can use old

00:45:57.400 --> 00:46:03.480
versions of libraries that are no longer

00:45:59.559 --> 00:46:05.359
compatible and so um in this paper uh

00:46:03.480 --> 00:46:08.359
which this is one of our papers too we

00:46:05.359 --> 00:46:10.079
called it DOC prompting um basically the

00:46:08.359 --> 00:46:13.720
idea is that

00:46:10.079 --> 00:46:17.440
you have your natural language input and

00:46:13.720 --> 00:46:20.119
then you look up uh similar thing

00:46:17.440 --> 00:46:23.240
similar documentation so you find like

00:46:20.119 --> 00:46:25.319
pigment is a general syntax highlighter

00:46:23.240 --> 00:46:28.160
uh so you can uh find syntax

00:46:25.319 --> 00:46:31.160
highlighting um you can also look up the

00:46:28.160 --> 00:46:32.640
lexer you can look up the HTML formatter

00:46:31.160 --> 00:46:35.119
and then all of the things that have

00:46:32.640 --> 00:46:37.000
similar documentation then you can uh

00:46:35.119 --> 00:46:39.480
append that to the prompt and then have

00:46:37.000 --> 00:46:41.680
that Genera output and we demonstrate

00:46:39.480 --> 00:46:43.200
that this is good both in general but

00:46:41.680 --> 00:46:44.800
also it's particularly good when you're

00:46:43.200 --> 00:46:46.240
dealing with new libraries that haven't

00:46:44.800 --> 00:46:48.280
been seen before or libraries that have

00:46:46.240 --> 00:46:50.119
been updated so this is another thing

00:46:48.280 --> 00:46:53.000
that you can

00:46:50.119 --> 00:46:55.720
do

00:46:53.000 --> 00:46:57.520
cool um another thing that you can do

00:46:55.720 --> 00:47:00.040
with code that you can't do easily with

00:46:57.520 --> 00:47:04.040
natural language is execution

00:47:00.040 --> 00:47:06.119
feedback and so this is a a paper where

00:47:04.040 --> 00:47:09.359
basically they do something that's

00:47:06.119 --> 00:47:10.319
rather simple but they generate multiple

00:47:09.359 --> 00:47:13.359
types of

00:47:10.319 --> 00:47:14.559
code or multiple instances of code so

00:47:13.359 --> 00:47:16.880
they basically sample different

00:47:14.559 --> 00:47:19.960
varieties of code and I was talking

00:47:16.880 --> 00:47:22.720
about like casset K right uh before

00:47:19.960 --> 00:47:25.000
casset K is good if you have some way to

00:47:22.720 --> 00:47:26.520
confirm which output is correct like you

00:47:25.000 --> 00:47:28.040
already have unit tests and you can run

00:47:26.520 --> 00:47:29.440
the unit test and identify which one

00:47:28.040 --> 00:47:31.839
passes the unit test or you can have a

00:47:29.440 --> 00:47:34.160
human check it but in the case when you

00:47:31.839 --> 00:47:35.640
can't do that what can you do and

00:47:34.160 --> 00:47:38.079
basically what you can do is you can

00:47:35.640 --> 00:47:40.800
execute all of the code Snippets that

00:47:38.079 --> 00:47:43.839
the model generated and check if the

00:47:40.800 --> 00:47:48.520
outputs overlap with each other and if

00:47:43.839 --> 00:47:50.680
you have um you know 30 programs that

00:47:48.520 --> 00:47:53.680
all generate very similar outputs then

00:47:50.680 --> 00:47:55.079
those outputs you know then that program

00:47:53.680 --> 00:47:56.520
is probably correct and then you can

00:47:55.079 --> 00:48:00.000
just pick one of them according to some

00:47:56.520 --> 00:48:02.160
criteria Ian specifically in this case

00:48:00.000 --> 00:48:03.960
they picked the program that has the

00:48:02.160 --> 00:48:05.599
lowest base risk like when we talked

00:48:03.960 --> 00:48:09.040
about minimum base risk and the decoding

00:48:05.599 --> 00:48:10.839
much so um they they basically execute a

00:48:09.040 --> 00:48:12.800
lot and then calculate the base risk of

00:48:10.839 --> 00:48:17.000
that

00:48:12.800 --> 00:48:17.000
that cool um

00:48:17.680 --> 00:48:24.440
yeah yeah and so like self consistency

00:48:21.599 --> 00:48:26.079
is a variety of Base risk um and they're

00:48:24.440 --> 00:48:27.640
using base risk here because outputs

00:48:26.079 --> 00:48:30.720
might not be exact the same but being

00:48:27.640 --> 00:48:30.720
closer is probably better

00:48:34.160 --> 00:48:39.040
than

00:48:36.760 --> 00:48:40.559
comp comparison of the code yeah that's

00:48:39.040 --> 00:48:42.880
a good question especially if you use

00:48:40.559 --> 00:48:44.319
something good like uh code BT score to

00:48:42.880 --> 00:48:46.280
do that comparison you might not even

00:48:44.319 --> 00:48:50.280
need to that's

00:48:46.280 --> 00:48:50.280
that I don't think they did that in

00:48:50.559 --> 00:48:57.240
this cool um another interesting thing

00:48:54.920 --> 00:48:59.760
um is there's

00:48:57.240 --> 00:49:04.119
several lines of work on fixing based on

00:48:59.760 --> 00:49:06.720
eror messages so the basic idea is you

00:49:04.119 --> 00:49:08.160
generate code you try to run it you get

00:49:06.720 --> 00:49:13.280
an airor message from it and then you

00:49:08.160 --> 00:49:16.200
feed that back to the llm um in order to

00:49:13.280 --> 00:49:17.520
you know correct the error and like llms

00:49:16.200 --> 00:49:19.119
if you give them an err and you give

00:49:17.520 --> 00:49:20.839
them buggy code they do have some

00:49:19.119 --> 00:49:24.599
capacity to do that especially as you

00:49:20.839 --> 00:49:28.839
get to theer llm so uh this is kind of a

00:49:24.599 --> 00:49:31.200
a nice uh paradigm this paper intercode

00:49:28.839 --> 00:49:33.880
actually generalizes this a bit and it's

00:49:31.200 --> 00:49:38.359
more recent that's why I cited it here

00:49:33.880 --> 00:49:40.000
and uh so this also um like says you can

00:49:38.359 --> 00:49:42.640
do single turn code generation you can

00:49:40.000 --> 00:49:44.960
also say oh could you please try again

00:49:42.640 --> 00:49:46.400
um you can also uh do planning and

00:49:44.960 --> 00:49:48.160
solving and other stuff like that so

00:49:46.400 --> 00:49:49.960
this is a good kind of like environment

00:49:48.160 --> 00:49:52.079
if you're interested in making these

00:49:49.960 --> 00:49:56.720
more like interactive coding assistance

00:49:52.079 --> 00:49:56.720
for example so you could take a look bre

00:49:58.359 --> 00:50:03.359
cool

00:50:00.119 --> 00:50:07.119
um another important topic is code

00:50:03.359 --> 00:50:08.880
synthesis from input output examples so

00:50:07.119 --> 00:50:12.319
actually when you said code generation

00:50:08.880 --> 00:50:14.760
or code synthesis like five years ago or

00:50:12.319 --> 00:50:17.440
10 years ago a lot of people would think

00:50:14.760 --> 00:50:19.440
about this uh so this is actually this

00:50:17.440 --> 00:50:22.440
has been around a lot longer than code

00:50:19.440 --> 00:50:24.160
synthesis um than serious inquiries into

00:50:22.440 --> 00:50:27.680
code synthesis from natural

00:50:24.160 --> 00:50:30.680
language um

00:50:27.680 --> 00:50:33.839
so basically the way this works is it

00:50:30.680 --> 00:50:35.319
can have no natural language whatsoever

00:50:33.839 --> 00:50:39.119
um but you still can try to guess the

00:50:35.319 --> 00:50:42.000
input from uh input output examples when

00:50:39.119 --> 00:50:44.319
would you want to do this so one example

00:50:42.000 --> 00:50:45.839
of this is something called flashfill

00:50:44.319 --> 00:50:48.599
which has been around for a very long

00:50:45.839 --> 00:50:51.839
time in Microsoft Excel and basically

00:50:48.599 --> 00:50:55.400
the way it works is you have one column

00:50:51.839 --> 00:50:58.640
and um the column might be

00:50:55.400 --> 00:50:58.640
like uh

00:50:59.559 --> 00:51:02.880
R new

00:51:03.040 --> 00:51:12.799
big and uh

00:51:06.559 --> 00:51:12.799
else just pick on three because he also

00:51:14.040 --> 00:51:19.599
up and so we have this column and then

00:51:17.160 --> 00:51:19.599
we have like

00:51:20.400 --> 00:51:26.760
gig um and from like one or a couple

00:51:25.160 --> 00:51:28.400
examples basically what it does is it

00:51:26.760 --> 00:51:30.319
tries to induce a program that can

00:51:28.400 --> 00:51:33.319
generate all the other examples properly

00:51:30.319 --> 00:51:35.599
so in this particular case that would be

00:51:33.319 --> 00:51:38.440
um you know like

00:51:35.599 --> 00:51:40.480
split take the first character from the

00:51:38.440 --> 00:51:43.280
first one and all of the last one and

00:51:40.480 --> 00:51:45.280
then concatenate and then M or something

00:51:43.280 --> 00:51:48.280
like that right

00:51:45.280 --> 00:51:50.079
um and so this is useful in some cases

00:51:48.280 --> 00:51:51.599
like you know in Excel when you have

00:51:50.079 --> 00:51:53.359
this long sheet and you want to fill in

00:51:51.599 --> 00:51:56.160
the rest of it and this has actually

00:51:53.359 --> 00:51:57.720
been deployed uh you know in Excel in

00:51:56.160 --> 00:52:00.960
white

00:51:57.720 --> 00:52:02.559
used um if you're interested in this

00:52:00.960 --> 00:52:06.040
topic there's a fair amount of work in

00:52:02.559 --> 00:52:08.839
it um my there's a little bit less work

00:52:06.040 --> 00:52:10.240
now because most people are focusing on

00:52:08.839 --> 00:52:12.400
uh learning programs from natural

00:52:10.240 --> 00:52:14.839
language and other stuff like this but

00:52:12.400 --> 00:52:16.480
uh this slightly older Pap paper called

00:52:14.839 --> 00:52:19.359
interpret explains a bunch of the

00:52:16.480 --> 00:52:22.880
different methods that people used and

00:52:19.359 --> 00:52:25.920
um how you uh like how they compare and

00:52:22.880 --> 00:52:28.119
stuff and also um Joshua ten and bums

00:52:25.920 --> 00:52:29.880
group from MI has done a lot on program

00:52:28.119 --> 00:52:31.319
synthesis from input output examples so

00:52:29.880 --> 00:52:32.359
you could also take a look at that that

00:52:31.319 --> 00:52:35.079
sounds

00:52:32.359 --> 00:52:38.240
interesting um one thing about this is

00:52:35.079 --> 00:52:40.280
these generally are mostly done on

00:52:38.240 --> 00:52:43.319
domain specific languages so they're

00:52:40.280 --> 00:52:46.839
mostly done like only for reg X's or

00:52:43.319 --> 00:52:48.480
they're done only for you know SQL or

00:52:46.839 --> 00:52:50.079
something like that not for the more

00:52:48.480 --> 00:52:51.960
general purpose languages just because

00:52:50.079 --> 00:52:54.079
the problem without any natural language

00:52:51.960 --> 00:52:56.520
specification is harder and so you need

00:52:54.079 --> 00:52:57.520
to like make the search space smaller or

00:52:56.520 --> 00:53:01.559
Additionally you needed to make the

00:52:57.520 --> 00:53:04.440
search small for theable so um that's a

00:53:01.559 --> 00:53:04.440
another thing to know

00:53:04.799 --> 00:53:09.440
about cool um any questions about

00:53:09.480 --> 00:53:14.440
these nice okay so finally in the the

00:53:12.559 --> 00:53:15.599
last few minutes I'd like to talk about

00:53:14.440 --> 00:53:18.480
um code

00:53:15.599 --> 00:53:22.880
LMS and I'm going to go through about

00:53:18.480 --> 00:53:24.599
four of them the first one is codex and

00:53:22.880 --> 00:53:26.200
so yeah actually what I should mention

00:53:24.599 --> 00:53:28.079
is all of the LMS that I talked about up

00:53:26.200 --> 00:53:30.640
until this point are code LMS because

00:53:28.079 --> 00:53:31.680
every LM trains on code so I'm mainly

00:53:30.640 --> 00:53:36.119
going to be talking about one

00:53:31.680 --> 00:53:39.200
specifically for code this time um so

00:53:36.119 --> 00:53:42.480
codex is the first and kind of like

00:53:39.200 --> 00:53:45.880
first really big impact Cod LM um it was

00:53:42.480 --> 00:53:47.720
created by open AI um originally I don't

00:53:45.880 --> 00:53:49.079
know about the deployed model now

00:53:47.720 --> 00:53:51.599
because you know they don't release the

00:53:49.079 --> 00:53:53.799
details of it but originally this was

00:53:51.599 --> 00:53:57.920
trained by continued training from

00:53:53.799 --> 00:53:59.799
gpt3 so they had a text M and then they

00:53:57.920 --> 00:54:03.079
just continued training it on lots and

00:53:59.799 --> 00:54:05.680
lots of code from GitHub um so yeah the

00:54:03.079 --> 00:54:08.799
data was lots of data from GitHub um if

00:54:05.680 --> 00:54:11.280
you did anything on GitHub at any point

00:54:08.799 --> 00:54:14.119
in your life uh you might be uh

00:54:11.280 --> 00:54:17.720
contributing to codep so thank you on

00:54:14.119 --> 00:54:22.440
behalf of open AI a 80 billion dollar

00:54:17.720 --> 00:54:24.599
company and uh importantly it Powers I

00:54:22.440 --> 00:54:27.599
believe it still Powers GitHub

00:54:24.599 --> 00:54:31.160
co-pilot one interesting thing is they

00:54:27.599 --> 00:54:33.119
had a large version of codex um and then

00:54:31.160 --> 00:54:35.799
they had a smaller version of codex

00:54:33.119 --> 00:54:38.359
called code kushman and the thing

00:54:35.799 --> 00:54:40.040
actually powering GitHub co-pilot is not

00:54:38.359 --> 00:54:42.839
the the largest version it's not code Da

00:54:40.040 --> 00:54:46.359
Vinci it's code kushman which is uh

00:54:42.839 --> 00:54:48.680
smaller and much faster and the reason

00:54:46.359 --> 00:54:50.640
why is probably twofold number one um

00:54:48.680 --> 00:54:54.160
you need really fast responses when

00:54:50.640 --> 00:54:55.760
you're you know working on code and

00:54:54.160 --> 00:54:57.440
there's actually in co-pilot there's

00:54:55.760 --> 00:55:00.280
some cach and other stuff like that to

00:54:57.440 --> 00:55:01.960
make your responses very fast as well um

00:55:00.280 --> 00:55:03.400
the second reason is probably it' just

00:55:01.960 --> 00:55:05.040
be too expensive for them to run Da

00:55:03.400 --> 00:55:06.760
Vinci over all the code bases for how

00:55:05.040 --> 00:55:10.400
much they're charging you for co-pilot

00:55:06.760 --> 00:55:12.119
so like every single time you like

00:55:10.400 --> 00:55:14.280
change something in one of your files if

00:55:12.119 --> 00:55:17.079
you're using copilot it's rerunning in

00:55:14.280 --> 00:55:19.359
llm and that would become very expensive

00:55:17.079 --> 00:55:20.599
if you look look at the token count so I

00:55:19.359 --> 00:55:21.839
think they're using a smaller model

00:55:20.599 --> 00:55:22.920
because of that but nonetheless it's

00:55:21.839 --> 00:55:27.039
very

00:55:22.920 --> 00:55:28.640
good um cool

00:55:27.039 --> 00:55:30.680
so now I want to get into some more

00:55:28.640 --> 00:55:33.880
modern models uh the first one I want to

00:55:30.680 --> 00:55:35.520
get into is uh star coder 2 and the

00:55:33.880 --> 00:55:38.359
reason why I want to talk about this

00:55:35.520 --> 00:55:40.160
first is because uh not necessarily that

00:55:38.359 --> 00:55:41.880
it's like absolutely the best one

00:55:40.160 --> 00:55:43.400
although it's very good but it's one of

00:55:41.880 --> 00:55:45.319
the models that actually tells us

00:55:43.400 --> 00:55:47.240
everything about their training data and

00:55:45.319 --> 00:55:50.400
training process and stuff so we know uh

00:55:47.240 --> 00:55:53.039
everything about them so the creator of

00:55:50.400 --> 00:55:54.440
This was um the big science project

00:55:53.039 --> 00:55:56.880
which was led by hugging face and

00:55:54.440 --> 00:55:58.680
service now um

00:55:56.880 --> 00:56:02.079
and includes lots and lots of people

00:55:58.680 --> 00:56:04.960
from various universities and things um

00:56:02.079 --> 00:56:09.319
the architecture is mostly llama style

00:56:04.960 --> 00:56:11.960
it has 3B 7B and 15b variants um one

00:56:09.319 --> 00:56:15.480
interesting thing about all code LMS is

00:56:11.960 --> 00:56:17.680
that they all do long context they all

00:56:15.480 --> 00:56:20.359
do longer context and they all

00:56:17.680 --> 00:56:23.200
reconfigure rope for longer context

00:56:20.359 --> 00:56:25.280
specifically so you know rope has a

00:56:23.200 --> 00:56:28.599
Theta parameter that allows you to tell

00:56:25.280 --> 00:56:31.720
how long the um like sign sine waves and

00:56:28.599 --> 00:56:33.720
stuff like that are and they all always

00:56:31.720 --> 00:56:36.079
um change the parameters so that the

00:56:33.720 --> 00:56:38.599
context is longer so that's another good

00:56:36.079 --> 00:56:38.599
thing to know

00:56:38.640 --> 00:56:44.559
about the the training data section of

00:56:42.000 --> 00:56:48.799
this paper is really fascinating I can

00:56:44.559 --> 00:56:51.240
like it it's a really good way to look

00:56:48.799 --> 00:56:54.160
at you know how much data engineering

00:56:51.240 --> 00:56:55.960
goes into making a good model um and

00:56:54.160 --> 00:56:57.960
just very shortly they give a lot more

00:56:55.960 --> 00:57:00.640
detail in the paper but it's trained on

00:56:57.960 --> 00:57:04.839
code uh including the stack which is

00:57:00.640 --> 00:57:06.920
just a huge uh amount like repository of

00:57:04.839 --> 00:57:08.359
code that I'll talk about in a second

00:57:06.920 --> 00:57:10.559
separately from that it was trained on

00:57:08.359 --> 00:57:13.079
GitHub issues it was trained on poll

00:57:10.559 --> 00:57:16.000
requests Jupiter notebooks keggle

00:57:13.079 --> 00:57:18.319
notebooks documentation and also

00:57:16.000 --> 00:57:23.440
intermediate representations from uh

00:57:18.319 --> 00:57:26.440
llvm so llvm is a uh you know like

00:57:23.440 --> 00:57:28.920
intermediate uh compiler style thing

00:57:26.440 --> 00:57:30.839
that is used for compiling code and it

00:57:28.920 --> 00:57:34.400
was also trained on a few code relevant

00:57:30.839 --> 00:57:38.440
natural language data sets

00:57:34.400 --> 00:57:39.960
um so for pre-processing they do

00:57:38.440 --> 00:57:42.640
something pretty interesting which is

00:57:39.960 --> 00:57:44.240
they add metadata tags such as the repo

00:57:42.640 --> 00:57:48.119
name and the file name and other stuff

00:57:44.240 --> 00:57:49.799
like this uh 50% of the time and they do

00:57:48.119 --> 00:57:51.599
this 50% of the time because they want

00:57:49.799 --> 00:57:54.400
the model to work with them but also be

00:57:51.599 --> 00:57:57.079
robust without them um and so you can

00:57:54.400 --> 00:57:59.839
either add them or not add them at test

00:57:57.079 --> 00:58:03.079
time uh they also do infilling every

00:57:59.839 --> 00:58:05.960
serus code LM does infilling Based

00:58:03.079 --> 00:58:07.480
training um one interesting thing about

00:58:05.960 --> 00:58:08.960
this from the training perspective is

00:58:07.480 --> 00:58:12.000
they actually trained it for four to

00:58:08.960 --> 00:58:14.359
five epochs um which is much more than

00:58:12.000 --> 00:58:17.160
we normally do so normally we only train

00:58:14.359 --> 00:58:18.359
for like one Epoch over you know all of

00:58:17.160 --> 00:58:20.079
the data we have but here they were

00:58:18.359 --> 00:58:21.319
training for monger and that's just

00:58:20.079 --> 00:58:23.359
because the amount of data they can get

00:58:21.319 --> 00:58:24.400
for code is less than the amount of data

00:58:23.359 --> 00:58:27.200
they can get for all the national

00:58:24.400 --> 00:58:30.039
language I

00:58:27.200 --> 00:58:33.200
so the data set that they created is uh

00:58:30.039 --> 00:58:36.119
the stack 2 and this is a code

00:58:33.200 --> 00:58:37.839
pre-training data set um one interesting

00:58:36.119 --> 00:58:40.039
thing that they thought about was uh

00:58:37.839 --> 00:58:42.960
license considerations so I talked about

00:58:40.039 --> 00:58:44.480
the um how copyright is a problem when

00:58:42.960 --> 00:58:46.640
trading large language models two

00:58:44.480 --> 00:58:48.880
classes ago and so here they

00:58:46.640 --> 00:58:50.119
specifically tried to find things with

00:58:48.880 --> 00:58:52.520
permissive

00:58:50.119 --> 00:58:53.880
licenses and so what they did is they

00:58:52.520 --> 00:58:57.000
basically looked at the license on

00:58:53.880 --> 00:58:59.520
GitHub um and if the GitHub license was

00:58:57.000 --> 00:59:01.440
permissive they marked it as permissive

00:58:59.520 --> 00:59:02.880
um then they tried to detect licenses

00:59:01.440 --> 00:59:05.720
and then um if all of them were

00:59:02.880 --> 00:59:08.000
permissive they marked it as

00:59:05.720 --> 00:59:10.480
permissive this is a huge table that

00:59:08.000 --> 00:59:14.160
they have in the paper of all of the

00:59:10.480 --> 00:59:15.480
data that they have and um you know I'm

00:59:14.160 --> 00:59:16.920
not going to go through all of this

00:59:15.480 --> 00:59:18.920
obviously but what you can see is some

00:59:16.920 --> 00:59:22.480
of the biggest data sets are like

00:59:18.920 --> 00:59:26.280
Java um

00:59:22.480 --> 00:59:28.640
PHP markdown

00:59:26.280 --> 00:59:30.039
and uh Python and other stuff like that

00:59:28.640 --> 00:59:32.240
so you can see the major programming

00:59:30.039 --> 00:59:35.559
languages have lots of data but there's

00:59:32.240 --> 00:59:38.400
also a long tail so if you like your uh

00:59:35.559 --> 00:59:40.440
you know more esoteric uh but cool

00:59:38.400 --> 00:59:43.960
programming languages like rust yes it

00:59:40.440 --> 00:59:46.160
has rust too so um we can do all all of

00:59:43.960 --> 00:59:46.160
those

00:59:46.480 --> 00:59:53.079
things so the next model that I'd like

00:59:49.799 --> 00:59:55.200
to talk about is cod llama and cod llama

00:59:53.079 --> 00:59:57.920
is another competitive model it came out

00:59:55.200 --> 00:59:59.480
a little bit before star coder and star

00:59:57.920 --> 01:00:02.680
coder 2 and deep sea coder which I'm

00:59:59.480 --> 01:00:04.079
going to talk about um this is a created

01:00:02.680 --> 01:00:08.319
by

01:00:04.079 --> 01:00:11.160
meta and um the architecture is the same

01:00:08.319 --> 01:00:14.280
as llama 2 uh basically and they did

01:00:11.160 --> 01:00:16.400
continued training from llama 2 um but

01:00:14.280 --> 01:00:18.000
they trained it on longer input contexts

01:00:16.400 --> 01:00:21.720
and they also extended the length of

01:00:18.000 --> 01:00:23.559
rope so uh those are you know standard

01:00:21.720 --> 01:00:26.680
things for code language

01:00:23.559 --> 01:00:28.680
models it was trained on DED code and

01:00:26.680 --> 01:00:30.400
also synthetically created instruction

01:00:28.680 --> 01:00:33.280
data so they created like instruction

01:00:30.400 --> 01:00:37.920
tuning data specifically for

01:00:33.280 --> 01:00:39.480
code um and the training was incremental

01:00:37.920 --> 01:00:42.559
with various data sets and what I mean

01:00:39.480 --> 01:00:45.599
by this is they trained on 500 billion

01:00:42.559 --> 01:00:47.599
uh I believe tokens of code and then

01:00:45.599 --> 01:00:50.400
they did long context fine tuning on 20

01:00:47.599 --> 01:00:52.599
billion tokens and then they also did

01:00:50.400 --> 01:00:55.400
instruction tuning they also have a

01:00:52.599 --> 01:00:57.079
python specific one and the reason why

01:00:55.400 --> 01:00:59.640
they have a p specific one is not

01:00:57.079 --> 01:01:02.319
because python is more import important

01:00:59.640 --> 01:01:03.839
uh uh necessarily but because a lot of

01:01:02.319 --> 01:01:05.559
the benchmarks are in Python because

01:01:03.839 --> 01:01:06.920
machine learning people like who are

01:01:05.559 --> 01:01:09.240
creating benchmarks they also like

01:01:06.920 --> 01:01:11.200
python so python is more common in the

01:01:09.240 --> 01:01:14.240
benchmarks so they basically wanted to

01:01:11.200 --> 01:01:15.720
do well on the benchmarks I think uh and

01:01:14.240 --> 01:01:17.920
and created a data set that does well in

01:01:15.720 --> 01:01:19.240
the benchmarks but um if you are

01:01:17.920 --> 01:01:23.160
creating python you can use the code

01:01:19.240 --> 01:01:25.280
llama python it's better at pipelines so

01:01:23.160 --> 01:01:28.000
um and then the final one I'd like to

01:01:25.280 --> 01:01:29.839
talk about is is a deep seek coder uh

01:01:28.000 --> 01:01:32.079
this is notable because it's a very

01:01:29.839 --> 01:01:34.599
strong model it it's maybe the strongest

01:01:32.079 --> 01:01:38.799
model on average over all the code

01:01:34.599 --> 01:01:41.599
models um they did 87% the data is not

01:01:38.799 --> 01:01:44.640
super clear but they did 87% source code

01:01:41.599 --> 01:01:46.359
10% English um from markdown in stock

01:01:44.640 --> 01:01:51.160
exchange and 3% Chinese because it's

01:01:46.359 --> 01:01:53.559
from a Chinese company deep seek um and

01:01:51.160 --> 01:01:54.960
they did standard prepr uh but one

01:01:53.559 --> 01:01:57.319
interesting thing they did is they

01:01:54.960 --> 01:01:59.200
included Library dependencies so they

01:01:57.319 --> 01:02:01.799
basically crawled the dependency graph

01:01:59.200 --> 01:02:03.640
of libraries pulled out files from the

01:02:01.799 --> 01:02:06.000
libraries that were referenced and then

01:02:03.640 --> 01:02:07.440
used them in training and so that's

01:02:06.000 --> 01:02:09.319
particularly useful if you want the

01:02:07.440 --> 01:02:12.920
model to be able to reference external

01:02:09.319 --> 01:02:14.039
libraries well um so that's kind of an

01:02:12.920 --> 01:02:17.279
interesting

01:02:14.039 --> 01:02:19.599
thing um the architecture is pretty

01:02:17.279 --> 01:02:22.960
standard it's llama likee with 1.3

01:02:19.599 --> 01:02:24.599
billion 6.7 billion in 33b variants and

01:02:22.960 --> 01:02:27.279
it has a reconfigured work like the

01:02:24.599 --> 01:02:30.520
others and they on two trillion

01:02:27.279 --> 01:02:34.200
tokens um so then a question becomes

01:02:30.520 --> 01:02:36.680
which one to use um and I created a

01:02:34.200 --> 01:02:39.160
summary here um all of them have

01:02:36.680 --> 01:02:40.760
somewhat similar performance uh this is

01:02:39.160 --> 01:02:42.760
they're compared in the star coder 2

01:02:40.760 --> 01:02:45.640
paper so you can go in and look at

01:02:42.760 --> 01:02:48.160
details at the starcode to paper um

01:02:45.640 --> 01:02:51.119
deeps coder seems to be strong on

01:02:48.160 --> 01:02:52.799
standard programming tasks um whereas

01:02:51.119 --> 01:02:54.799
star coder seems to be strong on data

01:02:52.799 --> 01:02:56.680
science notebooks so like on average

01:02:54.799 --> 01:02:59.160
it's better at kind of sound notebooks

01:02:56.680 --> 01:03:02.079
but all of them are good models um all

01:02:59.160 --> 01:03:05.440
of them are not quite as good as uh like

01:03:02.079 --> 01:03:08.920
gp4 quad on like they're very uh you

01:03:05.440 --> 01:03:10.799
know more complex tasks but uh they're

01:03:08.920 --> 01:03:12.359
available and you can find to them and

01:03:10.799 --> 01:03:16.880
do other things like that as

01:03:12.359 --> 01:03:21.599
well one caveat about the Deep seek

01:03:16.880 --> 01:03:24.640
thing is actually if I go back to this

01:03:21.599 --> 01:03:27.559
slide um a lot of the models up here are

01:03:24.640 --> 01:03:29.640
deep seek um so you do need to be a

01:03:27.559 --> 01:03:31.400
little bit careful about like

01:03:29.640 --> 01:03:34.400
interpreting their human Evel results

01:03:31.400 --> 01:03:36.319
because it's possible that the model uh

01:03:34.400 --> 01:03:38.799
was trained on data very similar to

01:03:36.319 --> 01:03:40.279
human eval or something like that so do

01:03:38.799 --> 01:03:42.880
take that with a grain of salt but even

01:03:40.279 --> 01:03:44.520
on other data sets where presumably the

01:03:42.880 --> 01:03:46.760
model has not seen those data sets it

01:03:44.520 --> 01:03:49.920
still does very well so it's not like

01:03:46.760 --> 01:03:51.480
it's um you know as you can see it's

01:03:49.920 --> 01:03:54.640
still one of the most competitive code

01:03:51.480 --> 01:03:57.680
models even on this new LCB um data set

01:03:54.640 --> 01:04:01.359
so uh that's want into the

01:03:57.680 --> 01:04:03.000
a cool um that's all I have for today I

01:04:01.359 --> 01:04:04.359
you know I love to talk about this topic

01:04:03.000 --> 01:04:06.480
I've done a lot of research on it so I'm

01:04:04.359 --> 01:04:11.200
happy to discuss any questions if people

01:04:06.480 --> 01:04:14.720
have them either in front of everyone or

01:04:11.200 --> 01:04:14.720
after any any

01:04:16.480 --> 01:04:24.160
questions uh yeah just wondering there a

01:04:20.359 --> 01:04:27.720
like enfor the outut during using things

01:04:24.160 --> 01:04:27.720
other than models

01:04:30.599 --> 01:04:36.599
yeah great question is there a way to

01:04:33.640 --> 01:04:38.200
enforce uh restrictions at decoding time

01:04:36.599 --> 01:04:39.760
other than using the model's uh

01:04:38.200 --> 01:04:42.240
probabilities because this is code and

01:04:39.760 --> 01:04:42.240
we know the

01:04:42.440 --> 01:04:51.079
syntax yes and no um there

01:04:46.319 --> 01:04:53.200
are for code it's not always immediately

01:04:51.079 --> 01:04:54.400
obvious like I mean one one thing you

01:04:53.200 --> 01:04:55.960
could do is just generate a bunch of

01:04:54.400 --> 01:04:58.520
results and throw out all the syntax

01:04:55.960 --> 01:04:59.480
incorrect on that's easy right um but if

01:04:58.520 --> 01:05:02.520
you don't want to do that and you want

01:04:59.480 --> 01:05:04.839
to do it at decoding time it's dependent

01:05:02.520 --> 01:05:07.480
on you being able to have an incremental

01:05:04.839 --> 01:05:09.079
syntax parser that allows you to like

01:05:07.480 --> 01:05:12.400
throw out bad

01:05:09.079 --> 01:05:14.160
hypotheses like incrementally and that's

01:05:12.400 --> 01:05:16.240
possible that's very easy for some

01:05:14.160 --> 01:05:17.200
languages and not possible not as easy

01:05:16.240 --> 01:05:20.559
for other

01:05:17.200 --> 01:05:23.720
languages um one really big thing right

01:05:20.559 --> 01:05:26.599
now is Json so like a lot of the time

01:05:23.720 --> 01:05:28.319
people want to Output Json uh in you

01:05:26.599 --> 01:05:31.559
know then par the Json and use it in

01:05:28.319 --> 01:05:36.640
some Downstream test and there actually

01:05:31.559 --> 01:05:36.640
are libraries um just to give a

01:05:38.559 --> 01:05:45.839
few um here's one this Library called

01:05:42.640 --> 01:05:48.799
outlines um is one that basically allows

01:05:45.839 --> 01:05:50.440
you to incorporate syntactic constraints

01:05:48.799 --> 01:05:53.240
through like weighted finite State

01:05:50.440 --> 01:05:55.160
automata and other stuff like this um to

01:05:53.240 --> 01:05:57.680
allow you to throw away anything that

01:05:55.160 --> 01:06:02.039
doesn't here to your grammar another

01:05:57.680 --> 01:06:02.039
popular one which

01:06:02.720 --> 01:06:06.880
is nice but a little bit more

01:06:07.160 --> 01:06:12.760
complicated is

01:06:09.799 --> 01:06:15.160
um this one uh

01:06:12.760 --> 01:06:17.200
guidance so if you want to look at like

01:06:15.160 --> 01:06:19.720
constrained generation of outputs I

01:06:17.200 --> 01:06:21.640
would definitely recommend uh looking at

01:06:19.720 --> 01:06:22.839
one of these two either outlines or or

01:06:21.640 --> 01:06:24.440
guidance and they both give you

01:06:22.839 --> 01:06:26.520
different ways to add constraints to

01:06:24.440 --> 01:06:29.079
Output um we did actually talk about

01:06:26.520 --> 01:06:31.200
outlines a little bit during the like uh

01:06:29.079 --> 01:06:34.599
generation class but um we didn't go

01:06:31.200 --> 01:06:35.760
into a lot of details so uh yeah but I I

01:06:34.599 --> 01:06:39.559
would recommend

01:06:35.760 --> 01:06:39.559
this cool any other

01:06:39.599 --> 01:06:43.920
questions okay if not uh I guess we can

01:06:42.079 --> 01:06:47.880
finish up and I'm happy to talk we have

01:06:43.920 --> 01:06:47.880
a little bit of extra time