File size: 122,414 Bytes
7c44714 | 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 | ensure_api_key() {
if "${GCLOUD}" secrets describe "${SECRET_NAME}" --project "${PROJECT}" >/dev/null 2>&1; then
log "Secret exists: ${SECRET_NAME}"
if "${GCLOUD}" secrets versions list "${SECRET_NAME}" --project "${PROJECT}" 2>/dev/null | grep -q "^[0-9]"; then
log "Re-using existing API key version (retrieve with ./scripts/invoke_helios_preview.sh key)."
return 0
fi
else
log "Creating secret: ${SECRET_NAME}"
"${GCLOUD}" secrets create "${SECRET_NAME}" \
--project "${PROJECT}" \
--replication-policy=automatic >/dev/null
fi
local key
key="$(python3 -c 'import secrets; print("hlp_" + secrets.token_urlsafe(32))')"
printf '%s' "${key}" | "${GCLOUD}" secrets versions add "${SECRET_NAME}" \
--project "${PROJECT}" \
--data-file=- >/dev/null
log "New API key generated. SAVE NOW (won't be shown again): ${key}"
}
from __future__ import annotations
## Cloudflare fallback
def _inject(body: bytes) -> bytes:
if not INJECT or not body:
return body
try:
data = json.loads(body)
except Exception:
return body
# Enable prompt cache (KV cache reuse)
data["cache_prompt"] = True
msgs = data.get("messages")
if not isinstance(msgs, list) or not msgs:
return body
## Dataset Layers
PROJECT="${PROJECT:-project-6168b668-98c9-444b-b27}"
REGION="${REGION:-europe-west1}"
SECRET_NAME="helios-preview-api-key"
SERVICE="helios-preview"
MODEL="maximo-helios-preview"
GCLOUD="${GCLOUD:-/Users/johnsondaniel/google-cloud-sdk/bin/gcloud}"
print_summary() {
local api_url
api_url="$("${GCLOUD}" run services describe "${API_SERVICE}" --project "${PROJECT}" --region "${REGION}" --format='value(status.url)')"
echo
echo "============================================================"
echo " maximo helios nano preview — DEPLOYED"
echo "============================================================"
echo " Endpoint URL : ${api_url}"
echo " Served model : maximo-helios-nano-preview"
echo " Region : ${REGION}"
echo " GPU : 1x nvidia-l4 (scales to zero when idle)"
echo " Auth : Authorization: Bearer <API_KEY>"
echo " Secret name : ${SECRET_NAME} (in Secret Manager)"
echo
echo " Example:"
echo " curl ${api_url}/v1/models \\"
echo " -H 'Authorization: Bearer <API_KEY>'"
echo
echo " OpenAI-compatible SDK:"
echo " from openai import OpenAI"
echo " client = OpenAI(base_url='${api_url}/v1', api_key='<API_KEY>')"
echo " r = client.chat.completions.create("
echo " model='maximo-helios-nano-preview',"
echo " messages=[{'role':'user','content':'Solve 2x+3=11'}]"
echo " )"
echo "============================================================"
}
```text
gs://maximoai-models-976606885534/
raw/
public/
private/
maximo-screen-records/
mytabulon-ui-screenshots/
processed/
pretrain/
sft/
eval/
manifests/
snapshots/
runs/
```
api_url="$(url)"
api_key="$(key)"
```bash
./scripts/invoke_helios_preview.sh key # show API key
./scripts/invoke_helios_preview.sh chat "Write a haiku" # chat
./scripts/invoke_helios_preview.sh tools "Weather in Lagos?" # tool calling
```
{
"bucket": "gs://maximoai-models-976606885534",
"config": "/Users/johnsondaniel/Documents/maximoai-models/configs/public_dataset_ingest.json",
"datasets": [
{
"bytes_uploaded": 37156608,
"category": "tool_calling",
"files": [
{
"gcs": "gs://maximoai-models-976606885534/raw/public/toolace/6bda777c88d2/README.md",
"path": "README.md",
"size": 1873,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/toolace/6bda777c88d2/data.json",
"path": "data.json",
"size": 37154735,
"status": "uploaded"
}
],
"id": "Team-ACE/ToolACE",
"license": "apache-2.0",
"purpose": "General function/tool-calling SFT.",
"revision": "6bda777c88d21e5a204703c1ee45597a8fa4f734",
"slug": "toolace"
},
{
"bytes_uploaded": 66774246,
"category": "tool_calling",
"files": [
{
"gcs": "gs://maximoai-models-976606885534/raw/public/hermes-function-calling-v1/dae3e1d28cfb/README.md",
"path": "README.md",
"size": 37741,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/hermes-function-calling-v1/dae3e1d28cfb/func-calling-singleturn.json",
"path": "func-calling-singleturn.json",
"size": 17793686,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/hermes-function-calling-v1/dae3e1d28cfb/func-calling.json",
"path": "func-calling.json",
"size": 20554130,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/hermes-function-calling-v1/dae3e1d28cfb/glaive-function-calling-5k.json",
"path": "glaive-function-calling-5k.json",
"size": 20416419,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/hermes-function-calling-v1/dae3e1d28cfb/json-mode-agentic.json",
"path": "json-mode-agentic.json",
"size": 5019263,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/hermes-function-calling-v1/dae3e1d28cfb/json-mode-singleturn.json",
"path": "json-mode-singleturn.json",
"size": 2953007,
"status": "uploaded"
}
],
"id": "NousResearch/hermes-function-calling-v1",
"license": "apache-2.0",
"purpose": "Function-calling examples with tool schemas and ShareGPT-style traces.",
"revision": "dae3e1d28cfbcf4b915c04ea1e072030529b4bda",
"slug": "hermes-function-calling-v1"
},
{
"bytes_uploaded": 271190171,
"category": "tool_calling",
"files": [
{
"gcs": "gs://maximoai-models-976606885534/raw/public/glaive-function-calling-v2/e7f4b6456019/README.md",
"path": "README.md",
"size": 106,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/glaive-function-calling-v2/e7f4b6456019/glaive-function-calling-v2.json",
"path": "glaive-function-calling-v2.json",
"size": 271190065,
"status": "uploaded"
}
],
"id": "glaiveai/glaive-function-calling-v2",
"license": "apache-2.0",
"purpose": "Large function-calling SFT set with mixed tool and no-tool examples.",
"revision": "e7f4b6456019f5d8bcb991ef0dd67d8ff23221ac",
"slug": "glaive-function-calling-v2"
},
{
"bytes_uploaded": 11717747,
"category": "tool_calling_eval",
"files": [
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_chatable.json",
"path": "BFCL_v3_chatable.json",
"size": 24980,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_exec_multiple.json",
"path": "BFCL_v3_exec_multiple.json",
"size": 82066,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_exec_parallel.json",
"path": "BFCL_v3_exec_parallel.json",
"size": 56281,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_exec_parallel_multiple.json",
"path": "BFCL_v3_exec_parallel_multiple.json",
"size": 73943,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_exec_simple.json",
"path": "BFCL_v3_exec_simple.json",
"size": 87953,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_irrelevance.json",
"path": "BFCL_v3_irrelevance.json",
"size": 160114,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_java.json",
"path": "BFCL_v3_java.json",
"size": 85919,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_javascript.json",
"path": "BFCL_v3_javascript.json",
"size": 46713,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_live_irrelevance.json",
"path": "BFCL_v3_live_irrelevance.json",
"size": 2202715,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_live_multiple.json",
"path": "BFCL_v3_live_multiple.json",
"size": 3891342,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_live_parallel.json",
"path": "BFCL_v3_live_parallel.json",
"size": 15649,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_live_parallel_multiple.json",
"path": "BFCL_v3_live_parallel_multiple.json",
"size": 82332,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_live_relevance.json",
"path": "BFCL_v3_live_relevance.json",
"size": 54134,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_live_simple.json",
"path": "BFCL_v3_live_simple.json",
"size": 260128,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_multi_turn_base.json",
"path": "BFCL_v3_multi_turn_base.json",
"size": 391058,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_multi_turn_composite.json",
"path": "BFCL_v3_multi_turn_composite.json",
"size": 404501,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_multi_turn_long_context.json",
"path": "BFCL_v3_multi_turn_long_context.json",
"size": 392651,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_multi_turn_miss_func.json",
"path": "BFCL_v3_multi_turn_miss_func.json",
"size": 401840,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_multi_turn_miss_param.json",
"path": "BFCL_v3_multi_turn_miss_param.json",
"size": 403181,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_multiple.json",
"path": "BFCL_v3_multiple.json",
"size": 316583,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_parallel.json",
"path": "BFCL_v3_parallel.json",
"size": 172094,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_parallel_multiple.json",
"path": "BFCL_v3_parallel_multiple.json",
"size": 347080,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_rest.json",
"path": "BFCL_v3_rest.json",
"size": 208186,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_simple.json",
"path": "BFCL_v3_simple.json",
"size": 280474,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/BFCL_v3_sql.json",
"path": "BFCL_v3_sql.json",
"size": 152641,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/README.md",
"path": "README.md",
"size": 15282,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/eval.yaml",
"path": "eval.yaml",
"size": 736,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/multi_turn_func_doc/gorilla_file_system.json",
"path": "multi_turn_func_doc/gorilla_file_system.json",
"size": 13951,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/multi_turn_func_doc/math_api.json",
"path": "multi_turn_func_doc/math_api.json",
"size": 9158,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/multi_turn_func_doc/message_api.json",
"path": "multi_turn_func_doc/message_api.json",
"size": 6097,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/multi_turn_func_doc/posting_api.json",
"path": "multi_turn_func_doc/posting_api.json",
"size": 10573,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/multi_turn_func_doc/ticket_api.json",
"path": "multi_turn_func_doc/ticket_api.json",
"size": 6577,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/multi_turn_func_doc/trading_bot.json",
"path": "multi_turn_func_doc/trading_bot.json",
"size": 14075,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/multi_turn_func_doc/travel_booking.json",
"path": "multi_turn_func_doc/travel_booking.json",
"size": 15930,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/multi_turn_func_doc/vehicle_control.json",
"path": "multi_turn_func_doc/vehicle_control.json",
"size": 17545,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/possible_answer/BFCL_v3_java.json",
"path": "possible_answer/BFCL_v3_java.json",
"size": 15707,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/possible_answer/BFCL_v3_javascript.json",
"path": "possible_answer/BFCL_v3_javascript.json",
"size": 7529,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/possible_answer/BFCL_v3_live_multiple.json",
"path": "possible_answer/BFCL_v3_live_multiple.json",
"size": 199668,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/possible_answer/BFCL_v3_live_parallel.json",
"path": "possible_answer/BFCL_v3_live_parallel.json",
"size": 4974,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/possible_answer/BFCL_v3_live_parallel_multiple.json",
"path": "possible_answer/BFCL_v3_live_parallel_multiple.json",
"size": 7420,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/possible_answer/BFCL_v3_live_simple.json",
"path": "possible_answer/BFCL_v3_live_simple.json",
"size": 46971,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/possible_answer/BFCL_v3_multi_turn_base.json",
"path": "possible_answer/BFCL_v3_multi_turn_base.json",
"size": 80428,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/possible_answer/BFCL_v3_multi_turn_composite.json",
"path": "possible_answer/BFCL_v3_multi_turn_composite.json",
"size": 115938,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/possible_answer/BFCL_v3_multi_turn_long_context.json",
"path": "possible_answer/BFCL_v3_multi_turn_long_context.json",
"size": 116024,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/possible_answer/BFCL_v3_multi_turn_miss_func.json",
"path": "possible_answer/BFCL_v3_multi_turn_miss_func.json",
"size": 82136,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/possible_answer/BFCL_v3_multi_turn_miss_param.json",
"path": "possible_answer/BFCL_v3_multi_turn_miss_param.json",
"size": 82360,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/possible_answer/BFCL_v3_multiple.json",
"path": "possible_answer/BFCL_v3_multiple.json",
"size": 32254,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/possible_answer/BFCL_v3_parallel.json",
"path": "possible_answer/BFCL_v3_parallel.json",
"size": 65905,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/possible_answer/BFCL_v3_parallel_multiple.json",
"path": "possible_answer/BFCL_v3_parallel_multiple.json",
"size": 74601,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/possible_answer/BFCL_v3_simple.json",
"path": "possible_answer/BFCL_v3_simple.json",
"size": 60809,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/possible_answer/BFCL_v3_sql.json",
"path": "possible_answer/BFCL_v3_sql.json",
"size": 20541,
"status": "uploaded"
}
],
"id": "gorilla-llm/Berkeley-Function-Calling-Leaderboard",
"license": "apache-2.0",
"purpose": "Holdout function-calling evaluation; do not train on this unless creating synthetic variants.",
"revision": "61fc0608cfd831fcfbbaa676ebdfef0ed963eeda",
"slug": "berkeley-function-calling-leaderboard"
},
{
"bytes_uploaded": 90129198,
"category": "coding",
"files": [
{
"gcs": "gs://maximoai-models-976606885534/raw/public/self-oss-instruct-sc2-exec-filter-50k/356bb069eee8/README.md",
"path": "README.md",
"size": 1040,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/self-oss-instruct-sc2-exec-filter-50k/356bb069eee8/data/train-00000-of-00001.parquet",
"path": "data/train-00000-of-00001.parquet",
"size": 90128158,
"status": "uploaded"
}
],
"id": "bigcode/self-oss-instruct-sc2-exec-filter-50k",
"license": "odc-by",
"purpose": "Coding instruction SFT from SelfCodeAlign.",
"revision": "356bb069eee815daa6e23e9a282eeefe1490ad44",
"slug": "self-oss-instruct-sc2-exec-filter-50k"
},
{
"bytes_uploaded": 37384124,
"category": "coding",
"files": [
{
"gcs": "gs://maximoai-models-976606885534/raw/public/evolvecoder-22k/73fa2c3f56f2/README.md",
"path": "README.md",
"size": 2339,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/evolvecoder-22k/73fa2c3f56f2/data/train-00000-of-00001.parquet",
"path": "data/train-00000-of-00001.parquet",
"size": 37381785,
"status": "uploaded"
}
],
"id": "TIGER-Lab/EvolveCoder-22K",
"license": "apache-2.0",
"purpose": "Competitive-programming tasks with adversarial/evolved tests.",
"revision": "73fa2c3f56f283410ba2d78a6ceacbb1ff372b1f",
"slug": "evolvecoder-22k"
},
{
"bytes_uploaded": 99160155,
"category": "coding",
"files": [
{
"gcs": "gs://maximoai-models-976606885534/raw/public/acecode-v1-1-69k/9d74afc8549d/README.md",
"path": "README.md",
"size": 4049,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/acecode-v1-1-69k/9d74afc8549d/data/train-00000-of-00001.parquet",
"path": "data/train-00000-of-00001.parquet",
"size": 99156106,
"status": "uploaded"
}
],
"id": "TIGER-Lab/AceCode-V1.1-69K",
"license": "mit",
"purpose": "Coding problems with tests for code reasoning and verification.",
"revision": "9d74afc8549d048bdd23959e4115af8d87620c08",
"slug": "acecode-v1-1-69k"
},
{
"bytes_uploaded": 87756597,
"category": "reasoning",
"files": [
{
"gcs": "gs://maximoai-models-976606885534/raw/public/webinstruct-verified/3e8a350b3a93/README.md",
"path": "README.md",
"size": 5087,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/webinstruct-verified/3e8a350b3a93/data/test-00000-of-00001.parquet",
"path": "data/test-00000-of-00001.parquet",
"size": 194902,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/webinstruct-verified/3e8a350b3a93/data/train-00000-of-00001.parquet",
"path": "data/train-00000-of-00001.parquet",
"size": 43775058,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/webinstruct-verified/3e8a350b3a93/data/train_legacy-00000-of-00001.parquet",
"path": "data/train_legacy-00000-of-00001.parquet",
"size": 43781550,
"status": "uploaded"
}
],
"id": "TIGER-Lab/WebInstruct-verified",
"license": "apache-2.0",
"purpose": "Verified web-derived reasoning/instruction data, useful as auxiliary SFT.",
"revision": "3e8a350b3a935d68fe70bdf379692500abc9ff51",
"slug": "webinstruct-verified"
},
{
"bytes_uploaded": 2055936,
"category": "gui_grounding",
"files": [
{
"gcs": "gs://maximoai-models-976606885534/raw/public/fiftyone-gui-grounding-train/01f6d9935139/README.md",
"path": "README.md",
"size": 9282,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/fiftyone-gui-grounding-train/01f6d9935139/fiftyone.yml",
"path": "fiftyone.yml",
"size": 97,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/fiftyone-gui-grounding-train/01f6d9935139/metadata.json",
"path": "metadata.json",
"size": 11169,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/fiftyone-gui-grounding-train/01f6d9935139/samples.json",
"path": "samples.json",
"size": 2035388,
"status": "uploaded"
}
],
"id": "Voxel51/FiftyOne-GUI-Grounding-Train",
"license": "apache-2.0",
"purpose": "Small GUI screenshot grounding set for visual UI understanding.",
"revision": "01f6d99351399bee5291346cb5942fd3318b4cb6",
"slug": "fiftyone-gui-grounding-train"
},
{
"bytes_uploaded": 15766174,
"category": "gui_grounding",
"files": [
{
"gcs": "gs://maximoai-models-976606885534/raw/public/fiftyone-gui-grounding-train-with-synthetic/3deedc5d3667/README.md",
"path": "README.md",
"size": 14002,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/fiftyone-gui-grounding-train-with-synthetic/3deedc5d3667/fiftyone.yml",
"path": "fiftyone.yml",
"size": 118,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/fiftyone-gui-grounding-train-with-synthetic/3deedc5d3667/metadata.json",
"path": "metadata.json",
"size": 11698,
"status": "uploaded"
},
{
"gcs": "gs://maximoai-models-976606885534/raw/public/fiftyone-gui-grounding-train-with-synthetic/3deedc5d3667/samples.json",
"path": "samples.json",
"size": 15740356,
"status": "uploaded"
}
],
"id": "Voxel51/FiftyOne-GUI-Grounding-Train-with-Synthetic",
"license": "apache-2.0",
"purpose": "GUI grounding with additional synthetic examples.",
"revision": "3deedc5d3667696aff317e5e8a3b47d83b9fb48c",
"slug": "fiftyone-gui-grounding-train-with-synthetic"
}
],
"dry_run": false,
"generated_at": "2026-06-09T13:28:02+00:00"
}
main() {
require
enable_apis
ensure_service_account
ensure_api_key
ensure_artifact_registry
build_model_image
build_serve_image
maybe_replace_service
deploy_service
print_summary
}
from google.cloud import aiplatform
| Property | Value |
|---|---|
| Served model name | `maximo-helios-preview` |
| Base model | `google/gemma-4-26B-A4B-it` (GGUF from `unsloth/gemma-4-26B-A4B-it-GGUF`) |
| Quant | `UD-Q4_K_M` (~14 GB) + `mmproj-BF16.gguf` (vision) |
| Engine | `llama.cpp` / `llama-server` (`--jinja` tool calling, `--mmproj` vision) |
| Endpoint | `/v1/chat/completions`, `/v1/models`, `/v1/completions` |
| Auth | `Authorization: Bearer <key>` (key in Secret Manager) |
| Compute | CPU 8 vCPU / 32Gi (default) or L4 GPU; both scale to zero |
| Cost when idle | **$0** (min-instances=0) |
#!/usr/bin/env python3
"""Print a compact summary of generated datasets."""
def main() -> None:
manifest = build_all(parse_args())
print(json.dumps({"generated_at": manifest["generated_at"], "files": manifest["files"]}, indent=2))
deploy_api() {
local vllm_url
vllm_url="$("${GCLOUD}" run services describe "${VLLM_SERVICE}" --project "${PROJECT}" --region "${REGION}" --format='value(status.url)')"
log "vLLM internal URL: ${vllm_url}"
Uploads the VibeThinker-3B vLLM model to Vertex AI Model Registry, creates an
endpoint, and deploys with min_replica_count=0 (scale-to-zero). Re-running is
safe: existing model/endpoint with the same display name is reused.
main "$@"
def parse_imported_routes(index_path: Path) -> dict[str, Path]:
if not index_path.exists():
return {}
text = read_text(index_path)
imports: dict[str, Path] = {}
for match in re.finditer(r'import\s+(\w+)\s+from\s+"\.\/routes\/([^"]+)"', text):
imports[match.group(1)] = index_path.parent / "routes" / f"{match.group(2)}.ts"
return imports
#!/usr/bin/env python3
"""Summarize the public dataset ingest manifest."""
def ingest_dataset(dataset: dict[str, Any], config: dict[str, Any], cache_root: Path, dry_run: bool) -> dict[str, Any]:
repo_id = dataset["id"]
slug = dataset["slug"]
project = config["project"]
bucket = config["bucket"]
max_dataset_bytes = int(dataset.get("max_dataset_bytes", 250_000_000))
max_file_bytes = int(dataset.get("max_file_bytes", max_dataset_bytes))
print(f"\n==> {repo_id}")
info = dataset_api(repo_id)
revision = info.get("sha") or "main"
siblings = info.get("siblings") or []
files: list[dict[str, Any]] = []
total = 0
dataset_dir = cache_root / slug / revision[:12]
if dataset_dir.exists() and not dry_run:
shutil.rmtree(dataset_dir)
for sibling in siblings:
if total >= max_dataset_bytes:
files.append({"path": sibling.get("rfilename") or "", "size": int(sibling.get("size") or 0), "status": "skipped-dataset-cap"})
continue
name = sibling.get("rfilename") or ""
if not name or not file_allowed(name):
continue
size = int(sibling.get("size") or 0)
if size and size > max_file_bytes:
files.append({"path": name, "size": size, "status": "skipped-too-large"})
continue
if size and total + size > max_dataset_bytes:
files.append({"path": name, "size": size, "status": "skipped-dataset-cap"})
continue
if not size and total >= max_dataset_bytes:
files.append({"path": name, "size": size, "status": "skipped-dataset-cap"})
continue
local = dataset_dir / name
gcs = f"{bucket}/raw/public/{slug}/{revision[:12]}/{name}"
if dry_run:
files.append({"path": name, "size": size, "status": "would-download", "gcs": gcs})
total += size
continue
url = resolve_url(repo_id, revision, name)
try:
remaining_budget = max(1, max_dataset_bytes - total)
downloaded = download_file(url, local, min(max_file_bytes, remaining_budget))
total += downloaded
copy_to_gcs(local, gcs, project)
files.append({"path": name, "size": downloaded, "status": "uploaded", "gcs": gcs})
print(f"uploaded {downloaded:,} bytes -> {gcs}")
time.sleep(0.25)
except (urllib.error.HTTPError, urllib.error.URLError, ValueError, subprocess.CalledProcessError) as error:
files.append({"path": name, "size": size, "status": "error", "error": str(error)})
print(f"error {name}: {error}", file=sys.stderr)
return {
"id": repo_id,
"slug": slug,
"category": dataset.get("category"),
"license": dataset.get("license"),
"purpose": dataset.get("purpose"),
"revision": revision,
"bytes_uploaded": sum(file.get("size", 0) for file in files if file.get("status") == "uploaded"),
"files": files,
}
import os
import time
from typing import Optional
"""Idempotent deploy of the Helios Nano Preview Vertex AI endpoint.
def parse_route_mounts(index_path: Path) -> list[RouteMount]:
imports = parse_imported_routes(index_path)
text = read_text(index_path)
mounts: list[RouteMount] = []
for block_match in re.finditer(r"app\.use\((.*?)\);", text, flags=re.DOTALL):
block = block_match.group(1)
mount_match = re.search(r'["\']([^"\']+)["\']', block)
if not mount_match:
continue
mount = mount_match.group(1)
for router_name, route_file in imports.items():
if re.search(rf"\b{re.escape(router_name)}\b", block):
mounts.append(RouteMount(mount=mount, router_name=router_name, route_file=route_file))
break
return mounts
def read_text(path: Path) -> str:
try:
return path.read_text(encoding="utf-8")
except UnicodeDecodeError:
return path.read_text(encoding="utf-8", errors="ignore")
def deploy_to_endpoint(model: aiplatform.Model, endpoint: aiplatform.Endpoint) -> None:
deployed_models = list(endpoint.list_models())
if deployed_models:
print(f"[vertex] Endpoint already has {len(deployed_models)} model(s) deployed — skipping redeploy.")
return
print(f"[vertex] Deploying {MODEL_DISPLAY} to {endpoint.resource_name} ({MACHINE_TYPE}, {ACC_COUNT}x {ACC_TYPE}, min={MIN_REPL}, max={MAX_REPL})…")
model.deploy(
endpoint=endpoint,
machine_type=MACHINE_TYPE,
accelerator_type=ACC_TYPE,
accelerator_count=ACC_COUNT,
min_replica_count=MIN_REPL,
max_replica_count=MAX_REPL,
traffic_percentage=100,
deploy_request_timeout=CONFIG["compute"]["timeout_seconds"],
service_account=SERVICE_ACCOUNT,
)
PROJECT="${PROJECT:-project-6168b668-98c9-444b-b27}"
REGION="${REGION:-europe-west1}"
GCLOUD="${GCLOUD:-/Users/johnsondaniel/google-cloud-sdk/bin/gcloud}"
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
CONFIG="${ROOT}/configs/helios_preview.json"
DEPLOY_DIR="${ROOT}/deploy/helios-preview"
#!/usr/bin/env bash
# Container entrypoint for "maximo helios preview".
# Runs two processes in one container:
# 1. llama-server on 127.0.0.1:8081 (the model; internal only)
# 2. injector.py on 0.0.0.0:8080 (public: API-key auth + identity injection)
#
# The model keeps its embedded chat template (so vision + tool calling work);
# identity is injected by the proxy, not by template surgery.
set -euo pipefail
set -euo pipefail
def parse_router_routes(route_file: Path) -> list[tuple[str, str]]:
if not route_file.exists():
return []
text = read_text(route_file)
routes: list[tuple[str, str]] = []
for match in re.finditer(r"router\.(get|post|put|patch|delete)\s*\(\s*['\"]([^'\"]+)['\"]", text, flags=re.DOTALL):
routes.append((match.group(1).upper(), match.group(2)))
return routes
def summarize_file(path: Path) -> dict[str, Any]:
rows = 0
if path.exists() and path.suffix == ".jsonl":
with path.open("r", encoding="utf-8") as handle:
rows = sum(1 for _ in handle)
return {
"path": str(path.relative_to(REPO_ROOT)),
"rows": rows,
"bytes": path.stat().st_size if path.exists() else 0,
"sha256": sha256_file(path) if path.exists() else None,
}
The model weights are **baked into the container image** (built in Cloud Build)
so a cold start loads from the local image instead of re-downloading ~14 GB.
ensure_artifact_registry() {
if "${GCLOUD}" artifacts repositories describe "${AR_REPO}" --project "${PROJECT}" --location "${REGION}" >/dev/null 2>&1; then
log "Artifact Registry repo exists: ${AR_REPO}"
else
log "Creating Artifact Registry repo: ${AR_REPO}"
"${GCLOUD}" artifacts repositories create "${AR_REPO}" \
--project "${PROJECT}" \
--location "${REGION}" \
--repository-format=docker \
--description="Helios Nano Preview auth proxy images" >/dev/null
fi
}
#!/usr/bin/env bash
# Smoke-test helper for the maximo helios preview endpoint.
#
# Usage:
# ./scripts/invoke_helios_preview.sh key # print the API key
# ./scripts/invoke_helios_preview.sh url # print the endpoint URL
# ./scripts/invoke_helios_preview.sh models # GET /v1/models
# ./scripts/invoke_helios_preview.sh chat "your prompt" # chat completion
# ./scripts/invoke_helios_preview.sh tools "prompt" # tool-calling test
#
# The first chat/tools call after idle triggers a cold start (~60-120s on CPU).
"${GCLOUD}" storage cp "${ROOT}/data/processed/sft/mytabulon_tool_calling_sft.jsonl" "${BUCKET}/processed/sft/mytabulon_tool_calling_sft.jsonl" --project "${PROJECT}"
"${GCLOUD}" storage cp "${ROOT}/data/processed/sft/maximoai_repo_coding_sft.jsonl" "${BUCKET}/processed/sft/maximoai_repo_coding_sft.jsonl" --project "${PROJECT}"
"${GCLOUD}" storage cp "${ROOT}/data/processed/pretrain/maximoai_code_continued_pretrain.jsonl" "${BUCKET}/processed/pretrain/maximoai_code_continued_pretrain.jsonl" --project "${PROJECT}"
"${GCLOUD}" storage cp "${ROOT}/data/processed/eval/mytabulon_tool_calling_eval.jsonl" "${BUCKET}/eval/mytabulon_tool_calling_eval.jsonl" --project "${PROJECT}"
def build_pretrain_rows(source_roots: dict[str, Path], max_files: int) -> list[dict[str, Any]]:
rows: list[dict[str, Any]] = []
for repo_name, root in source_roots.items():
for file_index, path in enumerate(iter_code_files(root)):
if file_index >= max_files:
break
rel = path.relative_to(root)
text = redact_text(read_text(path))
if not text.strip():
continue
lang = path.suffix.lower().lstrip(".") or "text"
for chunk_index, chunk in enumerate(chunk_text(text)):
rendered = (
f"Repository: {repo_name}\n"
f"Path: {rel}\n"
f"Purpose: Learn MaximoAI/MyTabulon implementation patterns, API shapes, UI flows, and coding style.\n\n"
f"```{lang}\n{chunk}\n```"
)
rows.append(
{
"id": f"code_pretrain_{sha256_text(repo_name + str(rel) + str(chunk_index))[:16]}",
"dataset": "maximoai_code_continued_pretrain",
"text": rendered,
"metadata": {
"repo": repo_name,
"path": str(rel),
"chunk_index": chunk_index,
"sha256": sha256_text(chunk),
"privacy": "source-derived-redacted",
},
}
)
return rows
def file_allowed(name: str) -> bool:
if Path(name).name in SKIP_NAMES:
return False
suffixes = Path(name).suffixes
if not suffixes:
return False
if suffixes[-1] in SAFE_EXTENSIONS:
return True
return any(suffix in SAFE_EXTENSIONS for suffix in suffixes)
ROOT = Path(__file__).resolve().parents[1]
MANIFEST = ROOT / "data" / "processed" / "manifests" / "public_dataset_ingest_manifest.json"
```bash
bash scripts/create_model_bucket.sh
```
def _check_key(request: Request) -> bool:
raw = request.headers.get(HEADER, "")
if not raw:
return False
parts = raw.split(None, 1)
if len(parts) != 2 or parts[0] != SCHEME:
return False
presented = parts[1].strip()
expected = _load_key()
if len(presented) != len(expected):
return False
result = 0
for a, b in zip(presented, expected):
result |= ord(a) ^ ord(b)
return result == 0
| Dataset | Approx size | License note | Use |
| --- | ---: | --- | --- |
| `Team-ACE/ToolACE` | 10K-100K rows, about 37 MB | Apache-2.0 | General function/tool-calling SFT |
| `NousResearch/hermes-function-calling-v1` | about 64 MB uploaded | Apache-2.0 | Function calling, JSON mode, agentic tool traces |
| `glaiveai/glaive-function-calling-v2` | about 259 MB uploaded | Apache-2.0 | Broad function calling with tool/no-tool behavior |
| `gorilla-llm/Berkeley-Function-Calling-Leaderboard` | about 11 MB uploaded | Apache-2.0 | Function-calling eval suite |
| `Salesforce/xlam-function-calling-60k` | 60K rows | Verify before commercial use | Function-calling SFT |
| `bigcode/self-oss-instruct-sc2-exec-filter-50k` | 50,467 rows, about 90 MB | ODC-BY | Coding instruction SFT |
| `TIGER-Lab/EvolveCoder-22K` | about 36 MB uploaded | Apache-2.0 | Test-aware coding |
| `TIGER-Lab/AceCode-V1.1-69K` | about 95 MB uploaded | MIT | Code reasoning and tests |
| `TIGER-Lab/WebInstruct-verified` | about 84 MB uploaded | Apache-2.0 | Auxiliary reasoning |
| `Voxel51/FiftyOne-GUI-Grounding-Train` | about 2 MB uploaded | Apache-2.0 | GUI grounding |
| `Voxel51/FiftyOne-GUI-Grounding-Train-with-Synthetic` | about 15 MB uploaded | Apache-2.0 | GUI grounding with synthetic examples |
| `m-a-p/CodeFeedback-Filtered-Instruction` | 60,735 rows | Verify before commercial use | Coding instruction and feedback SFT |
| `HuggingFaceM4/Docmatix` | 1M-10M rows, about 982 GB | MIT | Document image VQA/OCR; use a curated subset first |
# maximo helios preview
import argparse
import json
import os
import shutil
import subprocess
import sys
import time
import urllib.error
import urllib.parse
import urllib.request
from datetime import datetime, timezone
from pathlib import Path
from typing import Any
Read `data/processed/manifests/dataset_manifest.json` for exact generated counts, sizes, and checksums.
if __name__ == "__main__":
main()
- Repo: `/Users/johnsondaniel/Documents/maximoai-models`
- Model bucket: `gs://maximoai-models-976606885534`
- Cloud project: `project-6168b668-98c9-444b-b27`
- Region: `europe-west1`
"""Identity + API-key injector that sits in front of llama-server.
# Branding
- When forking/rebranding models, use the "maximo helios" naming convention (e.g., "maximo helios nano preview"). Confidence: 0.80
app = FastAPI(title="maximo-helios-nano-preview-auth-proxy")
def infer_properties(method: str, path: str) -> dict[str, Any]:
properties: dict[str, Any] = {}
required: list[str] = []
for param in route_params(path):
properties[param] = {"type": "string", "description": f"Path parameter {param}."}
required.append(param)
if method == "GET":
properties["limit"] = {"type": "integer", "minimum": 1, "maximum": 100, "default": 25}
properties["search"] = {"type": "string", "description": "Optional search or filter text."}
if method in {"POST", "PUT", "PATCH"}:
properties["payload"] = {
"type": "object",
"description": "Request body for this MyTabulon operation. Use the backend route/controller for exact shape.",
"additionalProperties": True,
}
required.append("payload")
if method == "POST" and "/ai-computer/runs" in path:
properties["agentType"] = {
"type": "string",
"enum": ["maximo_computer", "codex", "maximo_syntax", "hermes", "openclaw"],
"default": "maximo_computer",
}
properties["prompt"] = {"type": "string", "description": "Executable task for the selected agent."}
required.extend(["agentType", "prompt"])
return {"type": "object", "properties": properties, "required": sorted(set(required))}
Identity is injected, not trained, so a fine-tune later makes it intrinsic.
"""
from __future__ import annotations
## Public Sources
def now_iso() -> str:
return datetime.now(timezone.utc).isoformat(timespec="seconds")
#!/usr/bin/env bash
set -euo pipefail
# MaximoAI Model Datasets
set -euo pipefail
grant_user_invoker() {
local user
user="$("${GCLOUD}" config get-value account 2>/dev/null)"
if [[ -z "${user}" || "${user}" == "(unset)" ]]; then
log "No active gcloud account; skipping user invoker grant."
return 0
fi
log "Granting ${user} invoker on ${API_SERVICE}…"
"${GCLOUD}" run services add-iam-policy-binding "${API_SERVICE}" \
--project "${PROJECT}" \
--region "${REGION}" \
--member="user:${user}" \
--role="roles/run.invoker" >/dev/null
}
def tool_arguments(method: str, path: str) -> dict[str, Any]:
args = {param: param_value(param) for param in route_params(path)}
if method == "GET":
args["limit"] = 25
if method in {"POST", "PUT", "PATCH"}:
args["payload"] = {"demo": True, "source": "maximoai-models-dataset"}
if method == "POST" and "/ai-computer/runs" in path:
args["agentType"] = "codex"
args["prompt"] = "Inspect the MyTabulon frontend and propose a focused fix for the reported issue."
return args
#!/usr/bin/env bash
# Smoke-test helper for the maximo helios nano preview endpoint.
# Usage:
# ./scripts/invoke_helios_nano_preview.sh models
# ./scripts/invoke_helios_nano_preview.sh chat "Solve 2x+3=11"
# ./scripts/invoke_helios_nano_preview.sh stream "Write a haiku"
import httpx
from fastapi import FastAPI, Request, Response
from fastapi.responses import JSONResponse, StreamingResponse
from starlette.background import BackgroundTask
if __name__ == "__main__":
main()
import json
import os
import sys
from pathlib import Path
Use `configs/mixes/qwen35_4b_first_sft_mix.json` for the first Qwen3.5-4B LoRA/QLoRA SFT plan.
Use `configs/mixes/qwen35_4b_continued_pretrain_mix.json` for a small continued-pretraining pass.
Use `configs/mixes/qwen35_4b_public_augmented_sft_mix.json` once the public layer has been converted into the final Qwen chat/tool-call format.
The expanded public layer currently includes tool-calling, function-calling evals, coding, reasoning, and GUI grounding datasets.
From `/Users/johnsondaniel/Documents/maximoai-models`:
```bash
python3 scripts/download_public_datasets.py
python3 scripts/summarize_public_ingest.py
```
[cmd]: https://commandcode.ai/
Create/check the dedicated model bucket only:
MODEL_DISPLAY = "helios-nano-vllm"
ENDPOINT_DISPLAY = CONFIG["auth_proxy"]["internal_endpoint_display_name"]
import json
import os
import time
from typing import Optional
"${GCLOUD}" storage buckets create "${BUCKET}" \
--project "${PROJECT}" \
--location "${REGION}" \
--uniform-bucket-level-access
echo "[entrypoint] starting identity injector on 0.0.0.0:8080"
python3 -m uvicorn injector:app --app-dir /app --host 0.0.0.0 --port 8080 --workers 1 &
INJ_PID=$!
post_chat() {
local body="$1"
curl -sS --max-time 600 "$(url)/v1/chat/completions" \
-H "Authorization: Bearer $(key)" \
-H "Content-Type: application/json" \
-d "${body}" | python3 -m json.tool
}
echo "[entrypoint] starting llama-server (ctx=${CTX_SIZE}, KV=${CACHE_TYPE_K}/${CACHE_TYPE_V}) on 127.0.0.1:8081"
# shellcheck disable=SC2086
/app/llama-server \
--model "/models/${MODEL_FILE}" \
--mmproj "/models/${MMPROJ_FILE}" \
--alias "${SERVED_NAME}" \
--host 127.0.0.1 --port 8081 \
--jinja \
--ctx-size "${CTX_SIZE}" \
--parallel "${PARALLEL}" \
${KV_ARGS} \
--temp 1.0 --top-p 0.95 --top-k 64 \
--threads "${THREADS}" --threads-batch "${THREADS_BATCH}" ${EXTRA_ARGS} &
LLAMA_PID=$!
build_and_push() {
log "Configuring docker auth for ${AR_HOST}…"
"${GCLOUD}" auth configure-docker "${AR_HOST}" --project "${PROJECT}" >/dev/null
log "Building auth-proxy image ${IMAGE_TAG}…"
docker build --tag "${IMAGE_TAG}" --file "${DEPLOY_DIR}/Dockerfile" "${DEPLOY_DIR}"
log "Pushing auth-proxy image…"
docker push "${IMAGE_TAG}"
}
build_serve_image() {
if [[ "${FORCE_SERVE_BUILD:-0}" != "1" ]] \
&& "${GCLOUD}" artifacts docker images describe "${SERVE_IMAGE}" --project "${PROJECT}" >/dev/null 2>&1; then
log "Serve image already exists: ${SERVE_IMAGE} (set FORCE_SERVE_BUILD=1 to rebuild)."
return 0
fi
# Layers the identity injector + entrypoint on top of the model image. Fast:
# no GGUF re-download, just adds Python + two small files.
log "Building serve image (injector + entrypoint) on top of model image…"
"${GCLOUD}" builds submit "${DEPLOY_DIR}" \
--project "${PROJECT}" \
--config "${DEPLOY_DIR}/cloudbuild.serve.yaml" \
--substitutions "_IMAGE=${SERVE_IMAGE},_MODEL_IMAGE=${MODEL_IMAGE}"
}
from __future__ import annotations
maybe_replace_service() {
# Cloud Run rolling deploys keep the OLD revision live until the NEW one passes
# its startup probe -> 32Gi (old) + 32Gi (new) = 64Gi briefly, which blows past
# this region's 40Gi MemAllocPerProjectRegion quota. The new revision then never
# schedules and the deploy "fails its startup probe" (this is what bit the 26B
# deploys). Deleting the service first means only the new revision needs memory.
# The image builds above already finished while the old revision served, so the
# endpoint is only down for the brief delete->deploy window here.
if [[ "${REPLACE_SERVICE:-0}" == "1" ]] \
&& "${GCLOUD}" run services describe "${SERVICE}" --project "${PROJECT}" --region "${REGION}" >/dev/null 2>&1; then
log "REPLACE_SERVICE=1 -> deleting existing ${SERVICE} to dodge the 40Gi rollout quota wall…"
"${GCLOUD}" run services delete "${SERVICE}" --project "${PROJECT}" --region "${REGION}" --quiet
fi
}
ROOT = Path(__file__).resolve().parents[1]
MANIFEST = ROOT / "data" / "processed" / "manifests" / "dataset_manifest.json"
from __future__ import annotations
ROOT = Path(__file__).resolve().parent.parent.parent
sys.path.insert(0, str(ROOT))
Download/sync approved public datasets:
"${GCLOUD}" storage buckets describe "${BUCKET}" --project "${PROJECT}" >/dev/null 2>&1 && {
echo "Bucket already exists: ${BUCKET}"
exit 0
}
@app.get("/")
async def root() -> dict:
return {
"service": "maximo-helios-nano-preview",
"upstream": UPSTREAM,
"openai_compatible": True,
"endpoints": ["/v1/models", "/v1/chat/completions", "/v1/completions"],
}
def _load_key(force: bool = False) -> str:
global _cached_key, _cached_at
now = time.time()
if not force and _cached_key is not None and (now - _cached_at) < _CACHE_TTL:
return _cached_key
name = SECRET_RESOURCE
if not name.startswith("projects/"):
name = f"projects/{os.environ.get('GOOGLE_CLOUD_PROJECT', '')}/secrets/{SECRET_RESOURCE}/versions/latest"
resp = _get_client().access_secret_version(request={"name": name})
_cached_key = resp.payload.data.decode("utf-8").strip()
_cached_at = now
return _cached_key
require() {
command -v "${GCLOUD}" >/dev/null || { echo "gcloud not found at ${GCLOUD}"; exit 1; }
command -v docker >/dev/null || { echo "docker not found in PATH"; exit 1; }
[[ -f "${CONFIG}" ]] || { echo "Missing config: ${CONFIG}"; exit 1; }
[[ -f "${DEPLOY_DIR}/Dockerfile" ]] || { echo "Missing deploy dir: ${DEPLOY_DIR}"; exit 1; }
}
enable_apis() {
log "Enabling required APIs (idempotent)…"
"${GCLOUD}" services enable \
run.googleapis.com \
cloudbuild.googleapis.com \
artifactregistry.googleapis.com \
secretmanager.googleapis.com \
--project "${PROJECT}" >/dev/null
}
def vllm_args() -> list[str]:
return [
"python",
"-m",
"vllm.entrypoints.api_server",
"--host=0.0.0.0",
"--port=8080",
f"--model={HF_MODEL_ID}",
f"--served-model-name={SERVED_NAME}",
f"--tensor-parallel-size={TP}",
"--swap-space=16",
f"--max-model-len={MAX_MODEL_LEN}",
f"--dtype={DTYPE}",
f"--max-num-seqs={MAX_NUM_SEQS}",
f"--gpu-memory-utilization={GPU_MEM_UTIL}",
"--enable-prefix-caching",
"--enable-chunked-prefill",
"--disable-log-stats",
]
# ML Deployment
- Deploy ML models to GCP cloud. Confidence: 0.50
- Use OpenAI-compatible API design (e.g., /v1/models endpoint) for model serving. Confidence: 0.60
- For GCP deployments, use services that can scale to zero when idle to minimize costs. Confidence: 0.85
- Consider Fireworks AI as an alternative deployment platform for ML models, especially when GCP Vertex AI has quota/availability issues. Confidence: 0.55
- Keep ML deployment costs at or below $5 per hour (hard ceiling the user specified). Skip any option that exceeds this (e.g., H100/B200 on-demand at $7+/hr). Confidence: 0.85
key() {
"${GCLOUD}" secrets versions access latest --secret="${SECRET_NAME}" --project "${PROJECT}"
}
ensure_api_key() {
if "${GCLOUD}" secrets describe "${SECRET_NAME}" --project "${PROJECT}" >/dev/null 2>&1; then
log "Secret exists: ${SECRET_NAME}"
if "${GCLOUD}" secrets versions list "${SECRET_NAME}" --project "${PROJECT}" 2>/dev/null | grep -q "^[0-9]"; then
log "Re-using existing API key version."
return 0
fi
else
log "Creating secret: ${SECRET_NAME}"
"${GCLOUD}" secrets create "${SECRET_NAME}" \
--project "${PROJECT}" \
--replication-policy=automatic >/dev/null
fi
local key
key="$(python3 -c 'import secrets; print("hlnp_" + secrets.token_urlsafe(32))')"
printf '%s' "${key}" | "${GCLOUD}" secrets versions add "${SECRET_NAME}" \
--project "${PROJECT}" \
--data-file=- >/dev/null
log "New API key generated. SECRET (save now, won't be shown again): ${key}"
}
```bash
python3 scripts/summarize_datasets.py
rg -n "sk-[A-Za-z0-9]{20,}|AIza[A-Za-z0-9_-]{20,}|-----BEGIN [A-Z ]*PRIVATE KEY-----|Bearer [A-Za-z0-9._-]{20,}" data/processed
```
def _get_client() -> secretmanager.SecretManagerServiceClient:
global _sm_client
if _sm_client is None:
_sm_client = secretmanager.SecretManagerServiceClient()
return _sm_client
{
"name": "qwen35_4b_continued_pretrain_mix",
"base_model": "Qwen/Qwen3.5-4B-Base",
"goal": "Low-cost domain-adaptive pretraining before SFT.",
"storage_bucket": "gs://maximoai-models-976606885534",
"datasets": [
{
"id": "maximoai_code_continued_pretrain",
"path": "data/processed/pretrain/maximoai_code_continued_pretrain.jsonl",
"weight": 0.70
},
{
"id": "HuggingFaceM4/Docmatix-curated-subset",
"path": "gs://maximoai-models-976606885534/raw/public/docmatix/subset/",
"weight": 0.30,
"requires_download": true,
"notes": "Use a small subset first; full Docmatix is about TB scale."
}
],
"notes": [
"Run for a small token budget first and check evals before scaling.",
"This is continued pretraining, not from-scratch pretraining."
]
}
def jsonl_write(path: Path, rows: list[dict[str, Any]]) -> None:
path.parent.mkdir(parents=True, exist_ok=True)
with path.open("w", encoding="utf-8") as handle:
for row in rows:
handle.write(json.dumps(row, ensure_ascii=False, sort_keys=True) + "\n")
The existing MyTabulon upload bucket remains product storage only:
This workspace keeps training data separate from MyTabulon product uploads.
#!/usr/bin/env bash
# Idempotent deploy of "maximo helios nano preview" on Cloud Run.
# * vLLM service: helios-nano-vllm (private, 1x L4 GPU, min-instances=0)
# * Auth proxy: helios-nano-api (private, validates Bearer API key)
# Cost: scales to zero when idle. ~$0.21/hr only while a request is in-flight.
def find_endpoint() -> aiplatform.Endpoint | None:
for e in aiplatform.Endpoint.list(filter=f"display_name={ENDPOINT_DISPLAY}"):
return e
return None
def build_screen_record_manifest(screen_records_root: Path) -> list[dict[str, Any]]:
if not screen_records_root.exists():
return []
rows: list[dict[str, Any]] = []
for path in sorted(screen_records_root.rglob("*")):
if not path.is_file() or path.suffix.lower() not in VISUAL_EXTENSIONS:
continue
stat = path.stat()
mime_type = mimetypes.guess_type(str(path))[0] or "application/octet-stream"
rows.append(
{
"id": f"screen_record_{sha256_text(str(path))[:12]}",
"dataset": "maximo_screen_records_manifest",
"local_path": str(path),
"filename": path.name,
"mime_type": mime_type,
"bytes": stat.st_size,
"sha256": sha256_file(path) if stat.st_size <= 256 * 1024 * 1024 else None,
"gcs_target": f"gs://maximoai-models-976606885534/raw/maximo-screen-records/{path.name}",
"training_use": "raw-visual-source-for-curated-video-or-image-supervision",
}
)
return rows
def main() -> None:
args = parse_args()
config = load_config(args.config)
cache_root = Path(config["local_cache"])
only = set(args.only)
selected = []
for dataset in config["active"]:
if only and dataset["slug"] not in only and dataset["id"] not in only:
continue
selected.append(dataset)
manifest = {
"generated_at": now_iso(),
"config": str(args.config),
"bucket": config["bucket"],
"dry_run": args.dry_run,
"datasets": [],
}
for dataset in selected:
manifest["datasets"].append(ingest_dataset(dataset, config, cache_root, args.dry_run))
out_dir = REPO_ROOT / "data" / "processed" / "manifests"
out_dir.mkdir(parents=True, exist_ok=True)
out_path = out_dir / "public_dataset_ingest_manifest.json"
out_path.write_text(json.dumps(manifest, indent=2, sort_keys=True) + "\n", encoding="utf-8")
if not args.dry_run:
copy_to_gcs(out_path, f"{config['bucket']}/manifests/public_dataset_ingest_manifest.json", config["project"])
print(json.dumps({"manifest": str(out_path), "datasets": len(manifest["datasets"])}, indent=2))
Build the local private datasets:
echo "Synced local processed datasets to ${BUCKET}"
HF_REPO="${HF_REPO:-unsloth/Qwen3.5-2B-GGUF}"
MODEL_FILE="${MODEL_FILE:-Qwen3.5-2B-Q4_K_S.gguf}" # Q4_K_S: ~equal quality to Q4_K_M, slightly faster on CPU (accuracy/speed frontier)
MMPROJ_FILE="${MMPROJ_FILE:-mmproj-BF16.gguf}" # vision projector — keep (model is multimodal)
CTX_SIZE="${CTX_SIZE:-262144}" # 256K = model's trained max. Fits easily: 256K f16 KV ≈ ~12.8GB (total footprint ~18GB << 32Gi).
PARALLEL="${PARALLEL:-1}" # 1 slot → a single request gets the FULL ctx-size. llama.cpp shares the KV budget across --parallel N slots, so N>1 would split 256K into N pieces. Trade: requests serialize per instance.
CACHE_TYPE_K="${CACHE_TYPE_K:-f16}" # Set f16 KV cache (faster prefill on CPU than q8_0 dequantization overhead)
CACHE_TYPE_V="${CACHE_TYPE_V:-f16}"
INJECT_MODE="${INJECT_MODE:-system}" # 'system' replaces default system prompt
THREADS="${THREADS:-8}" # 8 threads: optimal for Cloud Run execution speed based on empirical testing
THREADS_BATCH="${THREADS_BATCH:-8}" # 8 batch threads for fast prompt ingestion
def build_coding_sft_rows(source_roots: dict[str, Path], limit: int = 300) -> list[dict[str, Any]]:
rows: list[dict[str, Any]] = []
interesting = re.compile(r"(route|controller|service|page|component|prompt|tool|agent|computer|automation)", re.I)
files: list[tuple[str, Path, Path]] = []
for repo_name, root in source_roots.items():
for path in iter_code_files(root):
rel = path.relative_to(root)
if interesting.search(str(rel)):
files.append((repo_name, root, path))
for repo_name, root, path in files[:limit]:
rel = path.relative_to(root)
text = redact_text(read_text(path))
excerpt = text[:1800]
rows.append(
{
"id": f"coding_sft_{sha256_text(repo_name + str(rel))[:16]}",
"dataset": "maximoai_repo_coding_sft",
"messages": [
{
"role": "system",
"content": "You are a senior engineer working on MaximoAI and MyTabulon code.",
},
{
"role": "user",
"content": (
f"In the {repo_name} repository, where should I look to understand or change "
f"the behavior related to `{rel.name}`?"
),
},
{
"role": "assistant",
"content": (
f"Start with `{rel}` in `{repo_name}`. It is part of the local MaximoAI/MyTabulon "
f"codebase. Relevant excerpt:\n\n```text\n{excerpt}\n```\n\n"
"Read the surrounding module before editing, keep changes scoped, and verify with "
"the repo's existing build or test command."
),
},
],
"metadata": {
"repo": repo_name,
"path": str(rel),
"privacy": "source-derived-redacted",
},
}
)
return rows
## Notes & tradeoffs
def _check_request_size(body: bytes) -> tuple[bool, str]:
if not body:
return True, ""
try:
data = json.loads(body)
except Exception:
return True, ""
msgs = data.get("messages")
if not isinstance(msgs, list):
return True, ""
total_chars = 0
for m in msgs:
content = m.get("content")
if isinstance(content, str):
total_chars += len(content)
elif isinstance(content, list):
for part in content:
if isinstance(part, dict) and part.get("type") == "text":
total_chars += len(part.get("text", ""))
is_cpu = os.environ.get("COMPUTE", "cpu").lower() == "cpu"
if is_cpu:
stream = bool(data.get("stream", False))
if stream:
# For streaming, limit is 260,000 chars (~65,000 tokens)
limit = 260000
msg = (
f"Prompt is too long ({total_chars} characters, approx {total_chars // 4} tokens). "
f"Streaming mode is capped at ~65,000 tokens to prevent excessive CPU prefill lockup. "
f"Please reduce prompt size or upgrade service to GPU."
)
else:
# For non-streaming, limit is 80,000 chars (~20,000 tokens) to prevent timeout
limit = 80000
msg = (
f"Prompt is too long ({total_chars} characters, approx {total_chars // 4} tokens). "
f"Non-streaming requests are capped at ~20,000 tokens to prevent client timeouts. "
f"Please use streaming (stream: true) for larger prompts up to 65,000 tokens."
)
if total_chars > limit:
return False, msg
return True, ""
def redact_text(text: str) -> str:
safe_lines: list[str] = []
for line in text.splitlines():
if SECRET_PATTERN.search(line):
key = line.split("=", 1)[0].split(":", 1)[0].strip()
safe_lines.append(f"{key}: [REDACTED_SECRET_LINE]")
else:
line = INFRA_PATTERN.sub("[REDACTED_INFRA]", line)
line = LONG_SECRET_PATTERN.sub(redact_long_secret_candidate, line)
safe_lines.append(line)
return "\n".join(safe_lines)
CONFIG = json.loads((ROOT / "configs" / "helios_nano_preview.json").read_text())
from __future__ import annotations
{
"service": "maximo-helios-nano-preview",
"model": {
"huggingface_repo": "WeiboAI/VibeThinker-3B",
"served_model_name": "maximo-helios-nano-preview",
"dtype": "bfloat16",
"max_model_len": 8192,
"tensor_parallel_size": 1,
"gpu_memory_utilization": 0.9,
"max_num_seqs": 32,
"sampling_defaults": {
"temperature": 1.0,
"top_p": 0.95,
"top_k": -1
}
},
"compute": {
"platform": "vertex_ai_prediction",
"region": "asia-southeast1",
"machine_type": "g2-standard-4",
"accelerator_type": "NVIDIA_L4",
"accelerator_count": 1,
"min_replica_count": 0,
"max_replica_count": 1,
"timeout_seconds": 600
},
"vllm": {
"image": "us-docker.pkg.dev/vertex-ai/vertex-vision-model-garden-dockers/pytorch-vllm-serve:20251205_0916_RC01",
"port": 8080,
"predict_route": "/generate",
"health_route": "/ping",
"shared_memory_mb": 16384
},
"auth_proxy": {
"image_repo": "helios",
"service_name": "helios-nano-api",
"internal_endpoint_display_name": "helios-nano-vllm-endpoint",
"secret_name": "helios-nano-api-key",
"header_name": "Authorization",
"header_scheme": "Bearer"
},
"iam": {
"service_account": "helios-nano-sa",
"secret_accessor_role": "roles/secretmanager.secretAccessor",
"vertex_ai_user_role": "roles/aiplatform.user",
"run_invoker_role": "roles/run.invoker"
}
}
url() {
"${GCLOUD}" run services describe "${SERVICE}" --project "${PROJECT}" --region "${REGION}" --format='value(status.url)'
}
key() {
"${GCLOUD}" secrets versions access latest --secret="${SECRET_NAME}" --project "${PROJECT}"
}
ensure_artifact_registry() {
if "${GCLOUD}" artifacts repositories describe "${AR_REPO}" --project "${PROJECT}" --location "${REGION}" >/dev/null 2>&1; then
log "Artifact Registry repo exists: ${AR_REPO}"
else
log "Creating Artifact Registry repo: ${AR_REPO}"
"${GCLOUD}" artifacts repositories create "${AR_REPO}" \
--project "${PROJECT}" \
--location "${REGION}" \
--repository-format=docker \
--description="Helios serving images" >/dev/null
fi
}
def is_safe_code_file(path: Path) -> bool:
if path.name in EXCLUDED_FILENAMES:
return False
if path.suffix.lower() not in CODE_EXTENSIONS:
return False
return all(part not in EXCLUDED_DIRS for part in path.parts)
#!/usr/bin/env python3
"""Download approved public HF datasets and sync them into the model GCS bucket."""
- `maximoai-models/` in R2 `maximoai-mytabulon-backups` is also copied to B2
`maximoai-mytabulon-backups-fb` (US East), nightly and on every write, by
Kydanet's mirror Worker. See the kydanet repo's `docs/cloudflare-fallback.md`.
If R2 is down, read the same keys from that B2 bucket.
- The GCS mirror (`gs://maximoai-models-976606885534`) is likely gone: Google
billing closed in November 2026, and MyTabulon's GCS bucket answers 403. Don't
count on it, and don't write new data there.
def main() -> None:
aiplatform.init(project=PROJECT, location=REGION)
model = upload_model()
endpoint = create_endpoint()
deploy_to_endpoint(model, endpoint)
print()
print("=" * 60)
print(" Vertex AI deployment complete")
print("=" * 60)
print(f" model : {model.resource_name}")
print(f" endpoint : {endpoint.resource_name}")
print(f" region : {REGION}")
print(f" scale : {MIN_REPL}..{MAX_REPL} replicas (scale to zero)")
print(f" raw url : https://{REGION}-aiplatform.googleapis.com/v1beta1/{endpoint.resource_name}")
print()
## Quick Start
if __name__ == "__main__":
main()
set -euo pipefail
def iter_code_files(root: Path) -> list[Path]:
if not root.exists():
return []
files: list[Path] = []
for path in root.rglob("*"):
if not path.is_file():
continue
if is_safe_code_file(path):
files.append(path)
return sorted(files)
def chunk_text(text: str, max_chars: int = 6000, overlap: int = 400) -> list[str]:
if len(text) <= max_chars:
return [text]
chunks: list[str] = []
start = 0
while start < len(text):
end = min(len(text), start + max_chars)
chunks.append(text[start:end])
if end >= len(text):
break
start = max(0, end - overlap)
return chunks
main() {
require
enable_apis
ensure_service_account
ensure_api_key
ensure_artifact_registry
build_and_push
deploy_vllm
grant_api_to_vllm_invoker
deploy_api
grant_user_invoker
print_summary
}
def human_bytes(value: int) -> str:
size = float(value)
for unit in ["B", "KB", "MB", "GB"]:
if size < 1024 or unit == "GB":
return f"{size:.1f} {unit}"
size /= 1024
return f"{size:.1f} GB"
def main() -> None:
manifest = json.loads(MANIFEST.read_text(encoding="utf-8"))
print(f"Generated: {manifest['generated_at']}")
print(f"GCS bucket: {manifest['gcs_bucket']}")
for name, info in sorted(manifest["files"].items()):
print(f"{name:18} {info['rows']:6} rows {human_bytes(info['bytes']):>9} {info['path']}")
def build_all(args: argparse.Namespace) -> dict[str, Any]:
output_root = REPO_ROOT / "data" / "processed"
source_roots = {
"mytabulon": args.mytabulon_root,
"maximo-syntax-cli": args.maximo_syntax_root,
"maximoai-ios": args.maximoai_app_root,
}
tool_specs, tool_sft, tool_eval = build_tool_datasets(args.mytabulon_root)
pretrain_rows = build_pretrain_rows(source_roots, args.max_files_per_repo)
coding_sft = build_coding_sft_rows(source_roots, args.coding_sft_limit)
frontend_pages = build_frontend_page_manifest(args.mytabulon_root)
screen_records = build_screen_record_manifest(args.screen_records_root)
Gemma 4 **26B A4B** (Mixture-of-Experts, multimodal, Apache-2.0) served via
**llama.cpp** as an **OpenAI-compatible API** on **Cloud Run**, scale-to-zero.
def route_params(path: str) -> list[str]:
return re.findall(r":([A-Za-z_][A-Za-z0-9_]*)", path)
Run with:
python3 deploy/helios-nano-preview/deploy_vertex.py
"""
from __future__ import annotations
- Do not write training artifacts to `gs://mytabulon-mvp-uploads-976606885534`.
- Do not train on production uploads, raw user chats, OAuth tokens, credentials, customer documents, or payment/accounting payloads unless a separate redaction/export pipeline has produced approved records.
def param_value(name: str) -> str:
return {
"companyId": "company_demo_001",
"sessionId": "session_demo_001",
"messageId": "message_demo_001",
"runId": "run_demo_001",
"jobId": "job_demo_001",
"workflowId": "workflow_demo_001",
"profileId": "profile_demo_001",
"actionId": "action_demo_001",
"clientId": "client_demo_001",
"invoiceId": "invoice_demo_001",
"employeeId": "employee_demo_001",
"leadId": "lead_demo_001",
"dealId": "deal_demo_001",
"customerId": "customer_demo_001",
"fileId": "file_demo_001",
}.get(name, f"{name}_demo")
Dedicated model bucket:
local -a flags=(
--project "${PROJECT}"
--region "${REGION}"
--image "${SERVE_IMAGE}"
--execution-environment gen2
--allow-unauthenticated
--port 8080
--cpu 8
--memory 32Gi
--no-cpu-throttling
--cpu-boost
--min-instances 0
--max-instances "${MAX_INSTANCES}"
--concurrency "${CONCURRENCY}"
--timeout 3600
--service-account "${SERVICE_ACCOUNT_EMAIL}"
--set-secrets "/secrets/api-key=${SECRET_NAME}:latest"
--set-env-vars "^|^${env_vars}"
--startup-probe "httpGet.path=/health,httpGet.port=8080,initialDelaySeconds=60,failureThreshold=60,timeoutSeconds=10,periodSeconds=15"
--labels "app=helios-preview,component=serve,compute=${COMPUTE}"
)
if [[ "${COMPUTE}" == "gpu" ]]; then
flags+=(--gpu 1 --gpu-type nvidia-l4 --no-gpu-zonal-redundancy)
fi
## Files
{
"project": "project-6168b668-98c9-444b-b27",
"bucket": "gs://maximoai-models-976606885534",
"local_cache": "/private/tmp/maximoai-public-datasets",
"active": [
{
"id": "Team-ACE/ToolACE",
"slug": "toolace",
"category": "tool_calling",
"license": "apache-2.0",
"purpose": "General function/tool-calling SFT.",
"max_dataset_bytes": 150000000
},
{
"id": "NousResearch/hermes-function-calling-v1",
"slug": "hermes-function-calling-v1",
"category": "tool_calling",
"license": "apache-2.0",
"purpose": "Function-calling examples with tool schemas and ShareGPT-style traces.",
"max_dataset_bytes": 180000000
},
{
"id": "glaiveai/glaive-function-calling-v2",
"slug": "glaive-function-calling-v2",
"category": "tool_calling",
"license": "apache-2.0",
"purpose": "Large function-calling SFT set with mixed tool and no-tool examples.",
"max_dataset_bytes": 400000000
},
{
"id": "gorilla-llm/Berkeley-Function-Calling-Leaderboard",
"slug": "berkeley-function-calling-leaderboard",
"category": "tool_calling_eval",
"license": "apache-2.0",
"purpose": "Holdout function-calling evaluation; do not train on this unless creating synthetic variants.",
"max_dataset_bytes": 50000000
},
{
"id": "bigcode/self-oss-instruct-sc2-exec-filter-50k",
"slug": "self-oss-instruct-sc2-exec-filter-50k",
"category": "coding",
"license": "odc-by",
"purpose": "Coding instruction SFT from SelfCodeAlign.",
"max_dataset_bytes": 180000000
},
{
"id": "TIGER-Lab/EvolveCoder-22K",
"slug": "evolvecoder-22k",
"category": "coding",
"license": "apache-2.0",
"purpose": "Competitive-programming tasks with adversarial/evolved tests.",
"max_dataset_bytes": 100000000
},
{
"id": "TIGER-Lab/AceCode-V1.1-69K",
"slug": "acecode-v1-1-69k",
"category": "coding",
"license": "mit",
"purpose": "Coding problems with tests for code reasoning and verification.",
"max_dataset_bytes": 180000000
},
{
"id": "TIGER-Lab/WebInstruct-verified",
"slug": "webinstruct-verified",
"category": "reasoning",
"license": "apache-2.0",
"purpose": "Verified web-derived reasoning/instruction data, useful as auxiliary SFT.",
"max_dataset_bytes": 140000000
},
{
"id": "Voxel51/FiftyOne-GUI-Grounding-Train",
"slug": "fiftyone-gui-grounding-train",
"category": "gui_grounding",
"license": "apache-2.0",
"purpose": "Small GUI screenshot grounding set for visual UI understanding.",
"max_dataset_bytes": 400000000
},
{
"id": "Voxel51/FiftyOne-GUI-Grounding-Train-with-Synthetic",
"slug": "fiftyone-gui-grounding-train-with-synthetic",
"category": "gui_grounding",
"license": "apache-2.0",
"purpose": "GUI grounding with additional synthetic examples.",
"max_dataset_bytes": 600000000
}
],
"candidates": [
{
"id": "lambda/hermes-agent-reasoning-traces",
"category": "agent_traces",
"license": "apache-2.0",
"size_estimate": "1.62 GB",
"reason_not_active": "Excellent match for coding/tool agents, but larger; ingest after first public batch or as a curated subset."
},
{
"id": "Qwen/WebWorldData",
"category": "browser_agent",
"license": "apache-2.0",
"size_estimate": "52.2 GB",
"reason_not_active": "Very relevant for browser-agent world modeling, but should be subsetted before download."
},
{
"id": "ServiceNow/VideoCUA",
"category": "computer_use_video",
"license": "mit",
"size_estimate": "26.1 GB",
"reason_not_active": "Strong computer-use video corpus; download only after deciding frame/action conversion strategy."
},
{
"id": "ServiceNow/GroundCUA",
"category": "computer_use_grounding",
"license": "mit",
"reason_not_active": "Good computer-use grounding target, but inspect file layout before full sync."
},
{
"id": "TIGER-Lab/VisualWebInstruct",
"category": "multimodal_reasoning",
"license": "apache-2.0",
"size_estimate": "1M rows",
"reason_not_active": "Large multimodal dataset; use a curated sample first."
},
{
"id": "HuggingFaceM4/Docmatix",
"category": "document_vqa",
"license": "mit",
"size_estimate": "982 GB",
"reason_not_active": "Excellent for document VQA/OCR, but full dataset is too large for first pass."
},
{
"id": "OpenCoder-LLM/opc-sft-stage1",
"category": "coding",
"license": "mit",
"size_estimate": "5.61 GB",
"reason_not_active": "Very strong coding SFT source; use a subset/shards after first medium batch."
},
{
"id": "Modotte/CodeX-2M-Thinking",
"category": "coding_reasoning",
"license": "apache-2.0",
"size_estimate": "24.4 GB",
"reason_not_active": "Large code-thinking corpus; candidate for later sampled pretraining/SFT."
}
]
}
def copy_to_gcs(local_path: Path, gcs_path: str, project: str) -> None:
subprocess.run(
[GCLOUD, "storage", "cp", str(local_path), gcs_path, "--project", project],
check=True,
)
The first pass creates route-aware tool-calling SFT, repo coding SFT, continued-pretraining code chunks, eval records, frontend page manifests, and screen-record manifests.
{
"permissions": {
"allow": [
"WebSearch"
]
}
}
{
"default_gcs_bucket": "gs://maximoai-models-976606885534",
"project": "project-6168b668-98c9-444b-b27",
"region": "europe-west1",
"policy": {
"do_not_use_bucket": "gs://mytabulon-mvp-uploads-976606885534",
"private_data_rule": "Never mix training datasets with MyTabulon production uploads. Use only gs://maximoai-models-976606885534 for model data.",
"secret_rule": "Redact secrets, OAuth tokens, customer payloads, credentials, and private user content before training."
},
"local_private_datasets": [
{
"id": "mytabulon_tool_calling_sft",
"local_path": "data/processed/sft/mytabulon_tool_calling_sft.jsonl",
"gcs_path": "gs://maximoai-models-976606885534/processed/sft/mytabulon_tool_calling_sft.jsonl",
"format": "openai-compatible-jsonl",
"purpose": "Fine-tune route-aware tool selection and arguments for MyTabulon management tasks.",
"storage": "local-and-gcs",
"privacy": "source-derived-no-live-user-data"
},
{
"id": "maximoai_repo_coding_sft",
"local_path": "data/processed/sft/maximoai_repo_coding_sft.jsonl",
"gcs_path": "gs://maximoai-models-976606885534/processed/sft/maximoai_repo_coding_sft.jsonl",
"format": "chat-jsonl",
"purpose": "Fine-tune repo navigation and coding-context behavior around MyTabulon, Maximo Syntax, and MaximoAI source.",
"storage": "local-and-gcs",
"privacy": "source-derived-redacted"
},
{
"id": "maximoai_code_continued_pretrain",
"local_path": "data/processed/pretrain/maximoai_code_continued_pretrain.jsonl",
"gcs_path": "gs://maximoai-models-976606885534/processed/pretrain/maximoai_code_continued_pretrain.jsonl",
"format": "text-jsonl",
"purpose": "Low-cost continued pretraining on MaximoAI/MyTabulon code, architecture, prompts, and docs.",
"storage": "local-and-gcs",
"privacy": "source-derived-redacted"
},
{
"id": "mytabulon_tool_calling_eval",
"local_path": "data/processed/eval/mytabulon_tool_calling_eval.jsonl",
"gcs_path": "gs://maximoai-models-976606885534/eval/mytabulon_tool_calling_eval.jsonl",
"format": "eval-jsonl",
"purpose": "Regression eval for tool choice, route targeting, and required arguments.",
"storage": "local-and-gcs",
"privacy": "source-derived-no-live-user-data"
},
{
"id": "maximo_screen_records_manifest",
"local_path": "data/processed/manifests/maximo_screen_records_manifest.jsonl",
"gcs_path": "gs://maximoai-models-976606885534/manifests/maximo_screen_records_manifest.jsonl",
"format": "manifest-jsonl",
"purpose": "Manifest for raw screen-record videos that can be converted to image/video supervision.",
"storage": "manifest-local-raw-assets-gcs-when-approved",
"privacy": "private-product-demo-media"
}
],
"public_candidate_datasets": [
{
"id": "Team-ACE/ToolACE",
"gcs_path": "gs://maximoai-models-976606885534/raw/public/toolace/",
"rows_estimate": "10K-100K",
"size_estimate": "37.2 MB",
"license": "apache-2.0",
"purpose": "General function/tool-calling SFT.",
"source": "https://huggingface.co/datasets/Team-ACE/ToolACE"
},
{
"id": "Salesforce/xlam-function-calling-60k",
"gcs_path": "gs://maximoai-models-976606885534/raw/public/xlam-function-calling-60k/",
"rows_estimate": "60K",
"license": "verify before commercial use",
"purpose": "General function-calling SFT and API argument generation.",
"source": "https://huggingface.co/datasets/Salesforce/xlam-function-calling-60k"
},
{
"id": "bigcode/self-oss-instruct-sc2-exec-filter-50k",
"gcs_path": "gs://maximoai-models-976606885534/raw/public/self-oss-instruct-sc2-exec-filter-50k/",
"rows_estimate": "50,467",
"size_estimate": "90.1 MB",
"license": "odc-by",
"purpose": "Coding instruction SFT.",
"source": "https://huggingface.co/datasets/bigcode/self-oss-instruct-sc2-exec-filter-50k"
},
{
"id": "m-a-p/CodeFeedback-Filtered-Instruction",
"gcs_path": "gs://maximoai-models-976606885534/raw/public/codefeedback-filtered-instruction/",
"rows_estimate": "60,735",
"license": "verify before commercial use",
"purpose": "Coding instruction and feedback SFT.",
"source": "https://huggingface.co/datasets/m-a-p/CodeFeedback-Filtered-Instruction"
},
{
"id": "HuggingFaceM4/Docmatix",
"gcs_path": "gs://maximoai-models-976606885534/raw/public/docmatix/",
"rows_estimate": "1M-10M",
"size_estimate": "982 GB",
"license": "mit",
"purpose": "Document image VQA/OCR continued multimodal tuning. Use a curated subset first.",
"source": "https://huggingface.co/datasets/HuggingFaceM4/Docmatix"
}
]
,
"public_ingested_datasets": [
{
"id": "Team-ACE/ToolACE",
"gcs_path": "gs://maximoai-models-976606885534/raw/public/toolace/6bda777c88d2/",
"bytes_uploaded": 37156608,
"license": "apache-2.0",
"purpose": "General function/tool-calling SFT."
},
{
"id": "NousResearch/hermes-function-calling-v1",
"gcs_path": "gs://maximoai-models-976606885534/raw/public/hermes-function-calling-v1/dae3e1d28cfb/",
"bytes_uploaded": 66776246,
"license": "apache-2.0",
"purpose": "Function-calling, JSON-mode, and agentic tool traces."
},
{
"id": "glaiveai/glaive-function-calling-v2",
"gcs_path": "gs://maximoai-models-976606885534/raw/public/glaive-function-calling-v2/e7f4b6456019/",
"bytes_uploaded": 271190171,
"license": "apache-2.0",
"purpose": "Broad function-calling SFT with mixed tool/no-tool behavior."
},
{
"id": "gorilla-llm/Berkeley-Function-Calling-Leaderboard",
"gcs_path": "gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/",
"bytes_uploaded": 11742225,
"license": "apache-2.0",
"purpose": "Function-calling evaluation suite; keep out of training by default."
},
{
"id": "bigcode/self-oss-instruct-sc2-exec-filter-50k",
"gcs_path": "gs://maximoai-models-976606885534/raw/public/self-oss-instruct-sc2-exec-filter-50k/356bb069eee8/",
"bytes_uploaded": 90129198,
"license": "odc-by",
"purpose": "Coding instruction SFT."
},
{
"id": "TIGER-Lab/EvolveCoder-22K",
"gcs_path": "gs://maximoai-models-976606885534/raw/public/evolvecoder-22k/73fa2c3f56f2/",
"bytes_uploaded": 37384124,
"license": "apache-2.0",
"purpose": "Test-aware coding and problem solving."
},
{
"id": "TIGER-Lab/AceCode-V1.1-69K",
"gcs_path": "gs://maximoai-models-976606885534/raw/public/acecode-v1-1-69k/9d74afc8549d/",
"bytes_uploaded": 99160155,
"license": "mit",
"purpose": "Coding problems with tests and code reasoning."
},
{
"id": "TIGER-Lab/WebInstruct-verified",
"gcs_path": "gs://maximoai-models-976606885534/raw/public/webinstruct-verified/3e8a350b3a93/",
"bytes_uploaded": 87756597,
"license": "apache-2.0",
"purpose": "Verified web-derived reasoning/instruction data."
},
{
"id": "Voxel51/FiftyOne-GUI-Grounding-Train",
"gcs_path": "gs://maximoai-models-976606885534/raw/public/fiftyone-gui-grounding-train/01f6d9935139/",
"bytes_uploaded": 2055936,
"license": "apache-2.0",
"purpose": "GUI screenshot grounding for UI understanding."
},
{
"id": "Voxel51/FiftyOne-GUI-Grounding-Train-with-Synthetic",
"gcs_path": "gs://maximoai-models-976606885534/raw/public/fiftyone-gui-grounding-train-with-synthetic/3deedc5d3667/",
"bytes_uploaded": 15766174,
"license": "apache-2.0",
"purpose": "GUI grounding with synthetic examples."
}
]
}
import json
from pathlib import Path
if __name__ == "__main__":
main()
def tool_name(method: str, path: str) -> str:
tokens = []
for part in path.strip("/").split("/"):
if not part or part == "api":
continue
if part.startswith(":"):
tokens.append(f"by_{part[1:]}")
else:
tokens.append(part)
raw = f"mytabulon_{method.lower()}_{'_'.join(tokens)}"
raw = re.sub(r"[^a-zA-Z0-9_]+", "_", raw).strip("_").lower()
return raw[:96]
# Workflow
- When debugging unfamiliar technical issues (e.g., quota errors, platform-specific behavior), do web research to find the actual cause rather than speculating. Confidence: 0.65
- Do not start fresh large downloads (e.g., 5+GB ML models from HuggingFace); user has limited internet data. Resume from existing cache or find alternative approaches. Confidence: 0.80
Use these only as candidates. Confirm the current dataset card/license before commercial training and snapshot the exact revision into GCS.
{
"files": {
"code_pretrain": {
"bytes": 39436449,
"path": "data/processed/pretrain/maximoai_code_continued_pretrain.jsonl",
"rows": 7041,
"sha256": "bcb0c6c718c7ad7152658e9297d119c469e71012c82b86e5cf1e0f27f2f59a2e"
},
"coding_sft": {
"bytes": 719827,
"path": "data/processed/sft/maximoai_repo_coding_sft.jsonl",
"rows": 300,
"sha256": "d277f226e9619e097e5d6f2604d9f9f2f40af978fe32f5cfc652560c1348f298"
},
"frontend_pages": {
"bytes": 42291,
"path": "data/processed/manifests/mytabulon_frontend_pages_manifest.jsonl",
"rows": 88,
"sha256": "11245497366ac3bc55064990fbeaded23b41e1f09bbad291ccef17281217bb59"
},
"screen_records": {
"bytes": 32438,
"path": "data/processed/manifests/maximo_screen_records_manifest.jsonl",
"rows": 61,
"sha256": "dd1768ae52ee194be35d748a96a66080a048a169304da11282c23ae2349ce61c"
},
"tool_eval": {
"bytes": 112584,
"path": "data/processed/eval/mytabulon_tool_calling_eval.jsonl",
"rows": 120,
"sha256": "110175f3e42e769488696f043c71dc7f87c489d0d457993e77f1e9b0cb11ab54"
},
"tool_sft": {
"bytes": 675982,
"path": "data/processed/sft/mytabulon_tool_calling_sft.jsonl",
"rows": 491,
"sha256": "cc5c0f6efc268fa22f46e33759438cbb63cded1b955cab819b8e5bf54f91659d"
},
"tool_specs": {
"bytes": 338856,
"path": "data/processed/manifests/mytabulon_tool_specs.jsonl",
"rows": 491,
"sha256": "3e0d33e5dfc14d38748031f918c6350906387a2f7ad3bc9b8bf6457e7308b010"
}
},
"gcs_bucket": "gs://maximoai-models-976606885534",
"gcs_prefixes": {
"eval": "gs://maximoai-models-976606885534/eval/",
"manifests": "gs://maximoai-models-976606885534/manifests/",
"processed": "gs://maximoai-models-976606885534/processed/",
"raw": "gs://maximoai-models-976606885534/raw/",
"snapshots": "gs://maximoai-models-976606885534/snapshots/"
},
"generated_at": "2026-06-09T12:54:53+00:00",
"notes": [
"No live MyTabulon user data is included by this builder.",
"Secret-looking source lines are redacted before dataset generation.",
"The existing MyTabulon upload bucket is intentionally not used."
],
"sources": {
"maximo-syntax-cli": "/Users/johnsondaniel/Documents/maximo-syntax-cli",
"maximoai-ios": "/Users/johnsondaniel/Documents/maximoai",
"mytabulon": "/Users/johnsondaniel/Documents/mytabulon"
},
"workspace": "/Users/johnsondaniel/Documents/maximoai-models"
}
_cached_key: Optional[str] = None
_cached_at: float = 0.0
_CACHE_TTL = 300.0
log() { echo "[helios] $*"; }
Use the model dataset workspace:
Never use the product upload bucket for training data:
PROJECT="${PROJECT:-project-6168b668-98c9-444b-b27}"
REGION="${REGION:-europe-west1}"
SECRET_NAME="helios-nano-api-key"
SERVICE="helios-nano-api"
GCLOUD="${GCLOUD:-/Users/johnsondaniel/google-cloud-sdk/bin/gcloud}"
def build_frontend_page_manifest(mytabulon_root: Path) -> list[dict[str, Any]]:
app_root = mytabulon_root / "frontend" / "src" / "app"
if not app_root.exists():
return []
rows: list[dict[str, Any]] = []
for page in sorted(app_root.rglob("page.tsx")):
route = path_to_route(page)
rows.append(
{
"id": f"frontend_page_{sha256_text(route)[:12]}",
"dataset": "mytabulon_frontend_pages_manifest",
"route": route,
"source_file": str(page),
"intended_visual_dataset": {
"image_gcs_prefix": "gs://maximoai-models-976606885534/raw/mytabulon-ui-screenshots/",
"format": "image-text-to-text",
"task": "Given a screenshot, identify the MyTabulon page, visible workflow state, and the safest next tool/action.",
},
}
)
return rows
def resolve_url(repo_id: str, revision: str, rfilename: str) -> str:
encoded_repo = urllib.parse.quote(repo_id, safe="/")
encoded_file = urllib.parse.quote(rfilename, safe="/")
return f"https://huggingface.co/datasets/{encoded_repo}/resolve/{revision}/{encoded_file}?download=true"
def create_endpoint() -> aiplatform.Endpoint:
existing = find_endpoint()
if existing is not None:
print(f"[vertex] Re-using existing Endpoint: {existing.resource_name}")
return existing
print(f"[vertex] Creating endpoint {ENDPOINT_DISPLAY}…")
return aiplatform.Endpoint.create(display_name=ENDPOINT_DISPLAY)
For public tool/coding/vision data candidates, read:
_http: Optional[httpx.AsyncClient] = None
_key: Optional[str] = None
_key_at: float = 0.0
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description="Build local MaximoAI/MyTabulon training datasets.")
parser.add_argument("--mytabulon-root", type=Path, default=DEFAULT_MYTABULON_ROOT)
parser.add_argument("--maximo-syntax-root", type=Path, default=DEFAULT_MAXIMO_SYNTAX_ROOT)
parser.add_argument("--maximoai-app-root", type=Path, default=DEFAULT_MAXIMOAI_APP_ROOT)
parser.add_argument("--screen-records-root", type=Path, default=DEFAULT_SCREEN_RECORDS_ROOT)
parser.add_argument("--max-files-per-repo", type=int, default=1600)
parser.add_argument("--coding-sft-limit", type=int, default=300)
return parser.parse_args()
- `data/processed/sft/mytabulon_tool_calling_sft.jsonl`: MyTabulon route-aware tool-calling SFT.
- `data/processed/sft/maximoai_repo_coding_sft.jsonl`: repo navigation and coding-context SFT.
- `data/processed/pretrain/maximoai_code_continued_pretrain.jsonl`: redacted source-code continued-pretraining chunks.
- `data/processed/eval/mytabulon_tool_calling_eval.jsonl`: holdout eval for tool choice and arguments.
- `data/processed/manifests/maximo_screen_records_manifest.jsonl`: manifest for visual demo media to curate into image/video supervision.
---
name: mytabulon-model-datasets
description: Build, inspect, sync, and use the private MaximoAI/MyTabulon model training datasets for Qwen-style continued pretraining, SFT, tool-calling, coding, and multimodal data work. Use when asked about MaximoAI model datasets, MyTabulon tool-calling fine-tuning data, GCS model dataset storage, dataset sizes, dataset manifests, public dataset candidates, or how to access/sync training data without mixing it with MyTabulon production uploads.
---
build_model_image() {
if [[ "${FORCE_MODEL_BUILD:-0}" != "1" ]] \
&& "${GCLOUD}" artifacts docker images describe "${MODEL_IMAGE}" --project "${PROJECT}" >/dev/null 2>&1; then
log "Model image already exists: ${MODEL_IMAGE} (set FORCE_MODEL_BUILD=1 to rebuild)."
return 0
fi
log "Building model image via Cloud Build (downloads ~14GB GGUF + vision projector; ~10-20 min)…"
log " base=${BASE_IMAGE}"
log " model=${HF_REPO}/${MODEL_FILE}"
"${GCLOUD}" builds submit "${DEPLOY_DIR}" \
--project "${PROJECT}" \
--config "${DEPLOY_DIR}/cloudbuild.yaml" \
--substitutions "_IMAGE=${MODEL_IMAGE},_BASE_IMAGE=${BASE_IMAGE},_HF_REPO=${HF_REPO},_MODEL_FILE=${MODEL_FILE},_MMPROJ_FILE=${MMPROJ_FILE}"
}
{
"service": "helios-preview",
"served_model_name": "maximo-helios-preview",
"description": "Maximo Helios Preview — Qwen3.5-2B (Q4_K_S GGUF, multimodal) served via llama.cpp as an OpenAI-compatible API. Scale-to-zero on Cloud Run CPU.",
"model": {
"base_model": "Qwen/Qwen3.5-2B",
"huggingface_repo": "unsloth/Qwen3.5-2B-GGUF",
"model_file": "Qwen3.5-2B-Q4_K_S.gguf",
"mmproj_file": "mmproj-BF16.gguf",
"license": "apache-2.0",
"architecture": "dense, hybrid linear+full attention",
"params_total": "~2B",
"layers": 24,
"kv_heads": 2,
"head_dim": 256,
"modalities": ["text", "image"],
"context_length": 262144,
"context_note": "256K = model's trained max (max_position_embeddings=262144), deployed with q8_0 KV + flash-attn and --parallel 1 (single request gets the full 256K). Footprint ~12GB on 32Gi (2 KV heads + 24 layers + hybrid attention make the KV cache tiny: ~6-7GB at 256K). NOTE: this swapped from Gemma 4 26B; some older references may still say Gemma.",
"parallel_slots": 1,
"sampling_defaults": { "temperature": 1.0, "top_p": 0.95, "top_k": 64 }
},
"serving": {
"engine": "llama.cpp/llama-server",
"openai_base_path": "/v1",
"endpoints": ["/v1/models", "/v1/chat/completions", "/v1/completions", "/v1/embeddings"],
"tool_calling": true,
"vision": true,
"jinja": true,
"port": 8080,
"health_route": "/health"
},
"compute": {
"active": "cpu",
"cpu": {
"platform": "cloud_run",
"execution_environment": "gen2",
"cpu": 8,
"memory": "32Gi",
"min_instances": 0,
"max_instances": 2,
"concurrency": 2,
"timeout_seconds": 3600,
"base_image": "ghcr.io/ggml-org/llama.cpp:server",
"expected_tok_per_sec": "~5-15 (memory-bandwidth bound)",
"extra_llama_args": ["--threads", "8", "--threads-batch", "8"]
},
"gpu": {
"platform": "cloud_run",
"execution_environment": "gen2",
"cpu": 8,
"memory": "32Gi",
"gpu": 1,
"gpu_type": "nvidia-l4",
"min_instances": 0,
"max_instances": 2,
"concurrency": 8,
"timeout_seconds": 3600,
"base_image": "ghcr.io/ggml-org/llama.cpp:server-cuda",
"expected_tok_per_sec": "~40-50",
"extra_llama_args": ["--n-gpu-layers", "99"]
}
},
"auth": {
"mode": "api_key",
"secret_name": "helios-preview-api-key",
"key_prefix": "hlp_",
"header": "Authorization",
"scheme": "Bearer",
"mount_path": "/secrets/api-key"
},
"iam": {
"service_account": "helios-preview-sa",
"secret_accessor_role": "roles/secretmanager.secretAccessor"
},
"artifact_registry": { "repo": "helios" }
}
PROJECT="${PROJECT:-project-6168b668-98c9-444b-b27}"
REGION="${REGION:-europe-west1}"
GCLOUD="${GCLOUD:-/Users/johnsondaniel/google-cloud-sdk/bin/gcloud}"
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
CONFIG="${ROOT}/configs/helios_nano_preview.json"
DEPLOY_DIR="${ROOT}/deploy/helios-nano-preview"
def redact_long_secret_candidate(match: re.Match[str]) -> str:
value = match.group(1)
has_digit = any(char.isdigit() for char in value)
has_lower = any(char.islower() for char in value)
has_upper = any(char.isupper() for char in value)
looks_like_identifier = "_" in value and not has_lower and not has_digit
if looks_like_identifier:
return value
if len(value) >= 40 and has_digit and (has_lower or has_upper):
return "[REDACTED_TOKEN]"
return value
# Taste (Continuously Learned by [CommandCode][cmd])
Use these local private datasets first:
COMPUTE="${COMPUTE:-cpu}" # cpu | gpu
SERVICE="${SERVICE:-helios-preview}"
SERVED_MODEL_NAME="maximo-helios-preview"
SERVICE_ACCOUNT="helios-preview-sa"
SERVICE_ACCOUNT_EMAIL="${SERVICE_ACCOUNT}@${PROJECT}.iam.gserviceaccount.com"
SECRET_NAME="helios-preview-api-key"
AR_REPO="helios"
AR_HOST="${REGION}-docker.pkg.dev"
The generated records are intentionally private/local by default. They contain
source-derived tool specs, route-aware SFT examples, source-code pretraining
chunks, and manifests for visual screen-record assets.
"""
Recommended first GCS layout:
url() {
"${GCLOUD}" run services describe "${SERVICE}" --project "${PROJECT}" --region "${REGION}" --format='value(status.url)'
}
Runs in the SAME container as llama-server (which listens on 127.0.0.1:8081).
This process listens on 0.0.0.0:8080 (the public Cloud Run port) and:
def path_to_route(path: Path) -> str:
parts = list(path.parts)
if "app" not in parts:
return "/"
app_index = parts.index("app")
route_parts = parts[app_index + 1 :]
if route_parts[-1] in {"page.tsx", "route.ts"}:
route_parts = route_parts[:-1]
cleaned = []
for part in route_parts:
if part.startswith("(") and part.endswith(")"):
continue
cleaned.append(part)
return "/" + "/".join(cleaned)
if __name__ == "__main__":
main()
# Rebuild the baked model image (after changing quant / mmproj)
FORCE_BUILD=1 ./scripts/deploy_helios_preview.sh
```
def infer_user_prompt(method: str, path: str) -> str:
nouns = [part for part in path.split("/") if part and not part.startswith(":") and part != "api"]
target = " ".join(nouns[-3:]).replace("-", " ")
if method == "GET":
return f"Show me the {target} for this company."
if method == "POST":
return f"Create or run the {target} workflow for this company."
if method in {"PUT", "PATCH"}:
return f"Update the {target} settings for this company."
if method == "DELETE":
return f"Delete the selected {target} item for this company."
return f"Use MyTabulon to manage {target}."
main "$@"
```python
from openai import OpenAI
client = OpenAI(base_url="https://<service-url>/v1", api_key="hlp_...")
r = client.chat.completions.create(
model="maximo-helios-preview",
messages=[{"role": "user", "content": "Hello"}],
)
print(r.choices[0].message.content)
```
# build_chat_json <mode> <prompt> -> JSON body on stdout (mode: chat|tools)
build_chat_json() {
MODEL="${MODEL}" python3 - "$1" "$2" <<'PY'
import json, os, sys
mode, prompt = sys.argv[1], sys.argv[2]
body = {
"model": os.environ["MODEL"],
"messages": [{"role": "user", "content": prompt}],
"temperature": 1.0,
"top_p": 0.95,
"max_tokens": 512,
}
if mode == "tools":
body["tools"] = [{
"type": "function",
"function": {
"name": "get_current_weather",
"description": "Get the current weather for a city",
"parameters": {
"type": "object",
"properties": {"location": {"type": "string", "description": "City name"}},
"required": ["location"],
},
},
}]
body["tool_choice"] = "auto"
print(json.dumps(body))
PY
}
echo "Created model dataset bucket: ${BUCKET}"
Before training or upload:
def _client() -> httpx.AsyncClient:
global _http
if _http is None:
_http = httpx.AsyncClient(base_url=UPSTREAM, timeout=httpx.Timeout(3600.0, connect=30.0))
return _http
deploy_service() {
# All llama-server flags live in the image entrypoint (entrypoint.sh); config is
# passed as env vars (no gcloud --args duplicate-token limit). The injector does
# API-key auth + identity injection, so the public port (8080) is the injector.
local env_vars
env_vars="MODEL_FILE=${MODEL_FILE}|MMPROJ_FILE=${MMPROJ_FILE}|SERVED_NAME=${SERVED_MODEL_NAME}"
env_vars+="|CTX_SIZE=${CTX_SIZE}|PARALLEL=${PARALLEL}|API_KEY_FILE=/secrets/api-key"
env_vars+="|CACHE_TYPE_K=${CACHE_TYPE_K}|CACHE_TYPE_V=${CACHE_TYPE_V}|INJECT_MODE=${INJECT_MODE}"
env_vars+="|THREADS=${THREADS}|THREADS_BATCH=${THREADS_BATCH}|COMPUTE=${COMPUTE}"
if [[ -n "${EXTRA_ARGS}" ]]; then
env_vars+="|EXTRA_ARGS=${EXTRA_ARGS}"
fi
Sync processed local datasets and manifests:
Read `data/processed/manifests/public_dataset_ingest_manifest.json` for the exact revisions, files, and byte counts.
deploy_vllm() {
log "Deploying vLLM service ${VLLM_SERVICE} (L4 GPU, min-instances=0, max-instances=2)…"
"${GCLOUD}" beta run deploy "${VLLM_SERVICE}" \
--project "${PROJECT}" \
--region "${REGION}" \
--image "${VLLM_IMAGE}" \
--execution-environment gen2 \
--no-allow-unauthenticated \
--cpu "${VLLM_CPU:-8}" \
--memory "${VLLM_MEM:-32Gi}" \
--gpu 1 \
--gpu-type nvidia-l4 \
--no-gpu-zonal-redundancy \
--no-cpu-throttling \
--min-instances 0 \
--max-instances 2 \
--concurrency 8 \
--timeout 600 \
--service-account "${SERVICE_ACCOUNT_EMAIL}" \
--add-volume name=dshm,type=tmpfs,size=8Gi \
--add-volume-mount volume=dshm,mount-path=/dev/shm \
--startup-probe "tcpSocket.port=8080,initialDelaySeconds=240,failureThreshold=30,timeoutSeconds=10,periodSeconds=30" \
--command "vllm" \
--args="serve,WeiboAI/VibeThinker-3B,--served-model-name,maximo-helios-nano-preview,--dtype,bfloat16,--max-model-len,8192,--tensor-parallel-size,1,--gpu-memory-utilization,0.9,--max-num-seqs,32,--enable-prefix-caching,--enable-chunked-prefill,--port,8080,--host,0.0.0.0" \
--set-env-vars "HF_HUB_ENABLE_HF_TRANSFER=1,VLLM_DISABLE_USAGE_STATS=1" \
--labels "app=helios-nano-preview,component=vllm"
}
@app.api_route(
"/v1/{path:path}",
methods=["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"],
)
async def proxy_v1(path: str, request: Request) -> Response:
if not _check_key(request):
return JSONResponse(
{"error": {"type": "invalid_api_key", "message": f"Invalid or missing {SCHEME} API key in {HEADER} header."}},
status_code=401,
headers={"WWW-Authenticate": SCHEME},
)
body = await request.body()
url = f"{UPSTREAM.rstrip('/')}/v1/{path}"
forward_headers = {
k: v
for k, v in request.headers.items()
if k.lower() not in {"host", "authorization", "content-length", "x-forwarded-for", "x-forwarded-proto"}
}
forward_headers["host"] = UPSTREAM.split("://", 1)[1].split("/", 1)[0]
client = _get_http()
try:
upstream_resp = await client.request(
method=request.method,
url=url,
params=request.query_params,
headers=forward_headers,
content=body,
)
except httpx.HTTPError as e:
return JSONResponse(
{"error": {"type": "upstream_error", "message": str(e)}},
status_code=502,
)
excluded = {"content-encoding", "content-length", "transfer-encoding", "connection"}
response_headers = {k: v for k, v in upstream_resp.headers.items() if k.lower() not in excluded}
return Response(
content=upstream_resp.content,
status_code=upstream_resp.status_code,
headers=response_headers,
media_type=upstream_resp.headers.get("content-type"),
)
#!/usr/bin/env bash
set -euo pipefail
if [[ "${BUCKET}" == "gs://mytabulon-mvp-uploads-976606885534"* ]]; then
echo "Refusing to sync training data to the MyTabulon production upload bucket." >&2
exit 1
fi
files = {
"tool_specs": REPO_ROOT / "data" / "processed" / "manifests" / "mytabulon_tool_specs.jsonl",
"tool_sft": output_root / "sft" / "mytabulon_tool_calling_sft.jsonl",
"tool_eval": output_root / "eval" / "mytabulon_tool_calling_eval.jsonl",
"code_pretrain": output_root / "pretrain" / "maximoai_code_continued_pretrain.jsonl",
"coding_sft": output_root / "sft" / "maximoai_repo_coding_sft.jsonl",
"frontend_pages": output_root / "manifests" / "mytabulon_frontend_pages_manifest.jsonl",
"screen_records": output_root / "manifests" / "maximo_screen_records_manifest.jsonl",
}
jsonl_write(files["tool_specs"], tool_specs)
jsonl_write(files["tool_sft"], tool_sft)
jsonl_write(files["tool_eval"], tool_eval)
jsonl_write(files["code_pretrain"], pretrain_rows)
jsonl_write(files["coding_sft"], coding_sft)
jsonl_write(files["frontend_pages"], frontend_pages)
jsonl_write(files["screen_records"], screen_records)
require() {
command -v "${GCLOUD}" >/dev/null || { echo "gcloud not found at ${GCLOUD}"; exit 1; }
[[ -f "${CONFIG}" ]] || { echo "Missing config: ${CONFIG}"; exit 1; }
[[ -f "${DEPLOY_DIR}/Dockerfile" ]] || { echo "Missing ${DEPLOY_DIR}/Dockerfile"; exit 1; }
[[ -f "${DEPLOY_DIR}/Dockerfile.serve" ]] || { echo "Missing ${DEPLOY_DIR}/Dockerfile.serve"; exit 1; }
[[ -f "${DEPLOY_DIR}/cloudbuild.yaml" ]] || { echo "Missing ${DEPLOY_DIR}/cloudbuild.yaml"; exit 1; }
[[ -f "${DEPLOY_DIR}/cloudbuild.serve.yaml" ]] || { echo "Missing ${DEPLOY_DIR}/cloudbuild.serve.yaml"; exit 1; }
[[ "${COMPUTE}" == "cpu" || "${COMPUTE}" == "gpu" ]] || { echo "COMPUTE must be cpu|gpu"; exit 1; }
}
def _authorized(request: Request) -> bool:
raw = request.headers.get(HEADER, "")
parts = raw.split(None, 1)
if len(parts) != 2 or parts[0] != SCHEME:
return False
presented = parts[1].strip()
expected = _load_key()
if len(presented) != len(expected):
return False
result = 0
for a, b in zip(presented, expected):
result |= ord(a) ^ ord(b)
return result == 0
HF_MODEL_ID = CONFIG["model"]["huggingface_repo"]
SERVED_NAME = CONFIG["model"]["served_model_name"]
CODE_EXTENSIONS = {
".css",
".html",
".js",
".json",
".jsonc",
".md",
".mjs",
".py",
".sql",
".swift",
".ts",
".tsx",
".yaml",
".yml",
}
VISUAL_EXTENSIONS = {".png", ".jpg", ".jpeg", ".webp", ".mp4", ".mov"}
EXCLUDED_DIRS = {
".DS_Store",
".git",
".next",
".turbo",
"build",
"coverage",
"dist",
"node_modules",
"tmp",
"uploads",
}
EXCLUDED_FILENAMES = {
".env",
".env.local",
".env.production",
"package-lock.json",
"bun.lock",
"yarn.lock",
}
SECRET_PATTERN = re.compile(
r"(api[_-]?key|secret|token|password|private[_-]?key|client[_-]?secret|bearer\s+|authorization)",
re.IGNORECASE,
)
LONG_SECRET_PATTERN = re.compile(r"([A-Za-z0-9_\-]{32,})")
INFRA_PATTERN = re.compile(
r"(project-[a-f0-9-]{20,}|mytabulon-mvp-uploads-\d+|maximoai-models-\d+|\b(?:10|34)\.\d{1,3}\.\d{1,3}\.\d{1,3}\b)",
re.IGNORECASE,
)
SERVICE_ACCOUNT="helios-nano-sa"
SERVICE_ACCOUNT_EMAIL="${SERVICE_ACCOUNT}@${PROJECT}.iam.gserviceaccount.com"
SECRET_NAME="helios-nano-api-key"
AR_REPO="helios"
VLLM_SERVICE="helios-nano-vllm"
API_SERVICE="helios-nano-api"
VLLM_IMAGE="us-docker.pkg.dev/vertex-ai/vertex-vision-model-garden-dockers/pytorch-vllm-serve:latest"
AR_HOST="${REGION}-docker.pkg.dev"
IMAGE_TAG="${AR_HOST}/${PROJECT}/${AR_REPO}/helios-nano-auth:${RANDOM:-$$}"
Treat any match as a blocker unless it is a known placeholder or redaction token.
Approved public ingest:
## Validation
import httpx
from fastapi import FastAPI, Request, Response
from fastapi.responses import JSONResponse
from google.cloud import secretmanager
## GCS Workflow
def download_file(url: str, dest: Path, max_bytes: int) -> int:
dest.parent.mkdir(parents=True, exist_ok=True)
tmp = dest.with_suffix(dest.suffix + ".part")
req = urllib.request.Request(url, headers={"User-Agent": "maximoai-dataset-ingest/1.0"})
downloaded = 0
with urllib.request.urlopen(req, timeout=120) as response, tmp.open("wb") as handle:
content_length = response.headers.get("Content-Length")
if content_length and int(content_length) > max_bytes:
tmp.unlink(missing_ok=True)
raise ValueError(f"remote file exceeds byte cap: {dest} ({content_length} > {max_bytes})")
while True:
chunk = response.read(1024 * 1024)
if not chunk:
break
downloaded += len(chunk)
if downloaded > max_bytes:
tmp.unlink(missing_ok=True)
raise ValueError(f"download exceeded byte cap: {dest}")
handle.write(chunk)
tmp.replace(dest)
return downloaded
ensure_service_account() {
if "${GCLOUD}" iam service-accounts describe "${SERVICE_ACCOUNT_EMAIL}" --project "${PROJECT}" >/dev/null 2>&1; then
log "Service account exists: ${SERVICE_ACCOUNT_EMAIL}"
else
log "Creating service account: ${SERVICE_ACCOUNT_EMAIL}"
"${GCLOUD}" iam service-accounts create "${SERVICE_ACCOUNT}" \
--project "${PROJECT}" \
--display-name="Helios Preview Service Account" >/dev/null
fi
# Newly-created service accounts take a few seconds to propagate to IAM, so the
# role binding can fail with "does not exist" right after creation. Retry.
log "Granting secretmanager.secretAccessor (retrying for IAM propagation)…"
local attempt
for attempt in 1 2 3 4 5 6; do
if "${GCLOUD}" projects add-iam-policy-binding "${PROJECT}" \
--member="serviceAccount:${SERVICE_ACCOUNT_EMAIL}" \
--role="roles/secretmanager.secretAccessor" --condition=None >/dev/null 2>&1; then
log " secretAccessor bound (attempt ${attempt})."
return 0
fi
log " attempt ${attempt} failed (SA not propagated yet); sleeping 10s…"
sleep 10
done
echo "Failed to bind secretAccessor after retries." >&2
return 1
}
def load_config(path: Path) -> dict[str, Any]:
config = json.loads(path.read_text(encoding="utf-8"))
bucket = config["bucket"]
if bucket.startswith(DO_NOT_USE_BUCKET):
raise ValueError("Refusing to use the MyTabulon product upload bucket for training data.")
return config
_sm_client: Optional[secretmanager.SecretManagerServiceClient] = None
_http: Optional[httpx.AsyncClient] = None
REPO_ROOT = Path(__file__).resolve().parents[1]
DEFAULT_MYTABULON_ROOT = Path("/Users/johnsondaniel/Documents/mytabulon")
DEFAULT_MAXIMO_SYNTAX_ROOT = Path("/Users/johnsondaniel/Documents/maximo-syntax-cli")
DEFAULT_MAXIMOAI_APP_ROOT = Path("/Users/johnsondaniel/Documents/maximoai")
DEFAULT_SCREEN_RECORDS_ROOT = Path("/Users/johnsondaniel/Documents/Maximo AI Screen Records")
```text
gs://maximoai-models-976606885534/raw/public/toolace/
gs://maximoai-models-976606885534/raw/public/xlam-function-calling-60k/
gs://maximoai-models-976606885534/raw/public/self-oss-instruct-sc2-exec-filter-50k/
gs://maximoai-models-976606885534/raw/public/codefeedback-filtered-instruction/
gs://maximoai-models-976606885534/raw/public/docmatix/subset/
```
"${GCLOUD}" storage cp "${ROOT}/data/catalogs/dataset_registry.json" "${BUCKET}/manifests/dataset_registry.json" --project "${PROJECT}"
"${GCLOUD}" storage cp "${ROOT}/configs/storage.json" "${BUCKET}/manifests/configs/storage.json" --project "${PROJECT}"
"${GCLOUD}" storage cp "${ROOT}/configs/public_dataset_ingest.json" "${BUCKET}/manifests/configs/public_dataset_ingest.json" --project "${PROJECT}"
"${GCLOUD}" storage cp "${ROOT}/configs/mixes/qwen35_4b_first_sft_mix.json" "${BUCKET}/manifests/configs/mixes/qwen35_4b_first_sft_mix.json" --project "${PROJECT}"
"${GCLOUD}" storage cp "${ROOT}/configs/mixes/qwen35_4b_continued_pretrain_mix.json" "${BUCKET}/manifests/configs/mixes/qwen35_4b_continued_pretrain_mix.json" --project "${PROJECT}"
"${GCLOUD}" storage cp "${ROOT}/configs/mixes/qwen35_4b_public_augmented_sft_mix.json" "${BUCKET}/manifests/configs/mixes/qwen35_4b_public_augmented_sft_mix.json" --project "${PROJECT}"
"${GCLOUD}" storage cp "${ROOT}/data/processed/manifests/dataset_manifest.json" "${BUCKET}/manifests/dataset_manifest.json" --project "${PROJECT}"
"${GCLOUD}" storage cp "${ROOT}/data/processed/manifests/public_dataset_ingest_manifest.json" "${BUCKET}/manifests/public_dataset_ingest_manifest.json" --project "${PROJECT}"
"${GCLOUD}" storage cp "${ROOT}/data/processed/manifests/mytabulon_tool_specs.jsonl" "${BUCKET}/manifests/mytabulon_tool_specs.jsonl" --project "${PROJECT}"
"${GCLOUD}" storage cp "${ROOT}/data/processed/manifests/mytabulon_frontend_pages_manifest.jsonl" "${BUCKET}/manifests/mytabulon_frontend_pages_manifest.jsonl" --project "${PROJECT}"
"${GCLOUD}" storage cp "${ROOT}/data/processed/manifests/maximo_screen_records_manifest.jsonl" "${BUCKET}/manifests/maximo_screen_records_manifest.jsonl" --project "${PROJECT}"
case "${1:-chat}" in
models)
curl -sS "${api_url}/v1/models" \
-H "Authorization: Bearer ${api_key}" | python3 -m json.tool
;;
chat)
prompt="${2:-What is 17 * 23?}"
body=$(python3 -c "import json,sys; print(json.dumps({'model':'maximo-helios-nano-preview','messages':[{'role':'user','content':sys.argv[1]}],'temperature':1.0,'top_p':0.95,'max_tokens':512}))" "${prompt}")
curl -sS "${api_url}/v1/chat/completions" \
-H "Authorization: Bearer ${api_key}" \
-H "Content-Type: application/json" \
-d "${body}" | python3 -m json.tool
;;
*)
echo "usage: $0 {models|chat \"prompt\"|stream \"prompt\"}" >&2
exit 1
;;
esac
PROJECT="${PROJECT:-project-6168b668-98c9-444b-b27}"
REGION="${REGION:-europe-west1}"
BUCKET="${BUCKET:-gs://maximoai-models-976606885534}"
GCLOUD="${GCLOUD:-/Users/johnsondaniel/google-cloud-sdk/bin/gcloud}"
# If either process exits, shut the container down so Cloud Run restarts it.
trap 'kill ${LLAMA_PID} ${INJ_PID} 2>/dev/null || true' EXIT
wait -n ${LLAMA_PID} ${INJ_PID}
echo "[entrypoint] a child process exited; stopping container."
exit 1
print_summary() {
local api_url
api_url="$("${GCLOUD}" run services describe "${SERVICE}" --project "${PROJECT}" --region "${REGION}" --format='value(status.url)')"
echo
echo "============================================================"
echo " maximo helios preview — DEPLOYED"
echo "============================================================"
echo " Endpoint URL : ${api_url}"
echo " Served model : ${SERVED_MODEL_NAME}"
echo " Base model : Qwen3.5-2B (Q4_K_S GGUF, multimodal, 256K ctx)"
echo " Region : ${REGION}"
echo " Compute : ${COMPUTE} (scales to zero when idle)"
echo " Capabilities : OpenAI /v1 · tool calling · vision"
echo " Auth : Authorization: Bearer <API_KEY>"
echo " Secret name : ${SECRET_NAME} (Secret Manager)"
echo
echo " Get the key : ./scripts/invoke_helios_preview.sh key"
echo " Smoke test : ./scripts/invoke_helios_preview.sh chat \"Say hi in 5 words\""
echo
echo " OpenAI SDK:"
echo " from openai import OpenAI"
echo " client = OpenAI(base_url='${api_url}/v1', api_key='<API_KEY>')"
echo " r = client.chat.completions.create("
echo " model='${SERVED_MODEL_NAME}',"
echo " messages=[{'role':'user','content':'Hello'}])"
echo
echo " NOTE: first request after idle is a cold start (~60-120s on CPU"
echo " while the model loads). Subsequent requests are warm."
echo "============================================================"
}
UPSTREAM = os.environ.get("UPSTREAM_URL", "http://127.0.0.1:8081")
API_KEY_FILE = os.environ.get("API_KEY_FILE", "/secrets/api-key")
INJECT = os.environ.get("INJECT_IDENTITY", "1") == "1"
# "user_prefix" (template-agnostic, safe) or "system" (uses a system message).
INJECT_MODE = os.environ.get("INJECT_MODE", "user_prefix")
IDENTITY = os.environ.get(
"IDENTITY_SYSTEM_PROMPT",
"You are Maximo Helios Preview, a large language model built by Maximo AI Ltd. "
"When asked who you are, your name, or who created, made or trained you, you are "
"Maximo Helios Preview by Maximo AI Ltd. "
"Never identify yourself as Gemma, Google, Qwen, Alibaba, or any other model or company.",
)
HEADER = "Authorization"
SCHEME = "Bearer"
# Two images: MODEL_IMAGE bakes the model weights (built once per model); SERVE_IMAGE
# layers the identity injector + entrypoint on top.
MODEL_SANITY="$(echo "${MODEL_FILE}" | sed 's/\.gguf//g' | tr '[:upper:]' '[:lower:]' | tr '_' '-')"
MODEL_IMAGE="${AR_HOST}/${PROJECT}/${AR_REPO}/helios-preview-${MODEL_SANITY}-${COMPUTE}:latest"
SERVE_IMAGE="${AR_HOST}/${PROJECT}/${AR_REPO}/helios-preview-serve-${MODEL_SANITY}-${COMPUTE}:latest"
app = FastAPI(title="maximo-helios-preview-injector")
ensure_service_account() {
if "${GCLOUD}" iam service-accounts describe "${SERVICE_ACCOUNT_EMAIL}" --project "${PROJECT}" >/dev/null 2>&1; then
log "Service account exists: ${SERVICE_ACCOUNT_EMAIL}"
else
log "Creating service account: ${SERVICE_ACCOUNT_EMAIL}"
"${GCLOUD}" iam service-accounts create "${SERVICE_ACCOUNT}" \
--project "${PROJECT}" \
--display-name="Helios Nano Preview Service Account" >/dev/null
fi
log "Granting secretmanager.secretAccessor…"
"${GCLOUD}" projects add-iam-policy-binding "${PROJECT}" \
--member="serviceAccount:${SERVICE_ACCOUNT_EMAIL}" \
--role="roles/secretmanager.secretAccessor" >/dev/null
}
set -euo pipefail
```text
gs://mytabulon-mvp-uploads-976606885534/
```
{
"name": "qwen35_4b_public_augmented_sft_mix",
"base_model": "Qwen/Qwen3.5-4B-Base",
"goal": "Expanded SFT mix for a MyTabulon manager/coding agent with strong tool-calling and coding behavior.",
"storage_bucket": "gs://maximoai-models-976606885534",
"datasets": [
{
"id": "mytabulon_tool_calling_sft",
"path": "gs://maximoai-models-976606885534/processed/sft/mytabulon_tool_calling_sft.jsonl",
"weight": 0.30,
"role": "core-private-tool-calling"
},
{
"id": "maximoai_repo_coding_sft",
"path": "gs://maximoai-models-976606885534/processed/sft/maximoai_repo_coding_sft.jsonl",
"weight": 0.10,
"role": "core-private-coding"
},
{
"id": "Team-ACE/ToolACE",
"path": "gs://maximoai-models-976606885534/raw/public/toolace/6bda777c88d2/",
"weight": 0.10,
"role": "public-tool-calling"
},
{
"id": "NousResearch/hermes-function-calling-v1",
"path": "gs://maximoai-models-976606885534/raw/public/hermes-function-calling-v1/dae3e1d28cfb/",
"weight": 0.12,
"role": "public-tool-calling-json-mode"
},
{
"id": "glaiveai/glaive-function-calling-v2",
"path": "gs://maximoai-models-976606885534/raw/public/glaive-function-calling-v2/e7f4b6456019/",
"weight": 0.12,
"role": "public-tool-calling-broad"
},
{
"id": "bigcode/self-oss-instruct-sc2-exec-filter-50k",
"path": "gs://maximoai-models-976606885534/raw/public/self-oss-instruct-sc2-exec-filter-50k/356bb069eee8/",
"weight": 0.08,
"role": "public-coding"
},
{
"id": "TIGER-Lab/EvolveCoder-22K",
"path": "gs://maximoai-models-976606885534/raw/public/evolvecoder-22k/73fa2c3f56f2/",
"weight": 0.06,
"role": "public-test-aware-coding"
},
{
"id": "TIGER-Lab/AceCode-V1.1-69K",
"path": "gs://maximoai-models-976606885534/raw/public/acecode-v1-1-69k/9d74afc8549d/",
"weight": 0.06,
"role": "public-code-reasoning"
},
{
"id": "TIGER-Lab/WebInstruct-verified",
"path": "gs://maximoai-models-976606885534/raw/public/webinstruct-verified/3e8a350b3a93/",
"weight": 0.04,
"role": "public-reasoning"
},
{
"id": "Voxel51/FiftyOne-GUI-Grounding-Train-with-Synthetic",
"path": "gs://maximoai-models-976606885534/raw/public/fiftyone-gui-grounding-train-with-synthetic/3deedc5d3667/",
"weight": 0.02,
"role": "public-gui-grounding"
}
],
"holdout_eval": [
"gs://maximoai-models-976606885534/eval/mytabulon_tool_calling_eval.jsonl",
"gs://maximoai-models-976606885534/raw/public/berkeley-function-calling-leaderboard/61fc0608cfd8/"
],
"notes": [
"Keep private MyTabulon tool-calling records overweighted so public generic tools do not wash out product behavior.",
"Treat BFCL as eval by default.",
"Convert public source formats into the final Qwen chat/tool-call template before training.",
"Use LoRA/QLoRA first; do not full fine-tune until evals improve."
]
}
Local workspace:
import json
from pathlib import Path
log() { echo "[helios-preview] $*"; }
The sync script refuses to use the MyTabulon upload bucket. If a command mentions `mytabulon-mvp-uploads-976606885534`, stop and correct it.
@app.get("/")
async def root():
return {"service": "maximo-helios-preview", "openai_compatible": True,
"endpoints": ["/v1/models", "/v1/chat/completions", "/v1/completions"]}
{
"project": "project-6168b668-98c9-444b-b27",
"region": "europe-west1",
"model_bucket": "gs://maximoai-models-976606885534",
"do_not_use_for_training": [
"gs://mytabulon-mvp-uploads-976606885534"
],
"prefixes": {
"raw": "raw/",
"processed": "processed/",
"eval": "eval/",
"manifests": "manifests/",
"snapshots": "snapshots/",
"runs": "runs/"
}
}
log "Deploying ${SERVICE} (compute=${COMPUTE}, ctx=${CTX_SIZE}, min-instances=0, max=${MAX_INSTANCES})…"
"${GCLOUD}" beta run deploy "${SERVICE}" "${flags[@]}"
}
PROJECT = os.environ.get("PROJECT", "project-6168b668-98c9-444b-b27")
REGION = os.environ.get("REGION", CONFIG["compute"]["region"])
os.environ.setdefault("GOOGLE_CLOUD_REGION", REGION)
SERVICE_ACCOUNT = f"{CONFIG['iam']['service_account']}@{PROJECT}.iam.gserviceaccount.com"
"""API-key auth proxy in front of the vLLM OpenAI-compatible server.
```text
/Users/johnsondaniel/Documents/maximoai-models/
configs/
data/
catalogs/
processed/
pretrain/
sft/
eval/
manifests/
scripts/
skills/
```
enable_apis() {
log "Enabling required APIs (idempotent)…"
"${GCLOUD}" services enable \
run.googleapis.com \
cloudbuild.googleapis.com \
artifactregistry.googleapis.com \
secretmanager.googleapis.com \
--project "${PROJECT}" >/dev/null
}
def upload_model() -> aiplatform.Model:
existing = find_model()
if existing is not None:
print(f"[vertex] Re-using existing Model: {existing.resource_name}")
return existing
print(f"[vertex] Uploading model {MODEL_DISPLAY} from {VLLM_IMAGE}…")
return aiplatform.Model.upload(
display_name=MODEL_DISPLAY,
serving_container_image_uri=VLLM_IMAGE,
serving_container_args=vllm_args(),
serving_container_ports=[CONFIG["vllm"]["port"]],
serving_container_predict_route=CONFIG["vllm"]["predict_route"],
serving_container_health_route=CONFIG["vllm"]["health_route"],
serving_container_shared_memory_size_mb=CONFIG["vllm"]["shared_memory_mb"],
serving_container_deployment_timeout=CONFIG["compute"]["timeout_seconds"],
serving_container_environment_variables={
"MODEL_ID": HF_MODEL_ID,
"DEPLOY_SOURCE": "helios-nano-preview-deploy-script",
"HF_HUB_ENABLE_HF_TRANSFER": "1",
"VLLM_DISABLE_USAGE_STATS": "1",
},
)
if INJECT_MODE == "system":
for m in msgs:
if m.get("role") == "system":
m["content"] = IDENTITY + "\n\n" + (m.get("content") or "")
break
else:
msgs.insert(0, {"role": "system", "content": IDENTITY})
else: # user_prefix — template-agnostic, safe for any Gemma template
for m in msgs:
if m.get("role") == "user":
c = m.get("content")
if isinstance(c, str):
m["content"] = IDENTITY + "\n\n" + c
elif isinstance(c, list): # multimodal content parts
c.insert(0, {"type": "text", "text": IDENTITY})
break
REPO_ROOT = Path(__file__).resolve().parents[1]
DEFAULT_CONFIG = REPO_ROOT / "configs" / "public_dataset_ingest.json"
GCLOUD = "/Users/johnsondaniel/google-cloud-sdk/bin/gcloud"
SAFE_EXTENSIONS = {
".arrow",
".csv",
".gz",
".json",
".jsonl",
".md",
".parquet",
".txt",
".yaml",
".yml",
".zip"
}
SKIP_NAMES = {".gitattributes"}
DO_NOT_USE_BUCKET = "gs://mytabulon-mvp-uploads-976606885534"
@app.get("/health")
async def health():
try:
r = await _client().get("/health", timeout=10.0)
return JSONResponse({"status": "ok"} if r.status_code == 200 else {"status": "starting"},
status_code=200 if r.status_code == 200 else 503)
except Exception as e: # noqa: BLE001
return JSONResponse({"status": "starting", "error": str(e)}, status_code=503)
def sha256_file(path: Path) -> str:
digest = hashlib.sha256()
with path.open("rb") as handle:
for chunk in iter(lambda: handle.read(1024 * 1024), b""):
digest.update(chunk)
return digest.hexdigest()
if stream:
req = client.build_request(request.method, url, params=request.query_params, headers=fwd, content=body)
resp = await client.send(req, stream=True)
headers = {k: v for k, v in resp.headers.items() if k.lower() not in drop}
async def keep_alive_generator(r):
import asyncio
queue = asyncio.Queue()
loop = asyncio.get_running_loop()
async def read_upstream():
try:
async for chunk in r.aiter_bytes():
await queue.put(chunk)
await queue.put(None) # EOF sentinel
except Exception as e:
await queue.put(e)
read_task = loop.create_task(read_upstream())
try:
while True:
try:
item = await asyncio.wait_for(queue.get(), timeout=10.0)
if item is None:
break
if isinstance(item, Exception):
raise item
yield item
except asyncio.TimeoutError:
yield b": ping\n\n"
finally:
if not read_task.done():
read_task.cancel()
try:
await read_task
except asyncio.CancelledError:
pass
await r.aclose()
return StreamingResponse(keep_alive_generator(resp), status_code=resp.status_code, headers=headers,
media_type=resp.headers.get("content-type"))
try:
resp = await client.request(request.method, url, params=request.query_params, headers=fwd, content=body)
except httpx.HTTPError as e:
return JSONResponse({"error": {"type": "upstream_error", "message": str(e)}}, status_code=502)
headers = {k: v for k, v in resp.headers.items() if k.lower() not in drop}
return Response(content=resp.content, status_code=resp.status_code, headers=headers,
media_type=resp.headers.get("content-type"))
def now_iso() -> str:
return datetime.now(timezone.utc).isoformat(timespec="seconds")
VLLM_IMAGE = CONFIG["vllm"]["image"]
MAX_MODEL_LEN = CONFIG["model"]["max_model_len"]
DTYPE = CONFIG["model"]["dtype"]
TP = CONFIG["model"]["tensor_parallel_size"]
GPU_MEM_UTIL = CONFIG["model"]["gpu_memory_utilization"]
MAX_NUM_SEQS = CONFIG["model"]["max_num_seqs"]
fwd = {k: v for k, v in request.headers.items()
if k.lower() not in {"host", "authorization", "content-length"}}
client = _client()
url = f"/v1/{path}"
drop = {"content-length", "transfer-encoding", "connection", "content-encoding"}
def infer_description(method: str, path: str) -> str:
clean = path.replace(":companyId", "company").replace("/", " ").strip()
verbs = {
"GET": "Read or list",
"POST": "Create, run, or submit",
"PUT": "Replace or update",
"PATCH": "Patch or partially update",
"DELETE": "Delete",
}
return f"{verbs.get(method, method)} MyTabulon {clean} records."
- **CPU speed:** ~5-15 tok/s (memory-bandwidth bound) for a 4B-active MoE at Q4.
Great for tool calling / agentic JSON / short answers; slow for long prose and
heavy vision. Flip to `COMPUTE=gpu` if you need ~40-50 tok/s.
- **Cold start:** first request after idle is ~60-120s on CPU while the model
loads. Set `--min-instances 1` if you need it always-warm (costs money).
- **Tool calling** uses `--jinja` with the model's embedded chat template. If a
future Gemma 4 GGUF needs a corrected tool template, add
`--chat-template-file` to the args in `deploy_helios_preview.sh`.
- **KV cache is left at full precision** on purpose — quantizing it degrades tool
calling.
- **Rebranding only** today (served as `maximo-helios-preview`). To make it truly
*yours*, LoRA-fine-tune Gemma 4 on the datasets in this repo
(`scripts/build_mytabulon_datasets.py`), convert to GGUF, and point
`MODEL_FILE` at the result.
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description="Download approved public datasets and sync to GCS.")
parser.add_argument("--config", type=Path, default=DEFAULT_CONFIG)
parser.add_argument("--only", action="append", default=[], help="Limit to one or more dataset slugs or IDs.")
parser.add_argument("--dry-run", action="store_true")
return parser.parse_args()
## Deploy
def join_routes(mount: str, child: str) -> str:
if child == "/":
return mount
return f"{mount.rstrip('/')}/{child.lstrip('/')}"
def build_tool_datasets(mytabulon_root: Path) -> tuple[list[dict[str, Any]], list[dict[str, Any]], list[dict[str, Any]]]:
index_path = mytabulon_root / "backend" / "src" / "index.ts"
specs: list[dict[str, Any]] = []
sft_rows: list[dict[str, Any]] = []
eval_rows: list[dict[str, Any]] = []
for mount in parse_route_mounts(index_path):
for method, child in parse_router_routes(mount.route_file):
path = join_routes(mount.mount, child)
name = tool_name(method, path)
schema = infer_properties(method, path)
spec = {
"name": name,
"description": infer_description(method, path),
"method": method,
"path_template": path,
"parameters": schema,
"source_file": str(mount.route_file),
"router": mount.router_name,
}
specs.append(spec)
args = tool_arguments(method, path)
tools = [
{
"type": "function",
"function": {
"name": name,
"description": spec["description"],
"parameters": schema,
},
}
]
sft_rows.append(
{
"id": f"tool_sft_{sha256_text(method + path)[:12]}",
"dataset": "mytabulon_tool_calling_sft",
"messages": [
{
"role": "system",
"content": (
"You are MaximoAI inside MyTabulon. Choose the narrowest safe "
"tool call for the user's business-management request. Do not "
"invent tools or secrets."
),
},
{"role": "user", "content": infer_user_prompt(method, path)},
{
"role": "assistant",
"content": "",
"tool_calls": [
{
"type": "function",
"function": {"name": name, "arguments": args},
}
],
},
],
"tools": tools,
"metadata": {
"method": method,
"path_template": path,
"source_file": str(mount.route_file),
"privacy": "source-derived-no-live-user-data",
},
}
)
if len(eval_rows) < 120:
eval_rows.append(
{
"id": f"tool_eval_{sha256_text(method + path)[:12]}",
"dataset": "mytabulon_tool_calling_eval",
"user": infer_user_prompt(method, path),
"tools": tools,
"expected_tool_name": name,
"expected_arguments_subset": {
param: args[param] for param in route_params(path) if param in args
},
"metadata": {"method": method, "path_template": path},
}
)
specs.sort(key=lambda row: (row["path_template"], row["method"]))
sft_rows.sort(key=lambda row: row["id"])
eval_rows.sort(key=lambda row: row["id"])
return specs, sft_rows, eval_rows
| File | Purpose |
|---|---|
| `Dockerfile` | Two-stage build: download GGUF from HF, bake into `llama.cpp:server` image |
| `cloudbuild.yaml` | In-cloud build (120 GB disk, 60-min timeout) |
| `../../configs/helios_preview.json` | Source-of-truth config (model, compute, auth) |
| `../../scripts/deploy_helios_preview.sh` | Idempotent deploy |
| `../../scripts/invoke_helios_preview.sh` | Smoke tests |
def _load_key() -> str:
global _key, _key_at
now = time.time()
if _key is not None and (now - _key_at) < 300:
return _key
with open(API_KEY_FILE, "r", encoding="utf-8") as fh:
_key = fh.read().strip()
_key_at = now
return _key
cmd="${1:-chat}"
case "${cmd}" in
key) key ;;
url) url ;;
models)
curl -sS --max-time 180 "$(url)/v1/models" \
-H "Authorization: Bearer $(key)" | python3 -m json.tool
;;
chat)
post_chat "$(build_chat_json chat "${2:-Say hello in exactly five words.}")"
;;
tools)
post_chat "$(build_chat_json tools "${2:-What is the weather in Lagos right now?}")"
;;
*)
echo "usage: $0 {key|url|models|chat \"prompt\"|tools \"prompt\"}" >&2
exit 1
;;
esac
```bash
bash scripts/sync_datasets_to_gcs.sh
```
stream = False
if body:
try:
stream = bool(json.loads(body).get("stream"))
except Exception:
stream = False
grant_api_to_vllm_invoker() {
log "Granting ${SERVICE_ACCOUNT_EMAIL} invoker on ${VLLM_SERVICE}…"
"${GCLOUD}" run services add-iam-policy-binding "${VLLM_SERVICE}" \
--project "${PROJECT}" \
--region "${REGION}" \
--member="serviceAccount:${SERVICE_ACCOUNT_EMAIL}" \
--role="roles/run.invoker" >/dev/null
}
MODEL_FILE="${MODEL_FILE:-Qwen3.5-2B-Q4_K_S.gguf}"
MMPROJ_FILE="${MMPROJ_FILE:-mmproj-BF16.gguf}"
SERVED_NAME="${SERVED_NAME:-maximo-helios-preview}"
CTX_SIZE="${CTX_SIZE:-262144}" # 256K = model's trained max (deploy passes this explicitly)
PARALLEL="${PARALLEL:-1}"
CACHE_TYPE_K="${CACHE_TYPE_K:-f16}" # f16 default. Set q8_0 (auto-enables flash-attn) to push toward 256K.
CACHE_TYPE_V="${CACHE_TYPE_V:-f16}"
THREADS="${THREADS:-8}"
THREADS_BATCH="${THREADS_BATCH:-8}"
EXTRA_ARGS="${EXTRA_ARGS:-}" # e.g. "--n-gpu-layers 99" for the GPU build
# Public Dataset Candidates
# L4 GPU instead (faster, ~40-50 tok/s; also scales to zero)
COMPUTE=gpu ./scripts/deploy_helios_preview.sh
data["messages"] = msgs
return json.dumps(data).encode("utf-8")
def sha256_text(value: str) -> str:
return hashlib.sha256(value.encode("utf-8")).hexdigest()
UPSTREAM = os.environ["UPSTREAM_URL"]
SECRET_RESOURCE = os.environ["SECRET_RESOURCE"]
HEADER = os.environ.get("AUTH_HEADER", "Authorization")
SCHEME = os.environ.get("AUTH_SCHEME", "Bearer")
def human_bytes(value: int) -> str:
size = float(value)
for unit in ["B", "KB", "MB", "GB", "TB"]:
if size < 1024 or unit == "TB":
return f"{size:.1f} {unit}"
size /= 1024
return f"{size:.1f} TB" |