@huggingface/tasks 0.13.4 → 0.13.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/hardware.d.ts +12 -0
- package/dist/commonjs/hardware.d.ts.map +1 -1
- package/dist/commonjs/hardware.js +15 -3
- package/dist/commonjs/local-apps.d.ts.map +1 -1
- package/dist/commonjs/local-apps.js +40 -21
- package/dist/commonjs/local-apps.spec.d.ts +2 -0
- package/dist/commonjs/local-apps.spec.d.ts.map +1 -0
- package/dist/commonjs/local-apps.spec.js +114 -0
- package/dist/commonjs/model-libraries-snippets.d.ts.map +1 -1
- package/dist/commonjs/model-libraries-snippets.js +23 -12
- package/dist/commonjs/model-libraries-snippets.spec.d.ts +2 -0
- package/dist/commonjs/model-libraries-snippets.spec.d.ts.map +1 -0
- package/dist/commonjs/model-libraries-snippets.spec.js +51 -0
- package/dist/commonjs/snippets/curl.js +4 -4
- package/dist/commonjs/snippets/js.js +5 -5
- package/dist/commonjs/tasks/audio-classification/inference.d.ts +4 -3
- package/dist/commonjs/tasks/audio-classification/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/automatic-speech-recognition/inference.d.ts +1 -5
- package/dist/commonjs/tasks/automatic-speech-recognition/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/chat-completion/inference.d.ts +18 -6
- package/dist/commonjs/tasks/chat-completion/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/depth-estimation/inference.d.ts +1 -1
- package/dist/commonjs/tasks/document-question-answering/inference.d.ts +1 -3
- package/dist/commonjs/tasks/document-question-answering/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/feature-extraction/inference.d.ts +1 -1
- package/dist/commonjs/tasks/fill-mask/inference.d.ts +1 -3
- package/dist/commonjs/tasks/fill-mask/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/image-classification/inference.d.ts +4 -3
- package/dist/commonjs/tasks/image-classification/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/image-segmentation/inference.d.ts +1 -3
- package/dist/commonjs/tasks/image-segmentation/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/image-to-image/inference.d.ts +1 -3
- package/dist/commonjs/tasks/image-to-image/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/image-to-text/inference.d.ts +1 -5
- package/dist/commonjs/tasks/image-to-text/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/object-detection/inference.d.ts +1 -3
- package/dist/commonjs/tasks/object-detection/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/question-answering/inference.d.ts +1 -3
- package/dist/commonjs/tasks/question-answering/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/sentence-similarity/inference.d.ts +1 -1
- package/dist/commonjs/tasks/summarization/inference.d.ts +1 -3
- package/dist/commonjs/tasks/summarization/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/table-question-answering/inference.d.ts +1 -1
- package/dist/commonjs/tasks/text-classification/inference.d.ts +4 -3
- package/dist/commonjs/tasks/text-classification/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/text-to-audio/inference.d.ts +1 -5
- package/dist/commonjs/tasks/text-to-audio/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/text-to-image/inference.d.ts +1 -3
- package/dist/commonjs/tasks/text-to-image/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/text-to-speech/inference.d.ts +1 -5
- package/dist/commonjs/tasks/text-to-speech/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/text2text-generation/inference.d.ts +1 -3
- package/dist/commonjs/tasks/text2text-generation/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/token-classification/inference.d.ts +1 -3
- package/dist/commonjs/tasks/token-classification/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/translation/inference.d.ts +1 -3
- package/dist/commonjs/tasks/translation/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/video-classification/inference.d.ts +4 -3
- package/dist/commonjs/tasks/video-classification/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/visual-question-answering/inference.d.ts +1 -3
- package/dist/commonjs/tasks/visual-question-answering/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/zero-shot-classification/inference.d.ts +1 -3
- package/dist/commonjs/tasks/zero-shot-classification/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/zero-shot-image-classification/inference.d.ts +1 -3
- package/dist/commonjs/tasks/zero-shot-image-classification/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/zero-shot-object-detection/inference.d.ts +1 -3
- package/dist/commonjs/tasks/zero-shot-object-detection/inference.d.ts.map +1 -1
- package/dist/esm/hardware.d.ts +12 -0
- package/dist/esm/hardware.d.ts.map +1 -1
- package/dist/esm/hardware.js +15 -3
- package/dist/esm/local-apps.d.ts.map +1 -1
- package/dist/esm/local-apps.js +40 -21
- package/dist/esm/local-apps.spec.d.ts +2 -0
- package/dist/esm/local-apps.spec.d.ts.map +1 -0
- package/dist/esm/local-apps.spec.js +112 -0
- package/dist/esm/model-libraries-snippets.d.ts.map +1 -1
- package/dist/esm/model-libraries-snippets.js +23 -12
- package/dist/esm/model-libraries-snippets.spec.d.ts +2 -0
- package/dist/esm/model-libraries-snippets.spec.d.ts.map +1 -0
- package/dist/esm/model-libraries-snippets.spec.js +49 -0
- package/dist/esm/snippets/curl.js +4 -4
- package/dist/esm/snippets/js.js +5 -5
- package/dist/esm/tasks/audio-classification/inference.d.ts +4 -3
- package/dist/esm/tasks/audio-classification/inference.d.ts.map +1 -1
- package/dist/esm/tasks/automatic-speech-recognition/inference.d.ts +1 -5
- package/dist/esm/tasks/automatic-speech-recognition/inference.d.ts.map +1 -1
- package/dist/esm/tasks/chat-completion/inference.d.ts +18 -6
- package/dist/esm/tasks/chat-completion/inference.d.ts.map +1 -1
- package/dist/esm/tasks/depth-estimation/inference.d.ts +1 -1
- package/dist/esm/tasks/document-question-answering/inference.d.ts +1 -3
- package/dist/esm/tasks/document-question-answering/inference.d.ts.map +1 -1
- package/dist/esm/tasks/feature-extraction/inference.d.ts +1 -1
- package/dist/esm/tasks/fill-mask/inference.d.ts +1 -3
- package/dist/esm/tasks/fill-mask/inference.d.ts.map +1 -1
- package/dist/esm/tasks/image-classification/inference.d.ts +4 -3
- package/dist/esm/tasks/image-classification/inference.d.ts.map +1 -1
- package/dist/esm/tasks/image-segmentation/inference.d.ts +1 -3
- package/dist/esm/tasks/image-segmentation/inference.d.ts.map +1 -1
- package/dist/esm/tasks/image-to-image/inference.d.ts +1 -3
- package/dist/esm/tasks/image-to-image/inference.d.ts.map +1 -1
- package/dist/esm/tasks/image-to-text/inference.d.ts +1 -5
- package/dist/esm/tasks/image-to-text/inference.d.ts.map +1 -1
- package/dist/esm/tasks/object-detection/inference.d.ts +1 -3
- package/dist/esm/tasks/object-detection/inference.d.ts.map +1 -1
- package/dist/esm/tasks/question-answering/inference.d.ts +1 -3
- package/dist/esm/tasks/question-answering/inference.d.ts.map +1 -1
- package/dist/esm/tasks/sentence-similarity/inference.d.ts +1 -1
- package/dist/esm/tasks/summarization/inference.d.ts +1 -3
- package/dist/esm/tasks/summarization/inference.d.ts.map +1 -1
- package/dist/esm/tasks/table-question-answering/inference.d.ts +1 -1
- package/dist/esm/tasks/text-classification/inference.d.ts +4 -3
- package/dist/esm/tasks/text-classification/inference.d.ts.map +1 -1
- package/dist/esm/tasks/text-to-audio/inference.d.ts +1 -5
- package/dist/esm/tasks/text-to-audio/inference.d.ts.map +1 -1
- package/dist/esm/tasks/text-to-image/inference.d.ts +1 -3
- package/dist/esm/tasks/text-to-image/inference.d.ts.map +1 -1
- package/dist/esm/tasks/text-to-speech/inference.d.ts +1 -5
- package/dist/esm/tasks/text-to-speech/inference.d.ts.map +1 -1
- package/dist/esm/tasks/text2text-generation/inference.d.ts +1 -3
- package/dist/esm/tasks/text2text-generation/inference.d.ts.map +1 -1
- package/dist/esm/tasks/token-classification/inference.d.ts +1 -3
- package/dist/esm/tasks/token-classification/inference.d.ts.map +1 -1
- package/dist/esm/tasks/translation/inference.d.ts +1 -3
- package/dist/esm/tasks/translation/inference.d.ts.map +1 -1
- package/dist/esm/tasks/video-classification/inference.d.ts +4 -3
- package/dist/esm/tasks/video-classification/inference.d.ts.map +1 -1
- package/dist/esm/tasks/visual-question-answering/inference.d.ts +1 -3
- package/dist/esm/tasks/visual-question-answering/inference.d.ts.map +1 -1
- package/dist/esm/tasks/zero-shot-classification/inference.d.ts +1 -3
- package/dist/esm/tasks/zero-shot-classification/inference.d.ts.map +1 -1
- package/dist/esm/tasks/zero-shot-image-classification/inference.d.ts +1 -3
- package/dist/esm/tasks/zero-shot-image-classification/inference.d.ts.map +1 -1
- package/dist/esm/tasks/zero-shot-object-detection/inference.d.ts +1 -3
- package/dist/esm/tasks/zero-shot-object-detection/inference.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/hardware.ts +15 -3
- package/src/local-apps.spec.ts +123 -0
- package/src/local-apps.ts +37 -18
- package/src/model-libraries-snippets.spec.ts +54 -0
- package/src/model-libraries-snippets.ts +24 -11
- package/src/snippets/curl.ts +4 -4
- package/src/snippets/js.ts +5 -5
- package/src/tasks/audio-classification/inference.ts +4 -3
- package/src/tasks/audio-classification/spec/input.json +3 -3
- package/src/tasks/automatic-speech-recognition/inference.ts +1 -5
- package/src/tasks/automatic-speech-recognition/spec/input.json +1 -2
- package/src/tasks/chat-completion/inference.ts +19 -6
- package/src/tasks/chat-completion/spec/input.json +14 -19
- package/src/tasks/common-definitions.json +0 -1
- package/src/tasks/depth-estimation/inference.ts +1 -1
- package/src/tasks/depth-estimation/spec/input.json +1 -2
- package/src/tasks/document-question-answering/inference.ts +1 -3
- package/src/tasks/document-question-answering/spec/input.json +1 -2
- package/src/tasks/feature-extraction/inference.ts +1 -1
- package/src/tasks/feature-extraction/spec/input.json +1 -1
- package/src/tasks/fill-mask/inference.ts +1 -3
- package/src/tasks/fill-mask/spec/input.json +1 -2
- package/src/tasks/image-classification/inference.ts +4 -3
- package/src/tasks/image-classification/spec/input.json +3 -3
- package/src/tasks/image-segmentation/inference.ts +1 -3
- package/src/tasks/image-segmentation/spec/input.json +1 -2
- package/src/tasks/image-to-image/inference.ts +1 -3
- package/src/tasks/image-to-image/spec/input.json +1 -2
- package/src/tasks/image-to-text/inference.ts +1 -5
- package/src/tasks/image-to-text/spec/input.json +1 -2
- package/src/tasks/object-detection/inference.ts +1 -3
- package/src/tasks/object-detection/spec/input.json +1 -2
- package/src/tasks/placeholder/spec/input.json +1 -2
- package/src/tasks/question-answering/inference.ts +1 -3
- package/src/tasks/question-answering/spec/input.json +1 -2
- package/src/tasks/sentence-similarity/inference.ts +1 -1
- package/src/tasks/sentence-similarity/spec/input.json +1 -2
- package/src/tasks/summarization/inference.ts +1 -3
- package/src/tasks/summarization/spec/input.json +1 -2
- package/src/tasks/table-question-answering/inference.ts +1 -1
- package/src/tasks/table-question-answering/spec/input.json +1 -2
- package/src/tasks/text-classification/inference.ts +4 -3
- package/src/tasks/text-classification/spec/input.json +3 -3
- package/src/tasks/text-to-audio/inference.ts +1 -5
- package/src/tasks/text-to-audio/spec/input.json +1 -2
- package/src/tasks/text-to-image/inference.ts +1 -3
- package/src/tasks/text-to-image/spec/input.json +1 -2
- package/src/tasks/text-to-speech/inference.ts +1 -5
- package/src/tasks/text-to-speech/spec/input.json +1 -2
- package/src/tasks/text2text-generation/inference.ts +1 -3
- package/src/tasks/text2text-generation/spec/input.json +1 -2
- package/src/tasks/token-classification/inference.ts +1 -3
- package/src/tasks/token-classification/spec/input.json +1 -2
- package/src/tasks/translation/inference.ts +1 -3
- package/src/tasks/translation/spec/input.json +1 -2
- package/src/tasks/video-classification/inference.ts +4 -3
- package/src/tasks/video-classification/spec/input.json +3 -3
- package/src/tasks/visual-question-answering/inference.ts +1 -3
- package/src/tasks/visual-question-answering/spec/input.json +1 -2
- package/src/tasks/zero-shot-classification/inference.ts +1 -3
- package/src/tasks/zero-shot-classification/spec/input.json +1 -2
- package/src/tasks/zero-shot-image-classification/inference.ts +1 -3
- package/src/tasks/zero-shot-image-classification/spec/input.json +1 -2
- package/src/tasks/zero-shot-object-detection/inference.ts +1 -3
- package/src/tasks/zero-shot-object-detection/spec/input.json +1 -2
- package/dist/commonjs/snippets/curl.spec.d.ts +0 -2
- package/dist/commonjs/snippets/curl.spec.d.ts.map +0 -1
- package/dist/commonjs/snippets/curl.spec.js +0 -89
- package/dist/commonjs/snippets/js.spec.d.ts +0 -2
- package/dist/commonjs/snippets/js.spec.d.ts.map +0 -1
- package/dist/commonjs/snippets/js.spec.js +0 -141
- package/dist/commonjs/snippets/python.spec.d.ts +0 -2
- package/dist/commonjs/snippets/python.spec.d.ts.map +0 -1
- package/dist/commonjs/snippets/python.spec.js +0 -135
- package/dist/esm/snippets/curl.spec.d.ts +0 -2
- package/dist/esm/snippets/curl.spec.d.ts.map +0 -1
- package/dist/esm/snippets/curl.spec.js +0 -87
- package/dist/esm/snippets/js.spec.d.ts +0 -2
- package/dist/esm/snippets/js.spec.d.ts.map +0 -1
- package/dist/esm/snippets/js.spec.js +0 -139
- package/dist/esm/snippets/python.spec.d.ts +0 -2
- package/dist/esm/snippets/python.spec.d.ts.map +0 -1
- package/dist/esm/snippets/python.spec.js +0 -133
- package/src/snippets/curl.spec.ts +0 -94
- package/src/snippets/js.spec.ts +0 -148
- package/src/snippets/python.spec.ts +0 -144
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/zero-shot-image-classification/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,EAAE,qCAAqC,CAAC;IAClD,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD
|
|
1
|
+
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/zero-shot-image-classification/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,EAAE,qCAAqC,CAAC;IAClD,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACrD;;OAEG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD,MAAM,MAAM,iCAAiC,GAAG,wCAAwC,EAAE,CAAC;AAC3F;;GAEG;AACH,MAAM,WAAW,wCAAwC;IACxD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
|
|
@@ -12,14 +12,12 @@ export interface ZeroShotObjectDetectionInput {
|
|
|
12
12
|
*/
|
|
13
13
|
inputs: string;
|
|
14
14
|
/**
|
|
15
|
-
* Additional inference parameters
|
|
15
|
+
* Additional inference parameters for Zero Shot Object Detection
|
|
16
16
|
*/
|
|
17
17
|
parameters: ZeroShotObjectDetectionParameters;
|
|
18
18
|
[property: string]: unknown;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* Additional inference parameters
|
|
22
|
-
*
|
|
23
21
|
* Additional inference parameters for Zero Shot Object Detection
|
|
24
22
|
*/
|
|
25
23
|
export interface ZeroShotObjectDetectionParameters {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/zero-shot-object-detection/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,EAAE,iCAAiC,CAAC;IAC9C,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD
|
|
1
|
+
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/zero-shot-object-detection/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,EAAE,iCAAiC,CAAC;IAC9C,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD;;OAEG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD,MAAM,MAAM,6BAA6B,GAAG,oCAAoC,EAAE,CAAC;AACnF;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACpD;;;OAGG;IACH,GAAG,EAAE,WAAW,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
|
package/dist/esm/hardware.d.ts
CHANGED
|
@@ -471,6 +471,18 @@ export declare const SKUS: {
|
|
|
471
471
|
tflops: number;
|
|
472
472
|
memory: number[];
|
|
473
473
|
};
|
|
474
|
+
"Apple M4": {
|
|
475
|
+
tflops: number;
|
|
476
|
+
memory: number[];
|
|
477
|
+
};
|
|
478
|
+
"Apple M4 Pro": {
|
|
479
|
+
tflops: number;
|
|
480
|
+
memory: number[];
|
|
481
|
+
};
|
|
482
|
+
"Apple M4 Max": {
|
|
483
|
+
tflops: number;
|
|
484
|
+
memory: number[];
|
|
485
|
+
};
|
|
474
486
|
};
|
|
475
487
|
};
|
|
476
488
|
};
|
|
@@ -1 +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,UAAqD,CAAC;AAEzF,eAAO,MAAM,IAAI
|
|
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,UAAqD,CAAC;AAEzF,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwcuD,CAAC;AAEzE,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,IAAI,CAAC"}
|
package/dist/esm/hardware.js
CHANGED
|
@@ -430,7 +430,7 @@ export const SKUS = {
|
|
|
430
430
|
memory: [8, 16, 24],
|
|
431
431
|
},
|
|
432
432
|
"Apple M2 Pro": {
|
|
433
|
-
tflops:
|
|
433
|
+
tflops: 6.8,
|
|
434
434
|
memory: [16, 24, 32],
|
|
435
435
|
},
|
|
436
436
|
"Apple M2 Max": {
|
|
@@ -442,17 +442,29 @@ export const SKUS = {
|
|
|
442
442
|
memory: [64, 96, 128, 192],
|
|
443
443
|
},
|
|
444
444
|
"Apple M3": {
|
|
445
|
-
tflops:
|
|
445
|
+
tflops: 4.1,
|
|
446
446
|
memory: [8, 16, 24],
|
|
447
447
|
},
|
|
448
448
|
"Apple M3 Pro": {
|
|
449
|
-
tflops:
|
|
449
|
+
tflops: 7.4,
|
|
450
450
|
memory: [18, 36],
|
|
451
451
|
},
|
|
452
452
|
"Apple M3 Max": {
|
|
453
453
|
tflops: 14.2,
|
|
454
454
|
memory: [36, 48, 64, 96, 128],
|
|
455
455
|
},
|
|
456
|
+
"Apple M4": {
|
|
457
|
+
tflops: 4.6,
|
|
458
|
+
memory: [16, 24, 32],
|
|
459
|
+
},
|
|
460
|
+
"Apple M4 Pro": {
|
|
461
|
+
tflops: 9.2,
|
|
462
|
+
memory: [24, 48],
|
|
463
|
+
},
|
|
464
|
+
"Apple M4 Max": {
|
|
465
|
+
tflops: 18.4,
|
|
466
|
+
memory: [36, 48, 64, 128],
|
|
467
|
+
},
|
|
456
468
|
},
|
|
457
469
|
},
|
|
458
470
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-apps.d.ts","sourceRoot":"","sources":["../../src/local-apps.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"local-apps.d.ts","sourceRoot":"","sources":["../../src/local-apps.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAKnD,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC3B;AAED;;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,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,GAAG,CAAC;CACtD,GACD;IACA;;;;OAIG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,EAAE,GAAG,eAAe,GAAG,eAAe,EAAE,CAAC;CACzG,CACH,CAAC;AAqBF,iBAAS,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAE7C;AAED,iBAAS,mBAAmB,CAAC,KAAK,EAAE,SAAS,WAE5C;AA+KD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU;;;;;;yBApLS,SAAS,aAAa,MAAM,KAAG,eAAe,EAAE;;;;;;;yBA0CzC,SAAS,aAAa,MAAM,KAAG,eAAe,EAAE;;;;;;oCA6JzD,SAAS;yBA5GX,SAAS,KAAG,eAAe,EAAE;;;;;;;yBAiD9B,SAAS,KAAG,eAAe,EAAE;;;;;;;;;;;;;;yBAxEzB,SAAS,aAAa,MAAM,KAAG,eAAe,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBATjD,SAAS,aAAa,MAAM,KAAG,MAAM;;CAiR/B,CAAC;AAErC,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,UAAU,CAAC"}
|
package/dist/esm/local-apps.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { parseGGUFQuantLabel } from "./gguf.js";
|
|
2
|
+
import { stringifyMessages } from "./snippets/common.js";
|
|
3
|
+
import { getModelInputSnippet } from "./snippets/inputs.js";
|
|
2
4
|
function isAwqModel(model) {
|
|
3
5
|
return model.config?.quantization_config?.quant_method === "awq";
|
|
4
6
|
}
|
|
@@ -24,14 +26,20 @@ function isMlxModel(model) {
|
|
|
24
26
|
return model.tags.includes("mlx");
|
|
25
27
|
}
|
|
26
28
|
const snippetLlamacpp = (model, filepath) => {
|
|
27
|
-
const command = (binary) =>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
const command = (binary) => {
|
|
30
|
+
const snippet = [
|
|
31
|
+
"# Load and run the model:",
|
|
32
|
+
`${binary} \\`,
|
|
33
|
+
` --hf-repo "${model.id}" \\`,
|
|
34
|
+
` --hf-file ${filepath ?? "{{GGUF_FILE}}"} \\`,
|
|
35
|
+
` -p "${model.tags.includes("conversational") ? "You are a helpful assistant" : "Once upon a time,"}"`,
|
|
36
|
+
];
|
|
37
|
+
if (model.tags.includes("conversational")) {
|
|
38
|
+
snippet[snippet.length - 1] += " \\";
|
|
39
|
+
snippet.push(" --conversation");
|
|
40
|
+
}
|
|
41
|
+
return snippet.join("\n");
|
|
42
|
+
};
|
|
35
43
|
return [
|
|
36
44
|
{
|
|
37
45
|
title: "Install from brew",
|
|
@@ -102,22 +110,33 @@ const snippetLocalAI = (model, filepath) => {
|
|
|
102
110
|
];
|
|
103
111
|
};
|
|
104
112
|
const snippetVllm = (model) => {
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
const messages = getModelInputSnippet(model);
|
|
114
|
+
const runCommandInstruct = `# Call the server using curl:
|
|
115
|
+
curl -X POST "http://localhost:8000/v1/chat/completions" \\
|
|
116
|
+
-H "Content-Type: application/json" \\
|
|
117
|
+
--data '{
|
|
118
|
+
"model": "${model.id}",
|
|
119
|
+
"messages": ${stringifyMessages(messages, {
|
|
120
|
+
indent: "\t\t",
|
|
121
|
+
attributeKeyQuotes: true,
|
|
122
|
+
customContentEscaper: (str) => str.replace(/'/g, "'\\''"),
|
|
123
|
+
})}
|
|
124
|
+
}'`;
|
|
125
|
+
const runCommandNonInstruct = `# Call the server using curl:
|
|
126
|
+
curl -X POST "http://localhost:8000/v1/completions" \\
|
|
127
|
+
-H "Content-Type: application/json" \\
|
|
128
|
+
--data '{
|
|
129
|
+
"model": "${model.id}",
|
|
130
|
+
"prompt": "Once upon a time,",
|
|
131
|
+
"max_tokens": 512,
|
|
132
|
+
"temperature": 0.5
|
|
133
|
+
}'`;
|
|
134
|
+
const runCommand = model.tags.includes("conversational") ? runCommandInstruct : runCommandNonInstruct;
|
|
116
135
|
return [
|
|
117
136
|
{
|
|
118
137
|
title: "Install from pip",
|
|
119
138
|
setup: ["# Install vLLM from pip:", "pip install vllm"].join("\n"),
|
|
120
|
-
content: [`# Load and run the model:\nvllm serve "${model.id}"`, runCommand
|
|
139
|
+
content: [`# Load and run the model:\nvllm serve "${model.id}"`, runCommand],
|
|
121
140
|
},
|
|
122
141
|
{
|
|
123
142
|
title: "Use Docker images",
|
|
@@ -134,7 +153,7 @@ const snippetVllm = (model) => {
|
|
|
134
153
|
].join("\n"),
|
|
135
154
|
content: [
|
|
136
155
|
`# Load and run the model:\ndocker exec -it my_vllm_container bash -c "vllm serve ${model.id}"`,
|
|
137
|
-
runCommand
|
|
156
|
+
runCommand,
|
|
138
157
|
],
|
|
139
158
|
},
|
|
140
159
|
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-apps.spec.d.ts","sourceRoot":"","sources":["../../src/local-apps.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { LOCAL_APPS } from "./local-apps.js";
|
|
3
|
+
describe("local-apps", () => {
|
|
4
|
+
it("llama.cpp conversational", async () => {
|
|
5
|
+
const { snippet: snippetFunc } = LOCAL_APPS["llama.cpp"];
|
|
6
|
+
const model = {
|
|
7
|
+
id: "bartowski/Llama-3.2-3B-Instruct-GGUF",
|
|
8
|
+
tags: ["conversational"],
|
|
9
|
+
inference: "",
|
|
10
|
+
};
|
|
11
|
+
const snippet = snippetFunc(model);
|
|
12
|
+
expect(snippet[0].content).toEqual(`# Load and run the model:
|
|
13
|
+
llama-cli \\
|
|
14
|
+
--hf-repo "bartowski/Llama-3.2-3B-Instruct-GGUF" \\
|
|
15
|
+
--hf-file {{GGUF_FILE}} \\
|
|
16
|
+
-p "You are a helpful assistant" \\
|
|
17
|
+
--conversation`);
|
|
18
|
+
});
|
|
19
|
+
it("llama.cpp non-conversational", async () => {
|
|
20
|
+
const { snippet: snippetFunc } = LOCAL_APPS["llama.cpp"];
|
|
21
|
+
const model = {
|
|
22
|
+
id: "mlabonne/gemma-2b-GGUF",
|
|
23
|
+
tags: [],
|
|
24
|
+
inference: "",
|
|
25
|
+
};
|
|
26
|
+
const snippet = snippetFunc(model);
|
|
27
|
+
expect(snippet[0].content).toEqual(`# Load and run the model:
|
|
28
|
+
llama-cli \\
|
|
29
|
+
--hf-repo "mlabonne/gemma-2b-GGUF" \\
|
|
30
|
+
--hf-file {{GGUF_FILE}} \\
|
|
31
|
+
-p "Once upon a time,"`);
|
|
32
|
+
});
|
|
33
|
+
it("vLLM conversational llm", async () => {
|
|
34
|
+
const { snippet: snippetFunc } = LOCAL_APPS["vllm"];
|
|
35
|
+
const model = {
|
|
36
|
+
id: "meta-llama/Llama-3.2-3B-Instruct",
|
|
37
|
+
pipeline_tag: "text-generation",
|
|
38
|
+
tags: ["conversational"],
|
|
39
|
+
inference: "",
|
|
40
|
+
};
|
|
41
|
+
const snippet = snippetFunc(model);
|
|
42
|
+
expect(snippet[0].content.join("\n")).toEqual(`# Load and run the model:
|
|
43
|
+
vllm serve "meta-llama/Llama-3.2-3B-Instruct"
|
|
44
|
+
# Call the server using curl:
|
|
45
|
+
curl -X POST "http://localhost:8000/v1/chat/completions" \\
|
|
46
|
+
-H "Content-Type: application/json" \\
|
|
47
|
+
--data '{
|
|
48
|
+
"model": "meta-llama/Llama-3.2-3B-Instruct",
|
|
49
|
+
"messages": [
|
|
50
|
+
{
|
|
51
|
+
"role": "user",
|
|
52
|
+
"content": "What is the capital of France?"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}'`);
|
|
56
|
+
});
|
|
57
|
+
it("vLLM non-conversational llm", async () => {
|
|
58
|
+
const { snippet: snippetFunc } = LOCAL_APPS["vllm"];
|
|
59
|
+
const model = {
|
|
60
|
+
id: "meta-llama/Llama-3.2-3B",
|
|
61
|
+
tags: [""],
|
|
62
|
+
inference: "",
|
|
63
|
+
};
|
|
64
|
+
const snippet = snippetFunc(model);
|
|
65
|
+
expect(snippet[0].content.join("\n")).toEqual(`# Load and run the model:
|
|
66
|
+
vllm serve "meta-llama/Llama-3.2-3B"
|
|
67
|
+
# Call the server using curl:
|
|
68
|
+
curl -X POST "http://localhost:8000/v1/completions" \\
|
|
69
|
+
-H "Content-Type: application/json" \\
|
|
70
|
+
--data '{
|
|
71
|
+
"model": "meta-llama/Llama-3.2-3B",
|
|
72
|
+
"prompt": "Once upon a time,",
|
|
73
|
+
"max_tokens": 512,
|
|
74
|
+
"temperature": 0.5
|
|
75
|
+
}'`);
|
|
76
|
+
});
|
|
77
|
+
it("vLLM conversational vlm", async () => {
|
|
78
|
+
const { snippet: snippetFunc } = LOCAL_APPS["vllm"];
|
|
79
|
+
const model = {
|
|
80
|
+
id: "meta-llama/Llama-3.2-11B-Vision-Instruct",
|
|
81
|
+
pipeline_tag: "image-text-to-text",
|
|
82
|
+
tags: ["conversational"],
|
|
83
|
+
inference: "",
|
|
84
|
+
};
|
|
85
|
+
const snippet = snippetFunc(model);
|
|
86
|
+
expect(snippet[0].content.join("\n")).toEqual(`# Load and run the model:
|
|
87
|
+
vllm serve "meta-llama/Llama-3.2-11B-Vision-Instruct"
|
|
88
|
+
# Call the server using curl:
|
|
89
|
+
curl -X POST "http://localhost:8000/v1/chat/completions" \\
|
|
90
|
+
-H "Content-Type: application/json" \\
|
|
91
|
+
--data '{
|
|
92
|
+
"model": "meta-llama/Llama-3.2-11B-Vision-Instruct",
|
|
93
|
+
"messages": [
|
|
94
|
+
{
|
|
95
|
+
"role": "user",
|
|
96
|
+
"content": [
|
|
97
|
+
{
|
|
98
|
+
"type": "text",
|
|
99
|
+
"text": "Describe this image in one sentence."
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"type": "image_url",
|
|
103
|
+
"image_url": {
|
|
104
|
+
"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}'`);
|
|
111
|
+
});
|
|
112
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-libraries-snippets.d.ts","sourceRoot":"","sources":["../../src/model-libraries-snippets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"model-libraries-snippets.d.ts","sourceRoot":"","sources":["../../src/model-libraries-snippets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAkBjD,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAKjD,CAAC;AAkBF,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAKjD,CAAC;AAEF,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAIjD,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,SAAS,KAAG,MAAM,EAkBlD,CAAC;AAaF,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAIjD,CAAC;AAEF,eAAO,MAAM,KAAK,UAAW,SAAS,KAAG,MAAM,EAI9C,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,SAAS,KAAG,MAAM,EA6C1D,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,SAAS,KAAG,MAAM,EAwBlD,CAAC;AAuCF,eAAO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;AAEF,eAAO,MAAM,KAAK,UAAW,SAAS,KAAG,MAAM,EAI9C,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { LIBRARY_TASK_MAPPING } from "./library-to-tasks.js";
|
|
2
|
+
import { getModelInputSnippet } from "./snippets/inputs.js";
|
|
3
|
+
import { stringifyMessages } from "./snippets/common.js";
|
|
2
4
|
const TAG_CUSTOM_CODE = "custom_code";
|
|
3
5
|
function nameWithoutNamespace(modelId) {
|
|
4
6
|
const splitted = modelId.split("/");
|
|
@@ -374,23 +376,32 @@ model = keras_hub.models.CausalLM.from_preset("hf://${model.id}", dtype="bfloat1
|
|
|
374
376
|
# full list here: https://keras.io/api/keras_hub/models/#api-documentation
|
|
375
377
|
`,
|
|
376
378
|
];
|
|
377
|
-
export const llama_cpp_python = (model) =>
|
|
378
|
-
|
|
379
|
+
export const llama_cpp_python = (model) => {
|
|
380
|
+
const snippets = [
|
|
381
|
+
`from llama_cpp import Llama
|
|
379
382
|
|
|
380
383
|
llm = Llama.from_pretrained(
|
|
381
384
|
repo_id="${model.id}",
|
|
382
385
|
filename="{{GGUF_FILE}}",
|
|
383
386
|
)
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
387
|
+
`,
|
|
388
|
+
];
|
|
389
|
+
if (model.tags.includes("conversational")) {
|
|
390
|
+
const messages = getModelInputSnippet(model);
|
|
391
|
+
snippets.push(`llm.create_chat_completion(
|
|
392
|
+
messages = ${stringifyMessages(messages, { attributeKeyQuotes: true, indent: "\t" })}
|
|
393
|
+
)`);
|
|
394
|
+
}
|
|
395
|
+
else {
|
|
396
|
+
snippets.push(`output = llm(
|
|
397
|
+
"Once upon a time,",
|
|
398
|
+
max_tokens=512,
|
|
399
|
+
echo=True
|
|
400
|
+
)
|
|
401
|
+
print(output)`);
|
|
402
|
+
}
|
|
403
|
+
return snippets;
|
|
404
|
+
};
|
|
394
405
|
export const tf_keras = (model) => [
|
|
395
406
|
`# Note: 'keras<3.x' or 'tf_keras' must be installed (legacy)
|
|
396
407
|
# See https://github.com/keras-team/tf-keras for more details.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-libraries-snippets.spec.d.ts","sourceRoot":"","sources":["../../src/model-libraries-snippets.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { llama_cpp_python } from "./model-libraries-snippets.js";
|
|
3
|
+
describe("model-libraries-snippets", () => {
|
|
4
|
+
it("llama_cpp_python conversational", async () => {
|
|
5
|
+
const model = {
|
|
6
|
+
id: "bartowski/Llama-3.2-3B-Instruct-GGUF",
|
|
7
|
+
pipeline_tag: "text-generation",
|
|
8
|
+
tags: ["conversational"],
|
|
9
|
+
inference: "",
|
|
10
|
+
};
|
|
11
|
+
const snippet = llama_cpp_python(model);
|
|
12
|
+
expect(snippet.join("\n")).toEqual(`from llama_cpp import Llama
|
|
13
|
+
|
|
14
|
+
llm = Llama.from_pretrained(
|
|
15
|
+
repo_id="bartowski/Llama-3.2-3B-Instruct-GGUF",
|
|
16
|
+
filename="{{GGUF_FILE}}",
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
llm.create_chat_completion(
|
|
20
|
+
messages = [
|
|
21
|
+
{
|
|
22
|
+
"role": "user",
|
|
23
|
+
"content": "What is the capital of France?"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
)`);
|
|
27
|
+
});
|
|
28
|
+
it("llama_cpp_python non-conversational", async () => {
|
|
29
|
+
const model = {
|
|
30
|
+
id: "mlabonne/gemma-2b-GGUF",
|
|
31
|
+
tags: [""],
|
|
32
|
+
inference: "",
|
|
33
|
+
};
|
|
34
|
+
const snippet = llama_cpp_python(model);
|
|
35
|
+
expect(snippet.join("\n")).toEqual(`from llama_cpp import Llama
|
|
36
|
+
|
|
37
|
+
llm = Llama.from_pretrained(
|
|
38
|
+
repo_id="mlabonne/gemma-2b-GGUF",
|
|
39
|
+
filename="{{GGUF_FILE}}",
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
output = llm(
|
|
43
|
+
"Once upon a time,",
|
|
44
|
+
max_tokens=512,
|
|
45
|
+
echo=True
|
|
46
|
+
)
|
|
47
|
+
print(output)`);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
@@ -5,7 +5,7 @@ export const snippetBasic = (model, accessToken) => ({
|
|
|
5
5
|
-X POST \\
|
|
6
6
|
-d '{"inputs": ${getModelInputSnippet(model, true)}}' \\
|
|
7
7
|
-H 'Content-Type: application/json' \\
|
|
8
|
-
-H
|
|
8
|
+
-H 'Authorization: Bearer ${accessToken || `{API_TOKEN}`}'`,
|
|
9
9
|
});
|
|
10
10
|
export const snippetTextGeneration = (model, accessToken, opts) => {
|
|
11
11
|
if (model.tags.includes("conversational")) {
|
|
@@ -20,7 +20,7 @@ export const snippetTextGeneration = (model, accessToken, opts) => {
|
|
|
20
20
|
};
|
|
21
21
|
return {
|
|
22
22
|
content: `curl 'https://api-inference.huggingface.co/models/${model.id}/v1/chat/completions' \\
|
|
23
|
-
-H
|
|
23
|
+
-H 'Authorization: Bearer ${accessToken || `{API_TOKEN}`}' \\
|
|
24
24
|
-H 'Content-Type: application/json' \\
|
|
25
25
|
--data '{
|
|
26
26
|
"model": "${model.id}",
|
|
@@ -47,13 +47,13 @@ export const snippetZeroShotClassification = (model, accessToken) => ({
|
|
|
47
47
|
-X POST \\
|
|
48
48
|
-d '{"inputs": ${getModelInputSnippet(model, true)}, "parameters": {"candidate_labels": ["refund", "legal", "faq"]}}' \\
|
|
49
49
|
-H 'Content-Type: application/json' \\
|
|
50
|
-
-H
|
|
50
|
+
-H 'Authorization: Bearer ${accessToken || `{API_TOKEN}`}'`,
|
|
51
51
|
});
|
|
52
52
|
export const snippetFile = (model, accessToken) => ({
|
|
53
53
|
content: `curl https://api-inference.huggingface.co/models/${model.id} \\
|
|
54
54
|
-X POST \\
|
|
55
55
|
--data-binary '@${getModelInputSnippet(model, true, true)}' \\
|
|
56
|
-
-H
|
|
56
|
+
-H 'Authorization: Bearer ${accessToken || `{API_TOKEN}`}'`,
|
|
57
57
|
});
|
|
58
58
|
export const curlSnippets = {
|
|
59
59
|
// Same order as in js/src/lib/interfaces/Types.ts
|
package/dist/esm/snippets/js.js
CHANGED
|
@@ -6,7 +6,7 @@ export const snippetBasic = (model, accessToken) => ({
|
|
|
6
6
|
"https://api-inference.huggingface.co/models/${model.id}",
|
|
7
7
|
{
|
|
8
8
|
headers: {
|
|
9
|
-
Authorization: "Bearer ${accessToken || `{API_TOKEN}`}"
|
|
9
|
+
Authorization: "Bearer ${accessToken || `{API_TOKEN}`}",
|
|
10
10
|
"Content-Type": "application/json",
|
|
11
11
|
},
|
|
12
12
|
method: "POST",
|
|
@@ -135,7 +135,7 @@ export const snippetZeroShotClassification = (model, accessToken) => ({
|
|
|
135
135
|
"https://api-inference.huggingface.co/models/${model.id}",
|
|
136
136
|
{
|
|
137
137
|
headers: {
|
|
138
|
-
Authorization: "Bearer ${accessToken || `{API_TOKEN}`}"
|
|
138
|
+
Authorization: "Bearer ${accessToken || `{API_TOKEN}`}",
|
|
139
139
|
"Content-Type": "application/json",
|
|
140
140
|
},
|
|
141
141
|
method: "POST",
|
|
@@ -156,7 +156,7 @@ export const snippetTextToImage = (model, accessToken) => ({
|
|
|
156
156
|
"https://api-inference.huggingface.co/models/${model.id}",
|
|
157
157
|
{
|
|
158
158
|
headers: {
|
|
159
|
-
Authorization: "Bearer ${accessToken || `{API_TOKEN}`}"
|
|
159
|
+
Authorization: "Bearer ${accessToken || `{API_TOKEN}`}",
|
|
160
160
|
"Content-Type": "application/json",
|
|
161
161
|
},
|
|
162
162
|
method: "POST",
|
|
@@ -176,7 +176,7 @@ export const snippetTextToAudio = (model, accessToken) => {
|
|
|
176
176
|
"https://api-inference.huggingface.co/models/${model.id}",
|
|
177
177
|
{
|
|
178
178
|
headers: {
|
|
179
|
-
Authorization: "Bearer ${accessToken || `{API_TOKEN}`}"
|
|
179
|
+
Authorization: "Bearer ${accessToken || `{API_TOKEN}`}",
|
|
180
180
|
"Content-Type": "application/json",
|
|
181
181
|
},
|
|
182
182
|
method: "POST",
|
|
@@ -216,7 +216,7 @@ export const snippetFile = (model, accessToken) => ({
|
|
|
216
216
|
"https://api-inference.huggingface.co/models/${model.id}",
|
|
217
217
|
{
|
|
218
218
|
headers: {
|
|
219
|
-
Authorization: "Bearer ${accessToken || `{API_TOKEN}`}"
|
|
219
|
+
Authorization: "Bearer ${accessToken || `{API_TOKEN}`}",
|
|
220
220
|
"Content-Type": "application/json",
|
|
221
221
|
},
|
|
222
222
|
method: "POST",
|
|
@@ -13,17 +13,18 @@ export interface AudioClassificationInput {
|
|
|
13
13
|
*/
|
|
14
14
|
inputs: string;
|
|
15
15
|
/**
|
|
16
|
-
* Additional inference parameters
|
|
16
|
+
* Additional inference parameters for Audio Classification
|
|
17
17
|
*/
|
|
18
18
|
parameters?: AudioClassificationParameters;
|
|
19
19
|
[property: string]: unknown;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Additional inference parameters
|
|
23
|
-
*
|
|
24
22
|
* Additional inference parameters for Audio Classification
|
|
25
23
|
*/
|
|
26
24
|
export interface AudioClassificationParameters {
|
|
25
|
+
/**
|
|
26
|
+
* The function to apply to the model outputs in order to retrieve the scores.
|
|
27
|
+
*/
|
|
27
28
|
function_to_apply?: ClassificationOutputTransform;
|
|
28
29
|
/**
|
|
29
30
|
* When specified, limits the output to the top K most probable classes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/audio-classification/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,6BAA6B,CAAC;IAC3C,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD
|
|
1
|
+
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/audio-classification/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,6BAA6B,CAAC;IAC3C,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC7C;;OAEG;IACH,iBAAiB,CAAC,EAAE,6BAA6B,CAAC;IAClD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAC3E,MAAM,MAAM,yBAAyB,GAAG,gCAAgC,EAAE,CAAC;AAC3E;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
|
|
@@ -13,14 +13,12 @@ export interface AutomaticSpeechRecognitionInput {
|
|
|
13
13
|
*/
|
|
14
14
|
inputs: string;
|
|
15
15
|
/**
|
|
16
|
-
* Additional inference parameters
|
|
16
|
+
* Additional inference parameters for Automatic Speech Recognition
|
|
17
17
|
*/
|
|
18
18
|
parameters?: AutomaticSpeechRecognitionParameters;
|
|
19
19
|
[property: string]: unknown;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Additional inference parameters
|
|
23
|
-
*
|
|
24
22
|
* Additional inference parameters for Automatic Speech Recognition
|
|
25
23
|
*/
|
|
26
24
|
export interface AutomaticSpeechRecognitionParameters {
|
|
@@ -36,8 +34,6 @@ export interface AutomaticSpeechRecognitionParameters {
|
|
|
36
34
|
}
|
|
37
35
|
/**
|
|
38
36
|
* Parametrization of the text generation process
|
|
39
|
-
*
|
|
40
|
-
* Ad-hoc parametrization of the text generation process
|
|
41
37
|
*/
|
|
42
38
|
export interface GenerationParameters {
|
|
43
39
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/automatic-speech-recognition/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,oCAAoC,CAAC;IAClD,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED
|
|
1
|
+
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/automatic-speech-recognition/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,oCAAoC,CAAC;IAClD,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACpD;;OAEG;IACH,qBAAqB,CAAC,EAAE,oBAAoB,CAAC;IAC7C;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,c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7 @@ export interface ChatCompletionInput {
|
|
|
78
78
|
* We generally recommend altering this or `top_p` but not both.
|
|
79
79
|
*/
|
|
80
80
|
temperature?: number;
|
|
81
|
-
tool_choice?:
|
|
81
|
+
tool_choice?: ChatCompletionInputToolChoice;
|
|
82
82
|
/**
|
|
83
83
|
* A prompt to be appended before the tools
|
|
84
84
|
*/
|
|
@@ -88,7 +88,7 @@ export interface ChatCompletionInput {
|
|
|
88
88
|
* Use this to provide a list of
|
|
89
89
|
* functions the model may generate JSON inputs for.
|
|
90
90
|
*/
|
|
91
|
-
tools?:
|
|
91
|
+
tools?: ChatCompletionInputTool[];
|
|
92
92
|
/**
|
|
93
93
|
* An integer between 0 and 5 specifying the number of most likely tokens to return at each
|
|
94
94
|
* token position, each with
|
|
@@ -144,16 +144,28 @@ export interface ChatCompletionInputStreamOptions {
|
|
|
144
144
|
include_usage: boolean;
|
|
145
145
|
[property: string]: unknown;
|
|
146
146
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
/**
|
|
148
|
+
*
|
|
149
|
+
* <https://platform.openai.com/docs/guides/function-calling/configuring-function-calling-behavior-using-the-tool_choice-parameter>
|
|
150
|
+
*/
|
|
151
|
+
export type ChatCompletionInputToolChoice = ChatCompletionInputToolChoiceEnum | ChatCompletionInputToolChoiceObject;
|
|
152
|
+
/**
|
|
153
|
+
* Means the model can pick between generating a message or calling one or more tools.
|
|
154
|
+
*
|
|
155
|
+
* Means the model will not call any tool and instead generates a message.
|
|
156
|
+
*
|
|
157
|
+
* Means the model must call one or more tools.
|
|
158
|
+
*/
|
|
159
|
+
export type ChatCompletionInputToolChoiceEnum = "auto" | "none" | "required";
|
|
160
|
+
export interface ChatCompletionInputToolChoiceObject {
|
|
161
|
+
function: ChatCompletionInputFunctionName;
|
|
150
162
|
[property: string]: unknown;
|
|
151
163
|
}
|
|
152
164
|
export interface ChatCompletionInputFunctionName {
|
|
153
165
|
name: string;
|
|
154
166
|
[property: string]: unknown;
|
|
155
167
|
}
|
|
156
|
-
export interface
|
|
168
|
+
export interface ChatCompletionInputTool {
|
|
157
169
|
function: ChatCompletionInputFunctionDefinition;
|
|
158
170
|
type: string;
|
|
159
171
|
[property: string]: unknown;
|