splintr 0.16.1

Fast Rust tokenizer (BPE + SentencePiece + WordPiece) with Python bindings
Documentation
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
// =============================================================================
// AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
// Generated by: scripts/generate_agent_tokens.py --lang rust
// Source of truth: AGENT_TOKENS and MODELS in that script
// =============================================================================
//
// Compile-time agent-token ids, one module per bundled vocabulary.
// Whisper has no module: it carries no agent tokens.
//
// Included by agent_tokens.rs, which holds the tests for these ids.

/// Agent tokens for cl100k_base (GPT-4, GPT-3.5-turbo).
///
/// The 54-token block starts at 100277. Every id here is also reachable
/// at runtime as `from_pretrained("cl100k_base")?.special_token_id(name)`;
/// these constants are the compile-time form, so a typo is a compile
/// error rather than a `None` to unwrap.
pub mod cl100k_agent_tokens {
    // Conversation & Roles
    /// System role - system instructions
    pub const SYSTEM: u32 = 100277;
    /// User role - user input
    pub const USER: u32 = 100278;
    /// Assistant role - model output
    pub const ASSISTANT: u32 = 100279;
    /// Start of message - ChatML wrapper
    pub const IM_START: u32 = 100280;
    /// End of message - ChatML wrapper
    pub const IM_END: u32 = 100281;

    // Reasoning/Thinking
    /// Start of thinking - Chain-of-Thought
    pub const THINK: u32 = 100282;
    /// End of thinking
    pub const THINK_END: u32 = 100283;

    // ReAct Agent Loop
    /// Start of plan - action planning
    pub const PLAN: u32 = 100284;
    /// End of plan
    pub const PLAN_END: u32 = 100285;
    /// Start of step - individual action step
    pub const STEP: u32 = 100286;
    /// End of step
    pub const STEP_END: u32 = 100287;
    /// Start of action - agent action
    pub const ACT: u32 = 100288;
    /// End of action
    pub const ACT_END: u32 = 100289;
    /// Start of observation - environment feedback
    pub const OBSERVE: u32 = 100290;
    /// End of observation
    pub const OBSERVE_END: u32 = 100291;

    // Tool/Function Calling
    /// Start of function call - function invocation
    pub const FUNCTION: u32 = 100292;
    /// End of function call
    pub const FUNCTION_END: u32 = 100293;
    /// Start of function result - return value
    pub const RESULT: u32 = 100294;
    /// End of function result
    pub const RESULT_END: u32 = 100295;
    /// Start of error - error message
    pub const ERROR: u32 = 100296;
    /// End of error
    pub const ERROR_END: u32 = 100297;

    // Code Execution
    /// Start of code - inline code execution
    pub const CODE: u32 = 100298;
    /// End of code
    pub const CODE_END: u32 = 100299;
    /// Start of output - execution output
    pub const OUTPUT: u32 = 100300;
    /// End of output
    pub const OUTPUT_END: u32 = 100301;
    /// Start of language tag - code language
    pub const LANG: u32 = 100302;
    /// End of language tag
    pub const LANG_END: u32 = 100303;

    // RAG & Citations
    /// Start of context - retrieved context
    pub const CONTEXT: u32 = 100304;
    /// End of context
    pub const CONTEXT_END: u32 = 100305;
    /// Start of quote - exact citation
    pub const QUOTE: u32 = 100306;
    /// End of quote
    pub const QUOTE_END: u32 = 100307;
    /// Start of cite - citation reference
    pub const CITE: u32 = 100308;
    /// End of cite
    pub const CITE_END: u32 = 100309;
    /// Start of source - document source
    pub const SOURCE: u32 = 100310;
    /// End of source
    pub const SOURCE_END: u32 = 100311;

    // Memory/State Management
    /// Start of memory - persistent memory
    pub const MEMORY: u32 = 100312;
    /// End of memory
    pub const MEMORY_END: u32 = 100313;
    /// Start of recall - memory retrieval
    pub const RECALL: u32 = 100314;
    /// End of recall
    pub const RECALL_END: u32 = 100315;

    // Control Tokens
    /// Padding token
    pub const PAD: u32 = 100316;
    /// Stop generation token
    pub const STOP: u32 = 100317;
    /// Separator token
    pub const SEP: u32 = 100318;

    // Multimodal Placeholders
    /// Start of image - image placeholder
    pub const IMAGE: u32 = 100319;
    /// End of image
    pub const IMAGE_END: u32 = 100320;
    /// Start of audio - audio placeholder
    pub const AUDIO: u32 = 100321;
    /// End of audio
    pub const AUDIO_END: u32 = 100322;
    /// Start of video - video placeholder
    pub const VIDEO: u32 = 100323;
    /// End of video
    pub const VIDEO_END: u32 = 100324;

    // Document Structure
    /// Start of title - document/section title
    pub const TITLE: u32 = 100325;
    /// End of title
    pub const TITLE_END: u32 = 100326;
    /// Start of section - semantic document section
    pub const SECTION: u32 = 100327;
    /// End of section
    pub const SECTION_END: u32 = 100328;
    /// Start of summary - condensed content summary
    pub const SUMMARY: u32 = 100329;
    /// End of summary
    pub const SUMMARY_END: u32 = 100330;
}

/// Agent tokens for o200k_base (GPT-4o).
///
/// The 54-token block starts at 200019. Every id here is also reachable
/// at runtime as `from_pretrained("o200k_base")?.special_token_id(name)`;
/// these constants are the compile-time form, so a typo is a compile
/// error rather than a `None` to unwrap.
pub mod o200k_agent_tokens {
    // Conversation & Roles
    /// System role - system instructions
    pub const SYSTEM: u32 = 200019;
    /// User role - user input
    pub const USER: u32 = 200020;
    /// Assistant role - model output
    pub const ASSISTANT: u32 = 200021;
    /// Start of message - ChatML wrapper
    pub const IM_START: u32 = 200022;
    /// End of message - ChatML wrapper
    pub const IM_END: u32 = 200023;

    // Reasoning/Thinking
    /// Start of thinking - Chain-of-Thought
    pub const THINK: u32 = 200024;
    /// End of thinking
    pub const THINK_END: u32 = 200025;

    // ReAct Agent Loop
    /// Start of plan - action planning
    pub const PLAN: u32 = 200026;
    /// End of plan
    pub const PLAN_END: u32 = 200027;
    /// Start of step - individual action step
    pub const STEP: u32 = 200028;
    /// End of step
    pub const STEP_END: u32 = 200029;
    /// Start of action - agent action
    pub const ACT: u32 = 200030;
    /// End of action
    pub const ACT_END: u32 = 200031;
    /// Start of observation - environment feedback
    pub const OBSERVE: u32 = 200032;
    /// End of observation
    pub const OBSERVE_END: u32 = 200033;

    // Tool/Function Calling
    /// Start of function call - function invocation
    pub const FUNCTION: u32 = 200034;
    /// End of function call
    pub const FUNCTION_END: u32 = 200035;
    /// Start of function result - return value
    pub const RESULT: u32 = 200036;
    /// End of function result
    pub const RESULT_END: u32 = 200037;
    /// Start of error - error message
    pub const ERROR: u32 = 200038;
    /// End of error
    pub const ERROR_END: u32 = 200039;

    // Code Execution
    /// Start of code - inline code execution
    pub const CODE: u32 = 200040;
    /// End of code
    pub const CODE_END: u32 = 200041;
    /// Start of output - execution output
    pub const OUTPUT: u32 = 200042;
    /// End of output
    pub const OUTPUT_END: u32 = 200043;
    /// Start of language tag - code language
    pub const LANG: u32 = 200044;
    /// End of language tag
    pub const LANG_END: u32 = 200045;

    // RAG & Citations
    /// Start of context - retrieved context
    pub const CONTEXT: u32 = 200046;
    /// End of context
    pub const CONTEXT_END: u32 = 200047;
    /// Start of quote - exact citation
    pub const QUOTE: u32 = 200048;
    /// End of quote
    pub const QUOTE_END: u32 = 200049;
    /// Start of cite - citation reference
    pub const CITE: u32 = 200050;
    /// End of cite
    pub const CITE_END: u32 = 200051;
    /// Start of source - document source
    pub const SOURCE: u32 = 200052;
    /// End of source
    pub const SOURCE_END: u32 = 200053;

    // Memory/State Management
    /// Start of memory - persistent memory
    pub const MEMORY: u32 = 200054;
    /// End of memory
    pub const MEMORY_END: u32 = 200055;
    /// Start of recall - memory retrieval
    pub const RECALL: u32 = 200056;
    /// End of recall
    pub const RECALL_END: u32 = 200057;

    // Control Tokens
    /// Padding token
    pub const PAD: u32 = 200058;
    /// Stop generation token
    pub const STOP: u32 = 200059;
    /// Separator token
    pub const SEP: u32 = 200060;

