@huggingface/tasks 0.13.1-test → 0.13.1-test2

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.
Files changed (198) hide show
  1. package/package.json +4 -2
  2. package/src/dataset-libraries.ts +89 -0
  3. package/src/default-widget-inputs.ts +718 -0
  4. package/src/gguf.ts +40 -0
  5. package/src/hardware.ts +482 -0
  6. package/src/index.ts +59 -0
  7. package/src/library-to-tasks.ts +76 -0
  8. package/src/local-apps.ts +412 -0
  9. package/src/model-data.ts +149 -0
  10. package/src/model-libraries-downloads.ts +18 -0
  11. package/src/model-libraries-snippets.ts +1128 -0
  12. package/src/model-libraries.ts +820 -0
  13. package/src/pipelines.ts +698 -0
  14. package/src/snippets/common.ts +39 -0
  15. package/src/snippets/curl.spec.ts +94 -0
  16. package/src/snippets/curl.ts +120 -0
  17. package/src/snippets/index.ts +7 -0
  18. package/src/snippets/inputs.ts +167 -0
  19. package/src/snippets/js.spec.ts +148 -0
  20. package/src/snippets/js.ts +305 -0
  21. package/src/snippets/python.spec.ts +144 -0
  22. package/src/snippets/python.ts +321 -0
  23. package/src/snippets/types.ts +16 -0
  24. package/src/tasks/audio-classification/about.md +86 -0
  25. package/src/tasks/audio-classification/data.ts +81 -0
  26. package/src/tasks/audio-classification/inference.ts +52 -0
  27. package/src/tasks/audio-classification/spec/input.json +35 -0
  28. package/src/tasks/audio-classification/spec/output.json +11 -0
  29. package/src/tasks/audio-to-audio/about.md +56 -0
  30. package/src/tasks/audio-to-audio/data.ts +70 -0
  31. package/src/tasks/automatic-speech-recognition/about.md +90 -0
  32. package/src/tasks/automatic-speech-recognition/data.ts +82 -0
  33. package/src/tasks/automatic-speech-recognition/inference.ts +160 -0
  34. package/src/tasks/automatic-speech-recognition/spec/input.json +35 -0
  35. package/src/tasks/automatic-speech-recognition/spec/output.json +38 -0
  36. package/src/tasks/chat-completion/inference.ts +322 -0
  37. package/src/tasks/chat-completion/spec/input.json +350 -0
  38. package/src/tasks/chat-completion/spec/output.json +206 -0
  39. package/src/tasks/chat-completion/spec/stream_output.json +213 -0
  40. package/src/tasks/common-definitions.json +100 -0
  41. package/src/tasks/depth-estimation/about.md +45 -0
  42. package/src/tasks/depth-estimation/data.ts +70 -0
  43. package/src/tasks/depth-estimation/inference.ts +35 -0
  44. package/src/tasks/depth-estimation/spec/input.json +25 -0
  45. package/src/tasks/depth-estimation/spec/output.json +16 -0
  46. package/src/tasks/document-question-answering/about.md +53 -0
  47. package/src/tasks/document-question-answering/data.ts +85 -0
  48. package/src/tasks/document-question-answering/inference.ts +110 -0
  49. package/src/tasks/document-question-answering/spec/input.json +85 -0
  50. package/src/tasks/document-question-answering/spec/output.json +36 -0
  51. package/src/tasks/feature-extraction/about.md +72 -0
  52. package/src/tasks/feature-extraction/data.ts +57 -0
  53. package/src/tasks/feature-extraction/inference.ts +40 -0
  54. package/src/tasks/feature-extraction/spec/input.json +47 -0
  55. package/src/tasks/feature-extraction/spec/output.json +15 -0
  56. package/src/tasks/fill-mask/about.md +51 -0
  57. package/src/tasks/fill-mask/data.ts +79 -0
  58. package/src/tasks/fill-mask/inference.ts +62 -0
  59. package/src/tasks/fill-mask/spec/input.json +38 -0
  60. package/src/tasks/fill-mask/spec/output.json +29 -0
  61. package/src/tasks/image-classification/about.md +50 -0
  62. package/src/tasks/image-classification/data.ts +88 -0
  63. package/src/tasks/image-classification/inference.ts +52 -0
  64. package/src/tasks/image-classification/spec/input.json +35 -0
  65. package/src/tasks/image-classification/spec/output.json +11 -0
  66. package/src/tasks/image-feature-extraction/about.md +23 -0
  67. package/src/tasks/image-feature-extraction/data.ts +59 -0
  68. package/src/tasks/image-segmentation/about.md +63 -0
  69. package/src/tasks/image-segmentation/data.ts +99 -0
  70. package/src/tasks/image-segmentation/inference.ts +69 -0
  71. package/src/tasks/image-segmentation/spec/input.json +45 -0
  72. package/src/tasks/image-segmentation/spec/output.json +26 -0
  73. package/src/tasks/image-text-to-text/about.md +76 -0
  74. package/src/tasks/image-text-to-text/data.ts +102 -0
  75. package/src/tasks/image-to-3d/about.md +62 -0
  76. package/src/tasks/image-to-3d/data.ts +75 -0
  77. package/src/tasks/image-to-image/about.md +129 -0
  78. package/src/tasks/image-to-image/data.ts +101 -0
  79. package/src/tasks/image-to-image/inference.ts +68 -0
  80. package/src/tasks/image-to-image/spec/input.json +55 -0
  81. package/src/tasks/image-to-image/spec/output.json +12 -0
  82. package/src/tasks/image-to-text/about.md +61 -0
  83. package/src/tasks/image-to-text/data.ts +82 -0
  84. package/src/tasks/image-to-text/inference.ts +143 -0
  85. package/src/tasks/image-to-text/spec/input.json +34 -0
  86. package/src/tasks/image-to-text/spec/output.json +14 -0
  87. package/src/tasks/index.ts +312 -0
  88. package/src/tasks/keypoint-detection/about.md +57 -0
  89. package/src/tasks/keypoint-detection/data.ts +50 -0
  90. package/src/tasks/mask-generation/about.md +65 -0
  91. package/src/tasks/mask-generation/data.ts +55 -0
  92. package/src/tasks/object-detection/about.md +37 -0
  93. package/src/tasks/object-detection/data.ts +86 -0
  94. package/src/tasks/object-detection/inference.ts +75 -0
  95. package/src/tasks/object-detection/spec/input.json +31 -0
  96. package/src/tasks/object-detection/spec/output.json +50 -0
  97. package/src/tasks/placeholder/about.md +15 -0
  98. package/src/tasks/placeholder/data.ts +21 -0
  99. package/src/tasks/placeholder/spec/input.json +35 -0
  100. package/src/tasks/placeholder/spec/output.json +17 -0
  101. package/src/tasks/question-answering/about.md +56 -0
  102. package/src/tasks/question-answering/data.ts +75 -0
  103. package/src/tasks/question-answering/inference.ts +99 -0
  104. package/src/tasks/question-answering/spec/input.json +67 -0
  105. package/src/tasks/question-answering/spec/output.json +29 -0
  106. package/src/tasks/reinforcement-learning/about.md +167 -0
  107. package/src/tasks/reinforcement-learning/data.ts +75 -0
  108. package/src/tasks/sentence-similarity/about.md +97 -0
  109. package/src/tasks/sentence-similarity/data.ts +101 -0
  110. package/src/tasks/sentence-similarity/inference.ts +32 -0
  111. package/src/tasks/sentence-similarity/spec/input.json +40 -0
  112. package/src/tasks/sentence-similarity/spec/output.json +12 -0
  113. package/src/tasks/summarization/about.md +58 -0
  114. package/src/tasks/summarization/data.ts +76 -0
  115. package/src/tasks/summarization/inference.ts +57 -0
  116. package/src/tasks/summarization/spec/input.json +42 -0
  117. package/src/tasks/summarization/spec/output.json +14 -0
  118. package/src/tasks/table-question-answering/about.md +43 -0
  119. package/src/tasks/table-question-answering/data.ts +59 -0
  120. package/src/tasks/table-question-answering/inference.ts +61 -0
  121. package/src/tasks/table-question-answering/spec/input.json +44 -0
  122. package/src/tasks/table-question-answering/spec/output.json +40 -0
  123. package/src/tasks/tabular-classification/about.md +65 -0
  124. package/src/tasks/tabular-classification/data.ts +68 -0
  125. package/src/tasks/tabular-regression/about.md +87 -0
  126. package/src/tasks/tabular-regression/data.ts +57 -0
  127. package/src/tasks/text-classification/about.md +173 -0
  128. package/src/tasks/text-classification/data.ts +103 -0
  129. package/src/tasks/text-classification/inference.ts +51 -0
  130. package/src/tasks/text-classification/spec/input.json +35 -0
  131. package/src/tasks/text-classification/spec/output.json +11 -0
  132. package/src/tasks/text-generation/about.md +154 -0
  133. package/src/tasks/text-generation/data.ts +114 -0
  134. package/src/tasks/text-generation/inference.ts +200 -0
  135. package/src/tasks/text-generation/spec/input.json +219 -0
  136. package/src/tasks/text-generation/spec/output.json +179 -0
  137. package/src/tasks/text-generation/spec/stream_output.json +103 -0
  138. package/src/tasks/text-to-3d/about.md +62 -0
  139. package/src/tasks/text-to-3d/data.ts +56 -0
  140. package/src/tasks/text-to-audio/inference.ts +143 -0
  141. package/src/tasks/text-to-audio/spec/input.json +31 -0
  142. package/src/tasks/text-to-audio/spec/output.json +17 -0
  143. package/src/tasks/text-to-image/about.md +96 -0
  144. package/src/tasks/text-to-image/data.ts +100 -0
  145. package/src/tasks/text-to-image/inference.ts +75 -0
  146. package/src/tasks/text-to-image/spec/input.json +63 -0
  147. package/src/tasks/text-to-image/spec/output.json +13 -0
  148. package/src/tasks/text-to-speech/about.md +63 -0
  149. package/src/tasks/text-to-speech/data.ts +79 -0
  150. package/src/tasks/text-to-speech/inference.ts +145 -0
  151. package/src/tasks/text-to-speech/spec/input.json +31 -0
  152. package/src/tasks/text-to-speech/spec/output.json +7 -0
  153. package/src/tasks/text-to-video/about.md +41 -0
  154. package/src/tasks/text-to-video/data.ts +102 -0
  155. package/src/tasks/text2text-generation/inference.ts +55 -0
  156. package/src/tasks/text2text-generation/spec/input.json +55 -0
  157. package/src/tasks/text2text-generation/spec/output.json +14 -0
  158. package/src/tasks/token-classification/about.md +76 -0
  159. package/src/tasks/token-classification/data.ts +92 -0
  160. package/src/tasks/token-classification/inference.ts +85 -0
  161. package/src/tasks/token-classification/spec/input.json +65 -0
  162. package/src/tasks/token-classification/spec/output.json +37 -0
  163. package/src/tasks/translation/about.md +65 -0
  164. package/src/tasks/translation/data.ts +70 -0
  165. package/src/tasks/translation/inference.ts +67 -0
  166. package/src/tasks/translation/spec/input.json +50 -0
  167. package/src/tasks/translation/spec/output.json +14 -0
  168. package/src/tasks/unconditional-image-generation/about.md +50 -0
  169. package/src/tasks/unconditional-image-generation/data.ts +72 -0
  170. package/src/tasks/video-classification/about.md +37 -0
  171. package/src/tasks/video-classification/data.ts +84 -0
  172. package/src/tasks/video-classification/inference.ts +59 -0
  173. package/src/tasks/video-classification/spec/input.json +42 -0
  174. package/src/tasks/video-classification/spec/output.json +10 -0
  175. package/src/tasks/video-text-to-text/about.md +98 -0
  176. package/src/tasks/video-text-to-text/data.ts +66 -0
  177. package/src/tasks/visual-question-answering/about.md +48 -0
  178. package/src/tasks/visual-question-answering/data.ts +97 -0
  179. package/src/tasks/visual-question-answering/inference.ts +62 -0
  180. package/src/tasks/visual-question-answering/spec/input.json +41 -0
  181. package/src/tasks/visual-question-answering/spec/output.json +21 -0
  182. package/src/tasks/zero-shot-classification/about.md +40 -0
  183. package/src/tasks/zero-shot-classification/data.ts +70 -0
  184. package/src/tasks/zero-shot-classification/inference.ts +67 -0
  185. package/src/tasks/zero-shot-classification/spec/input.json +50 -0
  186. package/src/tasks/zero-shot-classification/spec/output.json +11 -0
  187. package/src/tasks/zero-shot-image-classification/about.md +75 -0
  188. package/src/tasks/zero-shot-image-classification/data.ts +84 -0
  189. package/src/tasks/zero-shot-image-classification/inference.ts +61 -0
  190. package/src/tasks/zero-shot-image-classification/spec/input.json +45 -0
  191. package/src/tasks/zero-shot-image-classification/spec/output.json +10 -0
  192. package/src/tasks/zero-shot-object-detection/about.md +45 -0
  193. package/src/tasks/zero-shot-object-detection/data.ts +67 -0
  194. package/src/tasks/zero-shot-object-detection/inference.ts +66 -0
  195. package/src/tasks/zero-shot-object-detection/spec/input.json +40 -0
  196. package/src/tasks/zero-shot-object-detection/spec/output.json +47 -0
  197. package/src/tokenizer-data.ts +32 -0
  198. package/src/widget-example.ts +125 -0
