@huggingface/tasks 0.22.4 → 0.22.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/model-libraries-snippets.d.ts +10 -0
- package/dist/commonjs/model-libraries-snippets.d.ts.map +1 -1
- package/dist/commonjs/model-libraries-snippets.js +230 -3
- package/dist/commonjs/model-libraries.d.ts +175 -2
- package/dist/commonjs/model-libraries.d.ts.map +1 -1
- package/dist/commonjs/model-libraries.js +174 -1
- package/dist/esm/model-libraries-snippets.d.ts +10 -0
- package/dist/esm/model-libraries-snippets.d.ts.map +1 -1
- package/dist/esm/model-libraries-snippets.js +217 -0
- package/dist/esm/model-libraries.d.ts +175 -2
- package/dist/esm/model-libraries.d.ts.map +1 -1
- package/dist/esm/model-libraries.js +174 -1
- package/package.json +1 -1
- package/src/model-libraries-snippets.ts +232 -0
- package/src/model-libraries.ts +174 -1
|
@@ -39,6 +39,15 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
39
39
|
filter: true,
|
|
40
40
|
countDownloads: `path:"adapter_config.json"`,
|
|
41
41
|
},
|
|
42
|
+
alkove: {
|
|
43
|
+
prettyLabel: "Alkove",
|
|
44
|
+
repoName: "Alkove",
|
|
45
|
+
repoUrl: "https://github.com/alkove-ai/alkove",
|
|
46
|
+
docsUrl: "https://alkove.ai/docs/",
|
|
47
|
+
snippets: snippets.alkove,
|
|
48
|
+
filter: false,
|
|
49
|
+
countDownloads: `path_extension:"alk"`,
|
|
50
|
+
},
|
|
42
51
|
allennlp: {
|
|
43
52
|
prettyLabel: "AllenNLP",
|
|
44
53
|
repoName: "AllenNLP",
|
|
@@ -76,7 +85,7 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
76
85
|
repoName: "Asimov",
|
|
77
86
|
repoUrl: "https://github.com/menloresearch/humanoid-policy-viewer",
|
|
78
87
|
snippets: snippets.asimov,
|
|
79
|
-
filter:
|
|
88
|
+
filter: true,
|
|
80
89
|
countDownloads: `path:"env.yaml"`,
|
|
81
90
|
},
|
|
82
91
|
"aviation-ner": {
|
|
@@ -119,6 +128,15 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
119
128
|
filter: false,
|
|
120
129
|
countDownloads: `path:"llm_config.json"`,
|
|
121
130
|
},
|
|
131
|
+
basedecision: {
|
|
132
|
+
prettyLabel: "BaseDecision",
|
|
133
|
+
repoName: "BaseDecision",
|
|
134
|
+
repoUrl: "https://github.com/hrudayaditya/BaseDecision",
|
|
135
|
+
docsUrl: "https://github.com/hrudayaditya/BaseDecision/blob/main/docs/API.md",
|
|
136
|
+
snippets: snippets.basedecision,
|
|
137
|
+
filter: false,
|
|
138
|
+
countDownloads: `path:"model.safetensors"`,
|
|
139
|
+
},
|
|
122
140
|
bboxmaskpose: {
|
|
123
141
|
prettyLabel: "BBoxMaskPose",
|
|
124
142
|
repoName: "BBoxMaskPose",
|
|
@@ -258,6 +276,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
258
276
|
repoUrl: "https://github.com/amazon-science/chronos-forecasting",
|
|
259
277
|
snippets: snippets.chronos_forecasting,
|
|
260
278
|
},
|
|
279
|
+
"circuit-tracer": {
|
|
280
|
+
prettyLabel: "circuit-tracer",
|
|
281
|
+
repoName: "circuit-tracer",
|
|
282
|
+
repoUrl: "https://github.com/decoderesearch/circuit-tracer",
|
|
283
|
+
filter: false,
|
|
284
|
+
countDownloads: `path_filename:"config" AND path_extension:"yaml"`,
|
|
285
|
+
},
|
|
261
286
|
clara: {
|
|
262
287
|
prettyLabel: "Clara",
|
|
263
288
|
repoName: "Clara",
|
|
@@ -381,6 +406,15 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
381
406
|
snippets: snippets.describe_anything,
|
|
382
407
|
filter: false,
|
|
383
408
|
},
|
|
409
|
+
dewml: {
|
|
410
|
+
prettyLabel: "Dew",
|
|
411
|
+
repoName: "Dew",
|
|
412
|
+
repoUrl: "https://github.com/AshishKumar4/dew",
|
|
413
|
+
docsUrl: "https://dewml.dev",
|
|
414
|
+
snippets: snippets.dew,
|
|
415
|
+
filter: false,
|
|
416
|
+
countDownloads: `path:"run.json"`,
|
|
417
|
+
},
|
|
384
418
|
"dia-tts": {
|
|
385
419
|
prettyLabel: "Dia",
|
|
386
420
|
repoName: "Dia",
|
|
@@ -496,6 +530,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
496
530
|
filter: false,
|
|
497
531
|
countDownloads: `path_extension:"pt"`,
|
|
498
532
|
},
|
|
533
|
+
"fahr-face": {
|
|
534
|
+
prettyLabel: "FAHR-Face",
|
|
535
|
+
repoName: "FAHR-Face",
|
|
536
|
+
repoUrl: "https://github.com/AIM-Harvard/FAHR-Face",
|
|
537
|
+
docsUrl: "https://huggingface.co/fridolin22/FAHR-Face",
|
|
538
|
+
filter: false,
|
|
539
|
+
countDownloads: `path:"fahr_face.pth" OR path:"fahr_faceage.pth"`,
|
|
540
|
+
},
|
|
499
541
|
fairseq: {
|
|
500
542
|
prettyLabel: "Fairseq",
|
|
501
543
|
repoName: "fairseq",
|
|
@@ -564,6 +606,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
564
606
|
filter: false,
|
|
565
607
|
countDownloads: `path_extension:"tar"`,
|
|
566
608
|
},
|
|
609
|
+
fse: {
|
|
610
|
+
prettyLabel: "fse",
|
|
611
|
+
repoName: "fse",
|
|
612
|
+
repoUrl: "https://github.com/oborchers/Fast_Sentence_Embeddings",
|
|
613
|
+
snippets: snippets.fse,
|
|
614
|
+
filter: false,
|
|
615
|
+
countDownloads: `path:"config.json" OR path_extension:"model"`,
|
|
616
|
+
},
|
|
567
617
|
gaussianformer: {
|
|
568
618
|
prettyLabel: "GaussianFormer",
|
|
569
619
|
repoName: "GaussianFormer",
|
|
@@ -614,6 +664,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
614
664
|
filter: false,
|
|
615
665
|
countDownloads: `path:"flow/flow.pt"`,
|
|
616
666
|
},
|
|
667
|
+
glyd: {
|
|
668
|
+
prettyLabel: "Glyd",
|
|
669
|
+
repoName: "Glyd",
|
|
670
|
+
repoUrl: "https://github.com/surya-koritala/Glyd",
|
|
671
|
+
docsUrl: "https://getglyd.com",
|
|
672
|
+
filter: false,
|
|
673
|
+
},
|
|
617
674
|
"glyph-byt5": {
|
|
618
675
|
prettyLabel: "Glyph-ByT5",
|
|
619
676
|
repoName: "Glyph-ByT5",
|
|
@@ -834,6 +891,15 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
834
891
|
repoUrl: "https://github.com/KittenML/KittenTTS",
|
|
835
892
|
snippets: snippets.kittentts,
|
|
836
893
|
},
|
|
894
|
+
konfai: {
|
|
895
|
+
prettyLabel: "KonfAI",
|
|
896
|
+
repoName: "KonfAI",
|
|
897
|
+
repoUrl: "https://github.com/fideus-labs/KonfAI",
|
|
898
|
+
docsUrl: "https://konfai.readthedocs.io/en/latest/usage/apps.html",
|
|
899
|
+
snippets: snippets.konfai,
|
|
900
|
+
filter: false,
|
|
901
|
+
countDownloads: `path_filename:"app" AND path_extension:"json"`,
|
|
902
|
+
},
|
|
837
903
|
kronos: {
|
|
838
904
|
prettyLabel: "KRONOS",
|
|
839
905
|
repoName: "KRONOS",
|
|
@@ -905,6 +971,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
905
971
|
filter: false,
|
|
906
972
|
snippets: snippets.lerobot,
|
|
907
973
|
},
|
|
974
|
+
libreyolo: {
|
|
975
|
+
prettyLabel: "LibreYOLO",
|
|
976
|
+
repoName: "LibreYOLO",
|
|
977
|
+
repoUrl: "https://github.com/LibreYOLO/libreyolo",
|
|
978
|
+
docsUrl: "https://www.libreyolo.com/docs",
|
|
979
|
+
filter: false,
|
|
980
|
+
countDownloads: `path_extension:"pt" OR path_extension:"pth" OR path_extension:"ckpt" OR path_extension:"onnx" OR path:"config.json"`,
|
|
981
|
+
},
|
|
908
982
|
lightglue: {
|
|
909
983
|
prettyLabel: "LightGlue",
|
|
910
984
|
repoName: "LightGlue",
|
|
@@ -919,6 +993,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
919
993
|
filter: false,
|
|
920
994
|
countDownloads: `(path_filename:"params" AND path_extension:"yaml") OR (path_filename:"controllers" AND path_extension:"yaml") OR (path_filename:"norm_stats" AND path_extension:"json")`,
|
|
921
995
|
},
|
|
996
|
+
"lingbot-map": {
|
|
997
|
+
prettyLabel: "LingBot-Map",
|
|
998
|
+
repoName: "lingbot-map",
|
|
999
|
+
repoUrl: "https://github.com/Robbyant/lingbot-map",
|
|
1000
|
+
filter: false,
|
|
1001
|
+
countDownloads: `path_extension:"pt"`,
|
|
1002
|
+
},
|
|
922
1003
|
liveportrait: {
|
|
923
1004
|
prettyLabel: "LivePortrait",
|
|
924
1005
|
repoName: "LivePortrait",
|
|
@@ -932,6 +1013,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
932
1013
|
repoUrl: "https://github.com/meituan-longcat/LongCat-Video",
|
|
933
1014
|
filter: false,
|
|
934
1015
|
},
|
|
1016
|
+
"linnet-tts": {
|
|
1017
|
+
prettyLabel: "LinnetTTS",
|
|
1018
|
+
repoName: "LinnetTTS",
|
|
1019
|
+
repoUrl: "https://github.com/VoxRT/LinnetTTS",
|
|
1020
|
+
snippets: snippets.linnet_tts,
|
|
1021
|
+
filter: false,
|
|
1022
|
+
countDownloads: `path:"linnet-en-35m.fp16.safetensors"`,
|
|
1023
|
+
},
|
|
935
1024
|
"llama-cpp-python": {
|
|
936
1025
|
prettyLabel: "llama-cpp-python",
|
|
937
1026
|
repoName: "llama-cpp-python",
|
|
@@ -1039,12 +1128,28 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
1039
1128
|
filter: true,
|
|
1040
1129
|
countDownloads: `path_extension:"onnx"`,
|
|
1041
1130
|
},
|
|
1131
|
+
"minicpm-ocr": {
|
|
1132
|
+
prettyLabel: "MiniCPM-OCR",
|
|
1133
|
+
repoName: "MiniCPM-OCR",
|
|
1134
|
+
repoUrl: "https://github.com/OpenBMB/MiniCPM-OCR",
|
|
1135
|
+
docsUrl: "https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/minicpm_ocr_sdk_api_en.md",
|
|
1136
|
+
snippets: snippets.minicpmOcr,
|
|
1137
|
+
filter: false,
|
|
1138
|
+
},
|
|
1042
1139
|
mitie: {
|
|
1043
1140
|
prettyLabel: "MITIE",
|
|
1044
1141
|
repoName: "MITIE",
|
|
1045
1142
|
repoUrl: "https://github.com/mit-nlp/MITIE",
|
|
1046
1143
|
countDownloads: `path_filename:"total_word_feature_extractor"`,
|
|
1047
1144
|
},
|
|
1145
|
+
mjlab: {
|
|
1146
|
+
prettyLabel: "MJLab",
|
|
1147
|
+
repoName: "MJLab",
|
|
1148
|
+
repoUrl: "https://github.com/mujocolab/mjlab",
|
|
1149
|
+
docsUrl: "https://mujocolab.github.io/mjlab/",
|
|
1150
|
+
filter: false,
|
|
1151
|
+
countDownloads: `path:"policy.onnx" OR path:"final.onnx"`,
|
|
1152
|
+
},
|
|
1048
1153
|
"ml-agents": {
|
|
1049
1154
|
prettyLabel: "ml-agents",
|
|
1050
1155
|
repoName: "ml-agents",
|
|
@@ -1196,6 +1301,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
1196
1301
|
filter: false,
|
|
1197
1302
|
countDownloads: `path_extension:"pt"`,
|
|
1198
1303
|
},
|
|
1304
|
+
opendecision: {
|
|
1305
|
+
prettyLabel: "OpenDecision",
|
|
1306
|
+
repoName: "OpenDecision",
|
|
1307
|
+
repoUrl: "https://github.com/tokz-labs/OpenDecision",
|
|
1308
|
+
snippets: snippets.opendecision,
|
|
1309
|
+
filter: false,
|
|
1310
|
+
},
|
|
1199
1311
|
openpeerllm: {
|
|
1200
1312
|
prettyLabel: "OpenPeerLLM",
|
|
1201
1313
|
repoName: "OpenPeerLLM",
|
|
@@ -1278,6 +1390,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
1278
1390
|
filter: false,
|
|
1279
1391
|
countDownloads: `path_extension:"onnx" OR path_extension:"ckpt"`,
|
|
1280
1392
|
},
|
|
1393
|
+
pixeldense: {
|
|
1394
|
+
prettyLabel: "PixelDense",
|
|
1395
|
+
repoName: "PixelDense",
|
|
1396
|
+
repoUrl: "https://github.com/Hansxsourse/PixelDense",
|
|
1397
|
+
filter: false,
|
|
1398
|
+
countDownloads: `path:"PixelDense_XXL_T2I.ckpt"`,
|
|
1399
|
+
},
|
|
1281
1400
|
"pocket-tts": {
|
|
1282
1401
|
prettyLabel: "Pocket-TTS",
|
|
1283
1402
|
repoName: "PocketTTS",
|
|
@@ -1286,6 +1405,21 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
1286
1405
|
filter: false,
|
|
1287
1406
|
countDownloads: `path:"tts_b6369a24.safetensors"`,
|
|
1288
1407
|
},
|
|
1408
|
+
pqgan: {
|
|
1409
|
+
prettyLabel: "PQGAN",
|
|
1410
|
+
repoName: "PQGAN",
|
|
1411
|
+
repoUrl: "https://github.com/vislearn/PQGAN",
|
|
1412
|
+
filter: false,
|
|
1413
|
+
countDownloads: `path_extension:"safetensors"`,
|
|
1414
|
+
},
|
|
1415
|
+
protomotions: {
|
|
1416
|
+
prettyLabel: "ProtoMotions",
|
|
1417
|
+
repoName: "ProtoMotions",
|
|
1418
|
+
repoUrl: "https://github.com/NVlabs/ProtoMotions",
|
|
1419
|
+
docsUrl: "https://nvlabs.github.io/ProtoMotions/",
|
|
1420
|
+
filter: false,
|
|
1421
|
+
countDownloads: `path_extension:"onnx" OR ((path_filename:"inference_last" OR path_filename:"inference" OR path_filename:"last") AND path_extension:"ckpt")`,
|
|
1422
|
+
},
|
|
1289
1423
|
"pruna-ai": {
|
|
1290
1424
|
prettyLabel: "Pruna AI",
|
|
1291
1425
|
repoName: "Pruna AI",
|
|
@@ -1413,6 +1547,7 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
1413
1547
|
repoUrl: "https://github.com/jbloomAus/SAELens",
|
|
1414
1548
|
snippets: snippets.saelens,
|
|
1415
1549
|
filter: false,
|
|
1550
|
+
countDownloads: `(path_filename:"cfg" AND path_extension:"json") OR path:"config.json"`,
|
|
1416
1551
|
},
|
|
1417
1552
|
"sage-music": {
|
|
1418
1553
|
prettyLabel: "SAGE",
|
|
@@ -1656,6 +1791,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
1656
1791
|
snippets: snippets.supertonic,
|
|
1657
1792
|
filter: false,
|
|
1658
1793
|
},
|
|
1794
|
+
svdtrunc: {
|
|
1795
|
+
prettyLabel: "SVDtrunc",
|
|
1796
|
+
repoName: "SVDtrunc",
|
|
1797
|
+
repoUrl: "https://github.com/vislearn/SVDtrunc",
|
|
1798
|
+
filter: false,
|
|
1799
|
+
countDownloads: `path_extension:"safetensors"`,
|
|
1800
|
+
},
|
|
1659
1801
|
swarmformer: {
|
|
1660
1802
|
prettyLabel: "SwarmFormer",
|
|
1661
1803
|
repoName: "SwarmFormer",
|
|
@@ -1767,6 +1909,15 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
1767
1909
|
filter: false,
|
|
1768
1910
|
countDownloads: `path_extension:"pt" OR path_extension:"pth"`,
|
|
1769
1911
|
},
|
|
1912
|
+
"torch-pointcloud": {
|
|
1913
|
+
prettyLabel: "torch-pointcloud",
|
|
1914
|
+
repoName: "torch-pointcloud",
|
|
1915
|
+
repoUrl: "https://github.com/arthurdjn/pytorch-pointcloud",
|
|
1916
|
+
docsUrl: "https://pytorch-pointcloud.org/",
|
|
1917
|
+
snippets: snippets.torch_pointcloud,
|
|
1918
|
+
filter: false,
|
|
1919
|
+
countDownloads: `path:"model.safetensors"`,
|
|
1920
|
+
},
|
|
1770
1921
|
transformers: {
|
|
1771
1922
|
prettyLabel: "Transformers",
|
|
1772
1923
|
repoName: "🤗/transformers",
|
|
@@ -1810,6 +1961,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
1810
1961
|
countDownloads: `path_extension:"pt"`,
|
|
1811
1962
|
snippets: snippets.ultralytics,
|
|
1812
1963
|
},
|
|
1964
|
+
"unitree-rl": {
|
|
1965
|
+
prettyLabel: "Unitree",
|
|
1966
|
+
repoName: "unitree_rl_lab",
|
|
1967
|
+
repoUrl: "https://github.com/unitreerobotics/unitree_rl_lab",
|
|
1968
|
+
snippets: snippets.unitree,
|
|
1969
|
+
filter: true,
|
|
1970
|
+
countDownloads: `path:"params/deploy.yaml"`,
|
|
1971
|
+
},
|
|
1813
1972
|
univa: {
|
|
1814
1973
|
prettyLabel: "univa",
|
|
1815
1974
|
repoName: "univa",
|
|
@@ -1932,6 +2091,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
1932
2091
|
snippets: snippets.whisperkit,
|
|
1933
2092
|
countDownloads: `path_filename:"model" AND path_extension:"mil" AND _exists_:"path_prefix"`,
|
|
1934
2093
|
},
|
|
2094
|
+
wilddet3d: {
|
|
2095
|
+
prettyLabel: "WildDet3D",
|
|
2096
|
+
repoName: "WildDet3D",
|
|
2097
|
+
repoUrl: "https://github.com/allenai/WildDet3D",
|
|
2098
|
+
filter: false,
|
|
2099
|
+
countDownloads: `path_extension:"pt"`,
|
|
2100
|
+
},
|
|
1935
2101
|
yolov10: {
|
|
1936
2102
|
// YOLOv10 is a fork of ultraLytics. Code snippets and download count are the same but the repo is different.
|
|
1937
2103
|
prettyLabel: "YOLOv10",
|
|
@@ -1948,6 +2114,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
1948
2114
|
docsUrl: "https://docs.ultralytics.com/models/yolo26/",
|
|
1949
2115
|
countDownloads: `path_extension:"pt" OR path_extension:"safetensors"`,
|
|
1950
2116
|
},
|
|
2117
|
+
zipsplat: {
|
|
2118
|
+
prettyLabel: "ZipSplat",
|
|
2119
|
+
repoName: "ZipSplat",
|
|
2120
|
+
repoUrl: "https://github.com/cvg/ZipSplat",
|
|
2121
|
+
filter: false,
|
|
2122
|
+
countDownloads: `path_extension:"tar"`,
|
|
2123
|
+
},
|
|
1951
2124
|
zonos: {
|
|
1952
2125
|
prettyLabel: "Zonos",
|
|
1953
2126
|
repoName: "Zonos",
|
package/package.json
CHANGED
|
@@ -28,6 +28,52 @@ model = AadyaM1Forecaster(weights)
|
|
|
28
28
|
pmf = model.forecast([28, 30, 27], elapsed=0)`,
|
|
29
29
|
];
|
|
30
30
|
|
|
31
|
+
export const minicpmOcr = (model: ModelData): string[] => {
|
|
32
|
+
const isGguf = !!model.gguf?.context_length;
|
|
33
|
+
const backend = isGguf ? "llamacpp" : "vllm";
|
|
34
|
+
const device = isGguf ? "cpu" : "cuda:0";
|
|
35
|
+
const contextLength = isGguf ? 8192 : 40960;
|
|
36
|
+
const guide = isGguf ? "llamacpp_deploy.md" : "vllm_deploy_en.md";
|
|
37
|
+
const serviceSettings = isGguf
|
|
38
|
+
? "# llama.cpp: load the model and vision projector; use --port 8080,\n# --alias minicpm-ocr, --ctx-size 8192, --parallel 1, --jinja --reasoning off."
|
|
39
|
+
: "# vLLM: load the model above; use --port 8080,\n# --served-model-name minicpm-ocr and --max-model-len 40960.";
|
|
40
|
+
const pipeline = isGguf
|
|
41
|
+
? '{"queue_mode": "serial", "max_workers": 1, "render_workers": 1}'
|
|
42
|
+
: '{"overlap_layout": True, "render_workers": 1}';
|
|
43
|
+
|
|
44
|
+
return [
|
|
45
|
+
`pip install "minicpm-ocr[all]" huggingface_hub
|
|
46
|
+
|
|
47
|
+
# Deploy ${model.id} as a recognition service before running the Python example:
|
|
48
|
+
# https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/${guide}
|
|
49
|
+
${serviceSettings}
|
|
50
|
+
# Layout detection uses ${device}; recognition runs on the deployed service.`,
|
|
51
|
+
`from importlib.resources import files
|
|
52
|
+
from pathlib import Path
|
|
53
|
+
|
|
54
|
+
from minicpmvocr import load_config, pipelined_run
|
|
55
|
+
from huggingface_hub import snapshot_download
|
|
56
|
+
|
|
57
|
+
layout_model = snapshot_download("PaddlePaddle/PP-DocLayoutV3")
|
|
58
|
+
cfg = load_config(
|
|
59
|
+
str(files("minicpmvocr").joinpath("configs/minicpmvocr.yaml")),
|
|
60
|
+
overrides={
|
|
61
|
+
"input": {"file_path": str(Path("demo.png").resolve())},
|
|
62
|
+
"engine": {
|
|
63
|
+
"type": "${backend}",
|
|
64
|
+
"server_url": "http://127.0.0.1:8080",
|
|
65
|
+
"model_name": "minicpm-ocr",
|
|
66
|
+
"max_model_len": ${contextLength},
|
|
67
|
+
},
|
|
68
|
+
"layout": {"model_dir": layout_model, "device": "${device}"},
|
|
69
|
+
# Render PDFs in-process so this example also works without a main guard.
|
|
70
|
+
"pipeline": ${pipeline},
|
|
71
|
+
},
|
|
72
|
+
)
|
|
73
|
+
pipelined_run(cfg)`,
|
|
74
|
+
];
|
|
75
|
+
};
|
|
76
|
+
|
|
31
77
|
export const adapters = (model: ModelData): string[] => [
|
|
32
78
|
`from adapters import AutoAdapterModel
|
|
33
79
|
|
|
@@ -37,6 +83,16 @@ model = AutoAdapterModel.from_pretrained("${escapeStringForJson(
|
|
|
37
83
|
model.load_adapter("${model.id}", set_active=True)`,
|
|
38
84
|
];
|
|
39
85
|
|
|
86
|
+
export const alkove = (model: ModelData): string[] => {
|
|
87
|
+
const name = /^alkove-([a-z]+)-/.exec(model.id.split("/").pop() ?? "")?.[1] ?? "focus";
|
|
88
|
+
return [
|
|
89
|
+
`# pip install alkove
|
|
90
|
+
import alkove
|
|
91
|
+
|
|
92
|
+
models = alkove.Models.load(["${name}"])`,
|
|
93
|
+
];
|
|
94
|
+
};
|
|
95
|
+
|
|
40
96
|
const allennlpUnknown = (model: ModelData) => [
|
|
41
97
|
`import allennlp_models
|
|
42
98
|
from allennlp.predictors.predictor import Predictor
|
|
@@ -117,6 +173,18 @@ function get_prompt_from_diffusers_model(model: ModelData): string | undefined {
|
|
|
117
173
|
}
|
|
118
174
|
}
|
|
119
175
|
|
|
176
|
+
export const basedecision = (model: ModelData): string[] => [
|
|
177
|
+
`from basedecision import load_from_hub
|
|
178
|
+
|
|
179
|
+
model = load_from_hub("${model.id}")
|
|
180
|
+
result = model.choose(
|
|
181
|
+
context="Please refund my purchase.",
|
|
182
|
+
question="What does the customer request?",
|
|
183
|
+
options=["Refund", "Delivery status", "Change address"],
|
|
184
|
+
)
|
|
185
|
+
print(result.answer)`,
|
|
186
|
+
];
|
|
187
|
+
|
|
120
188
|
export const ben2 = (model: ModelData): string[] => [
|
|
121
189
|
`import requests
|
|
122
190
|
from PIL import Image
|
|
@@ -461,6 +529,24 @@ dam = DescribeAnythingModel(
|
|
|
461
529
|
)`,
|
|
462
530
|
];
|
|
463
531
|
|
|
532
|
+
export const dew = (model: ModelData): string[] => {
|
|
533
|
+
if (model.pipeline_tag === "text-to-image") {
|
|
534
|
+
return [
|
|
535
|
+
`# pip install dewml --extra-index-url https://pypi.dewml.dev/simple
|
|
536
|
+
import dew
|
|
537
|
+
|
|
538
|
+
pipe = dew.pipeline("${model.id}")
|
|
539
|
+
images = pipe(["a red fox in a snowy forest"], steps=20, key=0).host().images`,
|
|
540
|
+
];
|
|
541
|
+
}
|
|
542
|
+
return [
|
|
543
|
+
`# pip install dewml --extra-index-url https://pypi.dewml.dev/simple
|
|
544
|
+
import dew
|
|
545
|
+
|
|
546
|
+
task = dew.pipeline("${model.id}")`,
|
|
547
|
+
];
|
|
548
|
+
};
|
|
549
|
+
|
|
464
550
|
const diffusers_install = "pip install -U diffusers transformers accelerate";
|
|
465
551
|
|
|
466
552
|
const diffusersDefaultPrompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k";
|
|
@@ -905,6 +991,28 @@ print(f'Accuracy {accuracy_score(y_test, predictions):.2%}')
|
|
|
905
991
|
return [installSnippet, classificationSnippet, regressionsSnippet, matchingSnippet];
|
|
906
992
|
};
|
|
907
993
|
|
|
994
|
+
export const fse = (model: ModelData): string[] => {
|
|
995
|
+
if (model.config?.model_type === "fse") {
|
|
996
|
+
return [
|
|
997
|
+
`pip install "fse>=2.0"`,
|
|
998
|
+
`from fse import Encoder
|
|
999
|
+
|
|
1000
|
+
encoder = Encoder.from_pretrained("${model.id}")
|
|
1001
|
+
vectors = encoder.encode(["A sentence.", "Another sentence."])`,
|
|
1002
|
+
];
|
|
1003
|
+
}
|
|
1004
|
+
return [
|
|
1005
|
+
`pip install "fse<2"`,
|
|
1006
|
+
`from fse import SIF, IndexedList, Vectors
|
|
1007
|
+
|
|
1008
|
+
vectors = Vectors.from_pretrained("${nameWithoutNamespace(model.id)}")
|
|
1009
|
+
model = SIF(vectors)
|
|
1010
|
+
sentences = IndexedList([["hello", "world"], ["fast", "sentence", "embeddings"]])
|
|
1011
|
+
model.train(sentences)
|
|
1012
|
+
vector = model.sv[0]`,
|
|
1013
|
+
];
|
|
1014
|
+
};
|
|
1015
|
+
|
|
908
1016
|
export const gaussianformer = (model: ModelData): string[] => [
|
|
909
1017
|
`# pip install "gaussianformer @ git+https://github.com/SVLwoof/gaussianformer"
|
|
910
1018
|
from gaussianformer import GaussianFormerRenderingPipeline, load_ply
|
|
@@ -1178,6 +1286,15 @@ import soundfile as sf
|
|
|
1178
1286
|
sf.write('output.wav', audio, 24000)`,
|
|
1179
1287
|
];
|
|
1180
1288
|
|
|
1289
|
+
export const konfai = (model: ModelData): string[] => [
|
|
1290
|
+
`pip install "konfai[imaging]" konfai-apps`,
|
|
1291
|
+
`# List the apps this repository holds
|
|
1292
|
+
konfai-apps list ${model.id}
|
|
1293
|
+
|
|
1294
|
+
# Run one of them on an image
|
|
1295
|
+
konfai-apps infer ${model.id}:<app> -i image.nii.gz -o Output`,
|
|
1296
|
+
];
|
|
1297
|
+
|
|
1181
1298
|
/**
|
|
1182
1299
|
* Detect LTX-2.5 (split weights + Gemma 4 TE file) vs LTX-2.3
|
|
1183
1300
|
* (monolith checkpoint + separate Gemma 3 root). Prefer explicit tags / ids /
|
|
@@ -1495,6 +1612,27 @@ model.score("query", ["doc1", "doc2", "doc3"])`,
|
|
|
1495
1612
|
];
|
|
1496
1613
|
};
|
|
1497
1614
|
|
|
1615
|
+
export const linnet_tts = (model: ModelData): string[] => [
|
|
1616
|
+
`# pip install linnet-tts soundfile
|
|
1617
|
+
import linnet_tts, soundfile as sf
|
|
1618
|
+
from huggingface_hub import hf_hub_download
|
|
1619
|
+
|
|
1620
|
+
model = linnet_tts.Model(
|
|
1621
|
+
hf_hub_download("${model.id}", "linnet-en-35m.fp16.safetensors"),
|
|
1622
|
+
hf_hub_download("${model.id}", "tokenizer.model"),
|
|
1623
|
+
)
|
|
1624
|
+
voice = model.load_voice(hf_hub_download("${model.id}", "voices/linnet-en-f1.npy"))
|
|
1625
|
+
|
|
1626
|
+
audio = model.synthesize("Hello there.", voice, temp=0.3, cfg=2.0, seed=0)
|
|
1627
|
+
sf.write("hello.wav", audio, model.sample_rate) # float32, 24 kHz
|
|
1628
|
+
|
|
1629
|
+
# streaming: one chunk per 80 ms step
|
|
1630
|
+
session = model.session(voice, seed=0)
|
|
1631
|
+
session.prime("Streaming gives the first chunk of audio after one step.")
|
|
1632
|
+
for chunk in session:
|
|
1633
|
+
...`,
|
|
1634
|
+
];
|
|
1635
|
+
|
|
1498
1636
|
export const llama_cpp_python = (model: ModelData): string[] => {
|
|
1499
1637
|
const snippets = [
|
|
1500
1638
|
`# !pip install llama-cpp-python
|
|
@@ -1731,6 +1869,22 @@ opendde doctor
|
|
|
1731
1869
|
opendde pred -i examples/input.json -o ./output -n opendde_v1`,
|
|
1732
1870
|
];
|
|
1733
1871
|
|
|
1872
|
+
export const opendecision = (model: ModelData): string[] => [
|
|
1873
|
+
`# pip install tokz-opendecision
|
|
1874
|
+
from opendecision import OpenDecision, Choice, Bool, MultiLabel
|
|
1875
|
+
|
|
1876
|
+
model = OpenDecision.from_pretrained("${model.id}")
|
|
1877
|
+
out = model.decide(
|
|
1878
|
+
"I was charged twice for my May invoice and the app keeps logging me out.",
|
|
1879
|
+
{
|
|
1880
|
+
"queue": Choice(["billing", "technical", "account", "sales"]),
|
|
1881
|
+
"tags": MultiLabel(["double_charge", "login_issue", "refund_request", "outage"]),
|
|
1882
|
+
"urgent": Bool(),
|
|
1883
|
+
},
|
|
1884
|
+
)
|
|
1885
|
+
print(out["queue"].best, out["tags"].selected, out["urgent"].policy)`,
|
|
1886
|
+
];
|
|
1887
|
+
|
|
1734
1888
|
export const paddlenlp = (model: ModelData): string[] => {
|
|
1735
1889
|
const architecture = model.config?.architectures?.[0];
|
|
1736
1890
|
// interpolated as a Python class name, so a non-identifier is treated as absent
|
|
@@ -2021,6 +2175,13 @@ export const timm = (model: ModelData): string[] => [
|
|
|
2021
2175
|
model = timm.create_model("hf-hub:${model.id}", pretrained=True)`,
|
|
2022
2176
|
];
|
|
2023
2177
|
|
|
2178
|
+
// create_model() takes a name from the torch-pointcloud registry; the weights live in "torch-pointcloud/<name>"
|
|
2179
|
+
export const torch_pointcloud = (model: ModelData): string[] => [
|
|
2180
|
+
`import torch_pointcloud as tp
|
|
2181
|
+
|
|
2182
|
+
model = tp.create_model("${nameWithoutNamespace(model.id)}", pretrained=True)`,
|
|
2183
|
+
];
|
|
2184
|
+
|
|
2024
2185
|
export const saelens = (/* model: ModelData */): string[] => [
|
|
2025
2186
|
`# pip install sae-lens
|
|
2026
2187
|
from sae_lens import SAE
|
|
@@ -3015,6 +3176,77 @@ model = SwarmFormerModel.from_pretrained("${model.id}")
|
|
|
3015
3176
|
`,
|
|
3016
3177
|
];
|
|
3017
3178
|
|
|
3179
|
+
// Unitree deploy controllers live in two repos with slightly different robot folder names:
|
|
3180
|
+
// unitree_rl_lab (policies trained with Isaac Lab) and unitree_rl_mjlab (policies trained with mjlab).
|
|
3181
|
+
const UNITREE_ROBOTS: Record<string, { bin: string; isaaclab?: string; mjlab?: string }> = {
|
|
3182
|
+
"unitree-g1-29dof": { bin: "g1_ctrl", isaaclab: "g1_29dof", mjlab: "g1" },
|
|
3183
|
+
"unitree-g1-23dof": { bin: "g1_ctrl", isaaclab: "g1_23dof", mjlab: "g1_23dof" },
|
|
3184
|
+
"unitree-go2": { bin: "go2_ctrl", isaaclab: "go2", mjlab: "go2" },
|
|
3185
|
+
"unitree-go2w": { bin: "go2w_ctrl", isaaclab: "go2w" },
|
|
3186
|
+
"unitree-h1": { bin: "h1_ctrl", isaaclab: "h1" },
|
|
3187
|
+
"unitree-h1-2": { bin: "h1_2_ctrl", isaaclab: "h1_2", mjlab: "h1_2" },
|
|
3188
|
+
"unitree-b2": { bin: "b2_ctrl", isaaclab: "b2" },
|
|
3189
|
+
"unitree-a2": { bin: "a2_ctrl", mjlab: "a2" },
|
|
3190
|
+
"unitree-r1": { bin: "r1_ctrl", mjlab: "r1" },
|
|
3191
|
+
};
|
|
3192
|
+
|
|
3193
|
+
export const unitree = (model: ModelData): string[] => {
|
|
3194
|
+
// Everything comes from the model card tags: unitree-<robot>, isaaclab | mjlab, velocity | mimic
|
|
3195
|
+
const framework = model.tags.includes("mjlab") ? "mjlab" : "isaaclab";
|
|
3196
|
+
const repo = framework === "mjlab" ? "unitree_rl_mjlab" : "unitree_rl_lab";
|
|
3197
|
+
const robotTags = Object.keys(UNITREE_ROBOTS).filter((tag) => model.tags.includes(tag));
|
|
3198
|
+
const robot = robotTags.length === 1 ? UNITREE_ROBOTS[robotTags[0]] : undefined;
|
|
3199
|
+
const dir = robot?.[framework];
|
|
3200
|
+
const robotDir = dir ?? "ROBOT";
|
|
3201
|
+
const bin = dir && robot ? robot.bin : "ROBOT_ctrl";
|
|
3202
|
+
const prefix = dir ? "" : `# Replace ROBOT with the robot named in the model card.\n`;
|
|
3203
|
+
const name = model.id.split("/").pop() ?? model.id;
|
|
3204
|
+
const simFlag = framework === "mjlab" ? " --network=lo" : "";
|
|
3205
|
+
|
|
3206
|
+
let install: string;
|
|
3207
|
+
if (model.tags.includes("mimic")) {
|
|
3208
|
+
const policyDir = `config/policy/mimic/${name}`;
|
|
3209
|
+
const motion =
|
|
3210
|
+
framework === "mjlab"
|
|
3211
|
+
? `# motion_file: ${policyDir}/params/motion.npz`
|
|
3212
|
+
: `# motion_file: ${policyDir}/params/motion.csv\n# fps: 60`;
|
|
3213
|
+
install = `hf download ${model.id} --local-dir ${policyDir}
|
|
3214
|
+
# Enable the policy in config/config.yaml:
|
|
3215
|
+
# FSM:
|
|
3216
|
+
# _:
|
|
3217
|
+
# Mimic_Hub: {id: 110, type: Mimic}
|
|
3218
|
+
# Velocity:
|
|
3219
|
+
# transitions:
|
|
3220
|
+
# Mimic_Hub: LT(2s) + up.on_pressed
|
|
3221
|
+
# Mimic_Hub:
|
|
3222
|
+
# transitions:
|
|
3223
|
+
# Passive: LT + B.on_pressed
|
|
3224
|
+
# Velocity: RB + X.on_pressed
|
|
3225
|
+
# policy_dir: ${policyDir}/
|
|
3226
|
+
${motion}`;
|
|
3227
|
+
} else {
|
|
3228
|
+
const velocityDir =
|
|
3229
|
+
framework === "mjlab" || dir === "g1_29dof"
|
|
3230
|
+
? "config/policy/velocity"
|
|
3231
|
+
: `../../../logs/rsl_rl/unitree_${robotDir}_velocity`;
|
|
3232
|
+
install = `# The Velocity state runs the last policy folder in ${velocityDir}
|
|
3233
|
+
hf download ${model.id} --local-dir ${velocityDir}/v1`;
|
|
3234
|
+
}
|
|
3235
|
+
|
|
3236
|
+
return [
|
|
3237
|
+
`${prefix}# 1. Get the deploy controller and the policy
|
|
3238
|
+
git clone https://github.com/unitreerobotics/${repo}
|
|
3239
|
+
cd ${repo}/deploy/robots/${robotDir}
|
|
3240
|
+
${install}`,
|
|
3241
|
+
`# 2. Build the controller on Linux, with unitree_sdk2 and its dependencies installed
|
|
3242
|
+
mkdir -p build && cd build && cmake .. && make`,
|
|
3243
|
+
`# 3. Test in simulation first: start unitree_mujoco, then run
|
|
3244
|
+
./${bin}${simFlag}`,
|
|
3245
|
+
`# 4. Run on the robot, over its Ethernet interface
|
|
3246
|
+
./${bin} --network eth0`,
|
|
3247
|
+
];
|
|
3248
|
+
};
|
|
3249
|
+
|
|
3018
3250
|
export const univa = (model: ModelData): string[] => [
|
|
3019
3251
|
`# Follow installation instructions at https://github.com/PKU-YuanGroup/UniWorld-V1
|
|
3020
3252
|
import torch
|