    // Multimodal Placeholders
    /// Start of image - image placeholder
    pub const IMAGE: u32 = 200061;
    /// End of image
    pub const IMAGE_END: u32 = 200062;
    /// Start of audio - audio placeholder
    pub const AUDIO: u32 = 200063;
    /// End of audio
    pub const AUDIO_END: u32 = 200064;
    /// Start of video - video placeholder
    pub const VIDEO: u32 = 200065;
    /// End of video
    pub const VIDEO_END: u32 = 200066;

    // Document Structure
    /// Start of title - document/section title
    pub const TITLE: u32 = 200067;
    /// End of title
    pub const TITLE_END: u32 = 200068;
    /// Start of section - semantic document section
    pub const SECTION: u32 = 200069;
    /// End of section
    pub const SECTION_END: u32 = 200070;
    /// Start of summary - condensed content summary
    pub const SUMMARY: u32 = 200071;
    /// End of summary
    pub const SUMMARY_END: u32 = 200072;
}

/// Agent tokens for Llama 3 family.
///
/// The 54-token block starts at 128300. Every id here is also reachable
/// at runtime as `from_pretrained("llama3")?.special_token_id(name)`;
/// these constants are the compile-time form, so a typo is a compile
/// error rather than a `None` to unwrap.
///
/// Llama 3 family defines AUDIO, AUDIO_END, IMAGE, IMAGE_END, VIDEO, VIDEO_END itself, so those constants carry the
/// vocabulary's own id — below `base_vocab_size`, the id the checkpoint
/// was trained on — rather than a splintr-appended one.
///
/// The vocabulary's own markers are included too, so this module is its
/// whole special-token surface. A native name that would collide with
/// an agent token of the same meaning takes a `_NATIVE` suffix.
pub mod llama3_agent_tokens {
    // Vocabulary-native tokens
    /// Start of text marker
    pub const BEGIN_OF_TEXT: u32 = 128000;
    /// End of text marker
    pub const END_OF_TEXT: u32 = 128001;
    /// Padding token for fine-tuning - added in Llama 3.1
    pub const FINETUNE_RIGHT_PAD_ID: u32 = 128004;
    /// Step marker for reasoning - added in Llama 3.2-Vision
    pub const STEP_ID: u32 = 128005;
    /// Start of header marker
    pub const START_HEADER_ID: u32 = 128006;
    /// End of header marker
    pub const END_HEADER_ID: u32 = 128007;
    /// End of message marker for tool use - added in Llama 3.1
    pub const EOM_ID: u32 = 128008;
    /// End of turn marker
    pub const EOT_ID: u32 = 128009;
    /// Python code interpreter marker - added in Llama 3.1
    pub const PYTHON_TAG: u32 = 128010;
    /// Image placeholder - Llama 3.2-Vision official
    pub const IMAGE: u32 = 128256;
    /// End of image placeholder
    pub const IMAGE_END: u32 = 128257;
    /// Audio placeholder
    pub const AUDIO: u32 = 128258;
    /// End of audio placeholder
    pub const AUDIO_END: u32 = 128259;
    /// Video placeholder
    pub const VIDEO: u32 = 128260;
    /// End of video placeholder
    pub const VIDEO_END: u32 = 128261;

    // Conversation & Roles
    /// System role - system instructions
    pub const SYSTEM: u32 = 128300;
    /// User role - user input
    pub const USER: u32 = 128301;
    /// Assistant role - model output
    pub const ASSISTANT: u32 = 128302;
    /// Start of message - ChatML wrapper
    pub const IM_START: u32 = 128303;
    /// End of message - ChatML wrapper
    pub const IM_END: u32 = 128304;

    // Reasoning/Thinking
    /// Start of thinking - Chain-of-Thought
    pub const THINK: u32 = 128305;
    /// End of thinking
    pub const THINK_END: u32 = 128306;

    // ReAct Agent Loop
    /// Start of plan - action planning
    pub const PLAN: u32 = 128307;
    /// End of plan
    pub const PLAN_END: u32 = 128308;
    /// Start of step - individual action step
    pub const STEP: u32 = 128309;
    /// End of step
    pub const STEP_END: u32 = 128310;
    /// Start of action - agent action
    pub const ACT: u32 = 128311;
    /// End of action
    pub const ACT_END: u32 = 128312;
    /// Start of observation - environment feedback
    pub const OBSERVE: u32 = 128313;
    /// End of observation
    pub const OBSERVE_END: u32 = 128314;

    // Tool/Function Calling
    /// Start of function call - function invocation
    pub const FUNCTION: u32 = 128315;
    /// End of function call
    pub const FUNCTION_END: u32 = 128316;
    /// Start of function result - return value
    pub const RESULT: u32 = 128317;
    /// End of function result
    pub const RESULT_END: u32 = 128318;
    /// Start of error - error message
    pub const ERROR: u32 = 128319;
    /// End of error
    pub const ERROR_END: u32 = 128320;

    // Code Execution
    /// Start of code - inline code execution
    pub const CODE: u32 = 128321;
    /// End of code
    pub const CODE_END: u32 = 128322;
    /// Start of output - execution output
    pub const OUTPUT: u32 = 128323;
    /// End of output
    pub const OUTPUT_END: u32 = 128324;
    /// Start of language tag - code language
    pub const LANG: u32 = 128325;
    /// End of language tag
    pub const LANG_END: u32 = 128326;

    // RAG & Citations
    /// Start of context - retrieved context
    pub const CONTEXT: u32 = 128327;
    /// End of context
    pub const CONTEXT_END: u32 = 128328;
    /// Start of quote - exact citation
    pub const QUOTE: u32 = 128329;
    /// End of quote
    pub const QUOTE_END: u32 = 128330;
    /// Start of cite - citation reference
    pub const CITE: u32 = 128331;
    /// End of cite
    pub const CITE_END: u32 = 128332;
    /// Start of source - document source
    pub const SOURCE: u32 = 128333;
    /// End of source
    pub const SOURCE_END: u32 = 128334;

    // Memory/State Management
    /// Start of memory - persistent memory
    pub const MEMORY: u32 = 128335;
    /// End of memory
    pub const MEMORY_END: u32 = 128336;
    /// Start of recall - memory retrieval
    pub const RECALL: u32 = 128337;
    /// End of recall
    pub const RECALL_END: u32 = 128338;

    // Control Tokens
    /// Padding token
    pub const PAD: u32 = 128339;
    /// Stop generation token
    pub const STOP: u32 = 128340;
    /// Separator token
    pub const SEP: u32 = 128341;

    // Document Structure
    /// Start of title - document/section title
    pub const TITLE: u32 = 128348;
    /// End of title
    pub const TITLE_END: u32 = 128349;
    /// Start of section - semantic document section
    pub const SECTION: u32 = 128350;
    /// End of section
    pub const SECTION_END: u32 = 128351;
    /// Start of summary - condensed content summary
    pub const SUMMARY: u32 = 128352;
    /// End of summary
    pub const SUMMARY_END: u32 = 128353;
}

/// Agent tokens for DeepSeek V3/R1.
///
/// The 54-token block starts at 128900. Every id here is also reachable
/// at runtime as `from_pretrained("deepseek_v3")?.special_token_id(name)`;
/// these constants are the compile-time form, so a typo is a compile
/// error rather than a `None` to unwrap.
///
/// The vocabulary's own markers are included too, so this module is its
/// whole special-token surface. A native name that would collide with
/// an agent token of the same meaning takes a `_NATIVE` suffix.
pub mod deepseek_v3_agent_tokens {
    // Vocabulary-native tokens
    /// Begin of sentence marker
    pub const BEGIN_OF_SENTENCE: u32 = 0;
    /// End of sentence marker
    pub const END_OF_SENTENCE: u32 = 1;
    /// Native padding token
    pub const PAD_NATIVE: u32 = 2;
    /// Native `<think>` token
    pub const THINK_NATIVE: u32 = 128798;
    /// Native `</think>` token
    pub const THINK_END_NATIVE: u32 = 128799;
    /// Fill-in-the-Middle hole
    pub const FIM_HOLE: u32 = 128800;
    /// Fill-in-the-Middle begin
    pub const FIM_BEGIN: u32 = 128801;
    /// Fill-in-the-Middle end
    pub const FIM_END: u32 = 128802;
    /// Native `<|User|>` token
    pub const USER_NATIVE: u32 = 128803;
    /// Native `<|Assistant|>` token
    pub const ASSISTANT_NATIVE: u32 = 128804;
    /// End of turn `<|EOT|>`
    pub const EOT: u32 = 128805;
    /// Tool calls begin marker
    pub const TOOL_CALLS_BEGIN: u32 = 128806;
    /// Tool calls end marker
    pub const TOOL_CALLS_END: u32 = 128807;
    /// Single tool call begin
    pub const TOOL_CALL_BEGIN: u32 = 128808;
    /// Single tool call end
    pub const TOOL_CALL_END: u32 = 128809;
    /// Tool outputs begin marker
    pub const TOOL_OUTPUTS_BEGIN: u32 = 128810;
    /// Tool outputs end marker
    pub const TOOL_OUTPUTS_END: u32 = 128811;
    /// Single tool output begin
    pub const TOOL_OUTPUT_BEGIN: u32 = 128812;
    /// Single tool output end
    pub const TOOL_OUTPUT_END: u32 = 128813;
    /// Tool separator
    pub const TOOL_SEP: u32 = 128814;