@@ -0,0 +1,820 @@
1
+ import * as snippets from "./model-libraries-snippets.js";
2
+ import type { ModelData } from "./model-data.js";
3
+ import type { ElasticSearchQuery } from "./model-libraries-downloads.js";
4
+
5
+ /**
6
+ * Elements configurable by a model library.
7
+ */
8
+ export interface LibraryUiElement {
9
+ /**
10
+ * Pretty name of the library.
11
+ * displayed in tags, and on the main
12
+ * call-to-action button on the model page.
13
+ */
14
+ prettyLabel: string;
15
+ /**
16
+ * Repo name of the library's (usually on GitHub) code repo
17
+ */
18
+ repoName: string;
19
+ /**
20
+ * URL to library's (usually on GitHub) code repo
21
+ */
22
+ repoUrl: string;
23
+ /**
24
+ * URL to library's docs
25
+ */
26
+ docsUrl?: string;
27
+ /**
28
+ * Code snippet(s) displayed on model page
29
+ */
30
+ snippets?: (model: ModelData) => string[];
31
+ /**
32
+ * Elastic query used to count this library's model downloads
33
+ *
34
+ * By default, those files are counted:
35
+ * "config.json", "config.yaml", "hyperparams.yaml", "meta.yaml"
36
+ */
37
+ countDownloads?: ElasticSearchQuery;
38
+ /**
39
+ * should we display this library in hf.co/models filter
40
+ * (only for popular libraries with > 100 models)
41
+ */
42
+ filter?: boolean;
43
+ }
44
+
45
+ /**
46
+ * Add your new library here.
47
+ *
48
+ * This is for modeling (= architectures) libraries, not for file formats (like ONNX, etc).
49
+ * (unlike libraries, file formats live in an enum inside the internal codebase.)
50
+ *
51
+ * Doc on how to add a library to the Hub:
52
+ *
53
+ * https://huggingface.co/docs/hub/models-adding-libraries
54
+ *
55
+ * /!\ IMPORTANT
56
+ *
57
+ * The key you choose is the tag your models have in their library_name on the Hub.
58
+ */
59
+
60
+ export const MODEL_LIBRARIES_UI_ELEMENTS = {
61
+ "adapter-transformers": {
62
+ prettyLabel: "Adapters",
63
+ repoName: "adapters",
64
+ repoUrl: "https://github.com/Adapter-Hub/adapters",
65
+ docsUrl: "https://huggingface.co/docs/hub/adapters",
66
+ snippets: snippets.adapters,
67
+ filter: true,
68
+ countDownloads: `path:"adapter_config.json"`,
69
+ },
70
+ allennlp: {
71
+ prettyLabel: "AllenNLP",
72
+ repoName: "AllenNLP",
73
+ repoUrl: "https://github.com/allenai/allennlp",
74
+ docsUrl: "https://huggingface.co/docs/hub/allennlp",
75
+ snippets: snippets.allennlp,
76
+ filter: true,
77
+ },
78
+ asteroid: {
79
+ prettyLabel: "Asteroid",
80
+ repoName: "Asteroid",
81
+ repoUrl: "https://github.com/asteroid-team/asteroid",
82
+ docsUrl: "https://huggingface.co/docs/hub/asteroid",
83
+ snippets: snippets.asteroid,
84
+ filter: true,
85
+ countDownloads: `path:"pytorch_model.bin"`,
86
+ },
87
+ audiocraft: {
88
+ prettyLabel: "Audiocraft",
89
+ repoName: "audiocraft",
90
+ repoUrl: "https://github.com/facebookresearch/audiocraft",
91
+ snippets: snippets.audiocraft,
92
+ filter: false,
93
+ countDownloads: `path:"state_dict.bin"`,
94
+ },
95
+ audioseal: {
96
+ prettyLabel: "AudioSeal",
97
+ repoName: "audioseal",
98
+ repoUrl: "https://github.com/facebookresearch/audioseal",
99
+ filter: false,
100
+ countDownloads: `path_extension:"pth"`,
101
+ snippets: snippets.audioseal,
102
+ },
103
+ bertopic: {
104
+ prettyLabel: "BERTopic",
105
+ repoName: "BERTopic",
106
+ repoUrl: "https://github.com/MaartenGr/BERTopic",
107
+ snippets: snippets.bertopic,
108
+ filter: true,
109
+ },
110
+ big_vision: {
111
+ prettyLabel: "Big Vision",
112
+ repoName: "big_vision",
113
+ repoUrl: "https://github.com/google-research/big_vision",
114
+ filter: false,
115
+ countDownloads: `path_extension:"npz"`,
116
+ },
117
+ birefnet: {
118
+ prettyLabel: "BiRefNet",
119
+ repoName: "BiRefNet",
120
+ repoUrl: "https://github.com/ZhengPeng7/BiRefNet",
121
+ snippets: snippets.birefnet,
122
+ filter: false,
123
+ },
124
+ bm25s: {
125
+ prettyLabel: "BM25S",
126
+ repoName: "bm25s",
127
+ repoUrl: "https://github.com/xhluca/bm25s",
128
+ snippets: snippets.bm25s,
129
+ filter: false,
130
+ countDownloads: `path:"params.index.json"`,
131
+ },
132
+ champ: {
133
+ prettyLabel: "Champ",
134
+ repoName: "Champ",
135
+ repoUrl: "https://github.com/fudan-generative-vision/champ",
136
+ countDownloads: `path:"champ/motion_module.pth"`,
137
+ },
138
+ chat_tts: {
139
+ prettyLabel: "ChatTTS",
140
+ repoName: "ChatTTS",
141
+ repoUrl: "https://github.com/2noise/ChatTTS.git",
142
+ snippets: snippets.chattts,
143
+ filter: false,
144
+ countDownloads: `path:"asset/GPT.pt"`,
145
+ },
146
+ colpali: {
147
+ prettyLabel: "ColPali",
148
+ repoName: "ColPali",
149
+ repoUrl: "https://github.com/ManuelFay/colpali",
150
+ filter: false,
151
+ countDownloads: `path:"adapter_config.json"`,
152
+ },
153
+ deepforest: {
154
+ prettyLabel: "DeepForest",
155
+ repoName: "deepforest",
156
+ docsUrl: "https://deepforest.readthedocs.io/en/latest/",
157
+ repoUrl: "https://github.com/weecology/DeepForest",
158
+ countDownloads: `path_extension:"pt" OR path_extension:"pl"`,
159
+ },
160
+ "depth-anything-v2": {
161
+ prettyLabel: "DepthAnythingV2",
162
+ repoName: "Depth Anything V2",
163
+ repoUrl: "https://github.com/DepthAnything/Depth-Anything-V2",
164
+ snippets: snippets.depth_anything_v2,
165
+ filter: false,
166
+ countDownloads: `path_extension:"pth"`,
167
+ },
168
+ "depth-pro": {
169
+ prettyLabel: "Depth Pro",
170
+ repoName: "Depth Pro",
171
+ repoUrl: "https://github.com/apple/ml-depth-pro",
172
+ countDownloads: `path_extension:"pt"`,
173
+ snippets: snippets.depth_pro,
174
+ filter: false,
175
+ },
176
+ diffree: {
177
+ prettyLabel: "Diffree",
178
+ repoName: "Diffree",
179
+ repoUrl: "https://github.com/OpenGVLab/Diffree",
180
+ filter: false,
181
+ countDownloads: `path:"diffree-step=000010999.ckpt"`,
182
+ },
183
+ diffusers: {
184
+ prettyLabel: "Diffusers",
185
+ repoName: "🤗/diffusers",
186
+ repoUrl: "https://github.com/huggingface/diffusers",
187
+ docsUrl: "https://huggingface.co/docs/hub/diffusers",
188
+ snippets: snippets.diffusers,
189
+ filter: true,
190
+ /// diffusers has its own more complex "countDownloads" query
191
+ },
192
+ diffusionkit: {
193
+ prettyLabel: "DiffusionKit",
194
+ repoName: "DiffusionKit",
195
+ repoUrl: "https://github.com/argmaxinc/DiffusionKit",
196
+ snippets: snippets.diffusionkit,
197
+ },
198
+ doctr: {
199
+ prettyLabel: "docTR",
200
+ repoName: "doctr",
201
+ repoUrl: "https://github.com/mindee/doctr",
202
+ },
203
+ cartesia_pytorch: {
204
+ prettyLabel: "Cartesia Pytorch",
205
+ repoName: "Cartesia Pytorch",
206
+ repoUrl: "https://github.com/cartesia-ai/cartesia_pytorch",
207
+ snippets: snippets.cartesia_pytorch,
208
+ },
209
+ cartesia_mlx: {
210
+ prettyLabel: "Cartesia MLX",
211
+ repoName: "Cartesia MLX",
212
+ repoUrl: "https://github.com/cartesia-ai/cartesia_mlx",
213
+ snippets: snippets.cartesia_mlx,
214
+ },
215
+ cotracker: {
216
+ prettyLabel: "CoTracker",
217
+ repoName: "CoTracker",
218
+ repoUrl: "https://github.com/facebookresearch/co-tracker",
219
+ filter: false,
220
+ countDownloads: `path_extension:"pth"`,
221
+ },
222
+ edsnlp: {
223
+ prettyLabel: "EDS-NLP",
224
+ repoName: "edsnlp",
225
+ repoUrl: "https://github.com/aphp/edsnlp",
226
+ docsUrl: "https://aphp.github.io/edsnlp/latest/",
227
+ filter: false,
228
+ snippets: snippets.edsnlp,
229
+ countDownloads: `path_filename:"config" AND path_extension:"cfg"`,
230
+ },
231
+ elm: {
232
+ prettyLabel: "ELM",
233
+ repoName: "elm",
234
+ repoUrl: "https://github.com/slicex-ai/elm",
235
+ filter: false,
236
+ countDownloads: `path_filename:"slicex_elm_config" AND path_extension:"json"`,
237
+ },
238
+ espnet: {
239
+ prettyLabel: "ESPnet",
240
+ repoName: "ESPnet",
241
+ repoUrl: "https://github.com/espnet/espnet",
242
+ docsUrl: "https://huggingface.co/docs/hub/espnet",
243
+ snippets: snippets.espnet,
244
+ filter: true,
245
+ },
246
+ fairseq: {
247
+ prettyLabel: "Fairseq",
248
+ repoName: "fairseq",
249
+ repoUrl: "https://github.com/pytorch/fairseq",
250
+ snippets: snippets.fairseq,
251
+ filter: true,
252
+ },
253
+ fastai: {
254
+ prettyLabel: "fastai",
255
+ repoName: "fastai",
256
+ repoUrl: "https://github.com/fastai/fastai",
257
+ docsUrl: "https://huggingface.co/docs/hub/fastai",
258
+ snippets: snippets.fastai,
259
+ filter: true,
260
+ },
261
+ fasttext: {
262
+ prettyLabel: "fastText",
263
+ repoName: "fastText",
264
+ repoUrl: "https://fasttext.cc/",
265
+ snippets: snippets.fasttext,
266
+ filter: true,
267
+ countDownloads: `path_extension:"bin"`,
268
+ },
269
+ flair: {
270
+ prettyLabel: "Flair",
271
+ repoName: "Flair",
272
+ repoUrl: "https://github.com/flairNLP/flair",
273
+ docsUrl: "https://huggingface.co/docs/hub/flair",
274
+ snippets: snippets.flair,
275
+ filter: true,
276
+ countDownloads: `path:"pytorch_model.bin"`,
277
+ },
278
+ "gemma.cpp": {
279
+ prettyLabel: "gemma.cpp",
280
+ repoName: "gemma.cpp",
281
+ repoUrl: "https://github.com/google/gemma.cpp",
282
+ filter: false,
283
+ countDownloads: `path_extension:"sbs"`,
284
+ },
285
+ gliner: {
286
+ prettyLabel: "GLiNER",
287
+ repoName: "GLiNER",
288
+ repoUrl: "https://github.com/urchade/GLiNER",
289
+ snippets: snippets.gliner,
290
+ filter: false,
291
+ countDownloads: `path:"gliner_config.json"`,
292
+ },
293
+ "glyph-byt5": {
294
+ prettyLabel: "Glyph-ByT5",
295
+ repoName: "Glyph-ByT5",
296
+ repoUrl: "https://github.com/AIGText/Glyph-ByT5",
297
+ filter: false,
298
+ countDownloads: `path:"checkpoints/byt5_model.pt"`,
299
+ },
300
+ grok: {
301
+ prettyLabel: "Grok",
302
+ repoName: "Grok",
303
+ repoUrl: "https://github.com/xai-org/grok-1",
304
+ filter: false,
305
+ countDownloads: `path:"ckpt/tensor00000_000" OR path:"ckpt-0/tensor00000_000"`,
306
+ },
307
+ hallo: {
308
+ prettyLabel: "Hallo",
309
+ repoName: "Hallo",
310
+ repoUrl: "https://github.com/fudan-generative-vision/hallo",
311
+ countDownloads: `path:"hallo/net.pth"`,
312
+ },
313
+ hezar: {
314
+ prettyLabel: "Hezar",
315
+ repoName: "Hezar",
316
+ repoUrl: "https://github.com/hezarai/hezar",
317
+ docsUrl: "https://hezarai.github.io/hezar",
318
+ countDownloads: `path:"model_config.yaml" OR path:"embedding/embedding_config.yaml"`,
319
+ },
320
+ htrflow: {
321
+ prettyLabel: "HTRflow",
322
+ repoName: "HTRflow",
323
+ repoUrl: "https://github.com/AI-Riksarkivet/htrflow",
324
+ docsUrl: "https://ai-riksarkivet.github.io/htrflow",
325
+ snippets: snippets.htrflow,
326
+ },
327
+ "hunyuan-dit": {
328
+ prettyLabel: "HunyuanDiT",
329
+ repoName: "HunyuanDiT",
330
+ repoUrl: "https://github.com/Tencent/HunyuanDiT",
331
+ countDownloads: `path:"pytorch_model_ema.pt" OR path:"pytorch_model_distill.pt"`,
332
+ },
333
+ imstoucan: {
334
+ prettyLabel: "IMS Toucan",
335
+ repoName: "IMS-Toucan",
336
+ repoUrl: "https://github.com/DigitalPhonetics/IMS-Toucan",
337
+ countDownloads: `path:"embedding_gan.pt" OR path:"Vocoder.pt" OR path:"ToucanTTS.pt"`,
338
+ },
339
+ keras: {
340
+ prettyLabel: "Keras",
341
+ repoName: "Keras",
342
+ repoUrl: "https://github.com/keras-team/keras",
343
+ docsUrl: "https://huggingface.co/docs/hub/keras",
344
+ snippets: snippets.keras,
345
+ filter: true,
346
+ countDownloads: `path:"config.json" OR path_extension:"keras"`,
347
+ },
348
+ "tf-keras": {
349
+ // Legacy "Keras 2" library (tensorflow-only)
350
+ prettyLabel: "TF-Keras",
351
+ repoName: "TF-Keras",
352
+ repoUrl: "https://github.com/keras-team/tf-keras",
353
+ docsUrl: "https://huggingface.co/docs/hub/tf-keras",
354
+ snippets: snippets.tf_keras,
355
+ countDownloads: `path:"saved_model.pb"`,
356
+ },
357
+ "keras-nlp": {
358
+ prettyLabel: "KerasNLP",
359
+ repoName: "KerasNLP",
360
+ repoUrl: "https://github.com/keras-team/keras-nlp",
361
+ docsUrl: "https://keras.io/keras_nlp/",
362
+ snippets: snippets.keras_nlp,
363
+ },
364
+ "keras-hub": {
365
+ prettyLabel: "KerasHub",
366
+ repoName: "KerasHub",
367
+ repoUrl: "https://github.com/keras-team/keras-hub",
368
+ docsUrl: "https://keras.io/keras_hub/",
369
+ snippets: snippets.keras_hub,
370
+ filter: true,
371
+ },
372
+ k2: {
373
+ prettyLabel: "K2",
374
+ repoName: "k2",
375
+ repoUrl: "https://github.com/k2-fsa/k2",
376
+ },
377
+ liveportrait: {
378
+ prettyLabel: "LivePortrait",
379
+ repoName: "LivePortrait",
380
+ repoUrl: "https://github.com/KwaiVGI/LivePortrait",
381
+ filter: false,
382
+ countDownloads: `path:"liveportrait/landmark.onnx"`,
383
+ },
384
+ "llama-cpp-python": {
385
+ prettyLabel: "llama-cpp-python",
386
+ repoName: "llama-cpp-python",
387
+ repoUrl: "https://github.com/abetlen/llama-cpp-python",
388
+ snippets: snippets.llama_cpp_python,
389
+ },
390
+ "mini-omni2": {
391
+ prettyLabel: "Mini-Omni2",
392
+ repoName: "Mini-Omni2",
393
+ repoUrl: "https://github.com/gpt-omni/mini-omni2",
394
+ countDownloads: `path:"model_config.yaml"`,
395
+ },
396
+ mindspore: {
397
+ prettyLabel: "MindSpore",
398
+ repoName: "mindspore",
399
+ repoUrl: "https://github.com/mindspore-ai/mindspore",
400
+ },
401
+ "mamba-ssm": {
402
+ prettyLabel: "MambaSSM",
403
+ repoName: "MambaSSM",
404
+ repoUrl: "https://github.com/state-spaces/mamba",
405
+ filter: false,
406
+ snippets: snippets.mamba_ssm,
407
+ },
408
+ "mars5-tts": {
409
+ prettyLabel: "MARS5-TTS",
410
+ repoName: "MARS5-TTS",
411
+ repoUrl: "https://github.com/Camb-ai/MARS5-TTS",
412
+ filter: false,
413
+ countDownloads: `path:"mars5_ar.safetensors"`,
414
+ snippets: snippets.mars5_tts,
415
+ },
416
+ "mesh-anything": {
417
+ prettyLabel: "MeshAnything",
418
+ repoName: "MeshAnything",
419
+ repoUrl: "https://github.com/buaacyw/MeshAnything",
420
+ filter: false,
421
+ countDownloads: `path:"MeshAnything_350m.pth"`,
422
+ snippets: snippets.mesh_anything,
423
+ },
424
+ "ml-agents": {
425
+ prettyLabel: "ml-agents",
426
+ repoName: "ml-agents",
427
+ repoUrl: "https://github.com/Unity-Technologies/ml-agents",
428
+ docsUrl: "https://huggingface.co/docs/hub/ml-agents",
429
+ snippets: snippets.mlAgents,
430
+ filter: true,
431
+ countDownloads: `path_extension:"onnx"`,
432
+ },
433
+ mlx: {
434
+ prettyLabel: "MLX",
435
+ repoName: "MLX",
436
+ repoUrl: "https://github.com/ml-explore/mlx-examples/tree/main",
437
+ snippets: snippets.mlx,
438
+ filter: true,
439
+ },
440
+ "mlx-image": {
441
+ prettyLabel: "mlx-image",
442
+ repoName: "mlx-image",
443
+ repoUrl: "https://github.com/riccardomusmeci/mlx-image",
444
+ docsUrl: "https://huggingface.co/docs/hub/mlx-image",
445
+ snippets: snippets.mlxim,
446
+ filter: false,
447
+ countDownloads: `path:"model.safetensors"`,
448
+ },
449
+ "mlc-llm": {
450
+ prettyLabel: "MLC-LLM",
451
+ repoName: "MLC-LLM",
452
+ repoUrl: "https://github.com/mlc-ai/mlc-llm",
453
+ docsUrl: "https://llm.mlc.ai/docs/",
454
+ filter: false,
455
+ countDownloads: `path:"mlc-chat-config.json"`,
456
+ },
457
+ model2vec: {
458
+ prettyLabel: "Model2Vec",
459
+ repoName: "model2vec",
460
+ repoUrl: "https://github.com/MinishLab/model2vec",
461
+ snippets: snippets.model2vec,
462
+ filter: false,
463
+ },
464
+ moshi: {
465
+ prettyLabel: "Moshi",
466
+ repoName: "Moshi",
467
+ repoUrl: "https://github.com/kyutai-labs/moshi",
468
+ filter: false,
469
+ countDownloads: `path:"tokenizer-e351c8d8-checkpoint125.safetensors"`,
470
+ },
471
+ nemo: {
472
+ prettyLabel: "NeMo",
473
+ repoName: "NeMo",
474
+ repoUrl: "https://github.com/NVIDIA/NeMo",
475
+ snippets: snippets.nemo,
476
+ filter: true,
477
+ countDownloads: `path_extension:"nemo" OR path:"model_config.yaml"`,
478
+ },
479
+ "open-oasis": {
480
+ prettyLabel: "open-oasis",
481
+ repoName: "open-oasis",
482
+ repoUrl: "https://github.com/etched-ai/open-oasis",
483
+ countDownloads: `path:"oasis500m.safetensors"`,
484
+ },
485
+ open_clip: {
486
+ prettyLabel: "OpenCLIP",
487
+ repoName: "OpenCLIP",
488
+ repoUrl: "https://github.com/mlfoundations/open_clip",
489
+ snippets: snippets.open_clip,
490
+ filter: true,
491
+ countDownloads: `path_extension:"bin" AND path_filename:*pytorch_model`,
492
+ },
493
+ paddlenlp: {
494
+ prettyLabel: "paddlenlp",
495
+ repoName: "PaddleNLP",
496
+ repoUrl: "https://github.com/PaddlePaddle/PaddleNLP",
497
+ docsUrl: "https://huggingface.co/docs/hub/paddlenlp",
498
+ snippets: snippets.paddlenlp,
499
+ filter: true,
500
+ countDownloads: `path:"model_config.json"`,
501
+ },
502
+ peft: {
503
+ prettyLabel: "PEFT",
504
+ repoName: "PEFT",
505
+ repoUrl: "https://github.com/huggingface/peft",
506
+ snippets: snippets.peft,
507
+ filter: true,
508
+ countDownloads: `path:"adapter_config.json"`,
509
+ },
510
+ pxia: {
511
+ prettyLabel: "pxia",
512
+ repoName: "pxia",
513
+ repoUrl: "https://github.com/not-lain/pxia",
514
+ snippets: snippets.pxia,
515
+ filter: false,
516
+ },
517
+ "pyannote-audio": {
518
+ prettyLabel: "pyannote.audio",
519
+ repoName: "pyannote-audio",
520
+ repoUrl: "https://github.com/pyannote/pyannote-audio",
521
+ snippets: snippets.pyannote_audio,
522
+ filter: true,
523
+ },
524
+ "py-feat": {
525
+ prettyLabel: "Py-Feat",
526
+ repoName: "Py-Feat",
527
+ repoUrl: "https://github.com/cosanlab/py-feat",
528
+ docsUrl: "https://py-feat.org/",
529
+ filter: false,
530
+ },
531
+ pythae: {
532
+ prettyLabel: "pythae",
533
+ repoName: "pythae",
534
+ repoUrl: "https://github.com/clementchadebec/benchmark_VAE",
535
+ snippets: snippets.pythae,
536
+ filter: false,
537
+ },
538
+ recurrentgemma: {
539
+ prettyLabel: "RecurrentGemma",
540
+ repoName: "recurrentgemma",
541
+ repoUrl: "https://github.com/google-deepmind/recurrentgemma",
542
+ filter: false,
543
+ countDownloads: `path:"tokenizer.model"`,
544
+ },
545
+ relik: {
546
+ prettyLabel: "Relik",
547
+ repoName: "Relik",
548
+ repoUrl: "https://github.com/SapienzaNLP/relik",
549
+ snippets: snippets.relik,
550
+ filter: false,
551
+ },
552
+ refiners: {
553
+ prettyLabel: "Refiners",
554
+ repoName: "Refiners",
555
+ repoUrl: "https://github.com/finegrain-ai/refiners",
556
+ docsUrl: "https://refine.rs/",
557
+ filter: false,
558
+ countDownloads: `path:"model.safetensors"`,
559
+ },
560
+ reverb: {
561
+ prettyLabel: "Reverb",
562
+ repoName: "Reverb",
563
+ repoUrl: "https://github.com/revdotcom/reverb",
564
+ filter: false,
565
+ },
566
+ saelens: {
567
+ prettyLabel: "SAELens",
568
+ repoName: "SAELens",
569
+ repoUrl: "https://github.com/jbloomAus/SAELens",
570
+ snippets: snippets.saelens,
571
+ filter: false,
572
+ },
573
+ sam2: {
574
+ prettyLabel: "sam2",
575
+ repoName: "sam2",
576
+ repoUrl: "https://github.com/facebookresearch/segment-anything-2",
577
+ filter: false,
578
+ snippets: snippets.sam2,
579
+ countDownloads: `path_extension:"pt"`,
580
+ },
581
+ "sample-factory": {
582
+ prettyLabel: "sample-factory",
583
+ repoName: "sample-factory",
584
+ repoUrl: "https://github.com/alex-petrenko/sample-factory",
585
+ docsUrl: "https://huggingface.co/docs/hub/sample-factory",
586
+ snippets: snippets.sampleFactory,
587
+ filter: true,
588
+ countDownloads: `path:"cfg.json"`,
589
+ },
590
+ sapiens: {
591
+ prettyLabel: "sapiens",
592
+ repoName: "sapiens",
593
+ repoUrl: "https://github.com/facebookresearch/sapiens",
594
+ filter: false,
595
+ countDownloads: `path_extension:"pt2" OR path_extension:"pth" OR path_extension:"onnx"`,
596
+ },
597
+ "sentence-transformers": {
598
+ prettyLabel: "sentence-transformers",
599
+ repoName: "sentence-transformers",
600
+ repoUrl: "https://github.com/UKPLab/sentence-transformers",
601
+ docsUrl: "https://huggingface.co/docs/hub/sentence-transformers",
602
+ snippets: snippets.sentenceTransformers,
603
+ filter: true,
604
+ },
605
+ setfit: {
606
+ prettyLabel: "setfit",
607
+ repoName: "setfit",
608
+ repoUrl: "https://github.com/huggingface/setfit",
609
+ docsUrl: "https://huggingface.co/docs/hub/setfit",
610
+ snippets: snippets.setfit,
611
+ filter: true,
612
+ },
613
+ sklearn: {
614
+ prettyLabel: "Scikit-learn",
615
+ repoName: "Scikit-learn",
616
+ repoUrl: "https://github.com/scikit-learn/scikit-learn",
617
+ snippets: snippets.sklearn,
618
+ filter: true,
619
+ countDownloads: `path:"sklearn_model.joblib"`,
620
+ },
621
+ spacy: {
622
+ prettyLabel: "spaCy",
623
+ repoName: "spaCy",
624
+ repoUrl: "https://github.com/explosion/spaCy",
625
+ docsUrl: "https://huggingface.co/docs/hub/spacy",
626
+ snippets: snippets.spacy,
627
+ filter: true,
628
+ countDownloads: `path_extension:"whl"`,
629
+ },
630
+ "span-marker": {
631
+ prettyLabel: "SpanMarker",
632
+ repoName: "SpanMarkerNER",
633
+ repoUrl: "https://github.com/tomaarsen/SpanMarkerNER",
634
+ docsUrl: "https://huggingface.co/docs/hub/span_marker",
635
+ snippets: snippets.span_marker,
636
+ filter: true,
637
+ },
638
+ speechbrain: {
639
+ prettyLabel: "speechbrain",
640
+ repoName: "speechbrain",
641
+ repoUrl: "https://github.com/speechbrain/speechbrain",
642
+ docsUrl: "https://huggingface.co/docs/hub/speechbrain",
643
+ snippets: snippets.speechbrain,
644
+ filter: true,
645
+ countDownloads: `path:"hyperparams.yaml"`,
646
+ },
647
+ "ssr-speech": {
648
+ prettyLabel: "SSR-Speech",
649
+ repoName: "SSR-Speech",
650
+ repoUrl: "https://github.com/WangHelin1997/SSR-Speech",
651
+ filter: false,
652
+ countDownloads: `path_extension:".pth"`,
653
+ },
654
+ "stable-audio-tools": {
655
+ prettyLabel: "Stable Audio Tools",
656
+ repoName: "stable-audio-tools",
657
+ repoUrl: "https://github.com/Stability-AI/stable-audio-tools.git",
658
+ filter: false,
659
+ countDownloads: `path:"model.safetensors"`,
660
+ snippets: snippets.stable_audio_tools,
661
+ },
662
+ "diffusion-single-file": {
663
+ prettyLabel: "Diffusion Single File",
664
+ repoName: "diffusion-single-file",
665
+ repoUrl: "https://github.com/comfyanonymous/ComfyUI",
666
+ filter: false,
667
+ countDownloads: `path_extension:"safetensors"`,
668
+ },
669
+ "seed-story": {
670
+ prettyLabel: "SEED-Story",
671
+ repoName: "SEED-Story",
672
+ repoUrl: "https://github.com/TencentARC/SEED-Story",
673
+ filter: false,
674
+ countDownloads: `path:"cvlm_llama2_tokenizer/tokenizer.model"`,
675
+ snippets: snippets.seed_story,
676
+ },
677
+ soloaudio: {
678
+ prettyLabel: "SoloAudio",
679
+ repoName: "SoloAudio",
680
+ repoUrl: "https://github.com/WangHelin1997/SoloAudio",
681
+ filter: false,
682
+ countDownloads: `path:"soloaudio_v2.pt"`,
683
+ },
684
+ "stable-baselines3": {
685
+ prettyLabel: "stable-baselines3",
686
+ repoName: "stable-baselines3",
687
+ repoUrl: "https://github.com/huggingface/huggingface_sb3",
688
+ docsUrl: "https://huggingface.co/docs/hub/stable-baselines3",
689
+ snippets: snippets.stableBaselines3,
690
+ filter: true,
691
+ countDownloads: `path_extension:"zip"`,
692
+ },
693
+ stanza: {
694
+ prettyLabel: "Stanza",
695
+ repoName: "stanza",
696
+ repoUrl: "https://github.com/stanfordnlp/stanza",
697
+ docsUrl: "https://huggingface.co/docs/hub/stanza",
698
+ snippets: snippets.stanza,
699
+ filter: true,
700
+ countDownloads: `path:"models/default.zip"`,
701
+ },
702
+ "f5-tts": {
703
+ prettyLabel: "F5-TTS",
704
+ repoName: "F5-TTS",
705
+ repoUrl: "https://github.com/SWivid/F5-TTS",
706
+ filter: false,
707
+ countDownloads: `path_extension:"safetensors" OR path_extension:"pt"`,
708
+ },
709
+ genmo: {
710
+ prettyLabel: "Genmo",
711
+ repoName: "Genmo",
712
+ repoUrl: "https://github.com/genmoai/models",
713
+ filter: false,
714
+ countDownloads: `path:"vae_stats.json"`,
715
+ },
716
+ tensorflowtts: {
717
+ prettyLabel: "TensorFlowTTS",
718
+ repoName: "TensorFlowTTS",
719
+ repoUrl: "https://github.com/TensorSpeech/TensorFlowTTS",
720
+ snippets: snippets.tensorflowtts,
721
+ },
722
+ "tic-clip": {
723
+ prettyLabel: "TiC-CLIP",
724
+ repoName: "TiC-CLIP",
725
+ repoUrl: "https://github.com/apple/ml-tic-clip",
726
+ filter: false,
727
+ countDownloads: `path_extension:"pt" AND path_prefix:"checkpoints/"`,
728
+ },
729
+ timesfm: {
730
+ prettyLabel: "TimesFM",
731
+ repoName: "timesfm",
732
+ repoUrl: "https://github.com/google-research/timesfm",
733
+ filter: false,
734
+ countDownloads: `path:"checkpoints/checkpoint_1100000/state/checkpoint"`,
735
+ },
736
+ timm: {
737
+ prettyLabel: "timm",
738
+ repoName: "pytorch-image-models",
739
+ repoUrl: "https://github.com/rwightman/pytorch-image-models",
740
+ docsUrl: "https://huggingface.co/docs/hub/timm",
741
+ snippets: snippets.timm,
742
+ filter: true,
743
+ countDownloads: `path:"pytorch_model.bin" OR path:"model.safetensors"`,
744
+ },
745
+ transformers: {
746
+ prettyLabel: "Transformers",
747
+ repoName: "🤗/transformers",
748
+ repoUrl: "https://github.com/huggingface/transformers",
749
+ docsUrl: "https://huggingface.co/docs/hub/transformers",
750
+ snippets: snippets.transformers,
751
+ filter: true,
752
+ },
753
+ "transformers.js": {
754
+ prettyLabel: "Transformers.js",
755
+ repoName: "transformers.js",
756
+ repoUrl: "https://github.com/huggingface/transformers.js",
757
+ docsUrl: "https://huggingface.co/docs/hub/transformers-js",
758
+ snippets: snippets.transformersJS,
759
+ filter: true,
760
+ },
761
+ "unity-sentis": {
762
+ prettyLabel: "unity-sentis",
763
+ repoName: "unity-sentis",
764
+ repoUrl: "https://github.com/Unity-Technologies/sentis-samples",
765
+ snippets: snippets.sentis,
766
+ filter: true,
767
+ countDownloads: `path_extension:"sentis"`,
768
+ },
769
+ "vfi-mamba": {
770
+ prettyLabel: "VFIMamba",
771
+ repoName: "VFIMamba",
772
+ repoUrl: "https://github.com/MCG-NJU/VFIMamba",
773
+ countDownloads: `path_extension:"pkl"`,
774
+ snippets: snippets.vfimamba,
775
+ },
776
+ voicecraft: {
777
+ prettyLabel: "VoiceCraft",
778
+ repoName: "VoiceCraft",
779
+ repoUrl: "https://github.com/jasonppy/VoiceCraft",
780
+ docsUrl: "https://github.com/jasonppy/VoiceCraft",
781
+ snippets: snippets.voicecraft,
782
+ },
783
+ yolov10: {
784
+ prettyLabel: "YOLOv10",
785
+ repoName: "yolov10",
786
+ repoUrl: "https://github.com/THU-MIG/yolov10",
787
+ docsUrl: "https://github.com/THU-MIG/yolov10",
788
+ snippets: snippets.yolov10,
789
+ },
790
+ whisperkit: {
791
+ prettyLabel: "WhisperKit",
792
+ repoName: "WhisperKit",
793
+ repoUrl: "https://github.com/argmaxinc/WhisperKit",
794
+ docsUrl: "https://github.com/argmaxinc/WhisperKit?tab=readme-ov-file#homebrew",
795
+ snippets: snippets.whisperkit,
796
+ countDownloads: `path_filename:"model" AND path_extension:"mil" AND _exists_:"path_prefix"`,
797
+ },
798
+ "3dtopia-xl": {
799
+ prettyLabel: "3DTopia-XL",
800
+ repoName: "3DTopia-XL",
801
+ repoUrl: "https://github.com/3DTopia/3DTopia-XL",
802
+ filter: false,
803
+ countDownloads: `path:"model_vae_fp16.pt"`,
804
+ snippets: snippets.threedtopia_xl,
805
+ },
806
+ } satisfies Record<string, LibraryUiElement>;
807
+
808
+ export type ModelLibraryKey = keyof typeof MODEL_LIBRARIES_UI_ELEMENTS;
809
+
810
+ export const ALL_MODEL_LIBRARY_KEYS = Object.keys(MODEL_LIBRARIES_UI_ELEMENTS) as ModelLibraryKey[];
811
+
812
+ export const ALL_DISPLAY_MODEL_LIBRARY_KEYS = (
813
+ Object.entries(MODEL_LIBRARIES_UI_ELEMENTS as Record<ModelLibraryKey, LibraryUiElement>) as [
814
+ ModelLibraryKey,
815
+ LibraryUiElement,
816
+ ][]
817
+ )
818
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
819
+ .filter(([_, v]) => v.filter)
820
+ .map(([k]) => k);