@huggingface/transformers 3.0.0-alpha.20 → 3.0.0-alpha.21
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 +3 -2
- package/dist/ort-wasm-simd-threaded.jsep.wasm +0 -0
- package/dist/transformers.cjs +129 -467
- package/dist/transformers.cjs.map +1 -1
- package/dist/transformers.js +526 -861
- package/dist/transformers.js.map +1 -1
- package/dist/transformers.min.cjs +11 -11
- package/dist/transformers.min.cjs.map +1 -1
- package/dist/transformers.min.js +10 -10
- package/dist/transformers.min.js.map +1 -1
- package/dist/transformers.min.mjs +5 -5
- package/dist/transformers.min.mjs.map +1 -1
- package/dist/transformers.mjs +133 -468
- package/dist/transformers.mjs.map +1 -1
- package/package.json +2 -2
- package/src/configs.js +1 -0
- package/src/env.js +1 -1
- package/src/models.js +84 -453
- package/src/utils/tensor.js +37 -13
- package/types/configs.d.ts.map +1 -1
- package/types/models.d.ts +15 -294
- package/types/models.d.ts.map +1 -1
- package/types/pipelines.d.ts +1 -2
- package/types/pipelines.d.ts.map +1 -1
- package/types/utils/tensor.d.ts +14 -0
- 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.
|
|
@@ -844,14 +851,6 @@ export class AlbertForMaskedLM extends AlbertPreTrainedModel {
|
|
|
844
851
|
_call(model_inputs: any): Promise<MaskedLMOutput>;
|
|
845
852
|
}
|
|
846
853
|
export class T5PreTrainedModel extends PreTrainedModel {
|
|
847
|
-
/**
|
|
848
|
-
* Creates a new instance of the `T5PreTrainedModel` class.
|
|
849
|
-
* @param {Object} config The model configuration.
|
|
850
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
851
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
852
|
-
*/
|
|
853
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
854
|
-
generation_config: GenerationConfig;
|
|
855
854
|
}
|
|
856
855
|
export class T5Model extends T5PreTrainedModel {
|
|
857
856
|
}
|
|
@@ -864,14 +863,6 @@ export class T5ForConditionalGeneration extends T5PreTrainedModel {
|
|
|
864
863
|
* An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained models.
|
|
865
864
|
*/
|
|
866
865
|
export class LongT5PreTrainedModel extends PreTrainedModel {
|
|
867
|
-
/**
|
|
868
|
-
* Creates a new instance of the `LongT5ForConditionalGeneration` class.
|
|
869
|
-
* @param {Object} config The model configuration.
|
|
870
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
871
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
872
|
-
*/
|
|
873
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
874
|
-
generation_config: GenerationConfig;
|
|
875
866
|
}
|
|
876
867
|
/**
|
|
877
868
|
* The bare LONGT5 Model transformer outputting raw hidden-states without any specific head on top.
|
|
@@ -884,14 +875,6 @@ export class LongT5Model extends LongT5PreTrainedModel {
|
|
|
884
875
|
export class LongT5ForConditionalGeneration extends LongT5PreTrainedModel {
|
|
885
876
|
}
|
|
886
877
|
export class MT5PreTrainedModel extends PreTrainedModel {
|
|
887
|
-
/**
|
|
888
|
-
* Creates a new instance of the `MT5ForConditionalGeneration` class.
|
|
889
|
-
* @param {Object} config The model configuration.
|
|
890
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
891
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
892
|
-
*/
|
|
893
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
894
|
-
generation_config: GenerationConfig;
|
|
895
878
|
}
|
|
896
879
|
export class MT5Model extends MT5PreTrainedModel {
|
|
897
880
|
}
|
|
@@ -901,14 +884,6 @@ export class MT5Model extends MT5PreTrainedModel {
|
|
|
901
884
|
export class MT5ForConditionalGeneration extends MT5PreTrainedModel {
|
|
902
885
|
}
|
|
903
886
|
export class BartPretrainedModel extends PreTrainedModel {
|
|
904
|
-
/**
|
|
905
|
-
* Creates a new instance of the `BartForConditionalGeneration` class.
|
|
906
|
-
* @param {Object} config The model configuration.
|
|
907
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
908
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
909
|
-
*/
|
|
910
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
911
|
-
generation_config: GenerationConfig;
|
|
912
887
|
}
|
|
913
888
|
/**
|
|
914
889
|
* The bare BART Model outputting raw hidden-states without any specific head on top.
|
|
@@ -933,14 +908,6 @@ export class BartForSequenceClassification extends BartPretrainedModel {
|
|
|
933
908
|
_call(model_inputs: any): Promise<SequenceClassifierOutput>;
|
|
934
909
|
}
|
|
935
910
|
export class MBartPreTrainedModel extends PreTrainedModel {
|
|
936
|
-
/**
|
|
937
|
-
* Creates a new instance of the `MBartForConditionalGeneration` class.
|
|
938
|
-
* @param {Object} config The model configuration.
|
|
939
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
940
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
941
|
-
*/
|
|
942
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
943
|
-
generation_config: GenerationConfig;
|
|
944
911
|
}
|
|
945
912
|
/**
|
|
946
913
|
* The bare MBART Model outputting raw hidden-states without any specific head on top.
|
|
@@ -967,14 +934,6 @@ export class MBartForSequenceClassification extends MBartPreTrainedModel {
|
|
|
967
934
|
export class MBartForCausalLM extends MBartPreTrainedModel {
|
|
968
935
|
}
|
|
969
936
|
export class BlenderbotPreTrainedModel extends PreTrainedModel {
|
|
970
|
-
/**
|
|
971
|
-
* Creates a new instance of the `BlenderbotForConditionalGeneration` class.
|
|
972
|
-
* @param {Object} config The model configuration.
|
|
973
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
974
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
975
|
-
*/
|
|
976
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
977
|
-
generation_config: GenerationConfig;
|
|
978
937
|
}
|
|
979
938
|
/**
|
|
980
939
|
* The bare Blenderbot Model outputting raw hidden-states without any specific head on top.
|
|
@@ -987,14 +946,6 @@ export class BlenderbotModel extends BlenderbotPreTrainedModel {
|
|
|
987
946
|
export class BlenderbotForConditionalGeneration extends BlenderbotPreTrainedModel {
|
|
988
947
|
}
|
|
989
948
|
export class BlenderbotSmallPreTrainedModel extends PreTrainedModel {
|
|
990
|
-
/**
|
|
991
|
-
* Creates a new instance of the `BlenderbotForConditionalGeneration` class.
|
|
992
|
-
* @param {Object} config The model configuration.
|
|
993
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
994
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
995
|
-
*/
|
|
996
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
997
|
-
generation_config: GenerationConfig;
|
|
998
949
|
}
|
|
999
950
|
/**
|
|
1000
951
|
* The bare BlenderbotSmall Model outputting raw hidden-states without any specific head on top.
|
|
@@ -1182,15 +1133,7 @@ export class ASTModel extends ASTPreTrainedModel {
|
|
|
1182
1133
|
export class ASTForAudioClassification extends ASTPreTrainedModel {
|
|
1183
1134
|
}
|
|
1184
1135
|
export class WhisperPreTrainedModel extends PreTrainedModel {
|
|
1185
|
-
/**
|
|
1186
|
-
* Creates a new instance of the `WhisperPreTrainedModel` class.
|
|
1187
|
-
* @param {Object} config The model configuration.
|
|
1188
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1189
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1190
|
-
*/
|
|
1191
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1192
1136
|
requires_attention_mask: boolean;
|
|
1193
|
-
generation_config: GenerationConfig;
|
|
1194
1137
|
}
|
|
1195
1138
|
/**
|
|
1196
1139
|
* WhisperModel class for training Whisper models without a language model head.
|
|
@@ -1228,18 +1171,8 @@ export class WhisperForConditionalGeneration extends WhisperPreTrainedModel {
|
|
|
1228
1171
|
* Vision Encoder-Decoder model based on OpenAI's GPT architecture for image captioning and other vision tasks
|
|
1229
1172
|
*/
|
|
1230
1173
|
export class VisionEncoderDecoderModel extends PreTrainedModel {
|
|
1231
|
-
/**
|
|
1232
|
-
* Creates a new instance of the `VisionEncoderDecoderModel` class.
|
|
1233
|
-
* @param {Object} config The model configuration.
|
|
1234
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1235
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1236
|
-
*/
|
|
1237
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1238
|
-
generation_config: GenerationConfig;
|
|
1239
1174
|
}
|
|
1240
1175
|
export class LlavaPreTrainedModel extends PreTrainedModel {
|
|
1241
|
-
constructor(config: any, sessions: any, generation_config: any);
|
|
1242
|
-
generation_config: any;
|
|
1243
1176
|
}
|
|
1244
1177
|
/**
|
|
1245
1178
|
* The LLAVA model which consists of a vision backbone and a language model.
|
|
@@ -1258,8 +1191,6 @@ export class LlavaForConditionalGeneration extends LlavaPreTrainedModel {
|
|
|
1258
1191
|
export class Moondream1ForConditionalGeneration extends LlavaForConditionalGeneration {
|
|
1259
1192
|
}
|
|
1260
1193
|
export class Florence2PreTrainedModel extends PreTrainedModel {
|
|
1261
|
-
constructor(config: any, sessions: any, generation_config: any);
|
|
1262
|
-
generation_config: any;
|
|
1263
1194
|
}
|
|
1264
1195
|
export class Florence2ForConditionalGeneration extends Florence2PreTrainedModel {
|
|
1265
1196
|
_merge_input_ids_with_image_features({ inputs_embeds, image_features, input_ids, attention_mask, }: {
|
|
@@ -1565,14 +1496,6 @@ export class CLIPSegModel extends CLIPSegPreTrainedModel {
|
|
|
1565
1496
|
export class CLIPSegForImageSegmentation extends CLIPSegPreTrainedModel {
|
|
1566
1497
|
}
|
|
1567
1498
|
export class GPT2PreTrainedModel extends PreTrainedModel {
|
|
1568
|
-
/**
|
|
1569
|
-
* Creates a new instance of the `GPT2PreTrainedModel` class.
|
|
1570
|
-
* @param {Object} config The model configuration.
|
|
1571
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1572
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1573
|
-
*/
|
|
1574
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1575
|
-
generation_config: GenerationConfig;
|
|
1576
1499
|
}
|
|
1577
1500
|
export class GPT2Model extends GPT2PreTrainedModel {
|
|
1578
1501
|
}
|
|
@@ -1582,14 +1505,6 @@ export class GPT2Model extends GPT2PreTrainedModel {
|
|
|
1582
1505
|
export class GPT2LMHeadModel extends GPT2PreTrainedModel {
|
|
1583
1506
|
}
|
|
1584
1507
|
export class JAISPreTrainedModel extends PreTrainedModel {
|
|
1585
|
-
/**
|
|
1586
|
-
* Creates a new instance of the `JAISPreTrainedModel` class.
|
|
1587
|
-
* @param {Object} config The model configuration.
|
|
1588
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1589
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1590
|
-
*/
|
|
1591
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1592
|
-
generation_config: GenerationConfig;
|
|
1593
1508
|
}
|
|
1594
1509
|
/**
|
|
1595
1510
|
* The bare JAIS Model transformer outputting raw hidden-states without any specific head on top.
|
|
@@ -1602,70 +1517,30 @@ export class JAISModel extends JAISPreTrainedModel {
|
|
|
1602
1517
|
export class JAISLMHeadModel extends JAISPreTrainedModel {
|
|
1603
1518
|
}
|
|
1604
1519
|
export class GPTNeoPreTrainedModel extends PreTrainedModel {
|
|
1605
|
-
/**
|
|
1606
|
-
* Creates a new instance of the `GPTNeoPreTrainedModel` class.
|
|
1607
|
-
* @param {Object} config The model configuration.
|
|
1608
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1609
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1610
|
-
*/
|
|
1611
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1612
|
-
generation_config: GenerationConfig;
|
|
1613
1520
|
}
|
|
1614
1521
|
export class GPTNeoModel extends GPTNeoPreTrainedModel {
|
|
1615
1522
|
}
|
|
1616
1523
|
export class GPTNeoForCausalLM extends GPTNeoPreTrainedModel {
|
|
1617
1524
|
}
|
|
1618
1525
|
export class GPTNeoXPreTrainedModel extends PreTrainedModel {
|
|
1619
|
-
/**
|
|
1620
|
-
* Creates a new instance of the `GPTNeoXPreTrainedModel` class.
|
|
1621
|
-
* @param {Object} config The model configuration.
|
|
1622
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1623
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1624
|
-
*/
|
|
1625
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1626
|
-
generation_config: GenerationConfig;
|
|
1627
1526
|
}
|
|
1628
1527
|
export class GPTNeoXModel extends GPTNeoXPreTrainedModel {
|
|
1629
1528
|
}
|
|
1630
1529
|
export class GPTNeoXForCausalLM extends GPTNeoXPreTrainedModel {
|
|
1631
1530
|
}
|
|
1632
1531
|
export class GPTJPreTrainedModel extends PreTrainedModel {
|
|
1633
|
-
/**
|
|
1634
|
-
* Creates a new instance of the `GPTJPreTrainedModel` class.
|
|
1635
|
-
* @param {Object} config The model configuration.
|
|
1636
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1637
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1638
|
-
*/
|
|
1639
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1640
|
-
generation_config: GenerationConfig;
|
|
1641
1532
|
}
|
|
1642
1533
|
export class GPTJModel extends GPTJPreTrainedModel {
|
|
1643
1534
|
}
|
|
1644
1535
|
export class GPTJForCausalLM extends GPTJPreTrainedModel {
|
|
1645
1536
|
}
|
|
1646
1537
|
export class GPTBigCodePreTrainedModel extends PreTrainedModel {
|
|
1647
|
-
/**
|
|
1648
|
-
* Creates a new instance of the `GPTBigCodePreTrainedModel` class.
|
|
1649
|
-
* @param {Object} config The model configuration.
|
|
1650
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1651
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1652
|
-
*/
|
|
1653
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1654
|
-
generation_config: GenerationConfig;
|
|
1655
1538
|
}
|
|
1656
1539
|
export class GPTBigCodeModel extends GPTBigCodePreTrainedModel {
|
|
1657
1540
|
}
|
|
1658
1541
|
export class GPTBigCodeForCausalLM extends GPTBigCodePreTrainedModel {
|
|
1659
1542
|
}
|
|
1660
1543
|
export class CodeGenPreTrainedModel extends PreTrainedModel {
|
|
1661
|
-
/**
|
|
1662
|
-
* Creates a new instance of the `CodeGenPreTrainedModel` class.
|
|
1663
|
-
* @param {Object} config The model configuration.
|
|
1664
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1665
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1666
|
-
*/
|
|
1667
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1668
|
-
generation_config: GenerationConfig;
|
|
1669
1544
|
}
|
|
1670
1545
|
/**
|
|
1671
1546
|
* CodeGenModel is a class representing a code generation model without a language model head.
|
|
@@ -1681,14 +1556,6 @@ export class CodeGenForCausalLM extends CodeGenPreTrainedModel {
|
|
|
1681
1556
|
* The bare LLama Model outputting raw hidden-states without any specific head on top.
|
|
1682
1557
|
*/
|
|
1683
1558
|
export class LlamaPreTrainedModel extends PreTrainedModel {
|
|
1684
|
-
/**
|
|
1685
|
-
* Creates a new instance of the `LlamaPreTrainedModel` class.
|
|
1686
|
-
* @param {Object} config The model configuration.
|
|
1687
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1688
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1689
|
-
*/
|
|
1690
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1691
|
-
generation_config: GenerationConfig;
|
|
1692
1559
|
}
|
|
1693
1560
|
/**
|
|
1694
1561
|
* The bare LLaMA Model outputting raw hidden-states without any specific head on top.
|
|
@@ -1697,18 +1564,16 @@ export class LlamaModel extends LlamaPreTrainedModel {
|
|
|
1697
1564
|
}
|
|
1698
1565
|
export class LlamaForCausalLM extends LlamaPreTrainedModel {
|
|
1699
1566
|
}
|
|
1567
|
+
export class GranitePreTrainedModel extends PreTrainedModel {
|
|
1568
|
+
}
|
|
1569
|
+
export class GraniteModel extends GranitePreTrainedModel {
|
|
1570
|
+
}
|
|
1571
|
+
export class GraniteForCausalLM extends GranitePreTrainedModel {
|
|
1572
|
+
}
|
|
1700
1573
|
/**
|
|
1701
1574
|
* The bare Cohere Model outputting raw hidden-states without any specific head on top.
|
|
1702
1575
|
*/
|
|
1703
1576
|
export class CoherePreTrainedModel extends PreTrainedModel {
|
|
1704
|
-
/**
|
|
1705
|
-
* Creates a new instance of the `CoherePreTrainedModel` class.
|
|
1706
|
-
* @param {Object} config The model configuration.
|
|
1707
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1708
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1709
|
-
*/
|
|
1710
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1711
|
-
generation_config: GenerationConfig;
|
|
1712
1577
|
}
|
|
1713
1578
|
export class CohereModel extends CoherePreTrainedModel {
|
|
1714
1579
|
}
|
|
@@ -1718,14 +1583,6 @@ export class CohereForCausalLM extends CoherePreTrainedModel {
|
|
|
1718
1583
|
* The bare Gemma Model outputting raw hidden-states without any specific head on top.
|
|
1719
1584
|
*/
|
|
1720
1585
|
export class GemmaPreTrainedModel extends PreTrainedModel {
|
|
1721
|
-
/**
|
|
1722
|
-
* Creates a new instance of the `GemmaPreTrainedModel` class.
|
|
1723
|
-
* @param {Object} config The model configuration.
|
|
1724
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1725
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1726
|
-
*/
|
|
1727
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1728
|
-
generation_config: GenerationConfig;
|
|
1729
1586
|
}
|
|
1730
1587
|
/**
|
|
1731
1588
|
* The bare Gemma Model outputting raw hidden-states without any specific head on top.
|
|
@@ -1738,14 +1595,6 @@ export class GemmaForCausalLM extends GemmaPreTrainedModel {
|
|
|
1738
1595
|
* The bare Gemma2 Model outputting raw hidden-states without any specific head on top.
|
|
1739
1596
|
*/
|
|
1740
1597
|
export class Gemma2PreTrainedModel extends PreTrainedModel {
|
|
1741
|
-
/**
|
|
1742
|
-
* Creates a new instance of the `Gemma2PreTrainedModel` class.
|
|
1743
|
-
* @param {Object} config The model configuration.
|
|
1744
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1745
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1746
|
-
*/
|
|
1747
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1748
|
-
generation_config: GenerationConfig;
|
|
1749
1598
|
}
|
|
1750
1599
|
/**
|
|
1751
1600
|
* The bare Gemma2 Model outputting raw hidden-states without any specific head on top.
|
|
@@ -1755,14 +1604,6 @@ export class Gemma2Model extends Gemma2PreTrainedModel {
|
|
|
1755
1604
|
export class Gemma2ForCausalLM extends Gemma2PreTrainedModel {
|
|
1756
1605
|
}
|
|
1757
1606
|
export class OpenELMPreTrainedModel extends PreTrainedModel {
|
|
1758
|
-
/**
|
|
1759
|
-
* Creates a new instance of the `OpenELMPreTrainedModel` class.
|
|
1760
|
-
* @param {Object} config The model configuration.
|
|
1761
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1762
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1763
|
-
*/
|
|
1764
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1765
|
-
generation_config: GenerationConfig;
|
|
1766
1607
|
}
|
|
1767
1608
|
export class OpenELMModel extends OpenELMPreTrainedModel {
|
|
1768
1609
|
}
|
|
@@ -1772,14 +1613,6 @@ export class OpenELMForCausalLM extends OpenELMPreTrainedModel {
|
|
|
1772
1613
|
* The bare Qwen2 Model outputting raw hidden-states without any specific head on top.
|
|
1773
1614
|
*/
|
|
1774
1615
|
export class Qwen2PreTrainedModel extends PreTrainedModel {
|
|
1775
|
-
/**
|
|
1776
|
-
* Creates a new instance of the `Qwen2PreTrainedModel` class.
|
|
1777
|
-
* @param {Object} config The model configuration.
|
|
1778
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1779
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1780
|
-
*/
|
|
1781
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1782
|
-
generation_config: GenerationConfig;
|
|
1783
1616
|
}
|
|
1784
1617
|
/**
|
|
1785
1618
|
* The bare Qwen2 Model outputting raw hidden-states without any specific head on top.
|
|
@@ -1789,14 +1622,6 @@ export class Qwen2Model extends Qwen2PreTrainedModel {
|
|
|
1789
1622
|
export class Qwen2ForCausalLM extends Qwen2PreTrainedModel {
|
|
1790
1623
|
}
|
|
1791
1624
|
export class PhiPreTrainedModel extends PreTrainedModel {
|
|
1792
|
-
/**
|
|
1793
|
-
* Creates a new instance of the `PhiPreTrainedModel` class.
|
|
1794
|
-
* @param {Object} config The model configuration.
|
|
1795
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1796
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1797
|
-
*/
|
|
1798
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1799
|
-
generation_config: GenerationConfig;
|
|
1800
1625
|
}
|
|
1801
1626
|
/**
|
|
1802
1627
|
* The bare Phi Model outputting raw hidden-states without any specific head on top.
|
|
@@ -1806,14 +1631,6 @@ export class PhiModel extends PhiPreTrainedModel {
|
|
|
1806
1631
|
export class PhiForCausalLM extends PhiPreTrainedModel {
|
|
1807
1632
|
}
|
|
1808
1633
|
export class Phi3PreTrainedModel extends PreTrainedModel {
|
|
1809
|
-
/**
|
|
1810
|
-
* Creates a new instance of the `Phi3PreTrainedModel` class.
|
|
1811
|
-
* @param {Object} config The model configuration.
|
|
1812
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1813
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1814
|
-
*/
|
|
1815
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1816
|
-
generation_config: GenerationConfig;
|
|
1817
1634
|
}
|
|
1818
1635
|
/**
|
|
1819
1636
|
* The bare Phi3 Model outputting raw hidden-states without any specific head on top.
|
|
@@ -1826,14 +1643,6 @@ export class Phi3ForCausalLM extends Phi3PreTrainedModel {
|
|
|
1826
1643
|
* The Bloom Model transformer with a language modeling head on top (linear layer with weights tied to the input embeddings).
|
|
1827
1644
|
*/
|
|
1828
1645
|
export class BloomPreTrainedModel extends PreTrainedModel {
|
|
1829
|
-
/**
|
|
1830
|
-
* Creates a new instance of the `BloomPreTrainedModel` class.
|
|
1831
|
-
* @param {Object} config The model configuration.
|
|
1832
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1833
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1834
|
-
*/
|
|
1835
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1836
|
-
generation_config: GenerationConfig;
|
|
1837
1646
|
}
|
|
1838
1647
|
/**
|
|
1839
1648
|
* The bare Bloom Model transformer outputting raw hidden-states without any specific head on top.
|
|
@@ -1846,14 +1655,6 @@ export class BloomModel extends BloomPreTrainedModel {
|
|
|
1846
1655
|
export class BloomForCausalLM extends BloomPreTrainedModel {
|
|
1847
1656
|
}
|
|
1848
1657
|
export class MptPreTrainedModel extends PreTrainedModel {
|
|
1849
|
-
/**
|
|
1850
|
-
* Creates a new instance of the `MptPreTrainedModel` class.
|
|
1851
|
-
* @param {Object} config The model configuration.
|
|
1852
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1853
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1854
|
-
*/
|
|
1855
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1856
|
-
generation_config: GenerationConfig;
|
|
1857
1658
|
}
|
|
1858
1659
|
/**
|
|
1859
1660
|
* The bare Mpt Model transformer outputting raw hidden-states without any specific head on top.
|
|
@@ -1866,14 +1667,6 @@ export class MptModel extends MptPreTrainedModel {
|
|
|
1866
1667
|
export class MptForCausalLM extends MptPreTrainedModel {
|
|
1867
1668
|
}
|
|
1868
1669
|
export class OPTPreTrainedModel extends PreTrainedModel {
|
|
1869
|
-
/**
|
|
1870
|
-
* Creates a new instance of the `OPTPreTrainedModel` class.
|
|
1871
|
-
* @param {Object} config The model configuration.
|
|
1872
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
1873
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
1874
|
-
*/
|
|
1875
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
1876
|
-
generation_config: GenerationConfig;
|
|
1877
1670
|
}
|
|
1878
1671
|
/**
|
|
1879
1672
|
* The bare OPT Model outputting raw hidden-states without any specific head on top.
|
|
@@ -2613,28 +2406,12 @@ export class SamImageSegmentationOutput extends ModelOutput {
|
|
|
2613
2406
|
pred_masks: Tensor;
|
|
2614
2407
|
}
|
|
2615
2408
|
export class MarianPreTrainedModel extends PreTrainedModel {
|
|
2616
|
-
/**
|
|
2617
|
-
* Creates a new instance of the `MarianMTModel` class.
|
|
2618
|
-
* @param {Object} config The model configuration.
|
|
2619
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
2620
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
2621
|
-
*/
|
|
2622
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
2623
|
-
generation_config: GenerationConfig;
|
|
2624
2409
|
}
|
|
2625
2410
|
export class MarianModel extends MarianPreTrainedModel {
|
|
2626
2411
|
}
|
|
2627
2412
|
export class MarianMTModel extends MarianPreTrainedModel {
|
|
2628
2413
|
}
|
|
2629
2414
|
export class M2M100PreTrainedModel extends PreTrainedModel {
|
|
2630
|
-
/**
|
|
2631
|
-
* Creates a new instance of the `M2M100ForConditionalGeneration` class.
|
|
2632
|
-
* @param {Object} config The model configuration.
|
|
2633
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
2634
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
2635
|
-
*/
|
|
2636
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
2637
|
-
generation_config: GenerationConfig;
|
|
2638
2415
|
}
|
|
2639
2416
|
export class M2M100Model extends M2M100PreTrainedModel {
|
|
2640
2417
|
}
|
|
@@ -3085,14 +2862,6 @@ export class WavLMForAudioFrameClassification extends WavLMPreTrainedModel {
|
|
|
3085
2862
|
* An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained models.
|
|
3086
2863
|
*/
|
|
3087
2864
|
export class SpeechT5PreTrainedModel extends PreTrainedModel {
|
|
3088
|
-
/**
|
|
3089
|
-
* Creates a new instance of the `SpeechT5ForTextToSpeech` class.
|
|
3090
|
-
* @param {Object} config The model configuration.
|
|
3091
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
3092
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
3093
|
-
*/
|
|
3094
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
3095
|
-
generation_config: GenerationConfig;
|
|
3096
2865
|
}
|
|
3097
2866
|
/**
|
|
3098
2867
|
* The bare SpeechT5 Encoder-Decoder Model outputting raw hidden-states without any specific pre- or post-nets.
|
|
@@ -3196,14 +2965,6 @@ export class SpeechT5ForTextToSpeech extends SpeechT5PreTrainedModel {
|
|
|
3196
2965
|
export class SpeechT5HifiGan extends PreTrainedModel {
|
|
3197
2966
|
}
|
|
3198
2967
|
export class TrOCRPreTrainedModel extends PreTrainedModel {
|
|
3199
|
-
/**
|
|
3200
|
-
* Creates a new instance of the `TrOCRPreTrainedModel` class.
|
|
3201
|
-
* @param {Object} config The configuration of the model.
|
|
3202
|
-
* @param {any} session The ONNX session containing the model weights.
|
|
3203
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
3204
|
-
*/
|
|
3205
|
-
constructor(config: any, session: any, generation_config: GenerationConfig);
|
|
3206
|
-
generation_config: GenerationConfig;
|
|
3207
2968
|
}
|
|
3208
2969
|
/**
|
|
3209
2970
|
* The TrOCR Decoder with a language modeling head.
|
|
@@ -3214,14 +2975,6 @@ export class TrOCRForCausalLM extends TrOCRPreTrainedModel {
|
|
|
3214
2975
|
* The bare Mistral Model outputting raw hidden-states without any specific head on top.
|
|
3215
2976
|
*/
|
|
3216
2977
|
export class MistralPreTrainedModel extends PreTrainedModel {
|
|
3217
|
-
/**
|
|
3218
|
-
* Creates a new instance of the `MistralPreTrainedModel` class.
|
|
3219
|
-
* @param {Object} config The configuration of the model.
|
|
3220
|
-
* @param {any} session The ONNX session containing the model weights.
|
|
3221
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
3222
|
-
*/
|
|
3223
|
-
constructor(config: any, session: any, generation_config: GenerationConfig);
|
|
3224
|
-
generation_config: GenerationConfig;
|
|
3225
2978
|
}
|
|
3226
2979
|
export class MistralModel extends MistralPreTrainedModel {
|
|
3227
2980
|
}
|
|
@@ -3231,14 +2984,6 @@ export class MistralForCausalLM extends MistralPreTrainedModel {
|
|
|
3231
2984
|
* The bare Starcoder2 Model outputting raw hidden-states without any specific head on top.
|
|
3232
2985
|
*/
|
|
3233
2986
|
export class Starcoder2PreTrainedModel extends PreTrainedModel {
|
|
3234
|
-
/**
|
|
3235
|
-
* Creates a new instance of the `Starcoder2PreTrainedModel` class.
|
|
3236
|
-
* @param {Object} config The configuration of the model.
|
|
3237
|
-
* @param {any} session The ONNX session containing the model weights.
|
|
3238
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
3239
|
-
*/
|
|
3240
|
-
constructor(config: any, session: any, generation_config: GenerationConfig);
|
|
3241
|
-
generation_config: GenerationConfig;
|
|
3242
2987
|
}
|
|
3243
2988
|
export class Starcoder2Model extends Starcoder2PreTrainedModel {
|
|
3244
2989
|
}
|
|
@@ -3248,14 +2993,6 @@ export class Starcoder2ForCausalLM extends Starcoder2PreTrainedModel {
|
|
|
3248
2993
|
* The bare Falcon Model outputting raw hidden-states without any specific head on top.
|
|
3249
2994
|
*/
|
|
3250
2995
|
export class FalconPreTrainedModel extends PreTrainedModel {
|
|
3251
|
-
/**
|
|
3252
|
-
* Creates a new instance of the `FalconPreTrainedModel` class.
|
|
3253
|
-
* @param {Object} config The configuration of the model.
|
|
3254
|
-
* @param {any} session The ONNX session containing the model weights.
|
|
3255
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
3256
|
-
*/
|
|
3257
|
-
constructor(config: any, session: any, generation_config: GenerationConfig);
|
|
3258
|
-
generation_config: GenerationConfig;
|
|
3259
2996
|
}
|
|
3260
2997
|
export class FalconModel extends FalconPreTrainedModel {
|
|
3261
2998
|
}
|
|
@@ -3373,14 +3110,6 @@ export class SegformerForImageClassification extends SegformerPreTrainedModel {
|
|
|
3373
3110
|
export class SegformerForSemanticSegmentation extends SegformerPreTrainedModel {
|
|
3374
3111
|
}
|
|
3375
3112
|
export class StableLmPreTrainedModel extends PreTrainedModel {
|
|
3376
|
-
/**
|
|
3377
|
-
* Creates a new instance of the `StableLmPreTrainedModel` class.
|
|
3378
|
-
* @param {Object} config The configuration of the model.
|
|
3379
|
-
* @param {any} session The ONNX session containing the model weights.
|
|
3380
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
3381
|
-
*/
|
|
3382
|
-
constructor(config: any, session: any, generation_config: GenerationConfig);
|
|
3383
|
-
generation_config: GenerationConfig;
|
|
3384
3113
|
}
|
|
3385
3114
|
/**
|
|
3386
3115
|
* The bare StableLm Model transformer outputting raw hidden-states without any specific head on top.
|
|
@@ -3456,14 +3185,6 @@ export class MusicgenForCausalLM extends MusicgenPreTrainedModel {
|
|
|
3456
3185
|
* ```
|
|
3457
3186
|
*/
|
|
3458
3187
|
export class MusicgenForConditionalGeneration extends PreTrainedModel {
|
|
3459
|
-
/**
|
|
3460
|
-
* Creates a new instance of the `MusicgenForConditionalGeneration` class.
|
|
3461
|
-
* @param {Object} config The model configuration.
|
|
3462
|
-
* @param {Record<string, any>} sessions The inference sessions for the model.
|
|
3463
|
-
* @param {GenerationConfig} generation_config The generation configuration.
|
|
3464
|
-
*/
|
|
3465
|
-
constructor(config: any, sessions: Record<string, any>, generation_config: GenerationConfig);
|
|
3466
|
-
generation_config: GenerationConfig;
|
|
3467
3188
|
/**
|
|
3468
3189
|
* Apply the pattern mask to the final ids,
|
|
3469
3190
|
* then revert the pattern delay mask by filtering the pad token id in a single step.
|
|
@@ -3598,7 +3319,7 @@ export class AutoModel extends PretrainedMixin {
|
|
|
3598
3319
|
* let model = await AutoModelForSequenceClassification.from_pretrained('Xenova/distilbert-base-uncased-finetuned-sst-2-english');
|
|
3599
3320
|
*/
|
|
3600
3321
|
export class AutoModelForSequenceClassification extends PretrainedMixin {
|
|
3601
|
-
static MODEL_CLASS_MAPPINGS: Map<string, (string | typeof BertForSequenceClassification)[]
|
|
3322
|
+
static MODEL_CLASS_MAPPINGS: Map<string, (string | typeof BertForSequenceClassification)[]>[];
|
|
3602
3323
|
}
|
|
3603
3324
|
/**
|
|
3604
3325
|
* Helper class which is used to instantiate pretrained token classification models with the `from_pretrained` function.
|