    // Conversation & Roles
    /// System role - system instructions
    pub const SYSTEM: u32 = 128900;
    /// User role - user input
    pub const USER: u32 = 128901;
    /// Assistant role - model output
    pub const ASSISTANT: u32 = 128902;
    /// Start of message - ChatML wrapper
    pub const IM_START: u32 = 128903;
    /// End of message - ChatML wrapper
    pub const IM_END: u32 = 128904;

    // Reasoning/Thinking
    /// Start of thinking - Chain-of-Thought
    pub const THINK: u32 = 128905;
    /// End of thinking
    pub const THINK_END: u32 = 128906;

    // ReAct Agent Loop
    /// Start of plan - action planning
    pub const PLAN: u32 = 128907;
    /// End of plan
    pub const PLAN_END: u32 = 128908;
    /// Start of step - individual action step
    pub const STEP: u32 = 128909;
    /// End of step
    pub const STEP_END: u32 = 128910;
    /// Start of action - agent action
    pub const ACT: u32 = 128911;
    /// End of action
    pub const ACT_END: u32 = 128912;
    /// Start of observation - environment feedback
    pub const OBSERVE: u32 = 128913;
    /// End of observation
    pub const OBSERVE_END: u32 = 128914;

    // Tool/Function Calling
    /// Start of function call - function invocation
    pub const FUNCTION: u32 = 128915;
    /// End of function call
    pub const FUNCTION_END: u32 = 128916;
    /// Start of function result - return value
    pub const RESULT: u32 = 128917;
    /// End of function result
    pub const RESULT_END: u32 = 128918;
    /// Start of error - error message
    pub const ERROR: u32 = 128919;
    /// End of error
    pub const ERROR_END: u32 = 128920;

    // Code Execution
    /// Start of code - inline code execution
    pub const CODE: u32 = 128921;
    /// End of code
    pub const CODE_END: u32 = 128922;
    /// Start of output - execution output
    pub const OUTPUT: u32 = 128923;
    /// End of output
    pub const OUTPUT_END: u32 = 128924;
    /// Start of language tag - code language
    pub const LANG: u32 = 128925;
    /// End of language tag
    pub const LANG_END: u32 = 128926;

    // RAG & Citations
    /// Start of context - retrieved context
    pub const CONTEXT: u32 = 128927;
    /// End of context
    pub const CONTEXT_END: u32 = 128928;
    /// Start of quote - exact citation
    pub const QUOTE: u32 = 128929;
    /// End of quote
    pub const QUOTE_END: u32 = 128930;
    /// Start of cite - citation reference
    pub const CITE: u32 = 128931;
    /// End of cite
    pub const CITE_END: u32 = 128932;
    /// Start of source - document source
    pub const SOURCE: u32 = 128933;
    /// End of source
    pub const SOURCE_END: u32 = 128934;

    // Memory/State Management
    /// Start of memory - persistent memory
    pub const MEMORY: u32 = 128935;
    /// End of memory
    pub const MEMORY_END: u32 = 128936;
    /// Start of recall - memory retrieval
    pub const RECALL: u32 = 128937;
    /// End of recall
    pub const RECALL_END: u32 = 128938;

    // Control Tokens
    /// Padding token
    pub const PAD: u32 = 128939;
    /// Stop generation token
    pub const STOP: u32 = 128940;
    /// Separator token
    pub const SEP: u32 = 128941;

    // Multimodal Placeholders
    /// Start of image - image placeholder
    pub const IMAGE: u32 = 128942;
    /// End of image
    pub const IMAGE_END: u32 = 128943;
    /// Start of audio - audio placeholder
    pub const AUDIO: u32 = 128944;
    /// End of audio
    pub const AUDIO_END: u32 = 128945;
    /// Start of video - video placeholder
    pub const VIDEO: u32 = 128946;
    /// End of video
    pub const VIDEO_END: u32 = 128947;

    // Document Structure
    /// Start of title - document/section title
    pub const TITLE: u32 = 128948;
    /// End of title
    pub const TITLE_END: u32 = 128949;
    /// Start of section - semantic document section
    pub const SECTION: u32 = 128950;
    /// End of section
    pub const SECTION_END: u32 = 128951;
    /// Start of summary - condensed content summary
    pub const SUMMARY: u32 = 128952;
    /// End of summary
    pub const SUMMARY_END: u32 = 128953;
}

/// Agent tokens for Mistral V1 (7B v0.1/v0.2, Mixtral 8x7B).
///
/// The 54-token block starts at 32000. Every id here is also reachable
/// at runtime as `from_pretrained("mistral_v1")?.special_token_id(name)`;
/// these constants are the compile-time form, so a typo is a compile
/// error rather than a `None` to unwrap.
pub mod mistral_v1_agent_tokens {
    // Conversation & Roles
    /// System role - system instructions
    pub const SYSTEM: u32 = 32000;
    /// User role - user input
    pub const USER: u32 = 32001;
    /// Assistant role - model output
    pub const ASSISTANT: u32 = 32002;
    /// Start of message - ChatML wrapper
    pub const IM_START: u32 = 32003;
    /// End of message - ChatML wrapper
    pub const IM_END: u32 = 32004;

    // Reasoning/Thinking
    /// Start of thinking - Chain-of-Thought
    pub const THINK: u32 = 32005;
    /// End of thinking
    pub const THINK_END: u32 = 32006;

    // ReAct Agent Loop
    /// Start of plan - action planning
    pub const PLAN: u32 = 32007;
    /// End of plan
    pub const PLAN_END: u32 = 32008;
    /// Start of step - individual action step
    pub const STEP: u32 = 32009;
    /// End of step
    pub const STEP_END: u32 = 32010;
    /// Start of action - agent action
    pub const ACT: u32 = 32011;
    /// End of action
    pub const ACT_END: u32 = 32012;
    /// Start of observation - environment feedback
    pub const OBSERVE: u32 = 32013;
    /// End of observation
    pub const OBSERVE_END: u32 = 32014;

    // Tool/Function Calling
    /// Start of function call - function invocation
    pub const FUNCTION: u32 = 32015;
    /// End of function call
    pub const FUNCTION_END: u32 = 32016;
    /// Start of function result - return value
    pub const RESULT: u32 = 32017;
    /// End of function result
    pub const RESULT_END: u32 = 32018;
    /// Start of error - error message
    pub const ERROR: u32 = 32019;
    /// End of error
    pub const ERROR_END: u32 = 32020;

    // Code Execution
    /// Start of code - inline code execution
    pub const CODE: u32 = 32021;
    /// End of code
    pub const CODE_END: u32 = 32022;
    /// Start of output - execution output
    pub const OUTPUT: u32 = 32023;
    /// End of output
    pub const OUTPUT_END: u32 = 32024;
    /// Start of language tag - code language
    pub const LANG: u32 = 32025;
    /// End of language tag
    pub const LANG_END: u32 = 32026;

    // RAG & Citations
    /// Start of context - retrieved context
    pub const CONTEXT: u32 = 32027;
    /// End of context
    pub const CONTEXT_END: u32 = 32028;
    /// Start of quote - exact citation
    pub const QUOTE: u32 = 32029;
    /// End of quote
    pub const QUOTE_END: u32 = 32030;
    /// Start of cite - citation reference
    pub const CITE: u32 = 32031;
    /// End of cite
    pub const CITE_END: u32 = 32032;
    /// Start of source - document source
    pub const SOURCE: u32 = 32033;
    /// End of source
    pub const SOURCE_END: u32 = 32034;

    // Memory/State Management
    /// Start of memory - persistent memory
    pub const MEMORY: u32 = 32035;
    /// End of memory
    pub const MEMORY_END: u32 = 32036;
    /// Start of recall - memory retrieval
    pub const RECALL: u32 = 32037;
    /// End of recall
    pub const RECALL_END: u32 = 32038;

    // Control Tokens
    /// Padding token
    pub const PAD: u32 = 32039;
    /// Stop generation token
    pub const STOP: u32 = 32040;
    /// Separator token
    pub const SEP: u32 = 32041;

    // Multimodal Placeholders
    /// Start of image - image placeholder
    pub const IMAGE: u32 = 32042;
    /// End of image
    pub const IMAGE_END: u32 = 32043;
    /// Start of audio - audio placeholder
    pub const AUDIO: u32 = 32044;
    /// End of audio
    pub const AUDIO_END: u32 = 32045;
    /// Start of video - video placeholder
    pub const VIDEO: u32 = 32046;
    /// End of video
    pub const VIDEO_END: u32 = 32047;

