@huggingface/tasks 0.12.30 → 0.13.0-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.
- package/dist/index.cjs +26 -3
- package/dist/index.d.cts +4778 -0
- package/dist/index.d.ts +4778 -0
- package/dist/index.js +26 -3
- package/package.json +2 -4
- package/src/model-libraries-snippets.ts +17 -0
- package/src/model-libraries.ts +8 -1
- package/src/snippets/js.ts +2 -2
- package/dist/scripts/inference-codegen.d.ts +0 -2
- package/dist/scripts/inference-codegen.d.ts.map +0 -1
- package/dist/scripts/inference-tei-import.d.ts +0 -2
- package/dist/scripts/inference-tei-import.d.ts.map +0 -1
- package/dist/scripts/inference-tgi-import.d.ts +0 -2
- package/dist/scripts/inference-tgi-import.d.ts.map +0 -1
- package/dist/src/dataset-libraries.d.ts +0 -87
- package/dist/src/dataset-libraries.d.ts.map +0 -1
- package/dist/src/default-widget-inputs.d.ts +0 -6
- package/dist/src/default-widget-inputs.d.ts.map +0 -1
- package/dist/src/gguf.d.ts +0 -35
- package/dist/src/gguf.d.ts.map +0 -1
- package/dist/src/hardware.d.ts +0 -478
- package/dist/src/hardware.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -21
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/library-to-tasks.d.ts +0 -11
- package/dist/src/library-to-tasks.d.ts.map +0 -1
- package/dist/src/local-apps.d.ts +0 -195
- package/dist/src/local-apps.d.ts.map +0 -1
- package/dist/src/model-data.d.ts +0 -146
- package/dist/src/model-data.d.ts.map +0 -1
- package/dist/src/model-libraries-downloads.d.ts +0 -18
- package/dist/src/model-libraries-downloads.d.ts.map +0 -1
- package/dist/src/model-libraries-snippets.d.ts +0 -71
- package/dist/src/model-libraries-snippets.d.ts.map +0 -1
- package/dist/src/model-libraries.d.ts +0 -797
- package/dist/src/model-libraries.d.ts.map +0 -1
- package/dist/src/pipelines.d.ts +0 -425
- package/dist/src/pipelines.d.ts.map +0 -1
- package/dist/src/snippets/common.d.ts +0 -14
- package/dist/src/snippets/common.d.ts.map +0 -1
- package/dist/src/snippets/curl.d.ts +0 -17
- package/dist/src/snippets/curl.d.ts.map +0 -1
- package/dist/src/snippets/curl.spec.d.ts +0 -2
- package/dist/src/snippets/curl.spec.d.ts.map +0 -1
- package/dist/src/snippets/index.d.ts +0 -6
- package/dist/src/snippets/index.d.ts.map +0 -1
- package/dist/src/snippets/inputs.d.ts +0 -4
- package/dist/src/snippets/inputs.d.ts.map +0 -1
- package/dist/src/snippets/js.d.ts +0 -19
- package/dist/src/snippets/js.d.ts.map +0 -1
- package/dist/src/snippets/js.spec.d.ts +0 -2
- package/dist/src/snippets/js.spec.d.ts.map +0 -1
- package/dist/src/snippets/python.d.ts +0 -22
- package/dist/src/snippets/python.d.ts.map +0 -1
- package/dist/src/snippets/python.spec.d.ts +0 -2
- package/dist/src/snippets/python.spec.d.ts.map +0 -1
- package/dist/src/snippets/types.d.ts +0 -12
- package/dist/src/snippets/types.d.ts.map +0 -1
- package/dist/src/tasks/audio-classification/data.d.ts +0 -4
- package/dist/src/tasks/audio-classification/data.d.ts.map +0 -1
- package/dist/src/tasks/audio-classification/inference.d.ts +0 -53
- package/dist/src/tasks/audio-classification/inference.d.ts.map +0 -1
- package/dist/src/tasks/audio-to-audio/data.d.ts +0 -4
- package/dist/src/tasks/audio-to-audio/data.d.ts.map +0 -1
- package/dist/src/tasks/automatic-speech-recognition/data.d.ts +0 -4
- package/dist/src/tasks/automatic-speech-recognition/data.d.ts.map +0 -1
- package/dist/src/tasks/automatic-speech-recognition/inference.d.ts +0 -155
- package/dist/src/tasks/automatic-speech-recognition/inference.d.ts.map +0 -1
- package/dist/src/tasks/chat-completion/inference.d.ts +0 -291
- package/dist/src/tasks/chat-completion/inference.d.ts.map +0 -1
- package/dist/src/tasks/depth-estimation/data.d.ts +0 -4
- package/dist/src/tasks/depth-estimation/data.d.ts.map +0 -1
- package/dist/src/tasks/depth-estimation/inference.d.ts +0 -36
- package/dist/src/tasks/depth-estimation/inference.d.ts.map +0 -1
- package/dist/src/tasks/document-question-answering/data.d.ts +0 -4
- package/dist/src/tasks/document-question-answering/data.d.ts.map +0 -1
- package/dist/src/tasks/document-question-answering/inference.d.ts +0 -111
- package/dist/src/tasks/document-question-answering/inference.d.ts.map +0 -1
- package/dist/src/tasks/feature-extraction/data.d.ts +0 -4
- package/dist/src/tasks/feature-extraction/data.d.ts.map +0 -1
- package/dist/src/tasks/feature-extraction/inference.d.ts +0 -38
- package/dist/src/tasks/feature-extraction/inference.d.ts.map +0 -1
- package/dist/src/tasks/fill-mask/data.d.ts +0 -4
- package/dist/src/tasks/fill-mask/data.d.ts.map +0 -1
- package/dist/src/tasks/fill-mask/inference.d.ts +0 -63
- package/dist/src/tasks/fill-mask/inference.d.ts.map +0 -1
- package/dist/src/tasks/image-classification/data.d.ts +0 -4
- package/dist/src/tasks/image-classification/data.d.ts.map +0 -1
- package/dist/src/tasks/image-classification/inference.d.ts +0 -53
- package/dist/src/tasks/image-classification/inference.d.ts.map +0 -1
- package/dist/src/tasks/image-feature-extraction/data.d.ts +0 -4
- package/dist/src/tasks/image-feature-extraction/data.d.ts.map +0 -1
- package/dist/src/tasks/image-segmentation/data.d.ts +0 -4
- package/dist/src/tasks/image-segmentation/data.d.ts.map +0 -1
- package/dist/src/tasks/image-segmentation/inference.d.ts +0 -70
- package/dist/src/tasks/image-segmentation/inference.d.ts.map +0 -1
- package/dist/src/tasks/image-text-to-text/data.d.ts +0 -4
- package/dist/src/tasks/image-text-to-text/data.d.ts.map +0 -1
- package/dist/src/tasks/image-to-3d/data.d.ts +0 -4
- package/dist/src/tasks/image-to-3d/data.d.ts.map +0 -1
- package/dist/src/tasks/image-to-image/data.d.ts +0 -4
- package/dist/src/tasks/image-to-image/data.d.ts.map +0 -1
- package/dist/src/tasks/image-to-image/inference.d.ts +0 -65
- package/dist/src/tasks/image-to-image/inference.d.ts.map +0 -1
- package/dist/src/tasks/image-to-text/data.d.ts +0 -4
- package/dist/src/tasks/image-to-text/data.d.ts.map +0 -1
- package/dist/src/tasks/image-to-text/inference.d.ts +0 -139
- package/dist/src/tasks/image-to-text/inference.d.ts.map +0 -1
- package/dist/src/tasks/index.d.ts +0 -87
- package/dist/src/tasks/index.d.ts.map +0 -1
- package/dist/src/tasks/keypoint-detection/data.d.ts +0 -4
- package/dist/src/tasks/keypoint-detection/data.d.ts.map +0 -1
- package/dist/src/tasks/mask-generation/data.d.ts +0 -4
- package/dist/src/tasks/mask-generation/data.d.ts.map +0 -1
- package/dist/src/tasks/object-detection/data.d.ts +0 -4
- package/dist/src/tasks/object-detection/data.d.ts.map +0 -1
- package/dist/src/tasks/object-detection/inference.d.ts +0 -76
- package/dist/src/tasks/object-detection/inference.d.ts.map +0 -1
- package/dist/src/tasks/placeholder/data.d.ts +0 -4
- package/dist/src/tasks/placeholder/data.d.ts.map +0 -1
- package/dist/src/tasks/question-answering/data.d.ts +0 -4
- package/dist/src/tasks/question-answering/data.d.ts.map +0 -1
- package/dist/src/tasks/question-answering/inference.d.ts +0 -100
- package/dist/src/tasks/question-answering/inference.d.ts.map +0 -1
- package/dist/src/tasks/reinforcement-learning/data.d.ts +0 -4
- package/dist/src/tasks/reinforcement-learning/data.d.ts.map +0 -1
- package/dist/src/tasks/sentence-similarity/data.d.ts +0 -4
- package/dist/src/tasks/sentence-similarity/data.d.ts.map +0 -1
- package/dist/src/tasks/sentence-similarity/inference.d.ts +0 -32
- package/dist/src/tasks/sentence-similarity/inference.d.ts.map +0 -1
- package/dist/src/tasks/summarization/data.d.ts +0 -4
- package/dist/src/tasks/summarization/data.d.ts.map +0 -1
- package/dist/src/tasks/summarization/inference.d.ts +0 -56
- package/dist/src/tasks/summarization/inference.d.ts.map +0 -1
- package/dist/src/tasks/table-question-answering/data.d.ts +0 -4
- package/dist/src/tasks/table-question-answering/data.d.ts.map +0 -1
- package/dist/src/tasks/table-question-answering/inference.d.ts +0 -62
- package/dist/src/tasks/table-question-answering/inference.d.ts.map +0 -1
- package/dist/src/tasks/tabular-classification/data.d.ts +0 -4
- package/dist/src/tasks/tabular-classification/data.d.ts.map +0 -1
- package/dist/src/tasks/tabular-regression/data.d.ts +0 -4
- package/dist/src/tasks/tabular-regression/data.d.ts.map +0 -1
- package/dist/src/tasks/text-classification/data.d.ts +0 -4
- package/dist/src/tasks/text-classification/data.d.ts.map +0 -1
- package/dist/src/tasks/text-classification/inference.d.ts +0 -52
- package/dist/src/tasks/text-classification/inference.d.ts.map +0 -1
- package/dist/src/tasks/text-generation/data.d.ts +0 -4
- package/dist/src/tasks/text-generation/data.d.ts.map +0 -1
- package/dist/src/tasks/text-generation/inference.d.ts +0 -188
- package/dist/src/tasks/text-generation/inference.d.ts.map +0 -1
- package/dist/src/tasks/text-to-3d/data.d.ts +0 -4
- package/dist/src/tasks/text-to-3d/data.d.ts.map +0 -1
- package/dist/src/tasks/text-to-audio/inference.d.ts +0 -139
- package/dist/src/tasks/text-to-audio/inference.d.ts.map +0 -1
- package/dist/src/tasks/text-to-image/data.d.ts +0 -4
- package/dist/src/tasks/text-to-image/data.d.ts.map +0 -1
- package/dist/src/tasks/text-to-image/inference.d.ts +0 -72
- package/dist/src/tasks/text-to-image/inference.d.ts.map +0 -1
- package/dist/src/tasks/text-to-speech/data.d.ts +0 -4
- package/dist/src/tasks/text-to-speech/data.d.ts.map +0 -1
- package/dist/src/tasks/text-to-speech/inference.d.ts +0 -141
- package/dist/src/tasks/text-to-speech/inference.d.ts.map +0 -1
- package/dist/src/tasks/text-to-video/data.d.ts +0 -4
- package/dist/src/tasks/text-to-video/data.d.ts.map +0 -1
- package/dist/src/tasks/text2text-generation/inference.d.ts +0 -54
- package/dist/src/tasks/text2text-generation/inference.d.ts.map +0 -1
- package/dist/src/tasks/token-classification/data.d.ts +0 -4
- package/dist/src/tasks/token-classification/data.d.ts.map +0 -1
- package/dist/src/tasks/token-classification/inference.d.ts +0 -86
- package/dist/src/tasks/token-classification/inference.d.ts.map +0 -1
- package/dist/src/tasks/translation/data.d.ts +0 -4
- package/dist/src/tasks/translation/data.d.ts.map +0 -1
- package/dist/src/tasks/translation/inference.d.ts +0 -66
- package/dist/src/tasks/translation/inference.d.ts.map +0 -1
- package/dist/src/tasks/unconditional-image-generation/data.d.ts +0 -4
- package/dist/src/tasks/unconditional-image-generation/data.d.ts.map +0 -1
- package/dist/src/tasks/video-classification/data.d.ts +0 -4
- package/dist/src/tasks/video-classification/data.d.ts.map +0 -1
- package/dist/src/tasks/video-classification/inference.d.ts +0 -60
- package/dist/src/tasks/video-classification/inference.d.ts.map +0 -1
- package/dist/src/tasks/video-text-to-text/data.d.ts +0 -4
- package/dist/src/tasks/video-text-to-text/data.d.ts.map +0 -1
- package/dist/src/tasks/visual-question-answering/data.d.ts +0 -4
- package/dist/src/tasks/visual-question-answering/data.d.ts.map +0 -1
- package/dist/src/tasks/visual-question-answering/inference.d.ts +0 -63
- package/dist/src/tasks/visual-question-answering/inference.d.ts.map +0 -1
- package/dist/src/tasks/zero-shot-classification/data.d.ts +0 -4
- package/dist/src/tasks/zero-shot-classification/data.d.ts.map +0 -1
- package/dist/src/tasks/zero-shot-classification/inference.d.ts +0 -68
- package/dist/src/tasks/zero-shot-classification/inference.d.ts.map +0 -1
- package/dist/src/tasks/zero-shot-image-classification/data.d.ts +0 -4
- package/dist/src/tasks/zero-shot-image-classification/data.d.ts.map +0 -1
- package/dist/src/tasks/zero-shot-image-classification/inference.d.ts +0 -62
- package/dist/src/tasks/zero-shot-image-classification/inference.d.ts.map +0 -1
- package/dist/src/tasks/zero-shot-object-detection/data.d.ts +0 -4
- package/dist/src/tasks/zero-shot-object-detection/data.d.ts.map +0 -1
- package/dist/src/tasks/zero-shot-object-detection/inference.d.ts +0 -67
- package/dist/src/tasks/zero-shot-object-detection/inference.d.ts.map +0 -1
- package/dist/src/tokenizer-data.d.ts +0 -26
- package/dist/src/tokenizer-data.d.ts.map +0 -1
- package/dist/src/widget-example.d.ts +0 -83
- package/dist/src/widget-example.d.ts.map +0 -1
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Inference code generated from the JSON schema spec in ./spec
|
|
3
|
-
*
|
|
4
|
-
* Using src/scripts/inference-codegen
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Text Generation Input.
|
|
8
|
-
*
|
|
9
|
-
* Auto-generated from TGI specs.
|
|
10
|
-
* For more details, check out
|
|
11
|
-
* https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.
|
|
12
|
-
*/
|
|
13
|
-
export interface TextGenerationInput {
|
|
14
|
-
inputs: string;
|
|
15
|
-
parameters?: TextGenerationInputGenerateParameters;
|
|
16
|
-
stream?: boolean;
|
|
17
|
-
[property: string]: unknown;
|
|
18
|
-
}
|
|
19
|
-
export interface TextGenerationInputGenerateParameters {
|
|
20
|
-
/**
|
|
21
|
-
* Lora adapter id
|
|
22
|
-
*/
|
|
23
|
-
adapter_id?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Generate best_of sequences and return the one if the highest token logprobs.
|
|
26
|
-
*/
|
|
27
|
-
best_of?: number;
|
|
28
|
-
/**
|
|
29
|
-
* Whether to return decoder input token logprobs and ids.
|
|
30
|
-
*/
|
|
31
|
-
decoder_input_details?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Whether to return generation details.
|
|
34
|
-
*/
|
|
35
|
-
details?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Activate logits sampling.
|
|
38
|
-
*/
|
|
39
|
-
do_sample?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* The parameter for frequency penalty. 1.0 means no penalty
|
|
42
|
-
* Penalize new tokens based on their existing frequency in the text so far,
|
|
43
|
-
* decreasing the model's likelihood to repeat the same line verbatim.
|
|
44
|
-
*/
|
|
45
|
-
frequency_penalty?: number;
|
|
46
|
-
grammar?: TextGenerationInputGrammarType;
|
|
47
|
-
/**
|
|
48
|
-
* Maximum number of tokens to generate.
|
|
49
|
-
*/
|
|
50
|
-
max_new_tokens?: number;
|
|
51
|
-
/**
|
|
52
|
-
* The parameter for repetition penalty. 1.0 means no penalty.
|
|
53
|
-
* See [this paper](https://arxiv.org/pdf/1909.05858.pdf) for more details.
|
|
54
|
-
*/
|
|
55
|
-
repetition_penalty?: number;
|
|
56
|
-
/**
|
|
57
|
-
* Whether to prepend the prompt to the generated text
|
|
58
|
-
*/
|
|
59
|
-
return_full_text?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Random sampling seed.
|
|
62
|
-
*/
|
|
63
|
-
seed?: number;
|
|
64
|
-
/**
|
|
65
|
-
* Stop generating tokens if a member of `stop` is generated.
|
|
66
|
-
*/
|
|
67
|
-
stop?: string[];
|
|
68
|
-
/**
|
|
69
|
-
* The value used to module the logits distribution.
|
|
70
|
-
*/
|
|
71
|
-
temperature?: number;
|
|
72
|
-
/**
|
|
73
|
-
* The number of highest probability vocabulary tokens to keep for top-k-filtering.
|
|
74
|
-
*/
|
|
75
|
-
top_k?: number;
|
|
76
|
-
/**
|
|
77
|
-
* The number of highest probability vocabulary tokens to keep for top-n-filtering.
|
|
78
|
-
*/
|
|
79
|
-
top_n_tokens?: number;
|
|
80
|
-
/**
|
|
81
|
-
* Top-p value for nucleus sampling.
|
|
82
|
-
*/
|
|
83
|
-
top_p?: number;
|
|
84
|
-
/**
|
|
85
|
-
* Truncate inputs tokens to the given size.
|
|
86
|
-
*/
|
|
87
|
-
truncate?: number;
|
|
88
|
-
/**
|
|
89
|
-
* Typical Decoding mass
|
|
90
|
-
* See [Typical Decoding for Natural Language Generation](https://arxiv.org/abs/2202.00666)
|
|
91
|
-
* for more information.
|
|
92
|
-
*/
|
|
93
|
-
typical_p?: number;
|
|
94
|
-
/**
|
|
95
|
-
* Watermarking with [A Watermark for Large Language
|
|
96
|
-
* Models](https://arxiv.org/abs/2301.10226).
|
|
97
|
-
*/
|
|
98
|
-
watermark?: boolean;
|
|
99
|
-
[property: string]: unknown;
|
|
100
|
-
}
|
|
101
|
-
export interface TextGenerationInputGrammarType {
|
|
102
|
-
type: Type;
|
|
103
|
-
/**
|
|
104
|
-
* A string that represents a [JSON Schema](https://json-schema.org/).
|
|
105
|
-
*
|
|
106
|
-
* JSON Schema is a declarative language that allows to annotate JSON documents
|
|
107
|
-
* with types and descriptions.
|
|
108
|
-
*/
|
|
109
|
-
value: unknown;
|
|
110
|
-
[property: string]: unknown;
|
|
111
|
-
}
|
|
112
|
-
export type Type = "json" | "regex";
|
|
113
|
-
/**
|
|
114
|
-
* Text Generation Output.
|
|
115
|
-
*
|
|
116
|
-
* Auto-generated from TGI specs.
|
|
117
|
-
* For more details, check out
|
|
118
|
-
* https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.
|
|
119
|
-
*/
|
|
120
|
-
export interface TextGenerationOutput {
|
|
121
|
-
details?: TextGenerationOutputDetails;
|
|
122
|
-
generated_text: string;
|
|
123
|
-
[property: string]: unknown;
|
|
124
|
-
}
|
|
125
|
-
export interface TextGenerationOutputDetails {
|
|
126
|
-
best_of_sequences?: TextGenerationOutputBestOfSequence[];
|
|
127
|
-
finish_reason: TextGenerationOutputFinishReason;
|
|
128
|
-
generated_tokens: number;
|
|
129
|
-
prefill: TextGenerationOutputPrefillToken[];
|
|
130
|
-
seed?: number;
|
|
131
|
-
tokens: TextGenerationOutputToken[];
|
|
132
|
-
top_tokens?: Array<TextGenerationOutputToken[]>;
|
|
133
|
-
[property: string]: unknown;
|
|
134
|
-
}
|
|
135
|
-
export interface TextGenerationOutputBestOfSequence {
|
|
136
|
-
finish_reason: TextGenerationOutputFinishReason;
|
|
137
|
-
generated_text: string;
|
|
138
|
-
generated_tokens: number;
|
|
139
|
-
prefill: TextGenerationOutputPrefillToken[];
|
|
140
|
-
seed?: number;
|
|
141
|
-
tokens: TextGenerationOutputToken[];
|
|
142
|
-
top_tokens?: Array<TextGenerationOutputToken[]>;
|
|
143
|
-
[property: string]: unknown;
|
|
144
|
-
}
|
|
145
|
-
export type TextGenerationOutputFinishReason = "length" | "eos_token" | "stop_sequence";
|
|
146
|
-
export interface TextGenerationOutputPrefillToken {
|
|
147
|
-
id: number;
|
|
148
|
-
logprob: number;
|
|
149
|
-
text: string;
|
|
150
|
-
[property: string]: unknown;
|
|
151
|
-
}
|
|
152
|
-
export interface TextGenerationOutputToken {
|
|
153
|
-
id: number;
|
|
154
|
-
logprob: number;
|
|
155
|
-
special: boolean;
|
|
156
|
-
text: string;
|
|
157
|
-
[property: string]: unknown;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Text Generation Stream Output.
|
|
161
|
-
*
|
|
162
|
-
* Auto-generated from TGI specs.
|
|
163
|
-
* For more details, check out
|
|
164
|
-
* https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.
|
|
165
|
-
*/
|
|
166
|
-
export interface TextGenerationStreamOutput {
|
|
167
|
-
details?: TextGenerationStreamOutputStreamDetails;
|
|
168
|
-
generated_text?: string;
|
|
169
|
-
index: number;
|
|
170
|
-
token: TextGenerationStreamOutputToken;
|
|
171
|
-
top_tokens?: TextGenerationStreamOutputToken[];
|
|
172
|
-
[property: string]: unknown;
|
|
173
|
-
}
|
|
174
|
-
export interface TextGenerationStreamOutputStreamDetails {
|
|
175
|
-
finish_reason: TextGenerationOutputFinishReason;
|
|
176
|
-
generated_tokens: number;
|
|
177
|
-
input_length: number;
|
|
178
|
-
seed?: number;
|
|
179
|
-
[property: string]: unknown;
|
|
180
|
-
}
|
|
181
|
-
export interface TextGenerationStreamOutputToken {
|
|
182
|
-
id: number;
|
|
183
|
-
logprob: number;
|
|
184
|
-
special: boolean;
|
|
185
|
-
text: string;
|
|
186
|
-
[property: string]: unknown;
|
|
187
|
-
}
|
|
188
|
-
//# sourceMappingURL=inference.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/text-generation/inference.ts"],"names":[],"mappings":"AAAA;;;;GA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|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Inference code generated from the JSON schema spec in ./spec
|
|
3
|
-
*
|
|
4
|
-
* Using src/scripts/inference-codegen
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Inputs for Text To Audio inference
|
|
8
|
-
*/
|
|
9
|
-
export interface TextToAudioInput {
|
|
10
|
-
/**
|
|
11
|
-
* The input text data
|
|
12
|
-
*/
|
|
13
|
-
inputs: string;
|
|
14
|
-
/**
|
|
15
|
-
* Additional inference parameters
|
|
16
|
-
*/
|
|
17
|
-
parameters?: TextToAudioParameters;
|
|
18
|
-
[property: string]: unknown;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Additional inference parameters
|
|
22
|
-
*
|
|
23
|
-
* Additional inference parameters for Text To Audio
|
|
24
|
-
*/
|
|
25
|
-
export interface TextToAudioParameters {
|
|
26
|
-
/**
|
|
27
|
-
* Parametrization of the text generation process
|
|
28
|
-
*/
|
|
29
|
-
generation_parameters?: GenerationParameters;
|
|
30
|
-
[property: string]: unknown;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Parametrization of the text generation process
|
|
34
|
-
*
|
|
35
|
-
* Ad-hoc parametrization of the text generation process
|
|
36
|
-
*/
|
|
37
|
-
export interface GenerationParameters {
|
|
38
|
-
/**
|
|
39
|
-
* Whether to use sampling instead of greedy decoding when generating new tokens.
|
|
40
|
-
*/
|
|
41
|
-
do_sample?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Controls the stopping condition for beam-based methods.
|
|
44
|
-
*/
|
|
45
|
-
early_stopping?: EarlyStoppingUnion;
|
|
46
|
-
/**
|
|
47
|
-
* If set to float strictly between 0 and 1, only tokens with a conditional probability
|
|
48
|
-
* greater than epsilon_cutoff will be sampled. In the paper, suggested values range from
|
|
49
|
-
* 3e-4 to 9e-4, depending on the size of the model. See [Truncation Sampling as Language
|
|
50
|
-
* Model Desmoothing](https://hf.co/papers/2210.15191) for more details.
|
|
51
|
-
*/
|
|
52
|
-
epsilon_cutoff?: number;
|
|
53
|
-
/**
|
|
54
|
-
* Eta sampling is a hybrid of locally typical sampling and epsilon sampling. If set to
|
|
55
|
-
* float strictly between 0 and 1, a token is only considered if it is greater than either
|
|
56
|
-
* eta_cutoff or sqrt(eta_cutoff) * exp(-entropy(softmax(next_token_logits))). The latter
|
|
57
|
-
* term is intuitively the expected next token probability, scaled by sqrt(eta_cutoff). In
|
|
58
|
-
* the paper, suggested values range from 3e-4 to 2e-3, depending on the size of the model.
|
|
59
|
-
* See [Truncation Sampling as Language Model Desmoothing](https://hf.co/papers/2210.15191)
|
|
60
|
-
* for more details.
|
|
61
|
-
*/
|
|
62
|
-
eta_cutoff?: number;
|
|
63
|
-
/**
|
|
64
|
-
* The maximum length (in tokens) of the generated text, including the input.
|
|
65
|
-
*/
|
|
66
|
-
max_length?: number;
|
|
67
|
-
/**
|
|
68
|
-
* The maximum number of tokens to generate. Takes precedence over max_length.
|
|
69
|
-
*/
|
|
70
|
-
max_new_tokens?: number;
|
|
71
|
-
/**
|
|
72
|
-
* The minimum length (in tokens) of the generated text, including the input.
|
|
73
|
-
*/
|
|
74
|
-
min_length?: number;
|
|
75
|
-
/**
|
|
76
|
-
* The minimum number of tokens to generate. Takes precedence over min_length.
|
|
77
|
-
*/
|
|
78
|
-
min_new_tokens?: number;
|
|
79
|
-
/**
|
|
80
|
-
* Number of groups to divide num_beams into in order to ensure diversity among different
|
|
81
|
-
* groups of beams. See [this paper](https://hf.co/papers/1610.02424) for more details.
|
|
82
|
-
*/
|
|
83
|
-
num_beam_groups?: number;
|
|
84
|
-
/**
|
|
85
|
-
* Number of beams to use for beam search.
|
|
86
|
-
*/
|
|
87
|
-
num_beams?: number;
|
|
88
|
-
/**
|
|
89
|
-
* The value balances the model confidence and the degeneration penalty in contrastive
|
|
90
|
-
* search decoding.
|
|
91
|
-
*/
|
|
92
|
-
penalty_alpha?: number;
|
|
93
|
-
/**
|
|
94
|
-
* The value used to modulate the next token probabilities.
|
|
95
|
-
*/
|
|
96
|
-
temperature?: number;
|
|
97
|
-
/**
|
|
98
|
-
* The number of highest probability vocabulary tokens to keep for top-k-filtering.
|
|
99
|
-
*/
|
|
100
|
-
top_k?: number;
|
|
101
|
-
/**
|
|
102
|
-
* If set to float < 1, only the smallest set of most probable tokens with probabilities
|
|
103
|
-
* that add up to top_p or higher are kept for generation.
|
|
104
|
-
*/
|
|
105
|
-
top_p?: number;
|
|
106
|
-
/**
|
|
107
|
-
* Local typicality measures how similar the conditional probability of predicting a target
|
|
108
|
-
* token next is to the expected conditional probability of predicting a random token next,
|
|
109
|
-
* given the partial text already generated. If set to float < 1, the smallest set of the
|
|
110
|
-
* most locally typical tokens with probabilities that add up to typical_p or higher are
|
|
111
|
-
* kept for generation. See [this paper](https://hf.co/papers/2202.00666) for more details.
|
|
112
|
-
*/
|
|
113
|
-
typical_p?: number;
|
|
114
|
-
/**
|
|
115
|
-
* Whether the model should use the past last key/values attentions to speed up decoding
|
|
116
|
-
*/
|
|
117
|
-
use_cache?: boolean;
|
|
118
|
-
[property: string]: unknown;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Controls the stopping condition for beam-based methods.
|
|
122
|
-
*/
|
|
123
|
-
export type EarlyStoppingUnion = boolean | "never";
|
|
124
|
-
/**
|
|
125
|
-
* Outputs of inference for the Text To Audio task
|
|
126
|
-
*/
|
|
127
|
-
export interface TextToAudioOutput {
|
|
128
|
-
/**
|
|
129
|
-
* The generated audio waveform.
|
|
130
|
-
*/
|
|
131
|
-
audio: unknown;
|
|
132
|
-
samplingRate: unknown;
|
|
133
|
-
/**
|
|
134
|
-
* The sampling rate of the generated audio waveform.
|
|
135
|
-
*/
|
|
136
|
-
sampling_rate?: number;
|
|
137
|
-
[property: string]: unknown;
|
|
138
|
-
}
|
|
139
|
-
//# sourceMappingURL=inference.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inference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E,OAAO,CAAC;IACpB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/tasks/text-to-image/data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AAEzC,QAAA,MAAM,QAAQ,EAAE,cA+Ff,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Inference code generated from the JSON schema spec in ./spec
|
|
3
|
-
*
|
|
4
|
-
* Using src/scripts/inference-codegen
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Inputs for Text To Image inference
|
|
8
|
-
*/
|
|
9
|
-
export interface TextToImageInput {
|
|
10
|
-
/**
|
|
11
|
-
* The input text data (sometimes called "prompt")
|
|
12
|
-
*/
|
|
13
|
-
inputs: string;
|
|
14
|
-
/**
|
|
15
|
-
* Additional inference parameters
|
|
16
|
-
*/
|
|
17
|
-
parameters?: TextToImageParameters;
|
|
18
|
-
[property: string]: unknown;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Additional inference parameters
|
|
22
|
-
*
|
|
23
|
-
* Additional inference parameters for Text To Image
|
|
24
|
-
*/
|
|
25
|
-
export interface TextToImageParameters {
|
|
26
|
-
/**
|
|
27
|
-
* A higher guidance scale value encourages the model to generate images closely linked to
|
|
28
|
-
* the text prompt, but values too high may cause saturation and other artifacts.
|
|
29
|
-
*/
|
|
30
|
-
guidance_scale?: number;
|
|
31
|
-
/**
|
|
32
|
-
* One or several prompt to guide what NOT to include in image generation.
|
|
33
|
-
*/
|
|
34
|
-
negative_prompt?: string[];
|
|
35
|
-
/**
|
|
36
|
-
* The number of denoising steps. More denoising steps usually lead to a higher quality
|
|
37
|
-
* image at the expense of slower inference.
|
|
38
|
-
*/
|
|
39
|
-
num_inference_steps?: number;
|
|
40
|
-
/**
|
|
41
|
-
* Override the scheduler with a compatible one.
|
|
42
|
-
*/
|
|
43
|
-
scheduler?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Seed for the random number generator.
|
|
46
|
-
*/
|
|
47
|
-
seed?: number;
|
|
48
|
-
/**
|
|
49
|
-
* The size in pixel of the output image
|
|
50
|
-
*/
|
|
51
|
-
target_size?: TargetSize;
|
|
52
|
-
[property: string]: unknown;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* The size in pixel of the output image
|
|
56
|
-
*/
|
|
57
|
-
export interface TargetSize {
|
|
58
|
-
height: number;
|
|
59
|
-
width: number;
|
|
60
|
-
[property: string]: unknown;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Outputs of inference for the Text To Image task
|
|
64
|
-
*/
|
|
65
|
-
export interface TextToImageOutput {
|
|
66
|
-
/**
|
|
67
|
-
* The generated image returned as raw bytes in the payload.
|
|
68
|
-
*/
|
|
69
|
-
image: unknown;
|
|
70
|
-
[property: string]: unknown;
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=inference.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/text-to-image/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/tasks/text-to-speech/data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AAEzC,QAAA,MAAM,QAAQ,EAAE,cA0Ef,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Inference code generated from the JSON schema spec in ./spec
|
|
3
|
-
*
|
|
4
|
-
* Using src/scripts/inference-codegen
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Inputs for Text To Speech inference
|
|
8
|
-
*/
|
|
9
|
-
export interface TextToSpeechInput {
|
|
10
|
-
/**
|
|
11
|
-
* The input text data
|
|
12
|
-
*/
|
|
13
|
-
inputs: string;
|
|
14
|
-
/**
|
|
15
|
-
* Additional inference parameters
|
|
16
|
-
*/
|
|
17
|
-
parameters?: TextToSpeechParameters;
|
|
18
|
-
[property: string]: unknown;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Additional inference parameters
|
|
22
|
-
*
|
|
23
|
-
* Additional inference parameters for Text To Speech
|
|
24
|
-
*/
|
|
25
|
-
export interface TextToSpeechParameters {
|
|
26
|
-
/**
|
|
27
|
-
* Parametrization of the text generation process
|
|
28
|
-
*/
|
|
29
|
-
generation_parameters?: GenerationParameters;
|
|
30
|
-
[property: string]: unknown;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Parametrization of the text generation process
|
|
34
|
-
*
|
|
35
|
-
* Ad-hoc parametrization of the text generation process
|
|
36
|
-
*/
|
|
37
|
-
export interface GenerationParameters {
|
|
38
|
-
/**
|
|
39
|
-
* Whether to use sampling instead of greedy decoding when generating new tokens.
|
|
40
|
-
*/
|
|
41
|
-
do_sample?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Controls the stopping condition for beam-based methods.
|
|
44
|
-
*/
|
|
45
|
-
early_stopping?: EarlyStoppingUnion;
|
|
46
|
-
/**
|
|
47
|
-
* If set to float strictly between 0 and 1, only tokens with a conditional probability
|
|
48
|
-
* greater than epsilon_cutoff will be sampled. In the paper, suggested values range from
|
|
49
|
-
* 3e-4 to 9e-4, depending on the size of the model. See [Truncation Sampling as Language
|
|
50
|
-
* Model Desmoothing](https://hf.co/papers/2210.15191) for more details.
|
|
51
|
-
*/
|
|
52
|
-
epsilon_cutoff?: number;
|
|
53
|
-
/**
|
|
54
|
-
* Eta sampling is a hybrid of locally typical sampling and epsilon sampling. If set to
|
|
55
|
-
* float strictly between 0 and 1, a token is only considered if it is greater than either
|
|
56
|
-
* eta_cutoff or sqrt(eta_cutoff) * exp(-entropy(softmax(next_token_logits))). The latter
|
|
57
|
-
* term is intuitively the expected next token probability, scaled by sqrt(eta_cutoff). In
|
|
58
|
-
* the paper, suggested values range from 3e-4 to 2e-3, depending on the size of the model.
|
|
59
|
-
* See [Truncation Sampling as Language Model Desmoothing](https://hf.co/papers/2210.15191)
|
|
60
|
-
* for more details.
|
|
61
|
-
*/
|
|
62
|
-
eta_cutoff?: number;
|
|
63
|
-
/**
|
|
64
|
-
* The maximum length (in tokens) of the generated text, including the input.
|
|
65
|
-
*/
|
|
66
|
-
max_length?: number;
|
|
67
|
-
/**
|
|
68
|
-
* The maximum number of tokens to generate. Takes precedence over max_length.
|
|
69
|
-
*/
|
|
70
|
-
max_new_tokens?: number;
|
|
71
|
-
/**
|
|
72
|
-
* The minimum length (in tokens) of the generated text, including the input.
|
|
73
|
-
*/
|
|
74
|
-
min_length?: number;
|
|
75
|
-
/**
|
|
76
|
-
* The minimum number of tokens to generate. Takes precedence over min_length.
|
|
77
|
-
*/
|
|
78
|
-
min_new_tokens?: number;
|
|
79
|
-
/**
|
|
80
|
-
* Number of groups to divide num_beams into in order to ensure diversity among different
|
|
81
|
-
* groups of beams. See [this paper](https://hf.co/papers/1610.02424) for more details.
|
|
82
|
-
*/
|
|
83
|
-
num_beam_groups?: number;
|
|
84
|
-
/**
|
|
85
|
-
* Number of beams to use for beam search.
|
|
86
|
-
*/
|
|
87
|
-
num_beams?: number;
|
|
88
|
-
/**
|
|
89
|
-
* The value balances the model confidence and the degeneration penalty in contrastive
|
|
90
|
-
* search decoding.
|
|
91
|
-
*/
|
|
92
|
-
penalty_alpha?: number;
|
|
93
|
-
/**
|
|
94
|
-
* The value used to modulate the next token probabilities.
|
|
95
|
-
*/
|
|
96
|
-
temperature?: number;
|
|
97
|
-
/**
|
|
98
|
-
* The number of highest probability vocabulary tokens to keep for top-k-filtering.
|
|
99
|
-
*/
|
|
100
|
-
top_k?: number;
|
|
101
|
-
/**
|
|
102
|
-
* If set to float < 1, only the smallest set of most probable tokens with probabilities
|
|
103
|
-
* that add up to top_p or higher are kept for generation.
|
|
104
|
-
*/
|
|
105
|
-
top_p?: number;
|
|
106
|
-
/**
|
|
107
|
-
* Local typicality measures how similar the conditional probability of predicting a target
|
|
108
|
-
* token next is to the expected conditional probability of predicting a random token next,
|
|
109
|
-
* given the partial text already generated. If set to float < 1, the smallest set of the
|
|
110
|
-
* most locally typical tokens with probabilities that add up to typical_p or higher are
|
|
111
|
-
* kept for generation. See [this paper](https://hf.co/papers/2202.00666) for more details.
|
|
112
|
-
*/
|
|
113
|
-
typical_p?: number;
|
|
114
|
-
/**
|
|
115
|
-
* Whether the model should use the past last key/values attentions to speed up decoding
|
|
116
|
-
*/
|
|
117
|
-
use_cache?: boolean;
|
|
118
|
-
[property: string]: unknown;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Controls the stopping condition for beam-based methods.
|
|
122
|
-
*/
|
|
123
|
-
export type EarlyStoppingUnion = boolean | "never";
|
|
124
|
-
/**
|
|
125
|
-
* Outputs for Text to Speech inference
|
|
126
|
-
*
|
|
127
|
-
* Outputs of inference for the Text To Audio task
|
|
128
|
-
*/
|
|
129
|
-
export interface TextToSpeechOutput {
|
|
130
|
-
/**
|
|
131
|
-
* The generated audio waveform.
|
|
132
|
-
*/
|
|
133
|
-
audio: unknown;
|
|
134
|
-
samplingRate: unknown;
|
|
135
|
-
/**
|
|
136
|
-
* The sampling rate of the generated audio waveform.
|
|
137
|
-
*/
|
|
138
|
-
sampling_rate?: number;
|
|
139
|
-
[property: string]: unknown;
|
|
140
|
-
}
|
|
141
|
-
//# sourceMappingURL=inference.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/text-to-speech/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;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BAAkB;IAClC;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/tasks/text-to-video/data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AAEzC,QAAA,MAAM,QAAQ,EAAE,cAiGf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Inference code generated from the JSON schema spec in ./spec
|
|
3
|
-
*
|
|
4
|
-
* Using src/scripts/inference-codegen
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Inputs for Text2text Generation inference
|
|
8
|
-
*/
|
|
9
|
-
export interface Text2TextGenerationInput {
|
|
10
|
-
/**
|
|
11
|
-
* The input text data
|
|
12
|
-
*/
|
|
13
|
-
inputs: string;
|
|
14
|
-
/**
|
|
15
|
-
* Additional inference parameters
|
|
16
|
-
*/
|
|
17
|
-
parameters?: Text2TextGenerationParameters;
|
|
18
|
-
[property: string]: unknown;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Additional inference parameters
|
|
22
|
-
*
|
|
23
|
-
* Additional inference parameters for Text2text Generation
|
|
24
|
-
*/
|
|
25
|
-
export interface Text2TextGenerationParameters {
|
|
26
|
-
/**
|
|
27
|
-
* Whether to clean up the potential extra spaces in the text output.
|
|
28
|
-
*/
|
|
29
|
-
clean_up_tokenization_spaces?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Additional parametrization of the text generation algorithm
|
|
32
|
-
*/
|
|
33
|
-
generate_parameters?: {
|
|
34
|
-
[key: string]: unknown;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* The truncation strategy to use
|
|
38
|
-
*/
|
|
39
|
-
truncation?: Text2TextGenerationTruncationStrategy;
|
|
40
|
-
[property: string]: unknown;
|
|
41
|
-
}
|
|
42
|
-
export type Text2TextGenerationTruncationStrategy = "do_not_truncate" | "longest_first" | "only_first" | "only_second";
|
|
43
|
-
/**
|
|
44
|
-
* Outputs of inference for the Text2text Generation task
|
|
45
|
-
*/
|
|
46
|
-
export interface Text2TextGenerationOutput {
|
|
47
|
-
generatedText: unknown;
|
|
48
|
-
/**
|
|
49
|
-
* The generated text.
|
|
50
|
-
*/
|
|
51
|
-
generated_text?: string;
|
|
52
|
-
[property: string]: unknown;
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=inference.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/text2text-generation/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,6BAA6B,CAAC;IAC3C,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC7C;;OAEG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC;;OAEG;IACH,mBAAmB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IACjD;;OAEG;IACH,UAAU,CAAC,EAAE,qCAAqC,CAAC;IACnD,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED,MAAM,MAAM,qCAAqC,GAAG,iBAAiB,GAAG,eAAe,GAAG,YAAY,GAAG,aAAa,CAAC;AAEvH;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACzC,aAAa,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/tasks/token-classification/data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AAEzC,QAAA,MAAM,QAAQ,EAAE,cAuFf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|