@huggingface/transformers 3.0.0-alpha.9 → 3.0.1
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/README.md +82 -50
- package/dist/ort-wasm-simd-threaded.jsep.wasm +0 -0
- package/dist/transformers.cjs +2550 -2552
- package/dist/transformers.cjs.map +1 -1
- package/dist/transformers.js +3639 -3567
- package/dist/transformers.js.map +1 -1
- package/dist/transformers.min.cjs +25 -25
- package/dist/transformers.min.cjs.map +1 -1
- package/dist/transformers.min.js +41 -42
- package/dist/transformers.min.js.map +1 -1
- package/dist/transformers.min.mjs +56 -57
- package/dist/transformers.min.mjs.map +1 -1
- package/dist/transformers.mjs +2586 -2564
- package/dist/transformers.mjs.map +1 -1
- package/package.json +14 -13
- package/src/backends/onnx.js +24 -19
- package/src/configs.js +19 -4
- package/src/env.js +5 -9
- package/src/generation/logits_process.js +40 -37
- package/src/models.js +356 -539
- package/src/ops/registry.js +14 -3
- package/src/pipelines.js +5 -5
- package/src/processors.js +392 -351
- package/src/tokenizers.js +140 -175
- package/src/utils/constants.js +1 -1
- package/src/utils/core.js +12 -0
- package/src/utils/data-structures.js +13 -11
- package/src/utils/hub.js +1 -1
- package/src/utils/maths.js +14 -5
- package/src/utils/tensor.js +60 -13
- package/types/backends/onnx.d.ts +5 -2
- package/types/backends/onnx.d.ts.map +1 -1
- package/types/configs.d.ts +29 -3
- package/types/configs.d.ts.map +1 -1
- package/types/env.d.ts +4 -2
- package/types/env.d.ts.map +1 -1
- package/types/generation/logits_process.d.ts.map +1 -1
- package/types/models.d.ts +116 -289
- package/types/models.d.ts.map +1 -1
- package/types/ops/registry.d.ts +6 -6
- package/types/ops/registry.d.ts.map +1 -1
- package/types/pipelines.d.ts +1 -2
- package/types/pipelines.d.ts.map +1 -1
- package/types/processors.d.ts +58 -51
- package/types/processors.d.ts.map +1 -1
- package/types/tokenizers.d.ts +23 -32
- package/types/tokenizers.d.ts.map +1 -1
- package/types/utils/constants.d.ts +1 -1
- package/types/utils/constants.d.ts.map +1 -1
- package/types/utils/core.d.ts +7 -0
- package/types/utils/core.d.ts.map +1 -1
- package/types/utils/data-structures.d.ts +6 -6
- package/types/utils/data-structures.d.ts.map +1 -1
- package/types/utils/hub.d.ts +1 -1
- package/types/utils/hub.d.ts.map +1 -1
- package/types/utils/maths.d.ts +2 -2
- package/types/utils/maths.d.ts.map +1 -1
- package/types/utils/tensor.d.ts +27 -1
- package/types/utils/tensor.d.ts.map +1 -1
package/types/models.d.ts
CHANGED
|
@@ -26,12 +26,14 @@ export class PreTrainedModel extends PreTrainedModel_base {
|
|
|
26
26
|
* Creates a new instance of the `PreTrainedModel` class.
|
|
27
27
|
* @param {import('./configs.js').PretrainedConfig} config The model configuration.
|
|
28
28
|
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
29
|
+
* @param {Record<string, Object>} configs Additional configuration files (e.g., generation_config.json).
|
|
29
30
|
*/
|
|
30
|
-
constructor(config: import('./configs.js').PretrainedConfig, sessions: Record<string, any>);
|
|
31
|
+
constructor(config: import('./configs.js').PretrainedConfig, sessions: Record<string, any>, configs: Record<string, any>);
|
|
31
32
|
main_input_name: string;
|
|
32
33
|
forward_params: string[];
|
|
33
34
|
config: import("./configs.js").PretrainedConfig;
|
|
34
35
|
sessions: Record<string, any>;
|
|
36
|
+
configs: Record<string, any>;
|
|
35
37
|
can_generate: boolean;
|
|
36
38
|
_forward: typeof decoderForward;
|
|
37
39
|
_prepare_inputs_for_generation: typeof image_text_to_text_prepare_inputs_for_generation;
|
|
@@ -57,6 +59,11 @@ export class PreTrainedModel extends PreTrainedModel_base {
|
|
|
57
59
|
* @throws {Error} This method must be implemented in subclasses.
|
|
58
60
|
*/
|
|
59
61
|
forward(model_inputs: any): Promise<any>;
|
|
62
|
+
/**
|
|
63
|
+
* Get the model's generation config, if it exists.
|
|
64
|
+
* @returns {GenerationConfig|null} The model's generation config if it exists, otherwise `null`.
|
|
65
|
+
*/
|
|
66
|
+
get generation_config(): GenerationConfig;
|
|
60
67
|
/**
|
|
61
68
|
* This function returns a [`LogitsProcessorList`] list object that contains all relevant [`LogitsWarper`]
|
|
62
69
|
* instances used for multinomial sampling.
|
|
@@ -148,10 +155,9 @@ export class PreTrainedModel extends PreTrainedModel_base {
|
|
|
148
155
|
*
|
|
149
156
|
* @param {Object} decoderResults The decoder results object.
|
|
150
157
|
* @param {Object} pastKeyValues The previous past key values.
|
|
151
|
-
* @param {boolean} [dispose=true] Whether to dispose of the old gpu buffer.
|
|
152
158
|
* @returns {Object} An object containing past key values.
|
|
153
159
|
*/
|
|
154
|
-
getPastKeyValues(decoderResults: any, pastKeyValues: any,
|
|
160
|
+
getPastKeyValues(decoderResults: any, pastKeyValues: any, disposeEncoderPKVs?: boolean): any;
|
|
155
161
|
/**
|
|
156
162
|
* Returns an object containing attentions from the given model output object.
|
|
157
163
|
*
|
|
@@ -845,14 +851,6 @@ export class AlbertForMaskedLM extends AlbertPreTrainedModel {
|
|
|
845
851
|
_call(model_inputs: any): Promise<MaskedLMOutput>;
|
|
846
852
|
}
|
|
847
853
|
export class T5PreTrainedModel extends PreTrainedModel {
|
|
848
|
-
/**
|
|
849
|
-
* Creates a new instance of the `T5PreTrainedModel` class.
|
|
850
|
-
* @param {Object} config The model configuration.
|
|
851
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
852
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
853
|
-
*/
|
|
854
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
855
|
-
generation_config: GenerationConfig;
|
|
856
854
|
}
|
|
857
855
|
export class T5Model extends T5PreTrainedModel {
|
|
858
856
|
}
|
|
@@ -865,14 +863,6 @@ export class T5ForConditionalGeneration extends T5PreTrainedModel {
|
|
|
865
863
|
* An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained models.
|
|
866
864
|
*/
|
|
867
865
|
export class LongT5PreTrainedModel extends PreTrainedModel {
|
|
868
|
-
/**
|
|
869
|
-
* Creates a new instance of the `LongT5ForConditionalGeneration` class.
|
|
870
|
-
* @param {Object} config The model configuration.
|
|
871
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
872
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
873
|
-
*/
|
|
874
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
875
|
-
generation_config: GenerationConfig;
|
|
876
866
|
}
|
|
877
867
|
/**
|
|
878
868
|
* The bare LONGT5 Model transformer outputting raw hidden-states without any specific head on top.
|
|
@@ -885,14 +875,6 @@ export class LongT5Model extends LongT5PreTrainedModel {
|
|
|
885
875
|
export class LongT5ForConditionalGeneration extends LongT5PreTrainedModel {
|
|
886
876
|
}
|
|
887
877
|
export class MT5PreTrainedModel extends PreTrainedModel {
|
|
888
|
-
/**
|
|
889
|
-
* Creates a new instance of the `MT5ForConditionalGeneration` class.
|
|
890
|
-
* @param {Object} config The model configuration.
|
|
891
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
892
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
893
|
-
*/
|
|
894
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
895
|
-
generation_config: GenerationConfig;
|
|
896
878
|
}
|
|
897
879
|
export class MT5Model extends MT5PreTrainedModel {
|
|
898
880
|
}
|
|
@@ -902,14 +884,6 @@ export class MT5Model extends MT5PreTrainedModel {
|
|
|
902
884
|
export class MT5ForConditionalGeneration extends MT5PreTrainedModel {
|
|
903
885
|
}
|
|
904
886
|
export class BartPretrainedModel extends PreTrainedModel {
|
|
905
|
-
/**
|
|
906
|
-
* Creates a new instance of the `BartForConditionalGeneration` class.
|
|
907
|
-
* @param {Object} config The model configuration.
|
|
908
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
909
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
910
|
-
*/
|
|
911
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
912
|
-
generation_config: GenerationConfig;
|
|
913
887
|
}
|
|
914
888
|
/**
|
|
915
889
|
* The bare BART Model outputting raw hidden-states without any specific head on top.
|
|
@@ -934,14 +908,6 @@ export class BartForSequenceClassification extends BartPretrainedModel {
|
|
|
934
908
|
_call(model_inputs: any): Promise<SequenceClassifierOutput>;
|
|
935
909
|
}
|
|
936
910
|
export class MBartPreTrainedModel extends PreTrainedModel {
|
|
937
|
-
/**
|
|
938
|
-
* Creates a new instance of the `MBartForConditionalGeneration` class.
|
|
939
|
-
* @param {Object} config The model configuration.
|
|
940
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
941
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
942
|
-
*/
|
|
943
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
944
|
-
generation_config: GenerationConfig;
|
|
945
911
|
}
|
|
946
912
|
/**
|
|
947
913
|
* The bare MBART Model outputting raw hidden-states without any specific head on top.
|
|
@@ -968,14 +934,6 @@ export class MBartForSequenceClassification extends MBartPreTrainedModel {
|
|
|
968
934
|
export class MBartForCausalLM extends MBartPreTrainedModel {
|
|
969
935
|
}
|
|
970
936
|
export class BlenderbotPreTrainedModel extends PreTrainedModel {
|
|
971
|
-
/**
|
|
972
|
-
* Creates a new instance of the `BlenderbotForConditionalGeneration` class.
|
|
973
|
-
* @param {Object} config The model configuration.
|
|
974
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
975
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
976
|
-
*/
|
|
977
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
978
|
-
generation_config: GenerationConfig;
|
|
979
937
|
}
|
|
980
938
|
/**
|
|
981
939
|
* The bare Blenderbot Model outputting raw hidden-states without any specific head on top.
|
|
@@ -988,14 +946,6 @@ export class BlenderbotModel extends BlenderbotPreTrainedModel {
|
|
|
988
946
|
export class BlenderbotForConditionalGeneration extends BlenderbotPreTrainedModel {
|
|
989
947
|
}
|
|
990
948
|
export class BlenderbotSmallPreTrainedModel extends PreTrainedModel {
|
|
991
|
-
/**
|
|
992
|
-
* Creates a new instance of the `BlenderbotForConditionalGeneration` class.
|
|
993
|
-
* @param {Object} config The model configuration.
|
|
994
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
995
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
996
|
-
*/
|
|
997
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
998
|
-
generation_config: GenerationConfig;
|
|
999
949
|
}
|
|
1000
950
|
/**
|
|
1001
951
|
* The bare BlenderbotSmall Model outputting raw hidden-states without any specific head on top.
|
|
@@ -1183,15 +1133,7 @@ export class ASTModel extends ASTPreTrainedModel {
|
|
|
1183
1133
|
export class ASTForAudioClassification extends ASTPreTrainedModel {
|
|
1184
1134
|
}
|
|
1185
1135
|
export class WhisperPreTrainedModel extends PreTrainedModel {
|
|
1186
|
-
/**
|
|
1187
|
-
* Creates a new instance of the `WhisperPreTrainedModel` class.
|
|
1188
|
-
* @param {Object} config The model configuration.
|
|
1189
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1190
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1191
|
-
*/
|
|
1192
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1193
1136
|
requires_attention_mask: boolean;
|
|
1194
|
-
generation_config: GenerationConfig;
|
|
1195
1137
|
}
|
|
1196
1138
|
/**
|
|
1197
1139
|
* WhisperModel class for training Whisper models without a language model head.
|
|
@@ -1229,18 +1171,8 @@ export class WhisperForConditionalGeneration extends WhisperPreTrainedModel {
|
|
|
1229
1171
|
* Vision Encoder-Decoder model based on OpenAI's GPT architecture for image captioning and other vision tasks
|
|
1230
1172
|
*/
|
|
1231
1173
|
export class VisionEncoderDecoderModel extends PreTrainedModel {
|
|
1232
|
-
/**
|
|
1233
|
-
* Creates a new instance of the `VisionEncoderDecoderModel` class.
|
|
1234
|
-
* @param {Object} config The model configuration.
|
|
1235
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1236
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1237
|
-
*/
|
|
1238
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1239
|
-
generation_config: GenerationConfig;
|
|
1240
1174
|
}
|
|
1241
1175
|
export class LlavaPreTrainedModel extends PreTrainedModel {
|
|
1242
|
-
constructor(config: any, sessions: any, generation_config: any);
|
|
1243
|
-
generation_config: any;
|
|
1244
1176
|
}
|
|
1245
1177
|
/**
|
|
1246
1178
|
* The LLAVA model which consists of a vision backbone and a language model.
|
|
@@ -1259,8 +1191,6 @@ export class LlavaForConditionalGeneration extends LlavaPreTrainedModel {
|
|
|
1259
1191
|
export class Moondream1ForConditionalGeneration extends LlavaForConditionalGeneration {
|
|
1260
1192
|
}
|
|
1261
1193
|
export class Florence2PreTrainedModel extends PreTrainedModel {
|
|
1262
|
-
constructor(config: any, sessions: any, generation_config: any);
|
|
1263
|
-
generation_config: any;
|
|
1264
1194
|
}
|
|
1265
1195
|
export class Florence2ForConditionalGeneration extends Florence2PreTrainedModel {
|
|
1266
1196
|
_merge_input_ids_with_image_features({ inputs_embeds, image_features, input_ids, attention_mask, }: {
|
|
@@ -1340,6 +1270,11 @@ export class CLIPPreTrainedModel extends PreTrainedModel {
|
|
|
1340
1270
|
*/
|
|
1341
1271
|
export class CLIPModel extends CLIPPreTrainedModel {
|
|
1342
1272
|
}
|
|
1273
|
+
/**
|
|
1274
|
+
* The text model from CLIP without any head or projection on top.
|
|
1275
|
+
*/
|
|
1276
|
+
export class CLIPTextModel extends CLIPPreTrainedModel {
|
|
1277
|
+
}
|
|
1343
1278
|
/**
|
|
1344
1279
|
* CLIP Text Model with a projection layer on top (a linear layer on top of the pooled output)
|
|
1345
1280
|
*
|
|
@@ -1368,6 +1303,11 @@ export class CLIPModel extends CLIPPreTrainedModel {
|
|
|
1368
1303
|
*/
|
|
1369
1304
|
export class CLIPTextModelWithProjection extends CLIPPreTrainedModel {
|
|
1370
1305
|
}
|
|
1306
|
+
/**
|
|
1307
|
+
* The vision model from CLIP without any head or projection on top.
|
|
1308
|
+
*/
|
|
1309
|
+
export class CLIPVisionModel extends CLIPPreTrainedModel {
|
|
1310
|
+
}
|
|
1371
1311
|
/**
|
|
1372
1312
|
* CLIP Vision Model with a projection layer on top (a linear layer on top of the pooled output)
|
|
1373
1313
|
*
|
|
@@ -1556,14 +1496,6 @@ export class CLIPSegModel extends CLIPSegPreTrainedModel {
|
|
|
1556
1496
|
export class CLIPSegForImageSegmentation extends CLIPSegPreTrainedModel {
|
|
1557
1497
|
}
|
|
1558
1498
|
export class GPT2PreTrainedModel extends PreTrainedModel {
|
|
1559
|
-
/**
|
|
1560
|
-
* Creates a new instance of the `GPT2PreTrainedModel` class.
|
|
1561
|
-
* @param {Object} config The model configuration.
|
|
1562
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1563
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1564
|
-
*/
|
|
1565
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1566
|
-
generation_config: GenerationConfig;
|
|
1567
1499
|
}
|
|
1568
1500
|
export class GPT2Model extends GPT2PreTrainedModel {
|
|
1569
1501
|
}
|
|
@@ -1572,71 +1504,43 @@ export class GPT2Model extends GPT2PreTrainedModel {
|
|
|
1572
1504
|
*/
|
|
1573
1505
|
export class GPT2LMHeadModel extends GPT2PreTrainedModel {
|
|
1574
1506
|
}
|
|
1507
|
+
export class JAISPreTrainedModel extends PreTrainedModel {
|
|
1508
|
+
}
|
|
1509
|
+
/**
|
|
1510
|
+
* The bare JAIS Model transformer outputting raw hidden-states without any specific head on top.
|
|
1511
|
+
*/
|
|
1512
|
+
export class JAISModel extends JAISPreTrainedModel {
|
|
1513
|
+
}
|
|
1514
|
+
/**
|
|
1515
|
+
* The JAIS Model transformer with a language modeling head on top (linear layer with weights tied to the input embeddings).
|
|
1516
|
+
*/
|
|
1517
|
+
export class JAISLMHeadModel extends JAISPreTrainedModel {
|
|
1518
|
+
}
|
|
1575
1519
|
export class GPTNeoPreTrainedModel extends PreTrainedModel {
|
|
1576
|
-
/**
|
|
1577
|
-
* Creates a new instance of the `GPTNeoPreTrainedModel` class.
|
|
1578
|
-
* @param {Object} config The model configuration.
|
|
1579
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1580
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1581
|
-
*/
|
|
1582
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1583
|
-
generation_config: GenerationConfig;
|
|
1584
1520
|
}
|
|
1585
1521
|
export class GPTNeoModel extends GPTNeoPreTrainedModel {
|
|
1586
1522
|
}
|
|
1587
1523
|
export class GPTNeoForCausalLM extends GPTNeoPreTrainedModel {
|
|
1588
1524
|
}
|
|
1589
1525
|
export class GPTNeoXPreTrainedModel extends PreTrainedModel {
|
|
1590
|
-
/**
|
|
1591
|
-
* Creates a new instance of the `GPTNeoXPreTrainedModel` class.
|
|
1592
|
-
* @param {Object} config The model configuration.
|
|
1593
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1594
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1595
|
-
*/
|
|
1596
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1597
|
-
generation_config: GenerationConfig;
|
|
1598
1526
|
}
|
|
1599
1527
|
export class GPTNeoXModel extends GPTNeoXPreTrainedModel {
|
|
1600
1528
|
}
|
|
1601
1529
|
export class GPTNeoXForCausalLM extends GPTNeoXPreTrainedModel {
|
|
1602
1530
|
}
|
|
1603
1531
|
export class GPTJPreTrainedModel extends PreTrainedModel {
|
|
1604
|
-
/**
|
|
1605
|
-
* Creates a new instance of the `GPTJPreTrainedModel` class.
|
|
1606
|
-
* @param {Object} config The model configuration.
|
|
1607
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1608
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1609
|
-
*/
|
|
1610
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1611
|
-
generation_config: GenerationConfig;
|
|
1612
1532
|
}
|
|
1613
1533
|
export class GPTJModel extends GPTJPreTrainedModel {
|
|
1614
1534
|
}
|
|
1615
1535
|
export class GPTJForCausalLM extends GPTJPreTrainedModel {
|
|
1616
1536
|
}
|
|
1617
1537
|
export class GPTBigCodePreTrainedModel extends PreTrainedModel {
|
|
1618
|
-
/**
|
|
1619
|
-
* Creates a new instance of the `GPTBigCodePreTrainedModel` class.
|
|
1620
|
-
* @param {Object} config The model configuration.
|
|
1621
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1622
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1623
|
-
*/
|
|
1624
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1625
|
-
generation_config: GenerationConfig;
|
|
1626
1538
|
}
|
|
1627
1539
|
export class GPTBigCodeModel extends GPTBigCodePreTrainedModel {
|
|
1628
1540
|
}
|
|
1629
1541
|
export class GPTBigCodeForCausalLM extends GPTBigCodePreTrainedModel {
|
|
1630
1542
|
}
|
|
1631
1543
|
export class CodeGenPreTrainedModel extends PreTrainedModel {
|
|
1632
|
-
/**
|
|
1633
|
-
* Creates a new instance of the `CodeGenPreTrainedModel` class.
|
|
1634
|
-
* @param {Object} config The model configuration.
|
|
1635
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1636
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1637
|
-
*/
|
|
1638
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1639
|
-
generation_config: GenerationConfig;
|
|
1640
1544
|
}
|
|
1641
1545
|
/**
|
|
1642
1546
|
* CodeGenModel is a class representing a code generation model without a language model head.
|
|
@@ -1652,14 +1556,6 @@ export class CodeGenForCausalLM extends CodeGenPreTrainedModel {
|
|
|
1652
1556
|
* The bare LLama Model outputting raw hidden-states without any specific head on top.
|
|
1653
1557
|
*/
|
|
1654
1558
|
export class LlamaPreTrainedModel extends PreTrainedModel {
|
|
1655
|
-
/**
|
|
1656
|
-
* Creates a new instance of the `LlamaPreTrainedModel` class.
|
|
1657
|
-
* @param {Object} config The model configuration.
|
|
1658
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1659
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1660
|
-
*/
|
|
1661
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1662
|
-
generation_config: GenerationConfig;
|
|
1663
1559
|
}
|
|
1664
1560
|
/**
|
|
1665
1561
|
* The bare LLaMA Model outputting raw hidden-states without any specific head on top.
|
|
@@ -1668,18 +1564,16 @@ export class LlamaModel extends LlamaPreTrainedModel {
|
|
|
1668
1564
|
}
|
|
1669
1565
|
export class LlamaForCausalLM extends LlamaPreTrainedModel {
|
|
1670
1566
|
}
|
|
1567
|
+
export class GranitePreTrainedModel extends PreTrainedModel {
|
|
1568
|
+
}
|
|
1569
|
+
export class GraniteModel extends GranitePreTrainedModel {
|
|
1570
|
+
}
|
|
1571
|
+
export class GraniteForCausalLM extends GranitePreTrainedModel {
|
|
1572
|
+
}
|
|
1671
1573
|
/**
|
|
1672
1574
|
* The bare Cohere Model outputting raw hidden-states without any specific head on top.
|
|
1673
1575
|
*/
|
|
1674
1576
|
export class CoherePreTrainedModel extends PreTrainedModel {
|
|
1675
|
-
/**
|
|
1676
|
-
* Creates a new instance of the `CoherePreTrainedModel` class.
|
|
1677
|
-
* @param {Object} config The model configuration.
|
|
1678
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1679
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1680
|
-
*/
|
|
1681
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1682
|
-
generation_config: GenerationConfig;
|
|
1683
1577
|
}
|
|
1684
1578
|
export class CohereModel extends CoherePreTrainedModel {
|
|
1685
1579
|
}
|
|
@@ -1689,14 +1583,6 @@ export class CohereForCausalLM extends CoherePreTrainedModel {
|
|
|
1689
1583
|
* The bare Gemma Model outputting raw hidden-states without any specific head on top.
|
|
1690
1584
|
*/
|
|
1691
1585
|
export class GemmaPreTrainedModel extends PreTrainedModel {
|
|
1692
|
-
/**
|
|
1693
|
-
* Creates a new instance of the `GemmaPreTrainedModel` class.
|
|
1694
|
-
* @param {Object} config The model configuration.
|
|
1695
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1696
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1697
|
-
*/
|
|
1698
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1699
|
-
generation_config: GenerationConfig;
|
|
1700
1586
|
}
|
|
1701
1587
|
/**
|
|
1702
1588
|
* The bare Gemma Model outputting raw hidden-states without any specific head on top.
|
|
@@ -1709,14 +1595,6 @@ export class GemmaForCausalLM extends GemmaPreTrainedModel {
|
|
|
1709
1595
|
* The bare Gemma2 Model outputting raw hidden-states without any specific head on top.
|
|
1710
1596
|
*/
|
|
1711
1597
|
export class Gemma2PreTrainedModel extends PreTrainedModel {
|
|
1712
|
-
/**
|
|
1713
|
-
* Creates a new instance of the `Gemma2PreTrainedModel` class.
|
|
1714
|
-
* @param {Object} config The model configuration.
|
|
1715
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1716
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1717
|
-
*/
|
|
1718
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1719
|
-
generation_config: GenerationConfig;
|
|
1720
1598
|
}
|
|
1721
1599
|
/**
|
|
1722
1600
|
* The bare Gemma2 Model outputting raw hidden-states without any specific head on top.
|
|
@@ -1726,14 +1604,6 @@ export class Gemma2Model extends Gemma2PreTrainedModel {
|
|
|
1726
1604
|
export class Gemma2ForCausalLM extends Gemma2PreTrainedModel {
|
|
1727
1605
|
}
|
|
1728
1606
|
export class OpenELMPreTrainedModel extends PreTrainedModel {
|
|
1729
|
-
/**
|
|
1730
|
-
* Creates a new instance of the `OpenELMPreTrainedModel` class.
|
|
1731
|
-
* @param {Object} config The model configuration.
|
|
1732
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1733
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1734
|
-
*/
|
|
1735
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1736
|
-
generation_config: GenerationConfig;
|
|
1737
1607
|
}
|
|
1738
1608
|
export class OpenELMModel extends OpenELMPreTrainedModel {
|
|
1739
1609
|
}
|
|
@@ -1743,14 +1613,6 @@ export class OpenELMForCausalLM extends OpenELMPreTrainedModel {
|
|
|
1743
1613
|
* The bare Qwen2 Model outputting raw hidden-states without any specific head on top.
|
|
1744
1614
|
*/
|
|
1745
1615
|
export class Qwen2PreTrainedModel extends PreTrainedModel {
|
|
1746
|
-
/**
|
|
1747
|
-
* Creates a new instance of the `Qwen2PreTrainedModel` class.
|
|
1748
|
-
* @param {Object} config The model configuration.
|
|
1749
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1750
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1751
|
-
*/
|
|
1752
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1753
|
-
generation_config: GenerationConfig;
|
|
1754
1616
|
}
|
|
1755
1617
|
/**
|
|
1756
1618
|
* The bare Qwen2 Model outputting raw hidden-states without any specific head on top.
|
|
@@ -1760,14 +1622,6 @@ export class Qwen2Model extends Qwen2PreTrainedModel {
|
|
|
1760
1622
|
export class Qwen2ForCausalLM extends Qwen2PreTrainedModel {
|
|
1761
1623
|
}
|
|
1762
1624
|
export class PhiPreTrainedModel extends PreTrainedModel {
|
|
1763
|
-
/**
|
|
1764
|
-
* Creates a new instance of the `PhiPreTrainedModel` class.
|
|
1765
|
-
* @param {Object} config The model configuration.
|
|
1766
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1767
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1768
|
-
*/
|
|
1769
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1770
|
-
generation_config: GenerationConfig;
|
|
1771
1625
|
}
|
|
1772
1626
|
/**
|
|
1773
1627
|
* The bare Phi Model outputting raw hidden-states without any specific head on top.
|
|
@@ -1777,14 +1631,6 @@ export class PhiModel extends PhiPreTrainedModel {
|
|
|
1777
1631
|
export class PhiForCausalLM extends PhiPreTrainedModel {
|
|
1778
1632
|
}
|
|
1779
1633
|
export class Phi3PreTrainedModel extends PreTrainedModel {
|
|
1780
|
-
/**
|
|
1781
|
-
* Creates a new instance of the `Phi3PreTrainedModel` class.
|
|
1782
|
-
* @param {Object} config The model configuration.
|
|
1783
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1784
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1785
|
-
*/
|
|
1786
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1787
|
-
generation_config: GenerationConfig;
|
|
1788
1634
|
}
|
|
1789
1635
|
/**
|
|
1790
1636
|
* The bare Phi3 Model outputting raw hidden-states without any specific head on top.
|
|
@@ -1797,14 +1643,6 @@ export class Phi3ForCausalLM extends Phi3PreTrainedModel {
|
|
|
1797
1643
|
* The Bloom Model transformer with a language modeling head on top (linear layer with weights tied to the input embeddings).
|
|
1798
1644
|
*/
|
|
1799
1645
|
export class BloomPreTrainedModel extends PreTrainedModel {
|
|
1800
|
-
/**
|
|
1801
|
-
* Creates a new instance of the `BloomPreTrainedModel` class.
|
|
1802
|
-
* @param {Object} config The model configuration.
|
|
1803
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1804
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1805
|
-
*/
|
|
1806
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1807
|
-
generation_config: GenerationConfig;
|
|
1808
1646
|
}
|
|
1809
1647
|
/**
|
|
1810
1648
|
* The bare Bloom Model transformer outputting raw hidden-states without any specific head on top.
|
|
@@ -1817,14 +1655,6 @@ export class BloomModel extends BloomPreTrainedModel {
|
|
|
1817
1655
|
export class BloomForCausalLM extends BloomPreTrainedModel {
|
|
1818
1656
|
}
|
|
1819
1657
|
export class MptPreTrainedModel extends PreTrainedModel {
|
|
1820
|
-
/**
|
|
1821
|
-
* Creates a new instance of the `MptPreTrainedModel` class.
|
|
1822
|
-
* @param {Object} config The model configuration.
|
|
1823
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1824
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1825
|
-
*/
|
|
1826
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1827
|
-
generation_config: GenerationConfig;
|
|
1828
1658
|
}
|
|
1829
1659
|
/**
|
|
1830
1660
|
* The bare Mpt Model transformer outputting raw hidden-states without any specific head on top.
|
|
@@ -1837,14 +1667,6 @@ export class MptModel extends MptPreTrainedModel {
|
|
|
1837
1667
|
export class MptForCausalLM extends MptPreTrainedModel {
|
|
1838
1668
|
}
|
|
1839
1669
|
export class OPTPreTrainedModel extends PreTrainedModel {
|
|
1840
|
-
/**
|
|
1841
|
-
* Creates a new instance of the `OPTPreTrainedModel` class.
|
|
1842
|
-
* @param {Object} config The model configuration.
|
|
1843
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1844
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1845
|
-
*/
|
|
1846
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1847
|
-
generation_config: GenerationConfig;
|
|
1848
1670
|
}
|
|
1849
1671
|
/**
|
|
1850
1672
|
* The bare OPT Model outputting raw hidden-states without any specific head on top.
|
|
@@ -1866,6 +1688,34 @@ export class ViTForImageClassification extends ViTPreTrainedModel {
|
|
|
1866
1688
|
*/
|
|
1867
1689
|
_call(model_inputs: any): Promise<SequenceClassifierOutput>;
|
|
1868
1690
|
}
|
|
1691
|
+
export class PvtPreTrainedModel extends PreTrainedModel {
|
|
1692
|
+
}
|
|
1693
|
+
export class PvtModel extends PvtPreTrainedModel {
|
|
1694
|
+
}
|
|
1695
|
+
export class PvtForImageClassification extends PvtPreTrainedModel {
|
|
1696
|
+
/**
|
|
1697
|
+
* @param {any} model_inputs
|
|
1698
|
+
*/
|
|
1699
|
+
_call(model_inputs: any): Promise<SequenceClassifierOutput>;
|
|
1700
|
+
}
|
|
1701
|
+
export class ViTMAEPreTrainedModel extends PreTrainedModel {
|
|
1702
|
+
}
|
|
1703
|
+
export class ViTMAEModel extends ViTMAEPreTrainedModel {
|
|
1704
|
+
}
|
|
1705
|
+
export class ViTMSNPreTrainedModel extends PreTrainedModel {
|
|
1706
|
+
}
|
|
1707
|
+
export class ViTMSNModel extends ViTMSNPreTrainedModel {
|
|
1708
|
+
}
|
|
1709
|
+
export class ViTMSNForImageClassification extends ViTMSNPreTrainedModel {
|
|
1710
|
+
/**
|
|
1711
|
+
* @param {any} model_inputs
|
|
1712
|
+
*/
|
|
1713
|
+
_call(model_inputs: any): Promise<SequenceClassifierOutput>;
|
|
1714
|
+
}
|
|
1715
|
+
export class GroupViTPreTrainedModel extends PreTrainedModel {
|
|
1716
|
+
}
|
|
1717
|
+
export class GroupViTModel extends GroupViTPreTrainedModel {
|
|
1718
|
+
}
|
|
1869
1719
|
export class FastViTPreTrainedModel extends PreTrainedModel {
|
|
1870
1720
|
}
|
|
1871
1721
|
export class FastViTModel extends FastViTPreTrainedModel {
|
|
@@ -2079,6 +1929,16 @@ export class DeiTForImageClassification extends DeiTPreTrainedModel {
|
|
|
2079
1929
|
*/
|
|
2080
1930
|
_call(model_inputs: any): Promise<SequenceClassifierOutput>;
|
|
2081
1931
|
}
|
|
1932
|
+
export class HieraPreTrainedModel extends PreTrainedModel {
|
|
1933
|
+
}
|
|
1934
|
+
export class HieraModel extends HieraPreTrainedModel {
|
|
1935
|
+
}
|
|
1936
|
+
export class HieraForImageClassification extends HieraPreTrainedModel {
|
|
1937
|
+
/**
|
|
1938
|
+
* @param {any} model_inputs
|
|
1939
|
+
*/
|
|
1940
|
+
_call(model_inputs: any): Promise<SequenceClassifierOutput>;
|
|
1941
|
+
}
|
|
2082
1942
|
/**
|
|
2083
1943
|
* An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained models.
|
|
2084
1944
|
*/
|
|
@@ -2201,6 +2061,24 @@ export class DepthAnythingPreTrainedModel extends PreTrainedModel {
|
|
|
2201
2061
|
*/
|
|
2202
2062
|
export class DepthAnythingForDepthEstimation extends DepthAnythingPreTrainedModel {
|
|
2203
2063
|
}
|
|
2064
|
+
export class SapiensPreTrainedModel extends PreTrainedModel {
|
|
2065
|
+
}
|
|
2066
|
+
export class SapiensForSemanticSegmentation extends SapiensPreTrainedModel {
|
|
2067
|
+
}
|
|
2068
|
+
export class SapiensForDepthEstimation extends SapiensPreTrainedModel {
|
|
2069
|
+
}
|
|
2070
|
+
export class SapiensForNormalEstimation extends SapiensPreTrainedModel {
|
|
2071
|
+
}
|
|
2072
|
+
export class DepthProPreTrainedModel extends PreTrainedModel {
|
|
2073
|
+
}
|
|
2074
|
+
export class DepthProForDepthEstimation extends DepthProPreTrainedModel {
|
|
2075
|
+
}
|
|
2076
|
+
export class MaskFormerPreTrainedModel extends PreTrainedModel {
|
|
2077
|
+
}
|
|
2078
|
+
export class MaskFormerModel extends MaskFormerPreTrainedModel {
|
|
2079
|
+
}
|
|
2080
|
+
export class MaskFormerForInstanceSegmentation extends MaskFormerPreTrainedModel {
|
|
2081
|
+
}
|
|
2204
2082
|
export class GLPNPreTrainedModel extends PreTrainedModel {
|
|
2205
2083
|
}
|
|
2206
2084
|
/**
|
|
@@ -2528,28 +2406,12 @@ export class SamImageSegmentationOutput extends ModelOutput {
|
|
|
2528
2406
|
pred_masks: Tensor;
|
|
2529
2407
|
}
|
|
2530
2408
|
export class MarianPreTrainedModel extends PreTrainedModel {
|
|
2531
|
-
/**
|
|
2532
|
-
* Creates a new instance of the `MarianMTModel` class.
|
|
2533
|
-
* @param {Object} config The model configuration.
|
|
2534
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
2535
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
2536
|
-
*/
|
|
2537
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
2538
|
-
generation_config: GenerationConfig;
|
|
2539
2409
|
}
|
|
2540
2410
|
export class MarianModel extends MarianPreTrainedModel {
|
|
2541
2411
|
}
|
|
2542
2412
|
export class MarianMTModel extends MarianPreTrainedModel {
|
|
2543
2413
|
}
|
|
2544
2414
|
export class M2M100PreTrainedModel extends PreTrainedModel {
|
|
2545
|
-
/**
|
|
2546
|
-
* Creates a new instance of the `M2M100ForConditionalGeneration` class.
|
|
2547
|
-
* @param {Object} config The model configuration.
|
|
2548
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
2549
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
2550
|
-
*/
|
|
2551
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
2552
|
-
generation_config: GenerationConfig;
|
|
2553
2415
|
}
|
|
2554
2416
|
export class M2M100Model extends M2M100PreTrainedModel {
|
|
2555
2417
|
}
|
|
@@ -2628,7 +2490,7 @@ export class PyAnnoteModel extends PyAnnotePreTrainedModel {
|
|
|
2628
2490
|
* **Example:** Load and run a `PyAnnoteForAudioFrameClassification` for speaker diarization.
|
|
2629
2491
|
*
|
|
2630
2492
|
* ```javascript
|
|
2631
|
-
* import { AutoProcessor, AutoModelForAudioFrameClassification, read_audio } from '@
|
|
2493
|
+
* import { AutoProcessor, AutoModelForAudioFrameClassification, read_audio } from '@huggingface/transformers';
|
|
2632
2494
|
*
|
|
2633
2495
|
* // Load model and processor
|
|
2634
2496
|
* const model_id = 'onnx-community/pyannote-segmentation-3.0';
|
|
@@ -3000,14 +2862,6 @@ export class WavLMForAudioFrameClassification extends WavLMPreTrainedModel {
|
|
|
3000
2862
|
* An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained models.
|
|
3001
2863
|
*/
|
|
3002
2864
|
export class SpeechT5PreTrainedModel extends PreTrainedModel {
|
|
3003
|
-
/**
|
|
3004
|
-
* Creates a new instance of the `SpeechT5ForTextToSpeech` class.
|
|
3005
|
-
* @param {Object} config The model configuration.
|
|
3006
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
3007
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
3008
|
-
*/
|
|
3009
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
3010
|
-
generation_config: GenerationConfig;
|
|
3011
2865
|
}
|
|
3012
2866
|
/**
|
|
3013
2867
|
* The bare SpeechT5 Encoder-Decoder Model outputting raw hidden-states without any specific pre- or post-nets.
|
|
@@ -3111,14 +2965,6 @@ export class SpeechT5ForTextToSpeech extends SpeechT5PreTrainedModel {
|
|
|
3111
2965
|
export class SpeechT5HifiGan extends PreTrainedModel {
|
|
3112
2966
|
}
|
|
3113
2967
|
export class TrOCRPreTrainedModel extends PreTrainedModel {
|
|
3114
|
-
/**
|
|
3115
|
-
* Creates a new instance of the `TrOCRPreTrainedModel` class.
|
|
3116
|
-
* @param {Object} config The configuration of the model.
|
|
3117
|
-
* @param {any} session The ONNX session containing the model weights.
|
|
3118
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
3119
|
-
*/
|
|
3120
|
-
constructor(config: any, session: any, generation_config: GenerationConfig);
|
|
3121
|
-
generation_config: GenerationConfig;
|
|
3122
2968
|
}
|
|
3123
2969
|
/**
|
|
3124
2970
|
* The TrOCR Decoder with a language modeling head.
|
|
@@ -3129,14 +2975,6 @@ export class TrOCRForCausalLM extends TrOCRPreTrainedModel {
|
|
|
3129
2975
|
* The bare Mistral Model outputting raw hidden-states without any specific head on top.
|
|
3130
2976
|
*/
|
|
3131
2977
|
export class MistralPreTrainedModel extends PreTrainedModel {
|
|
3132
|
-
/**
|
|
3133
|
-
* Creates a new instance of the `MistralPreTrainedModel` class.
|
|
3134
|
-
* @param {Object} config The configuration of the model.
|
|
3135
|
-
* @param {any} session The ONNX session containing the model weights.
|
|
3136
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
3137
|
-
*/
|
|
3138
|
-
constructor(config: any, session: any, generation_config: GenerationConfig);
|
|
3139
|
-
generation_config: GenerationConfig;
|
|
3140
2978
|
}
|
|
3141
2979
|
export class MistralModel extends MistralPreTrainedModel {
|
|
3142
2980
|
}
|
|
@@ -3146,14 +2984,6 @@ export class MistralForCausalLM extends MistralPreTrainedModel {
|
|
|
3146
2984
|
* The bare Starcoder2 Model outputting raw hidden-states without any specific head on top.
|
|
3147
2985
|
*/
|
|
3148
2986
|
export class Starcoder2PreTrainedModel extends PreTrainedModel {
|
|
3149
|
-
/**
|
|
3150
|
-
* Creates a new instance of the `Starcoder2PreTrainedModel` class.
|
|
3151
|
-
* @param {Object} config The configuration of the model.
|
|
3152
|
-
* @param {any} session The ONNX session containing the model weights.
|
|
3153
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
3154
|
-
*/
|
|
3155
|
-
constructor(config: any, session: any, generation_config: GenerationConfig);
|
|
3156
|
-
generation_config: GenerationConfig;
|
|
3157
2987
|
}
|
|
3158
2988
|
export class Starcoder2Model extends Starcoder2PreTrainedModel {
|
|
3159
2989
|
}
|
|
@@ -3163,14 +2993,6 @@ export class Starcoder2ForCausalLM extends Starcoder2PreTrainedModel {
|
|
|
3163
2993
|
* The bare Falcon Model outputting raw hidden-states without any specific head on top.
|
|
3164
2994
|
*/
|
|
3165
2995
|
export class FalconPreTrainedModel extends PreTrainedModel {
|
|
3166
|
-
/**
|
|
3167
|
-
* Creates a new instance of the `FalconPreTrainedModel` class.
|
|
3168
|
-
* @param {Object} config The configuration of the model.
|
|
3169
|
-
* @param {any} session The ONNX session containing the model weights.
|
|
3170
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
3171
|
-
*/
|
|
3172
|
-
constructor(config: any, session: any, generation_config: GenerationConfig);
|
|
3173
|
-
generation_config: GenerationConfig;
|
|
3174
2996
|
}
|
|
3175
2997
|
export class FalconModel extends FalconPreTrainedModel {
|
|
3176
2998
|
}
|
|
@@ -3288,14 +3110,6 @@ export class SegformerForImageClassification extends SegformerPreTrainedModel {
|
|
|
3288
3110
|
export class SegformerForSemanticSegmentation extends SegformerPreTrainedModel {
|
|
3289
3111
|
}
|
|
3290
3112
|
export class StableLmPreTrainedModel extends PreTrainedModel {
|
|
3291
|
-
/**
|
|
3292
|
-
* Creates a new instance of the `StableLmPreTrainedModel` class.
|
|
3293
|
-
* @param {Object} config The configuration of the model.
|
|
3294
|
-
* @param {any} session The ONNX session containing the model weights.
|
|
3295
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
3296
|
-
*/
|
|
3297
|
-
constructor(config: any, session: any, generation_config: GenerationConfig);
|
|
3298
|
-
generation_config: GenerationConfig;
|
|
3299
3113
|
}
|
|
3300
3114
|
/**
|
|
3301
3115
|
* The bare StableLm Model transformer outputting raw hidden-states without any specific head on top.
|
|
@@ -3371,14 +3185,6 @@ export class MusicgenForCausalLM extends MusicgenPreTrainedModel {
|
|
|
3371
3185
|
* ```
|
|
3372
3186
|
*/
|
|
3373
3187
|
export class MusicgenForConditionalGeneration extends PreTrainedModel {
|
|
3374
|
-
/**
|
|
3375
|
-
* Creates a new instance of the `MusicgenForConditionalGeneration` class.
|
|
3376
|
-
* @param {Object} config The model configuration.
|
|
3377
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
3378
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
3379
|
-
*/
|
|
3380
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
3381
|
-
generation_config: GenerationConfig;
|
|
3382
3188
|
/**
|
|
3383
3189
|
* Apply the pattern mask to the final ids,
|
|
3384
3190
|
* then revert the pattern delay mask by filtering the pad token id in a single step.
|
|
@@ -3456,6 +3262,14 @@ export class MobileNetV4ForImageClassification extends MobileNetV4PreTrainedMode
|
|
|
3456
3262
|
*/
|
|
3457
3263
|
_call(model_inputs: any): Promise<SequenceClassifierOutput>;
|
|
3458
3264
|
}
|
|
3265
|
+
export class DecisionTransformerPreTrainedModel extends PreTrainedModel {
|
|
3266
|
+
}
|
|
3267
|
+
/**
|
|
3268
|
+
* The model builds upon the GPT2 architecture to perform autoregressive prediction of actions in an offline RL setting.
|
|
3269
|
+
* Refer to the paper for more details: https://arxiv.org/abs/2106.01345
|
|
3270
|
+
*/
|
|
3271
|
+
export class DecisionTransformerModel extends DecisionTransformerPreTrainedModel {
|
|
3272
|
+
}
|
|
3459
3273
|
/**
|
|
3460
3274
|
* Base class of all AutoModels. Contains the `from_pretrained` function
|
|
3461
3275
|
* which is used to instantiate pretrained models.
|
|
@@ -3505,7 +3319,7 @@ export class AutoModel extends PretrainedMixin {
|
|
|
3505
3319
|
* let model = await AutoModelForSequenceClassification.from_pretrained('Xenova/distilbert-base-uncased-finetuned-sst-2-english');
|
|
3506
3320
|
*/
|
|
3507
3321
|
export class AutoModelForSequenceClassification extends PretrainedMixin {
|
|
3508
|
-
static MODEL_CLASS_MAPPINGS: Map<string, (string | typeof BertForSequenceClassification)[]
|
|
3322
|
+
static MODEL_CLASS_MAPPINGS: Map<string, (string | typeof BertForSequenceClassification)[]>[];
|
|
3509
3323
|
}
|
|
3510
3324
|
/**
|
|
3511
3325
|
* Helper class which is used to instantiate pretrained token classification models with the `from_pretrained` function.
|
|
@@ -3627,6 +3441,16 @@ export class AutoModelForImageSegmentation extends PretrainedMixin {
|
|
|
3627
3441
|
export class AutoModelForSemanticSegmentation extends PretrainedMixin {
|
|
3628
3442
|
static MODEL_CLASS_MAPPINGS: Map<string, (string | typeof SegformerForSemanticSegmentation)[]>[];
|
|
3629
3443
|
}
|
|
3444
|
+
/**
|
|
3445
|
+
* Helper class which is used to instantiate pretrained universal image segmentation models with the `from_pretrained` function.
|
|
3446
|
+
* The chosen model class is determined by the type specified in the model config.
|
|
3447
|
+
*
|
|
3448
|
+
* @example
|
|
3449
|
+
* let model = await AutoModelForUniversalSegmentation.from_pretrained('hf-internal-testing/tiny-random-MaskFormerForInstanceSegmentation');
|
|
3450
|
+
*/
|
|
3451
|
+
export class AutoModelForUniversalSegmentation extends PretrainedMixin {
|
|
3452
|
+
static MODEL_CLASS_MAPPINGS: Map<string, (string | typeof MaskFormerForInstanceSegmentation)[]>[];
|
|
3453
|
+
}
|
|
3630
3454
|
/**
|
|
3631
3455
|
* Helper class which is used to instantiate pretrained object detection models with the `from_pretrained` function.
|
|
3632
3456
|
* The chosen model class is determined by the type specified in the model config.
|
|
@@ -3674,6 +3498,9 @@ export class AutoModelForImageToImage extends PretrainedMixin {
|
|
|
3674
3498
|
export class AutoModelForDepthEstimation extends PretrainedMixin {
|
|
3675
3499
|
static MODEL_CLASS_MAPPINGS: Map<string, (string | typeof DPTForDepthEstimation)[]>[];
|
|
3676
3500
|
}
|
|
3501
|
+
export class AutoModelForNormalEstimation extends PretrainedMixin {
|
|
3502
|
+
static MODEL_CLASS_MAPPINGS: Map<string, (string | typeof SapiensForNormalEstimation)[]>[];
|
|
3503
|
+
}
|
|
3677
3504
|
export class AutoModelForImageFeatureExtraction extends PretrainedMixin {
|
|
3678
3505
|
static MODEL_CLASS_MAPPINGS: Map<string, (string | typeof CLIPVisionModelWithProjection)[]>[];
|
|
3679
3506
|
}
|