    // Document Structure
    /// Start of title - document/section title
    pub const TITLE: u32 = 32048;
    /// End of title
    pub const TITLE_END: u32 = 32049;
    /// Start of section - semantic document section
    pub const SECTION: u32 = 32050;
    /// End of section
    pub const SECTION_END: u32 = 32051;
    /// Start of summary - condensed content summary
    pub const SUMMARY: u32 = 32052;
    /// End of summary
    pub const SUMMARY_END: u32 = 32053;
}

/// Agent tokens for Mistral V2 (7B v0.3, Mixtral 8x22B, Codestral).
///
/// The 54-token block starts at 32768. Every id here is also reachable
/// at runtime as `from_pretrained("mistral_v2")?.special_token_id(name)`;
/// these constants are the compile-time form, so a typo is a compile
/// error rather than a `None` to unwrap.
pub mod mistral_v2_agent_tokens {
    // Conversation & Roles
    /// System role - system instructions
    pub const SYSTEM: u32 = 32768;
    /// User role - user input
    pub const USER: u32 = 32769;
    /// Assistant role - model output
    pub const ASSISTANT: u32 = 32770;
    /// Start of message - ChatML wrapper
    pub const IM_START: u32 = 32771;
    /// End of message - ChatML wrapper
    pub const IM_END: u32 = 32772;

    // Reasoning/Thinking
    /// Start of thinking - Chain-of-Thought
    pub const THINK: u32 = 32773;
    /// End of thinking
    pub const THINK_END: u32 = 32774;

    // ReAct Agent Loop
    /// Start of plan - action planning
    pub const PLAN: u32 = 32775;
    /// End of plan
    pub const PLAN_END: u32 = 32776;
    /// Start of step - individual action step
    pub const STEP: u32 = 32777;
    /// End of step
    pub const STEP_END: u32 = 32778;
    /// Start of action - agent action
    pub const ACT: u32 = 32779;
    /// End of action
    pub const ACT_END: u32 = 32780;
    /// Start of observation - environment feedback
    pub const OBSERVE: u32 = 32781;
    /// End of observation
    pub const OBSERVE_END: u32 = 32782;

    // Tool/Function Calling
    /// Start of function call - function invocation
    pub const FUNCTION: u32 = 32783;
    /// End of function call
    pub const FUNCTION_END: u32 = 32784;
    /// Start of function result - return value
    pub const RESULT: u32 = 32785;
    /// End of function result
    pub const RESULT_END: u32 = 32786;
    /// Start of error - error message
    pub const ERROR: u32 = 32787;
    /// End of error
    pub const ERROR_END: u32 = 32788;

    // Code Execution
    /// Start of code - inline code execution
    pub const CODE: u32 = 32789;
    /// End of code
    pub const CODE_END: u32 = 32790;
    /// Start of output - execution output
    pub const OUTPUT: u32 = 32791;
    /// End of output
    pub const OUTPUT_END: u32 = 32792;
    /// Start of language tag - code language
    pub const LANG: u32 = 32793;
    /// End of language tag
    pub const LANG_END: u32 = 32794;

    // RAG & Citations
    /// Start of context - retrieved context
    pub const CONTEXT: u32 = 32795;
    /// End of context
    pub const CONTEXT_END: u32 = 32796;
    /// Start of quote - exact citation
    pub const QUOTE: u32 = 32797;
    /// End of quote
    pub const QUOTE_END: u32 = 32798;
    /// Start of cite - citation reference
    pub const CITE: u32 = 32799;
    /// End of cite
    pub const CITE_END: u32 = 32800;
    /// Start of source - document source
    pub const SOURCE: u32 = 32801;
    /// End of source
    pub const SOURCE_END: u32 = 32802;

    // Memory/State Management
    /// Start of memory - persistent memory
    pub const MEMORY: u32 = 32803;
    /// End of memory
    pub const MEMORY_END: u32 = 32804;
    /// Start of recall - memory retrieval
    pub const RECALL: u32 = 32805;
    /// End of recall
    pub const RECALL_END: u32 = 32806;

    // Control Tokens
    /// Padding token
    pub const PAD: u32 = 32807;
    /// Stop generation token
    pub const STOP: u32 = 32808;
    /// Separator token
    pub const SEP: u32 = 32809;

    // Multimodal Placeholders
    /// Start of image - image placeholder
    pub const IMAGE: u32 = 32810;
    /// End of image
    pub const IMAGE_END: u32 = 32811;
    /// Start of audio - audio placeholder
    pub const AUDIO: u32 = 32812;
    /// End of audio
    pub const AUDIO_END: u32 = 32813;
    /// Start of video - video placeholder
    pub const VIDEO: u32 = 32814;
    /// End of video
    pub const VIDEO_END: u32 = 32815;

    // Document Structure
    /// Start of title - document/section title
    pub const TITLE: u32 = 32816;
    /// End of title
    pub const TITLE_END: u32 = 32817;
    /// Start of section - semantic document section
    pub const SECTION: u32 = 32818;
    /// End of section
    pub const SECTION_END: u32 = 32819;
    /// Start of summary - condensed content summary
    pub const SUMMARY: u32 = 32820;
    /// End of summary
    pub const SUMMARY_END: u32 = 32821;
}

/// Agent tokens for Mistral V3/Tekken (NeMo, Large 2, Pixtral).
///
/// The 54-token block starts at 131072. Every id here is also reachable
/// at runtime as `from_pretrained("mistral_v3")?.special_token_id(name)`;
/// these constants are the compile-time form, so a typo is a compile
/// error rather than a `None` to unwrap.
///
/// The vocabulary's own markers are included too, so this module is its
/// whole special-token surface. A native name that would collide with
/// an agent token of the same meaning takes a `_NATIVE` suffix.
pub mod mistral_v3_agent_tokens {
    // Vocabulary-native tokens
    /// `[INST]` instruction begin
    pub const INST: u32 = 3;
    /// `[/INST]` instruction end
    pub const INST_END: u32 = 4;
    /// `[AVAILABLE_TOOLS]` tool list begin
    pub const AVAILABLE_TOOLS: u32 = 5;
    /// `[/AVAILABLE_TOOLS]` tool list end
    pub const AVAILABLE_TOOLS_END: u32 = 6;
    /// `[TOOL_RESULTS]` tool results begin
    pub const TOOL_RESULTS: u32 = 7;
    /// `[/TOOL_RESULTS]` tool results end
    pub const TOOL_RESULTS_END: u32 = 8;
    /// `[TOOL_CALLS]` tool calls marker
    pub const TOOL_CALLS: u32 = 9;

    // Conversation & Roles
    /// System role - system instructions
    pub const SYSTEM: u32 = 131072;
    /// User role - user input
    pub const USER: u32 = 131073;
    /// Assistant role - model output
    pub const ASSISTANT: u32 = 131074;
    /// Start of message - ChatML wrapper
    pub const IM_START: u32 = 131075;
    /// End of message - ChatML wrapper
    pub const IM_END: u32 = 131076;

    // Reasoning/Thinking
    /// Start of thinking - Chain-of-Thought
    pub const THINK: u32 = 131077;
    /// End of thinking
    pub const THINK_END: u32 = 131078;

    // ReAct Agent Loop
    /// Start of plan - action planning
    pub const PLAN: u32 = 131079;
    /// End of plan
    pub const PLAN_END: u32 = 131080;
    /// Start of step - individual action step
    pub const STEP: u32 = 131081;
    /// End of step
    pub const STEP_END: u32 = 131082;
    /// Start of action - agent action
    pub const ACT: u32 = 131083;
    /// End of action
    pub const ACT_END: u32 = 131084;
    /// Start of observation - environment feedback
    pub const OBSERVE: u32 = 131085;
    /// End of observation
    pub const OBSERVE_END: u32 = 131086;

    // Tool/Function Calling
    /// Start of function call - function invocation
    pub const FUNCTION: u32 = 131087;
    /// End of function call
    pub const FUNCTION_END: u32 = 131088;
    /// Start of function result - return value
    pub const RESULT: u32 = 131089;
    /// End of function result
    pub const RESULT_END: u32 = 131090;
    /// Start of error - error message
    pub const ERROR: u32 = 131091;
    /// End of error
    pub const ERROR_END: u32 = 131092;

    // Code Execution
    /// Start of code - inline code execution
    pub const CODE: u32 = 131093;
    /// End of code
    pub const CODE_END: u32 = 131094;
    /// Start of output - execution output
    pub const OUTPUT: u32 = 131095;
    /// End of output
    pub const OUTPUT_END: u32 = 131096;
    /// Start of language tag - code language
    pub const LANG: u32 = 131097;
    /// End of language tag
    pub const LANG_END: u32 = 131098;

    // RAG & Citations
    /// Start of context - retrieved context
    pub const CONTEXT: u32 = 131099;
    /// End of context
    pub const CONTEXT_END: u32 = 131100;
    /// Start of quote - exact citation
    pub const QUOTE: u32 = 131101;
    /// End of quote
    pub const QUOTE_END: u32 = 131102;
    /// Start of cite - citation reference
    pub const CITE: u32 = 131103;
    /// End of cite
    pub const CITE_END: u32 = 131104;
    /// Start of source - document source
    pub const SOURCE: u32 = 131105;
    /// End of source
    pub const SOURCE_END: u32 = 131106;

