@huggingface/tasks 0.10.3 → 0.10.5
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/index.cjs +293 -9
- package/dist/index.js +291 -9
- package/dist/src/hardware.d.ts +305 -0
- package/dist/src/hardware.d.ts.map +1 -0
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/local-apps.d.ts +0 -5
- package/dist/src/local-apps.d.ts.map +1 -1
- package/dist/src/widget-example.d.ts +2 -5
- package/dist/src/widget-example.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/hardware.ts +309 -0
- package/src/index.ts +2 -1
- package/src/local-apps.ts +11 -9
- package/src/widget-example.ts +3 -6
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Biden AI Executive Order
|
|
3
|
+
* https://www.whitehouse.gov/briefing-room/presidential-actions/2023/10/30/executive-order-on-the-safe-secure-and-trustworthy-development-and-use-of-artificial-intelligence/
|
|
4
|
+
*/
|
|
5
|
+
export declare const TFLOPS_THRESHOLD_WHITE_HOUSE_MODEL_TRAINING_TOTAL: number;
|
|
6
|
+
export declare const TFLOPS_THRESHOLD_WHITE_HOUSE_MODEL_TRAINING_TOTAL_BIOLOGY: number;
|
|
7
|
+
export declare const TFLOPS_THRESHOLD_WHITE_HOUSE_CLUSTER: number;
|
|
8
|
+
/**
|
|
9
|
+
* EU AI Act
|
|
10
|
+
* https://ec.europa.eu/commission/presscorner/detail/en/qanda_21_1683
|
|
11
|
+
*/
|
|
12
|
+
export declare const TFLOPS_THRESHOLD_EU_AI_ACT_MODEL_TRAINING_TOTAL: number;
|
|
13
|
+
export interface HardwareSpec {
|
|
14
|
+
/**
|
|
15
|
+
* Approximate value, in FP16 whenever possible.
|
|
16
|
+
* This is only approximate/theoretical and shouldn't be taken too seriously.
|
|
17
|
+
* Currently the CPU values are from cpu-monkey.com
|
|
18
|
+
* while the GPU values are from techpowerup.com
|
|
19
|
+
*
|
|
20
|
+
* Note to reviewers: I got fed up with data entry,
|
|
21
|
+
* and HuggingChat running Llama3 with Web search was failing a bit,
|
|
22
|
+
* so some of those values might be slightly inaccurate. Forgive me and please feel free to improve.
|
|
23
|
+
*/
|
|
24
|
+
tflops: number;
|
|
25
|
+
/**
|
|
26
|
+
* If an array is specified, options of memory size (can be VRAM, unified RAM)
|
|
27
|
+
* e.g. an A100 exists in 40 or 80 GB.
|
|
28
|
+
*/
|
|
29
|
+
memory?: number[];
|
|
30
|
+
}
|
|
31
|
+
export declare const DEFAULT_MEMORY_OPTIONS: number[];
|
|
32
|
+
export declare const SKUS: {
|
|
33
|
+
GPU: {
|
|
34
|
+
NVIDIA: {
|
|
35
|
+
H100: {
|
|
36
|
+
tflops: number;
|
|
37
|
+
memory: number[];
|
|
38
|
+
};
|
|
39
|
+
L40: {
|
|
40
|
+
tflops: number;
|
|
41
|
+
memory: number[];
|
|
42
|
+
};
|
|
43
|
+
"RTX 6000 Ada": {
|
|
44
|
+
tflops: number;
|
|
45
|
+
memory: number[];
|
|
46
|
+
};
|
|
47
|
+
A100: {
|
|
48
|
+
tflops: number;
|
|
49
|
+
memory: number[];
|
|
50
|
+
};
|
|
51
|
+
A40: {
|
|
52
|
+
tflops: number;
|
|
53
|
+
memory: number[];
|
|
54
|
+
};
|
|
55
|
+
A10: {
|
|
56
|
+
tflops: number;
|
|
57
|
+
memory: number[];
|
|
58
|
+
};
|
|
59
|
+
T4: {
|
|
60
|
+
tflops: number;
|
|
61
|
+
memory: number[];
|
|
62
|
+
};
|
|
63
|
+
"RTX 4090": {
|
|
64
|
+
tflops: number;
|
|
65
|
+
memory: number[];
|
|
66
|
+
};
|
|
67
|
+
"RTX 4080 SUPER": {
|
|
68
|
+
tflops: number;
|
|
69
|
+
memory: number[];
|
|
70
|
+
};
|
|
71
|
+
"RTX 4080": {
|
|
72
|
+
tflops: number;
|
|
73
|
+
memory: number[];
|
|
74
|
+
};
|
|
75
|
+
"RTX 4070": {
|
|
76
|
+
tflops: number;
|
|
77
|
+
memory: number[];
|
|
78
|
+
};
|
|
79
|
+
"RTX 4070 Ti": {
|
|
80
|
+
tflops: number;
|
|
81
|
+
memory: number[];
|
|
82
|
+
};
|
|
83
|
+
"RTX 4070 Super": {
|
|
84
|
+
tflops: number;
|
|
85
|
+
memory: number[];
|
|
86
|
+
};
|
|
87
|
+
"RTX 4070 Ti Super": {
|
|
88
|
+
tflops: number;
|
|
89
|
+
memory: number[];
|
|
90
|
+
};
|
|
91
|
+
"RTX 3090": {
|
|
92
|
+
tflops: number;
|
|
93
|
+
memory: number[];
|
|
94
|
+
};
|
|
95
|
+
"RTX 3090 Ti": {
|
|
96
|
+
tflops: number;
|
|
97
|
+
memory: number[];
|
|
98
|
+
};
|
|
99
|
+
"RTX 3080 Ti": {
|
|
100
|
+
tflops: number;
|
|
101
|
+
memory: number[];
|
|
102
|
+
};
|
|
103
|
+
"RTX 3080": {
|
|
104
|
+
tflops: number;
|
|
105
|
+
memory: number[];
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
AMD: {
|
|
109
|
+
MI300: {
|
|
110
|
+
tflops: number;
|
|
111
|
+
memory: number[];
|
|
112
|
+
};
|
|
113
|
+
MI250: {
|
|
114
|
+
tflops: number;
|
|
115
|
+
memory: number[];
|
|
116
|
+
};
|
|
117
|
+
MI210: {
|
|
118
|
+
tflops: number;
|
|
119
|
+
memory: number[];
|
|
120
|
+
};
|
|
121
|
+
"RX 7900 XTX": {
|
|
122
|
+
tflops: number;
|
|
123
|
+
memory: number[];
|
|
124
|
+
};
|
|
125
|
+
"RX 7900 XT": {
|
|
126
|
+
tflops: number;
|
|
127
|
+
memory: number[];
|
|
128
|
+
};
|
|
129
|
+
"RX 7900 GRE": {
|
|
130
|
+
tflops: number;
|
|
131
|
+
memory: number[];
|
|
132
|
+
};
|
|
133
|
+
"RX 7800 XT": {
|
|
134
|
+
tflops: number;
|
|
135
|
+
memory: number[];
|
|
136
|
+
};
|
|
137
|
+
"RX 7700 XT": {
|
|
138
|
+
tflops: number;
|
|
139
|
+
memory: number[];
|
|
140
|
+
};
|
|
141
|
+
"RX 7600 XT": {
|
|
142
|
+
tflops: number;
|
|
143
|
+
memory: number[];
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
CPU: {
|
|
148
|
+
Intel: {
|
|
149
|
+
"Xeon 4th Generation (Sapphire Rapids)": {
|
|
150
|
+
tflops: number;
|
|
151
|
+
};
|
|
152
|
+
"Xeon 3th Generation (Ice Lake)": {
|
|
153
|
+
tflops: number;
|
|
154
|
+
};
|
|
155
|
+
"Xeon 2th Generation (Cascade Lake)": {
|
|
156
|
+
tflops: number;
|
|
157
|
+
};
|
|
158
|
+
"Intel Core 13th Generation (i9)": {
|
|
159
|
+
tflops: number;
|
|
160
|
+
};
|
|
161
|
+
"Intel Core 13th Generation (i7)": {
|
|
162
|
+
tflops: number;
|
|
163
|
+
};
|
|
164
|
+
"Intel Core 13th Generation (i5)": {
|
|
165
|
+
tflops: number;
|
|
166
|
+
};
|
|
167
|
+
"Intel Core 13th Generation (i3)": {
|
|
168
|
+
tflops: number;
|
|
169
|
+
};
|
|
170
|
+
"Intel Core 12th Generation (i9)": {
|
|
171
|
+
tflops: number;
|
|
172
|
+
};
|
|
173
|
+
"Intel Core 12th Generation (i7)": {
|
|
174
|
+
tflops: number;
|
|
175
|
+
};
|
|
176
|
+
"Intel Core 12th Generation (i5)": {
|
|
177
|
+
tflops: number;
|
|
178
|
+
};
|
|
179
|
+
"Intel Core 12th Generation (i3)": {
|
|
180
|
+
tflops: number;
|
|
181
|
+
};
|
|
182
|
+
"Intel Core 11th Generation (i9)": {
|
|
183
|
+
tflops: number;
|
|
184
|
+
};
|
|
185
|
+
"Intel Core 11th Generation (i7)": {
|
|
186
|
+
tflops: number;
|
|
187
|
+
};
|
|
188
|
+
"Intel Core 11th Generation (i5)": {
|
|
189
|
+
tflops: number;
|
|
190
|
+
};
|
|
191
|
+
"Intel Core 11th Generation (i3)": {
|
|
192
|
+
tflops: number;
|
|
193
|
+
};
|
|
194
|
+
"Intel Core 10th Generation (i9)": {
|
|
195
|
+
tflops: number;
|
|
196
|
+
};
|
|
197
|
+
"Intel Core 10th Generation (i7)": {
|
|
198
|
+
tflops: number;
|
|
199
|
+
};
|
|
200
|
+
"Intel Core 10th Generation (i5)": {
|
|
201
|
+
tflops: number;
|
|
202
|
+
};
|
|
203
|
+
"Intel Core 10th Generation (i3)": {
|
|
204
|
+
tflops: number;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
AMD: {
|
|
208
|
+
"EPYC 4th Generation (Genoa)": {
|
|
209
|
+
tflops: number;
|
|
210
|
+
};
|
|
211
|
+
"EPYC 3th Generation (Milan)": {
|
|
212
|
+
tflops: number;
|
|
213
|
+
};
|
|
214
|
+
"EPYC 2th Generation (Rome)": {
|
|
215
|
+
tflops: number;
|
|
216
|
+
};
|
|
217
|
+
"EPYC 1st Generation (Naples)": {
|
|
218
|
+
tflops: number;
|
|
219
|
+
};
|
|
220
|
+
"Ryzen Zen4 7000 (Ryzen 9)": {
|
|
221
|
+
tflops: number;
|
|
222
|
+
};
|
|
223
|
+
"Ryzen Zen4 7000 (Ryzen 7)": {
|
|
224
|
+
tflops: number;
|
|
225
|
+
};
|
|
226
|
+
"Ryzen Zen4 7000 (Ryzen 5)": {
|
|
227
|
+
tflops: number;
|
|
228
|
+
};
|
|
229
|
+
"Ryzen Zen3 5000 (Ryzen 9)": {
|
|
230
|
+
tflops: number;
|
|
231
|
+
};
|
|
232
|
+
"Ryzen Zen3 5000 (Ryzen 7)": {
|
|
233
|
+
tflops: number;
|
|
234
|
+
};
|
|
235
|
+
"Ryzen Zen3 5000 (Ryzen 5)": {
|
|
236
|
+
tflops: number;
|
|
237
|
+
};
|
|
238
|
+
"Ryzen Zen 2 3000 (Threadripper)": {
|
|
239
|
+
tflops: number;
|
|
240
|
+
};
|
|
241
|
+
"Ryzen Zen 2 3000 (Ryzen 9)": {
|
|
242
|
+
tflops: number;
|
|
243
|
+
};
|
|
244
|
+
"Ryzen Zen 2 3000 (Ryzen 7)": {
|
|
245
|
+
tflops: number;
|
|
246
|
+
};
|
|
247
|
+
"Ryzen Zen 2 3000 (Ryzen 5)": {
|
|
248
|
+
tflops: number;
|
|
249
|
+
};
|
|
250
|
+
"Ryzen Zen 2 3000 (Ryzen 3)": {
|
|
251
|
+
tflops: number;
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
"Apple Silicon": {
|
|
256
|
+
"-": {
|
|
257
|
+
"Apple M1": {
|
|
258
|
+
tflops: number;
|
|
259
|
+
memory: number[];
|
|
260
|
+
};
|
|
261
|
+
"Apple M1 Pro": {
|
|
262
|
+
tflops: number;
|
|
263
|
+
memory: number[];
|
|
264
|
+
};
|
|
265
|
+
"Apple M1 Max": {
|
|
266
|
+
tflops: number;
|
|
267
|
+
memory: number[];
|
|
268
|
+
};
|
|
269
|
+
"Apple M1 Ultra": {
|
|
270
|
+
tflops: number;
|
|
271
|
+
memory: number[];
|
|
272
|
+
};
|
|
273
|
+
"Apple M2": {
|
|
274
|
+
tflops: number;
|
|
275
|
+
memory: number[];
|
|
276
|
+
};
|
|
277
|
+
"Apple M2 Pro": {
|
|
278
|
+
tflops: number;
|
|
279
|
+
memory: number[];
|
|
280
|
+
};
|
|
281
|
+
"Apple M2 Max": {
|
|
282
|
+
tflops: number;
|
|
283
|
+
memory: number[];
|
|
284
|
+
};
|
|
285
|
+
"Apple M2 Ultra": {
|
|
286
|
+
tflops: number;
|
|
287
|
+
memory: number[];
|
|
288
|
+
};
|
|
289
|
+
"Apple M3": {
|
|
290
|
+
tflops: number;
|
|
291
|
+
memory: number[];
|
|
292
|
+
};
|
|
293
|
+
"Apple M3 Pro": {
|
|
294
|
+
tflops: number;
|
|
295
|
+
memory: number[];
|
|
296
|
+
};
|
|
297
|
+
"Apple M3 Max": {
|
|
298
|
+
tflops: number;
|
|
299
|
+
memory: number[];
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
export type SkuType = keyof typeof SKUS;
|
|
305
|
+
//# sourceMappingURL=hardware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hardware.d.ts","sourceRoot":"","sources":["../../src/hardware.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iDAAiD,QAAW,CAAC;AAC1E,eAAO,MAAM,yDAAyD,QAAW,CAAC;AAClF,eAAO,MAAM,oCAAoC,QAAU,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,+CAA+C,QAAW,CAAC;AAExE,MAAM,WAAW,YAAY;IAC5B;;;;;;;;;OASG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,eAAO,MAAM,sBAAsB,UAA2C,CAAC;AAE/E,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+QuD,CAAC;AAEzE,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,IAAI,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -7,11 +7,13 @@ export { ALL_DISPLAY_MODEL_LIBRARY_KEYS, ALL_MODEL_LIBRARY_KEYS, MODEL_LIBRARIES
|
|
|
7
7
|
export type { LibraryUiElement, ModelLibraryKey } from "./model-libraries";
|
|
8
8
|
export type { ModelData, TransformersInfo } from "./model-data";
|
|
9
9
|
export type { AddedToken, SpecialTokensMap, TokenizerConfig } from "./tokenizer-data";
|
|
10
|
-
export type {
|
|
10
|
+
export type { WidgetExample, WidgetExampleAttribute, WidgetExampleAssetAndPromptInput, WidgetExampleAssetAndTextInput, WidgetExampleAssetAndZeroShotInput, WidgetExampleAssetInput, WidgetExampleChatInput, WidgetExampleSentenceSimilarityInput, WidgetExampleStructuredDataInput, WidgetExampleTableDataInput, WidgetExampleTextAndContextInput, WidgetExampleTextAndTableInput, WidgetExampleTextInput, WidgetExampleZeroShotTextInput, WidgetExampleOutput, WidgetExampleOutputUrl, WidgetExampleOutputLabels, WidgetExampleOutputAnswerScore, WidgetExampleOutputText, } from "./widget-example";
|
|
11
11
|
export { InferenceDisplayability } from "./model-data";
|
|
12
12
|
export { SPECIAL_TOKENS_ATTRIBUTES } from "./tokenizer-data";
|
|
13
13
|
import * as snippets from "./snippets";
|
|
14
14
|
export { snippets };
|
|
15
|
+
export { SKUS, DEFAULT_MEMORY_OPTIONS } from "./hardware";
|
|
16
|
+
export type { HardwareSpec, SkuType } from "./hardware";
|
|
15
17
|
export { LOCAL_APPS } from "./local-apps";
|
|
16
18
|
export type { LocalApp, LocalAppKey } from "./local-apps";
|
|
17
19
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC9E,cAAc,SAAS,CAAC;AACxB,OAAO,EACN,aAAa,EACb,cAAc,EACd,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB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BAAuB,EACvB,sBAAsB,EACtB,oCAAoC,EACpC,gCAAgC,EAChC,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,EAC9B,sBAAsB,EACtB,8BAA8B,EAC9B,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,EACzB,8BAA8B,EAC9B,uBAAuB,GACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,CAAC;AAEpB,OAAO,EAAE,IAAI,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAC1D,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/src/local-apps.d.ts
CHANGED
|
@@ -74,7 +74,6 @@ export declare const LOCAL_APPS: {
|
|
|
74
74
|
prettyLabel: string;
|
|
75
75
|
docsUrl: string;
|
|
76
76
|
mainTask: "text-generation";
|
|
77
|
-
macOSOnly: true;
|
|
78
77
|
displayOnModelPage: typeof isGgufModel;
|
|
79
78
|
deeplink: (model: ModelData) => URL;
|
|
80
79
|
};
|
|
@@ -83,10 +82,6 @@ export declare const LOCAL_APPS: {
|
|
|
83
82
|
docsUrl: string;
|
|
84
83
|
mainTask: "text-to-image";
|
|
85
84
|
macOSOnly: true;
|
|
86
|
-
comingSoon: true;
|
|
87
|
-
/**
|
|
88
|
-
* random function, will need to refine the actual conditions:
|
|
89
|
-
*/
|
|
90
85
|
displayOnModelPage: (model: ModelData) => boolean;
|
|
91
86
|
deeplink: (model: ModelData) => URL;
|
|
92
87
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-apps.d.ts","sourceRoot":"","sources":["../../src/local-apps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,kBAAkB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,CAAC;CAClD,GAAG,CACD;IACA;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC;CACnC,GACD;IACA;;OAEG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,CAAC;CACrC,CACH,CAAC;AAEF,iBAAS,WAAW,CAAC,KAAK,EAAE,SAAS,WAEpC;AAUD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU;;;;;;yBAnBS,SAAS,KAAG,MAAM
|
|
1
|
+
{"version":3,"file":"local-apps.d.ts","sourceRoot":"","sources":["../../src/local-apps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,kBAAkB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,CAAC;CAClD,GAAG,CACD;IACA;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC;CACnC,GACD;IACA;;OAEG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,CAAC;CACrC,CACH,CAAC;AAEF,iBAAS,WAAW,CAAC,KAAK,EAAE,SAAS,WAEpC;AAUD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU;;;;;;yBAnBS,SAAS,KAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEd,CAAC;AAErC,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,UAAU,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* See default-widget-inputs.ts for the default widget inputs, this files only contains the types
|
|
3
3
|
*/
|
|
4
|
+
import type { ChatCompletionInputMessage } from "./tasks";
|
|
4
5
|
type TableData = Record<string, (string | number)[]>;
|
|
5
6
|
export type WidgetExampleOutputLabels = Array<{
|
|
6
7
|
label: string;
|
|
@@ -40,12 +41,8 @@ export interface WidgetExampleBase<TOutput> {
|
|
|
40
41
|
*/
|
|
41
42
|
output?: TOutput;
|
|
42
43
|
}
|
|
43
|
-
export interface ChatMessage {
|
|
44
|
-
role: "user" | "assistant" | "system";
|
|
45
|
-
content: string;
|
|
46
|
-
}
|
|
47
44
|
export interface WidgetExampleChatInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
|
|
48
|
-
messages:
|
|
45
|
+
messages: ChatCompletionInputMessage[];
|
|
49
46
|
}
|
|
50
47
|
export interface WidgetExampleTextInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
|
|
51
48
|
text: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-example.d.ts","sourceRoot":"","sources":["../../src/widget-example.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;AAGrD,MAAM,MAAM,yBAAyB,GAAG,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAChF,MAAM,WAAW,8BAA8B;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACd;AACD,MAAM,WAAW,uBAAuB;IACvC,IAAI,EAAE,MAAM,CAAC;CACb;AACD,MAAM,WAAW,sBAAsB;IACtC,GAAG,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,mBAAmB,GAC5B,yBAAyB,GACzB,8BAA8B,GAC9B,uBAAuB,GACvB,sBAAsB,CAAC;AAG1B,MAAM,WAAW,iBAAiB,CAAC,OAAO;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE;QAEZ,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAE9B,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,SAAS,CAAC,EAAE,OAAO,CAAC;QAEpB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC7B,CAAC;IACF;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"widget-example.d.ts","sourceRoot":"","sources":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M,WAAW,8BAA8B,CAAC,OAAO,GAAG,mBAAmB,CAAE,SAAQ,sBAAsB,CAAC,OAAO,CAAC;IACrH,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,oCAAoC,CAAC,OAAO,GAAG,mBAAmB,CAClF,SAAQ,iBAAiB,CAAC,OAAO,CAAC;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,EAAE,CAAC;CACpB;AAID,MAAM,MAAM,aAAa,CAAC,OAAO,GAAG,mBAAmB,IACpD,sBAAsB,CAAC,OAAO,CAAC,GAC/B,sBAAsB,CAAC,OAAO,CAAC,GAC/B,gCAAgC,CAAC,OAAO,CAAC,GACzC,8BAA8B,CAAC,OAAO,CAAC,GACvC,uBAAuB,CAAC,OAAO,CAAC,GAChC,gCAAgC,CAAC,OAAO,CAAC,GACzC,8BAA8B,CAAC,OAAO,CAAC,GACvC,kCAAkC,CAAC,OAAO,CAAC,GAC3C,gCAAgC,CAAC,OAAO,CAAC,GACzC,2BAA2B,CAAC,OAAO,CAAC,GACpC,8BAA8B,CAAC,OAAO,CAAC,GACvC,oCAAoC,CAAC,OAAO,CAAC,CAAC;AAEjD,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC;AAE1D,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huggingface/tasks",
|
|
3
3
|
"packageManager": "pnpm@8.10.5",
|
|
4
|
-
"version": "0.10.
|
|
4
|
+
"version": "0.10.5",
|
|
5
5
|
"description": "List of ML tasks for huggingface.co/tasks",
|
|
6
6
|
"repository": "https://github.com/huggingface/huggingface.js.git",
|
|
7
7
|
"publishConfig": {
|