    // Memory/State Management
    /// Start of memory - persistent memory
    pub const MEMORY: u32 = 131107;
    /// End of memory
    pub const MEMORY_END: u32 = 131108;
    /// Start of recall - memory retrieval
    pub const RECALL: u32 = 131109;
    /// End of recall
    pub const RECALL_END: u32 = 131110;

    // Control Tokens
    /// Padding token
    pub const PAD: u32 = 131111;
    /// Stop generation token
    pub const STOP: u32 = 131112;
    /// Separator token
    pub const SEP: u32 = 131113;

    // Multimodal Placeholders
    /// Start of image - image placeholder
    pub const IMAGE: u32 = 131114;
    /// End of image
    pub const IMAGE_END: u32 = 131115;
    /// Start of audio - audio placeholder
    pub const AUDIO: u32 = 131116;
    /// End of audio
    pub const AUDIO_END: u32 = 131117;
    /// Start of video - video placeholder
    pub const VIDEO: u32 = 131118;
    /// End of video
    pub const VIDEO_END: u32 = 131119;

    // Document Structure
    /// Start of title - document/section title
    pub const TITLE: u32 = 131120;
    /// End of title
    pub const TITLE_END: u32 = 131121;
    /// Start of section - semantic document section
    pub const SECTION: u32 = 131122;
    /// End of section
    pub const SECTION_END: u32 = 131123;
    /// Start of summary - condensed content summary
    pub const SUMMARY: u32 = 131124;
    /// End of summary
    pub const SUMMARY_END: u32 = 131125;
}

/// Agent tokens for Qwen 2/3 (also Baichuan-M2).
///
/// The 54-token block starts at 151669. Every id here is also reachable
/// at runtime as `from_pretrained("qwen3")?.special_token_id(name)`;
/// these constants are the compile-time form, so a typo is a compile
/// error rather than a `None` to unwrap.
///
/// Qwen 2/3 (also Baichuan-M2) defines IM_END, IM_START itself, so those constants carry the
/// vocabulary's own id — below `base_vocab_size`, the id the checkpoint
/// was trained on — rather than a splintr-appended one.
///
/// The vocabulary's own markers are included too, so this module is its
/// whole special-token surface. A native name that would collide with
/// an agent token of the same meaning takes a `_NATIVE` suffix.
pub mod qwen3_agent_tokens {
    // Vocabulary-native tokens
    /// End of text marker
    pub const ENDOFTEXT: u32 = 151643;
    /// Native `<|im_start|>` - ChatML message start
    pub const IM_START: u32 = 151644;
    /// Native `<|im_end|>` - ChatML message end
    pub const IM_END: u32 = 151645;
    /// Object reference begin
    pub const OBJECT_REF_START: u32 = 151646;
    /// Object reference end
    pub const OBJECT_REF_END: u32 = 151647;
    /// Bounding box begin
    pub const BOX_START: u32 = 151648;
    /// Bounding box end
    pub const BOX_END: u32 = 151649;
    /// Quadrilateral begin
    pub const QUAD_START: u32 = 151650;
    /// Quadrilateral end
    pub const QUAD_END: u32 = 151651;
    /// Vision block begin
    pub const VISION_START: u32 = 151652;
    /// Vision block end
    pub const VISION_END: u32 = 151653;
    /// Vision padding
    pub const VISION_PAD: u32 = 151654;
    /// Image padding
    pub const IMAGE_PAD: u32 = 151655;
    /// Video padding
    pub const VIDEO_PAD: u32 = 151656;
    /// Native `<tool_call>`
    pub const TOOL_CALL: u32 = 151657;
    /// Native `</tool_call>`
    pub const TOOL_CALL_END: u32 = 151658;
    /// Fill-in-the-Middle prefix
    pub const FIM_PREFIX: u32 = 151659;
    /// Fill-in-the-Middle middle
    pub const FIM_MIDDLE: u32 = 151660;
    /// Fill-in-the-Middle suffix
    pub const FIM_SUFFIX: u32 = 151661;
    /// Fill-in-the-Middle padding
    pub const FIM_PAD: u32 = 151662;
    /// Repository name marker
    pub const REPO_NAME: u32 = 151663;
    /// File separator
    pub const FILE_SEP: u32 = 151664;
    /// Native `<tool_response>`
    pub const TOOL_RESPONSE: u32 = 151665;
    /// Native `</tool_response>`
    pub const TOOL_RESPONSE_END: u32 = 151666;
    /// Native `<think>` token
    pub const THINK_NATIVE: u32 = 151667;
    /// Native `</think>` token
    pub const THINK_END_NATIVE: u32 = 151668;

    // Conversation & Roles
    /// System role - system instructions
    pub const SYSTEM: u32 = 151669;
    /// User role - user input
    pub const USER: u32 = 151670;
    /// Assistant role - model output
    pub const ASSISTANT: u32 = 151671;

    // Reasoning/Thinking
    /// Start of thinking - Chain-of-Thought
    pub const THINK: u32 = 151674;
    /// End of thinking
    pub const THINK_END: u32 = 151675;

    // ReAct Agent Loop
    /// Start of plan - action planning
    pub const PLAN: u32 = 151676;
    /// End of plan
    pub const PLAN_END: u32 = 151677;
    /// Start of step - individual action step
    pub const STEP: u32 = 151678;
    /// End of step
    pub const STEP_END: u32 = 151679;
    /// Start of action - agent action
    pub const ACT: u32 = 151680;
    /// End of action
    pub const ACT_END: u32 = 151681;
    /// Start of observation - environment feedback
    pub const OBSERVE: u32 = 151682;
    /// End of observation
    pub const OBSERVE_END: u32 = 151683;

    // Tool/Function Calling
    /// Start of function call - function invocation
    pub const FUNCTION: u32 = 151684;
    /// End of function call
    pub const FUNCTION_END: u32 = 151685;
    /// Start of function result - return value
    pub const RESULT: u32 = 151686;
    /// End of function result
    pub const RESULT_END: u32 = 151687;
    /// Start of error - error message
    pub const ERROR: u32 = 151688;
    /// End of error
    pub const ERROR_END: u32 = 151689;

    // Code Execution
    /// Start of code - inline code execution
    pub const CODE: u32 = 151690;
    /// End of code
    pub const CODE_END: u32 = 151691;
    /// Start of output - execution output
    pub const OUTPUT: u32 = 151692;
    /// End of output
    pub const OUTPUT_END: u32 = 151693;
    /// Start of language tag - code language
    pub const LANG: u32 = 151694;
    /// End of language tag
    pub const LANG_END: u32 = 151695;

    // RAG & Citations
    /// Start of context - retrieved context
    pub const CONTEXT: u32 = 151696;
    /// End of context
    pub const CONTEXT_END: u32 = 151697;
    /// Start of quote - exact citation
    pub const QUOTE: u32 = 151698;
    /// End of quote
    pub const QUOTE_END: u32 = 151699;
    /// Start of cite - citation reference
    pub const CITE: u32 = 151700;
    /// End of cite
    pub const CITE_END: u32 = 151701;
    /// Start of source - document source
    pub const SOURCE: u32 = 151702;
    /// End of source
    pub const SOURCE_END: u32 = 151703;

    // Memory/State Management
    /// Start of memory - persistent memory
    pub const MEMORY: u32 = 151704;
    /// End of memory
    pub const MEMORY_END: u32 = 151705;
    /// Start of recall - memory retrieval
    pub const RECALL: u32 = 151706;
    /// End of recall
    pub const RECALL_END: u32 = 151707;

    // Control Tokens
    /// Padding token
    pub const PAD: u32 = 151708;
    /// Stop generation token
    pub const STOP: u32 = 151709;
    /// Separator token
    pub const SEP: u32 = 151710;

    // Multimodal Placeholders
    /// Start of image - image placeholder
    pub const IMAGE: u32 = 151711;
    /// End of image
    pub const IMAGE_END: u32 = 151712;
    /// Start of audio - audio placeholder
    pub const AUDIO: u32 = 151713;
    /// End of audio
    pub const AUDIO_END: u32 = 151714;
    /// Start of video - video placeholder
    pub const VIDEO: u32 = 151715;
    /// End of video
    pub const VIDEO_END: u32 = 151716;

    // Document Structure
    /// Start of title - document/section title
    pub const TITLE: u32 = 151717;
    /// End of title
    pub const TITLE_END: u32 = 151718;
    /// Start of section - semantic document section
    pub const SECTION: u32 = 151719;
    /// End of section
    pub const SECTION_END: u32 = 151720;
    /// Start of summary - condensed content summary
    pub const SUMMARY: u32 = 151721;
    /// End of summary
    pub const SUMMARY_END: u32 = 151722;
}

/// Agent tokens for GLM-4/4.5.
///
/// The 54-token block starts at 151365. Every id here is also reachable
/// at runtime as `from_pretrained("glm4")?.special_token_id(name)`;
/// these constants are the compile-time form, so a typo is a compile
/// error rather than a `None` to unwrap.
///
/// GLM-4/4.5 defines ASSISTANT, IMAGE, SYSTEM, USER, VIDEO itself, so those constants carry the
/// vocabulary's own id — below `base_vocab_size`, the id the checkpoint
/// was trained on — rather than a splintr-appended one.
///
/// The vocabulary's own markers are included too, so this module is its
/// whole special-token surface. A native name that would collide with
/// an agent token of the same meaning takes a `_NATIVE` suffix.
pub mod glm4_agent_tokens {
    // Vocabulary-native tokens
    /// End of text marker
    pub const ENDOFTEXT: u32 = 151329;
    /// `[MASK]`
    pub const MASK: u32 = 151330;
    /// `[gMASK]`
    pub const GMASK: u32 = 151331;
    /// `[sMASK]`
    pub const SMASK: u32 = 151332;
    /// Start of prefix `<sop>`
    pub const SOP: u32 = 151333;
    /// End of prefix `<eop>`
    pub const EOP: u32 = 151334;
    /// Native `<|system|>` role marker
    pub const SYSTEM: u32 = 151335;
    /// Native `<|user|>` role marker
    pub const USER: u32 = 151336;
    /// Native `<|assistant|>` role marker
    pub const ASSISTANT: u32 = 151337;
    /// Observation role marker
    pub const OBSERVATION: u32 = 151338;
    /// Image block begin
    pub const BEGIN_OF_IMAGE: u32 = 151339;
    /// Image block end
    pub const END_OF_IMAGE: u32 = 151340;
    /// Video block begin
    pub const BEGIN_OF_VIDEO: u32 = 151341;
    /// Video block end
    pub const END_OF_VIDEO: u32 = 151342;
    /// Audio block begin
    pub const BEGIN_OF_AUDIO: u32 = 151343;
    /// Audio block end
    pub const END_OF_AUDIO: u32 = 151344;
    /// Transcription begin
    pub const BEGIN_OF_TRANSCRIPTION: u32 = 151345;
    /// Transcription end
    pub const END_OF_TRANSCRIPTION: u32 = 151346;
    /// Code Fill-in-the-Middle prefix
    pub const CODE_PREFIX: u32 = 151347;
    /// Code Fill-in-the-Middle middle
    pub const CODE_MIDDLE: u32 = 151348;
    /// Code Fill-in-the-Middle suffix
    pub const CODE_SUFFIX: u32 = 151349;
    /// Native `<think>` token
    pub const THINK_NATIVE: u32 = 151350;
    /// Native `</think>` token
    pub const THINK_END_NATIVE: u32 = 151351;
    /// Native `<tool_call>`
    pub const TOOL_CALL: u32 = 151352;
    /// Native `</tool_call>`
    pub const TOOL_CALL_END: u32 = 151353;
    /// Native `<tool_response>`
    pub const TOOL_RESPONSE: u32 = 151354;
    /// Native `</tool_response>`
    pub const TOOL_RESPONSE_END: u32 = 151355;
    /// Tool argument key begin
    pub const ARG_KEY: u32 = 151356;
    /// Tool argument key end
    pub const ARG_KEY_END: u32 = 151357;
    /// Tool argument value begin
    pub const ARG_VALUE: u32 = 151358;
    /// Tool argument value end
    pub const ARG_VALUE_END: u32 = 151359;
    /// /nothink directive
    pub const NOTHINK: u32 = 151360;
    /// Box begin
    pub const BEGIN_OF_BOX: u32 = 151361;
    /// Box end
    pub const END_OF_BOX: u32 = 151362;
    /// Native `<|image|>` placeholder
    pub const IMAGE: u32 = 151363;
    /// Native `<|video|>` placeholder
    pub const VIDEO: u32 = 151364;

    // Conversation & Roles
    /// Start of message - ChatML wrapper
    pub const IM_START: u32 = 151368;
    /// End of message - ChatML wrapper
    pub const IM_END: u32 = 151369;

    // Reasoning/Thinking
    /// Start of thinking - Chain-of-Thought
    pub const THINK: u32 = 151370;
    /// End of thinking
    pub const THINK_END: u32 = 151371;

    // ReAct Agent Loop
    /// Start of plan - action planning
    pub const PLAN: u32 = 151372;
    /// End of plan
    pub const PLAN_END: u32 = 151373;
    /// Start of step - individual action step
    pub const STEP: u32 = 151374;
    /// End of step
    pub const STEP_END: u32 = 151375;
    /// Start of action - agent action
    pub const ACT: u32 = 151376;
    /// End of action
    pub const ACT_END: u32 = 151377;
    /// Start of observation - environment feedback
    pub const OBSERVE: u32 = 151378;
    /// End of observation
    pub const OBSERVE_END: u32 = 151379;

    // Tool/Function Calling
    /// Start of function call - function invocation
    pub const FUNCTION: u32 = 151380;
    /// End of function call
    pub const FUNCTION_END: u32 = 151381;
    /// Start of function result - return value
    pub const RESULT: u32 = 151382;
    /// End of function result
    pub const RESULT_END: u32 = 151383;
    /// Start of error - error message
    pub const ERROR: u32 = 151384;
    /// End of error
    pub const ERROR_END: u32 = 151385;

    // Code Execution
    /// Start of code - inline code execution
    pub const CODE: u32 = 151386;
    /// End of code
    pub const CODE_END: u32 = 151387;
    /// Start of output - execution output
    pub const OUTPUT: u32 = 151388;
    /// End of output
    pub const OUTPUT_END: u32 = 151389;
    /// Start of language tag - code language
    pub const LANG: u32 = 151390;
    /// End of language tag
    pub const LANG_END: u32 = 151391;

    // RAG & Citations
    /// Start of context - retrieved context
    pub const CONTEXT: u32 = 151392;
    /// End of context
    pub const CONTEXT_END: u32 = 151393;
    /// Start of quote - exact citation
    pub const QUOTE: u32 = 151394;
    /// End of quote
    pub const QUOTE_END: u32 = 151395;
    /// Start of cite - citation reference
    pub const CITE: u32 = 151396;
    /// End of cite
    pub const CITE_END: u32 = 151397;
    /// Start of source - document source
    pub const SOURCE: u32 = 151398;
    /// End of source
    pub const SOURCE_END: u32 = 151399;

    // Memory/State Management
    /// Start of memory - persistent memory
    pub const MEMORY: u32 = 151400;
    /// End of memory
    pub const MEMORY_END: u32 = 151401;
    /// Start of recall - memory retrieval
    pub const RECALL: u32 = 151402;
    /// End of recall
    pub const RECALL_END: u32 = 151403;

    // Control Tokens
    /// Padding token
    pub const PAD: u32 = 151404;
    /// Stop generation token
    pub const STOP: u32 = 151405;
    /// Separator token
    pub const SEP: u32 = 151406;

    // Multimodal Placeholders
    /// End of image
    pub const IMAGE_END: u32 = 151408;
    /// Start of audio - audio placeholder
    pub const AUDIO: u32 = 151409;
    /// End of audio
    pub const AUDIO_END: u32 = 151410;
    /// End of video
    pub const VIDEO_END: u32 = 151412;

    // Document Structure
    /// Start of title - document/section title
    pub const TITLE: u32 = 151413;
    /// End of title
    pub const TITLE_END: u32 = 151414;
    /// Start of section - semantic document section
    pub const SECTION: u32 = 151415;
    /// End of section
    pub const SECTION_END: u32 = 151416;
    /// Start of summary - condensed content summary
    pub const SUMMARY: u32 = 151417;
    /// End of summary
    pub const SUMMARY_END: u32 = 151418;
}

/// Agent tokens for OpenAI gpt-oss.
///
/// The 54-token block starts at 200019. Every id here is also reachable
/// at runtime as `from_pretrained("gpt-oss")?.special_token_id(name)`;
/// these constants are the compile-time form, so a typo is a compile
/// error rather than a `None` to unwrap.
///
/// The vocabulary's own markers are included too, so this module is its
/// whole special-token surface. A native name that would collide with
/// an agent token of the same meaning takes a `_NATIVE` suffix.
pub mod gpt_oss_agent_tokens {
    // Vocabulary-native tokens
    /// Start of text marker
    pub const STARTOFTEXT: u32 = 199998;
    /// End of text marker
    pub const ENDOFTEXT: u32 = 199999;
    /// End of a final assistant turn
    pub const RETURN: u32 = 200002;
    /// Constrained-output marker
    pub const CONSTRAIN: u32 = 200003;
    /// Channel marker (analysis/commentary/final)
    pub const CHANNEL: u32 = 200005;
    /// Message start
    pub const START: u32 = 200006;
    /// Message end
    pub const END: u32 = 200007;
    /// Message body begin
    pub const MESSAGE: u32 = 200008;
    /// Tool call marker
    pub const CALL: u32 = 200012;
    /// End of prompt
    pub const ENDOFPROMPT: u32 = 200018;

    // Conversation & Roles
    /// System role - system instructions
    pub const SYSTEM: u32 = 200019;
    /// User role - user input
    pub const USER: u32 = 200020;
    /// Assistant role - model output
    pub const ASSISTANT: u32 = 200021;
    /// Start of message - ChatML wrapper
    pub const IM_START: u32 = 200022;
    /// End of message - ChatML wrapper
    pub const IM_END: u32 = 200023;

    // Reasoning/Thinking
    /// Start of thinking - Chain-of-Thought
    pub const THINK: u32 = 200024;
    /// End of thinking
    pub const THINK_END: u32 = 200025;

    // ReAct Agent Loop
    /// Start of plan - action planning
    pub const PLAN: u32 = 200026;
    /// End of plan
    pub const PLAN_END: u32 = 200027;
    /// Start of step - individual action step
    pub const STEP: u32 = 200028;
    /// End of step
    pub const STEP_END: u32 = 200029;
    /// Start of action - agent action
    pub const ACT: u32 = 200030;
    /// End of action
    pub const ACT_END: u32 = 200031;
    /// Start of observation - environment feedback
    pub const OBSERVE: u32 = 200032;
    /// End of observation
    pub const OBSERVE_END: u32 = 200033;

    // Tool/Function Calling
    /// Start of function call - function invocation
    pub const FUNCTION: u32 = 200034;
    /// End of function call
    pub const FUNCTION_END: u32 = 200035;
    /// Start of function result - return value
    pub const RESULT: u32 = 200036;
    /// End of function result
    pub const RESULT_END: u32 = 200037;
    /// Start of error - error message
    pub const ERROR: u32 = 200038;
    /// End of error
    pub const ERROR_END: u32 = 200039;

    // Code Execution
    /// Start of code - inline code execution
    pub const CODE: u32 = 200040;
    /// End of code
    pub const CODE_END: u32 = 200041;
    /// Start of output - execution output
    pub const OUTPUT: u32 = 200042;
    /// End of output
    pub const OUTPUT_END: u32 = 200043;
    /// Start of language tag - code language
    pub const LANG: u32 = 200044;
    /// End of language tag
    pub const LANG_END: u32 = 200045;

    // RAG & Citations
    /// Start of context - retrieved context
    pub const CONTEXT: u32 = 200046;
    /// End of context
    pub const CONTEXT_END: u32 = 200047;
    /// Start of quote - exact citation
    pub const QUOTE: u32 = 200048;
    /// End of quote
    pub const QUOTE_END: u32 = 200049;
    /// Start of cite - citation reference
    pub const CITE: u32 = 200050;
    /// End of cite
    pub const CITE_END: u32 = 200051;
    /// Start of source - document source
    pub const SOURCE: u32 = 200052;
    /// End of source
    pub const SOURCE_END: u32 = 200053;

    // Memory/State Management
    /// Start of memory - persistent memory
    pub const MEMORY: u32 = 200054;
    /// End of memory
    pub const MEMORY_END: u32 = 200055;
    /// Start of recall - memory retrieval
    pub const RECALL: u32 = 200056;
    /// End of recall
    pub const RECALL_END: u32 = 200057;

    // Control Tokens
    /// Padding token
    pub const PAD: u32 = 200058;
    /// Stop generation token
    pub const STOP: u32 = 200059;
    /// Separator token
    pub const SEP: u32 = 200060;

    // Multimodal Placeholders
    /// Start of image - image placeholder
    pub const IMAGE: u32 = 200061;
    /// End of image
    pub const IMAGE_END: u32 = 200062;
    /// Start of audio - audio placeholder
    pub const AUDIO: u32 = 200063;
    /// End of audio
    pub const AUDIO_END: u32 = 200064;
    /// Start of video - video placeholder
    pub const VIDEO: u32 = 200065;
    /// End of video
    pub const VIDEO_END: u32 = 200066;

    // Document Structure
    /// Start of title - document/section title
    pub const TITLE: u32 = 200067;
    /// End of title
    pub const TITLE_END: u32 = 200068;
    /// Start of section - semantic document section
    pub const SECTION: u32 = 200069;
    /// End of section
    pub const SECTION_END: u32 = 200070;
    /// Start of summary - condensed content summary
    pub const SUMMARY: u32 = 200071;
    /// End of summary
    pub const SUMMARY_END: u32 = 200072;
}

/// Agent tokens for Kimi K2 (K2, K2.5, K2.6, K2.7, Kimi-Linear).
///
/// The 54-token block starts at 163840. Every id here is also reachable
/// at runtime as `from_pretrained("kimi_k2")?.special_token_id(name)`;
/// these constants are the compile-time form, so a typo is a compile
/// error rather than a `None` to unwrap.
///
/// Kimi K2 (K2, K2.5, K2.6, K2.7, Kimi-Linear) defines IM_END itself, so those constants carry the
/// vocabulary's own id — below `base_vocab_size`, the id the checkpoint
/// was trained on — rather than a splintr-appended one.
///
/// The vocabulary's own markers are included too, so this module is its
/// whole special-token surface. A native name that would collide with
/// an agent token of the same meaning takes a `_NATIVE` suffix.
pub mod kimi_k2_agent_tokens {
    // Vocabulary-native tokens
    /// Beginning of sequence `[BOS]`
    pub const BOS: u32 = 163584;
    /// End of sequence `[EOS]`
    pub const EOS: u32 = 163585;
    /// Native `<|im_end|>` - end of message
    pub const IM_END: u32 = 163586;
    /// User turn marker
    pub const IM_USER: u32 = 163587;
    /// Assistant turn marker
    pub const IM_ASSISTANT: u32 = 163588;
    /// Header begin
    pub const START_HEADER_ID: u32 = 163590;
    /// Header end
    pub const END_HEADER_ID: u32 = 163591;
    /// End of turn `[EOT]`
    pub const EOT: u32 = 163593;
    /// System turn marker
    pub const IM_SYSTEM: u32 = 163594;
    /// Tool calls section begin
    pub const TOOL_CALLS_SECTION_BEGIN: u32 = 163595;
    /// Tool calls section end
    pub const TOOL_CALLS_SECTION_END: u32 = 163596;
    /// Single tool call begin
    pub const TOOL_CALL_BEGIN: u32 = 163597;
    /// Tool call argument begin
    pub const TOOL_CALL_ARGUMENT_BEGIN: u32 = 163598;
    /// Single tool call end
    pub const TOOL_CALL_END: u32 = 163599;
    /// Message middle marker
    pub const IM_MIDDLE: u32 = 163601;
    /// Media block begin
    pub const MEDIA_BEGIN: u32 = 163602;
    /// Media content
    pub const MEDIA_CONTENT: u32 = 163603;
    /// Media block end
    pub const MEDIA_END: u32 = 163604;
    /// Media padding
    pub const MEDIA_PAD: u32 = 163605;
    /// Native `<think>` token
    pub const THINK_NATIVE: u32 = 163606;
    /// Native `</think>` token
    pub const THINK_END_NATIVE: u32 = 163607;
    /// Unknown token `[UNK]`
    pub const UNK: u32 = 163838;
    /// Native padding `[PAD]`
    pub const PAD_NATIVE: u32 = 163839;

    // Conversation & Roles
    /// System role - system instructions
    pub const SYSTEM: u32 = 163840;
    /// User role - user input
    pub const USER: u32 = 163841;
    /// Assistant role - model output
    pub const ASSISTANT: u32 = 163842;
    /// Start of message - ChatML wrapper
    pub const IM_START: u32 = 163843;

    // Reasoning/Thinking
    /// Start of thinking - Chain-of-Thought
    pub const THINK: u32 = 163845;
    /// End of thinking
    pub const THINK_END: u32 = 163846;

    // ReAct Agent Loop
    /// Start of plan - action planning
    pub const PLAN: u32 = 163847;
    /// End of plan
    pub const PLAN_END: u32 = 163848;
    /// Start of step - individual action step
    pub const STEP: u32 = 163849;
    /// End of step
    pub const STEP_END: u32 = 163850;
    /// Start of action - agent action
    pub const ACT: u32 = 163851;
    /// End of action
    pub const ACT_END: u32 = 163852;
    /// Start of observation - environment feedback
    pub const OBSERVE: u32 = 163853;
    /// End of observation
    pub const OBSERVE_END: u32 = 163854;

    // Tool/Function Calling
    /// Start of function call - function invocation
    pub const FUNCTION: u32 = 163855;
    /// End of function call
    pub const FUNCTION_END: u32 = 163856;
    /// Start of function result - return value
    pub const RESULT: u32 = 163857;
    /// End of function result
    pub const RESULT_END: u32 = 163858;
    /// Start of error - error message
    pub const ERROR: u32 = 163859;
    /// End of error
    pub const ERROR_END: u32 = 163860;

    // Code Execution
    /// Start of code - inline code execution
    pub const CODE: u32 = 163861;
    /// End of code
    pub const CODE_END: u32 = 163862;
    /// Start of output - execution output
    pub const OUTPUT: u32 = 163863;
    /// End of output
    pub const OUTPUT_END: u32 = 163864;
    /// Start of language tag - code language
    pub const LANG: u32 = 163865;
    /// End of language tag
    pub const LANG_END: u32 = 163866;

    // RAG & Citations
    /// Start of context - retrieved context
    pub const CONTEXT: u32 = 163867;
    /// End of context
    pub const CONTEXT_END: u32 = 163868;
    /// Start of quote - exact citation
    pub const QUOTE: u32 = 163869;
    /// End of quote
    pub const QUOTE_END: u32 = 163870;
    /// Start of cite - citation reference
    pub const CITE: u32 = 163871;
    /// End of cite
    pub const CITE_END: u32 = 163872;
    /// Start of source - document source
    pub const SOURCE: u32 = 163873;
    /// End of source
    pub const SOURCE_END: u32 = 163874;

    // Memory/State Management
    /// Start of memory - persistent memory
    pub const MEMORY: u32 = 163875;
    /// End of memory
    pub const MEMORY_END: u32 = 163876;
    /// Start of recall - memory retrieval
    pub const RECALL: u32 = 163877;
    /// End of recall
    pub const RECALL_END: u32 = 163878;

    // Control Tokens
    /// Padding token
    pub const PAD: u32 = 163879;
    /// Stop generation token
    pub const STOP: u32 = 163880;
    /// Separator token
    pub const SEP: u32 = 163881;

    // Multimodal Placeholders
    /// Start of image - image placeholder
    pub const IMAGE: u32 = 163882;
    /// End of image
    pub const IMAGE_END: u32 = 163883;
    /// Start of audio - audio placeholder
    pub const AUDIO: u32 = 163884;
    /// End of audio
    pub const AUDIO_END: u32 = 163885;
    /// Start of video - video placeholder
    pub const VIDEO: u32 = 163886;
    /// End of video
    pub const VIDEO_END: u32 = 163887;

    // Document Structure
    /// Start of title - document/section title
    pub const TITLE: u32 = 163888;
    /// End of title
    pub const TITLE_END: u32 = 163889;
    /// Start of section - semantic document section
    pub const SECTION: u32 = 163890;
    /// End of section
    pub const SECTION_END: u32 = 163891;
    /// Start of summary - condensed content summary
    pub const SUMMARY: u32 = 163892;
    /// End of summary
    pub const SUMMARY_END: u32 = 163893;
}

/// Agent tokens for Kimi K3.
///
/// The 54-token block starts at 163840. Every id here is also reachable
/// at runtime as `from_pretrained("kimi_k3")?.special_token_id(name)`;
/// these constants are the compile-time form, so a typo is a compile
/// error rather than a `None` to unwrap.
///
/// Kimi K3 defines SEP itself, so those constants carry the
/// vocabulary's own id — below `base_vocab_size`, the id the checkpoint
/// was trained on — rather than a splintr-appended one.
///
/// The vocabulary's own markers are included too, so this module is its
/// whole special-token surface. A native name that would collide with
/// an agent token of the same meaning takes a `_NATIVE` suffix.
pub mod kimi_k3_agent_tokens {
    // Vocabulary-native tokens
    /// Beginning of sequence `[BOS]`
    pub const BOS: u32 = 163584;
    /// End of sequence `[EOS]`
    pub const EOS: u32 = 163585;
    /// End of message
    pub const END_OF_MSG: u32 = 163586;
    /// Open marker
    pub const OPEN: u32 = 163587;
    /// Close marker
    pub const CLOSE: u32 = 163588;
    /// Separator
    pub const SEP: u32 = 163589;
    /// Header begin
    pub const START_HEADER_ID: u32 = 163590;
    /// Header end
    pub const END_HEADER_ID: u32 = 163591;
    /// End of turn `[EOT]`
    pub const EOT: u32 = 163593;
    /// Media block begin
    pub const MEDIA_BEGIN: u32 = 163602;
    /// Media content
    pub const MEDIA_CONTENT: u32 = 163603;
    /// Media block end
    pub const MEDIA_END: u32 = 163604;
    /// Media padding
    pub const MEDIA_PAD: u32 = 163605;
    /// OS-agent mode marker
    pub const OSAGENT_MODE: u32 = 163649;
    /// Unknown token `[UNK]`
    pub const UNK: u32 = 163838;
    /// Native padding `[PAD]`
    pub const PAD_NATIVE: u32 = 163839;

    // Conversation & Roles
    /// System role - system instructions
    pub const SYSTEM: u32 = 163840;
    /// User role - user input
    pub const USER: u32 = 163841;
    /// Assistant role - model output
    pub const ASSISTANT: u32 = 163842;
    /// Start of message - ChatML wrapper
    pub const IM_START: u32 = 163843;
    /// End of message - ChatML wrapper
    pub const IM_END: u32 = 163844;

    // Reasoning/Thinking
    /// Start of thinking - Chain-of-Thought
    pub const THINK: u32 = 163845;
    /// End of thinking
    pub const THINK_END: u32 = 163846;

    // ReAct Agent Loop
    /// Start of plan - action planning
    pub const PLAN: u32 = 163847;
    /// End of plan
    pub const PLAN_END: u32 = 163848;
    /// Start of step - individual action step
    pub const STEP: u32 = 163849;
    /// End of step
    pub const STEP_END: u32 = 163850;
    /// Start of action - agent action
    pub const ACT: u32 = 163851;
    /// End of action
    pub const ACT_END: u32 = 163852;
    /// Start of observation - environment feedback
    pub const OBSERVE: u32 = 163853;
    /// End of observation
    pub const OBSERVE_END: u32 = 163854;

    // Tool/Function Calling
    /// Start of function call - function invocation
    pub const FUNCTION: u32 = 163855;
    /// End of function call
    pub const FUNCTION_END: u32 = 163856;
    /// Start of function result - return value
    pub const RESULT: u32 = 163857;
    /// End of function result
    pub const RESULT_END: u32 = 163858;
    /// Start of error - error message
    pub const ERROR: u32 = 163859;
    /// End of error
    pub const ERROR_END: u32 = 163860;

    // Code Execution
    /// Start of code - inline code execution
    pub const CODE: u32 = 163861;
    /// End of code
    pub const CODE_END: u32 = 163862;
    /// Start of output - execution output
    pub const OUTPUT: u32 = 163863;
    /// End of output
    pub const OUTPUT_END: u32 = 163864;
    /// Start of language tag - code language
    pub const LANG: u32 = 163865;
    /// End of language tag
    pub const LANG_END: u32 = 163866;

    // RAG & Citations
    /// Start of context - retrieved context
    pub const CONTEXT: u32 = 163867;
    /// End of context
    pub const CONTEXT_END: u32 = 163868;
    /// Start of quote - exact citation
    pub const QUOTE: u32 = 163869;
    /// End of quote
    pub const QUOTE_END: u32 = 163870;
    /// Start of cite - citation reference
    pub const CITE: u32 = 163871;
    /// End of cite
    pub const CITE_END: u32 = 163872;
    /// Start of source - document source
    pub const SOURCE: u32 = 163873;
    /// End of source
    pub const SOURCE_END: u32 = 163874;

    // Memory/State Management
    /// Start of memory - persistent memory
    pub const MEMORY: u32 = 163875;
    /// End of memory
    pub const MEMORY_END: u32 = 163876;
    /// Start of recall - memory retrieval
    pub const RECALL: u32 = 163877;
    /// End of recall
    pub const RECALL_END: u32 = 163878;

    // Control Tokens
    /// Padding token
    pub const PAD: u32 = 163879;
    /// Stop generation token
    pub const STOP: u32 = 163880;

    // Multimodal Placeholders
    /// Start of image - image placeholder
    pub const IMAGE: u32 = 163882;
    /// End of image
    pub const IMAGE_END: u32 = 163883;
    /// Start of audio - audio placeholder
    pub const AUDIO: u32 = 163884;
    /// End of audio
    pub const AUDIO_END: u32 = 163885;
    /// Start of video - video placeholder
    pub const VIDEO: u32 = 163886;
    /// End of video
    pub const VIDEO_END: u32 = 163887;

    // Document Structure
    /// Start of title - document/section title
    pub const TITLE: u32 = 163888;
    /// End of title
    pub const TITLE_END: u32 = 163889;
    /// Start of section - semantic document section
    pub const SECTION: u32 = 163890;
    /// End of section
    pub const SECTION_END: u32 = 163891;
    /// Start of summary - condensed content summary
    pub const SUMMARY: u32 = 163892;
    /// End of summary
    pub const SUMMARY_END: u32 = 163893;
}