@huggingface/tasks 0.19.2 → 0.19.4

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.
@@ -1,3 +1,48 @@
1
+ export declare enum GGMLFileQuantizationType {
2
+ F32 = 0,
3
+ F16 = 1,
4
+ Q4_0 = 2,
5
+ Q4_1 = 3,
6
+ Q4_1_SOME_F16 = 4,
7
+ Q4_2 = 5,
8
+ Q4_3 = 6,
9
+ Q8_0 = 7,
10
+ Q5_0 = 8,
11
+ Q5_1 = 9,
12
+ Q2_K = 10,
13
+ Q3_K_S = 11,
14
+ Q3_K_M = 12,
15
+ Q3_K_L = 13,
16
+ Q4_K_S = 14,
17
+ Q4_K_M = 15,
18
+ Q5_K_S = 16,
19
+ Q5_K_M = 17,
20
+ Q6_K = 18,
21
+ IQ2_XXS = 19,
22
+ IQ2_XS = 20,
23
+ Q2_K_S = 21,
24
+ IQ3_XS = 22,
25
+ IQ3_XXS = 23,
26
+ IQ1_S = 24,
27
+ IQ4_NL = 25,
28
+ IQ3_S = 26,
29
+ IQ3_M = 27,
30
+ IQ2_S = 28,
31
+ IQ2_M = 29,
32
+ IQ4_XS = 30,
33
+ IQ1_M = 31,
34
+ BF16 = 32,
35
+ Q4_0_4_4 = 33,
36
+ Q4_0_4_8 = 34,
37
+ Q4_0_8_8 = 35,
38
+ TQ1_0 = 36,
39
+ TQ2_0 = 37
40
+ }
41
+ export declare const GGUF_QUANT_RE: RegExp;
42
+ export declare const GGUF_QUANT_RE_GLOBAL: RegExp;
43
+ export declare function parseGGUFQuantLabel(fname: string): string | undefined;
44
+ export declare const GGUF_QUANT_ORDER: GGMLFileQuantizationType[];
45
+ export declare function findNearestQuantType(quant: GGMLFileQuantizationType, availableQuants: GGMLFileQuantizationType[]): GGMLFileQuantizationType | undefined;
1
46
  export declare enum GGMLQuantizationType {
2
47
  F32 = 0,
3
48
  F16 = 1,
@@ -27,9 +72,8 @@ export declare enum GGMLQuantizationType {
27
72
  I64 = 27,
28
73
  F64 = 28,
29
74
  IQ1_M = 29,
30
- BF16 = 30
75
+ BF16 = 30,
76
+ TQ1_0 = 34,
77
+ TQ2_0 = 35
31
78
  }
32
- export declare const GGUF_QUANT_RE: RegExp;
33
- export declare const GGUF_QUANT_RE_GLOBAL: RegExp;
34
- export declare function parseGGUFQuantLabel(fname: string): string | undefined;
35
79
  //# sourceMappingURL=gguf.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gguf.d.ts","sourceRoot":"","sources":["../../src/gguf.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC/B,GAAG,IAAI;IACP,GAAG,IAAI;IACP,IAAI,IAAI;IACR,IAAI,IAAI;IACR,IAAI,IAAI;IACR,IAAI,IAAI;IACR,IAAI,IAAI;IACR,IAAI,IAAI;IACR,IAAI,KAAK;IACT,IAAI,KAAK;IACT,IAAI,KAAK;IACT,IAAI,KAAK;IACT,IAAI,KAAK;IACT,IAAI,KAAK;IACT,OAAO,KAAK;IACZ,MAAM,KAAK;IACX,OAAO,KAAK;IACZ,KAAK,KAAK;IACV,MAAM,KAAK;IACX,KAAK,KAAK;IACV,KAAK,KAAK;IACV,MAAM,KAAK;IACX,EAAE,KAAK;IACP,GAAG,KAAK;IACR,GAAG,KAAK;IACR,GAAG,KAAK;IACR,GAAG,KAAK;IACR,KAAK,KAAK;IACV,IAAI,KAAK;CACT;AAGD,eAAO,MAAM,aAAa,QAAmF,CAAC;AAC9G,eAAO,MAAM,oBAAoB,QAAiC,CAAC;AAEnE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGrE"}
1
+ {"version":3,"file":"gguf.d.ts","sourceRoot":"","sources":["../../src/gguf.ts"],"names":[],"mappings":"AAGA,oBAAY,wBAAwB;IACnC,GAAG,IAAI;IACP,GAAG,IAAI;IACP,IAAI,IAAI;IACR,IAAI,IAAI;IACR,aAAa,IAAI;IACjB,IAAI,IAAI;IACR,IAAI,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;IACV,KAAK,KAAK;IACV,MAAM,KAAK;IACX,EAAE,KAAK;IACP,GAAG,KAAK;IACR,GAAG,KAAK;IACR,GAAG,KAAK;IACR,GAAG,KAAK;IACR,KAAK,KAAK;IACV,IAAI,KAAK;IACT,KAAK,KAAK;IACV,KAAK,KAAK;CACV"}
@@ -1,7 +1,142 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GGUF_QUANT_RE_GLOBAL = exports.GGUF_QUANT_RE = exports.GGMLQuantizationType = void 0;
3
+ exports.GGMLQuantizationType = exports.GGUF_QUANT_ORDER = exports.GGUF_QUANT_RE_GLOBAL = exports.GGUF_QUANT_RE = exports.GGMLFileQuantizationType = void 0;
4
4
  exports.parseGGUFQuantLabel = parseGGUFQuantLabel;
5
+ exports.findNearestQuantType = findNearestQuantType;
6
+ // This list is copied from gguf/types.ts, but will all types available (for backward compatibility)
7
+ // NOT to be confused with GGMLQuantizationType, a FileQuantization can contain multiple GGMLQuantizationType
8
+ // For example, Q4_K_M model can contains Q4_K and Q6_K tensors
9
+ var GGMLFileQuantizationType;
10
+ (function (GGMLFileQuantizationType) {
11
+ GGMLFileQuantizationType[GGMLFileQuantizationType["F32"] = 0] = "F32";
12
+ GGMLFileQuantizationType[GGMLFileQuantizationType["F16"] = 1] = "F16";
13
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q4_0"] = 2] = "Q4_0";
14
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q4_1"] = 3] = "Q4_1";
15
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q4_1_SOME_F16"] = 4] = "Q4_1_SOME_F16";
16
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q4_2"] = 5] = "Q4_2";
17
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q4_3"] = 6] = "Q4_3";
18
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q8_0"] = 7] = "Q8_0";
19
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q5_0"] = 8] = "Q5_0";
20
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q5_1"] = 9] = "Q5_1";
21
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q2_K"] = 10] = "Q2_K";
22
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q3_K_S"] = 11] = "Q3_K_S";
23
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q3_K_M"] = 12] = "Q3_K_M";
24
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q3_K_L"] = 13] = "Q3_K_L";
25
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q4_K_S"] = 14] = "Q4_K_S";
26
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q4_K_M"] = 15] = "Q4_K_M";
27
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q5_K_S"] = 16] = "Q5_K_S";
28
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q5_K_M"] = 17] = "Q5_K_M";
29
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q6_K"] = 18] = "Q6_K";
30
+ GGMLFileQuantizationType[GGMLFileQuantizationType["IQ2_XXS"] = 19] = "IQ2_XXS";
31
+ GGMLFileQuantizationType[GGMLFileQuantizationType["IQ2_XS"] = 20] = "IQ2_XS";
32
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q2_K_S"] = 21] = "Q2_K_S";
33
+ GGMLFileQuantizationType[GGMLFileQuantizationType["IQ3_XS"] = 22] = "IQ3_XS";
34
+ GGMLFileQuantizationType[GGMLFileQuantizationType["IQ3_XXS"] = 23] = "IQ3_XXS";
35
+ GGMLFileQuantizationType[GGMLFileQuantizationType["IQ1_S"] = 24] = "IQ1_S";
36
+ GGMLFileQuantizationType[GGMLFileQuantizationType["IQ4_NL"] = 25] = "IQ4_NL";
37
+ GGMLFileQuantizationType[GGMLFileQuantizationType["IQ3_S"] = 26] = "IQ3_S";
38
+ GGMLFileQuantizationType[GGMLFileQuantizationType["IQ3_M"] = 27] = "IQ3_M";
39
+ GGMLFileQuantizationType[GGMLFileQuantizationType["IQ2_S"] = 28] = "IQ2_S";
40
+ GGMLFileQuantizationType[GGMLFileQuantizationType["IQ2_M"] = 29] = "IQ2_M";
41
+ GGMLFileQuantizationType[GGMLFileQuantizationType["IQ4_XS"] = 30] = "IQ4_XS";
42
+ GGMLFileQuantizationType[GGMLFileQuantizationType["IQ1_M"] = 31] = "IQ1_M";
43
+ GGMLFileQuantizationType[GGMLFileQuantizationType["BF16"] = 32] = "BF16";
44
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q4_0_4_4"] = 33] = "Q4_0_4_4";
45
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q4_0_4_8"] = 34] = "Q4_0_4_8";
46
+ GGMLFileQuantizationType[GGMLFileQuantizationType["Q4_0_8_8"] = 35] = "Q4_0_8_8";
47
+ GGMLFileQuantizationType[GGMLFileQuantizationType["TQ1_0"] = 36] = "TQ1_0";
48
+ GGMLFileQuantizationType[GGMLFileQuantizationType["TQ2_0"] = 37] = "TQ2_0";
49
+ })(GGMLFileQuantizationType || (exports.GGMLFileQuantizationType = GGMLFileQuantizationType = {}));
50
+ const ggufQuants = Object.values(GGMLFileQuantizationType).filter((v) => typeof v === "string");
51
+ exports.GGUF_QUANT_RE = new RegExp(`(?<quant>${ggufQuants.join("|")})` + "(_(?<sizeVariation>[A-Z]+))?");
52
+ exports.GGUF_QUANT_RE_GLOBAL = new RegExp(exports.GGUF_QUANT_RE, "g");
53
+ function parseGGUFQuantLabel(fname) {
54
+ const quantLabel = fname.toUpperCase().match(exports.GGUF_QUANT_RE_GLOBAL)?.at(-1); // if there is multiple quant substrings in a name, we prefer the last one
55
+ return quantLabel;
56
+ }
57
+ // order of quantization, from biggest to smallest
58
+ // this list must be in sync with the order in GGMLFileQuantizationType
59
+ // the gguf.spec.ts tests are using verify if the order is correct
60
+ exports.GGUF_QUANT_ORDER = [
61
+ GGMLFileQuantizationType.F32,
62
+ GGMLFileQuantizationType.BF16,
63
+ GGMLFileQuantizationType.F16,
64
+ GGMLFileQuantizationType.Q8_0,
65
+ // 6-bit quantizations
66
+ GGMLFileQuantizationType.Q6_K,
67
+ // 5-bit quantizations
68
+ GGMLFileQuantizationType.Q5_0,
69
+ GGMLFileQuantizationType.Q5_1,
70
+ GGMLFileQuantizationType.Q5_K_M,
71
+ GGMLFileQuantizationType.Q5_K_S,
72
+ // 4-bit quantizations
73
+ GGMLFileQuantizationType.Q4_K_M,
74
+ GGMLFileQuantizationType.Q4_K_S,
75
+ GGMLFileQuantizationType.IQ4_NL,
76
+ GGMLFileQuantizationType.IQ4_XS,
77
+ GGMLFileQuantizationType.Q4_0_4_4,
78
+ GGMLFileQuantizationType.Q4_0_4_8,
79
+ GGMLFileQuantizationType.Q4_0_8_8,
80
+ GGMLFileQuantizationType.Q4_0,
81
+ GGMLFileQuantizationType.Q4_1_SOME_F16,
82
+ GGMLFileQuantizationType.Q4_1,
83
+ GGMLFileQuantizationType.Q4_2,
84
+ GGMLFileQuantizationType.Q4_3,
85
+ // 3-bit quantizations
86
+ GGMLFileQuantizationType.Q3_K_L,
87
+ GGMLFileQuantizationType.Q3_K_M,
88
+ GGMLFileQuantizationType.Q3_K_S,
89
+ GGMLFileQuantizationType.IQ3_M,
90
+ GGMLFileQuantizationType.IQ3_S,
91
+ GGMLFileQuantizationType.IQ3_XS,
92
+ GGMLFileQuantizationType.IQ3_XXS,
93
+ // 2-bit quantizations
94
+ GGMLFileQuantizationType.Q2_K,
95
+ GGMLFileQuantizationType.Q2_K_S,
96
+ GGMLFileQuantizationType.IQ2_M,
97
+ GGMLFileQuantizationType.IQ2_S,
98
+ GGMLFileQuantizationType.IQ2_XS,
99
+ GGMLFileQuantizationType.IQ2_XXS,
100
+ // 1-bit quantizations
101
+ GGMLFileQuantizationType.IQ1_S,
102
+ GGMLFileQuantizationType.IQ1_M,
103
+ GGMLFileQuantizationType.TQ1_0,
104
+ GGMLFileQuantizationType.TQ2_0,
105
+ ];
106
+ // This function finds the nearest quantization type that is less than or equal to the given quantization type.
107
+ // It returns undefined if no such quantization type is found.
108
+ function findNearestQuantType(quant, availableQuants) {
109
+ // Create a map for quick index lookup from the defined order
110
+ const orderMap = new Map();
111
+ exports.GGUF_QUANT_ORDER.forEach((q, index) => {
112
+ orderMap.set(q, index);
113
+ });
114
+ const targetIndex = orderMap.get(quant) ?? 0; // the 0 case should never happen
115
+ // Filter the available quantizations to include only those defined in the order map,
116
+ // then sort them according to the GGUF_QUANT_ORDER (from largest/index 0 to smallest/highest index).
117
+ const sortedAvailable = availableQuants
118
+ .filter((q) => orderMap.has(q))
119
+ .sort((a, b) => (orderMap.get(a) ?? Infinity) - (orderMap.get(b) ?? Infinity));
120
+ // If no valid quantizations are available after filtering
121
+ if (sortedAvailable.length === 0) {
122
+ return undefined;
123
+ }
124
+ // Iterate through the sorted available quantizations (largest to smallest).
125
+ // Find the first one whose order index is >= the target index.
126
+ // This means finding the largest quantization that is smaller than or equal to the target.
127
+ for (const availableQuant of sortedAvailable) {
128
+ // We know the key exists due to the filter above.
129
+ const availableIndex = orderMap.get(availableQuant) ?? 0;
130
+ if (availableIndex >= targetIndex) {
131
+ return availableQuant;
132
+ }
133
+ }
134
+ // If the loop completes, it means all available quantizations are larger (have a smaller index)
135
+ // than the target quantization. In this case, return the "smallest" available quantization,
136
+ // which is the last element in the sorted list (highest index among available).
137
+ return sortedAvailable[sortedAvailable.length - 1];
138
+ }
139
+ // This list is only used to calculate the size of the model, NOT to be confused with the quantization FILE type
5
140
  var GGMLQuantizationType;
6
141
  (function (GGMLQuantizationType) {
7
142
  GGMLQuantizationType[GGMLQuantizationType["F32"] = 0] = "F32";
@@ -33,11 +168,6 @@ var GGMLQuantizationType;
33
168
  GGMLQuantizationType[GGMLQuantizationType["F64"] = 28] = "F64";
34
169
  GGMLQuantizationType[GGMLQuantizationType["IQ1_M"] = 29] = "IQ1_M";
35
170
  GGMLQuantizationType[GGMLQuantizationType["BF16"] = 30] = "BF16";
171
+ GGMLQuantizationType[GGMLQuantizationType["TQ1_0"] = 34] = "TQ1_0";
172
+ GGMLQuantizationType[GGMLQuantizationType["TQ2_0"] = 35] = "TQ2_0";
36
173
  })(GGMLQuantizationType || (exports.GGMLQuantizationType = GGMLQuantizationType = {}));
37
- const ggufQuants = Object.values(GGMLQuantizationType).filter((v) => typeof v === "string");
38
- exports.GGUF_QUANT_RE = new RegExp(`(?<quant>${ggufQuants.join("|")})` + "(_(?<sizeVariation>[A-Z]+))?");
39
- exports.GGUF_QUANT_RE_GLOBAL = new RegExp(exports.GGUF_QUANT_RE, "g");
40
- function parseGGUFQuantLabel(fname) {
41
- const quantLabel = fname.toUpperCase().match(exports.GGUF_QUANT_RE_GLOBAL)?.at(-1); // if there is multiple quant substrings in a name, we prefer the last one
42
- return quantLabel;
43
- }
@@ -12,6 +12,7 @@ export declare const depth_anything_v2: (model: ModelData) => string[];
12
12
  export declare const depth_pro: (model: ModelData) => string[];
13
13
  export declare const derm_foundation: () => string[];
14
14
  export declare const dia: (model: ModelData) => string[];
15
+ export declare const describe_anything: (model: ModelData) => string[];
15
16
  export declare const diffusers: (model: ModelData) => string[];
16
17
  export declare const diffusionkit: (model: ModelData) => string[];
17
18
  export declare const cartesia_pytorch: (model: ModelData) => string[];
@@ -37,6 +38,7 @@ export declare const mesh_anything: () => string[];
37
38
  export declare const open_clip: (model: ModelData) => string[];
38
39
  export declare const paddlenlp: (model: ModelData) => string[];
39
40
  export declare const perception_encoder: (model: ModelData) => string[];
41
+ export declare const phantom_wan: (model: ModelData) => string[];
40
42
  export declare const pyannote_audio_pipeline: (model: ModelData) => string[];
41
43
  export declare const pyannote_audio: (model: ModelData) => string[];
42
44
  export declare const relik: (model: ModelData) => string[];
@@ -70,8 +72,8 @@ export declare const chattts: () => string[];
70
72
  export declare const ultralytics: (model: ModelData) => string[];
71
73
  export declare const birefnet: (model: ModelData) => string[];
72
74
  export declare const swarmformer: (model: ModelData) => string[];
73
- export declare const mlx: (model: ModelData) => string[];
74
75
  export declare const mlxim: (model: ModelData) => string[];
76
+ export declare const mlx: (model: ModelData) => string[];
75
77
  export declare const model2vec: (model: ModelData) => string[];
76
78
  export declare const nemo: (model: ModelData) => string[];
77
79
  export declare const outetts: (model: ModelData) => string[];
@@ -82,4 +84,5 @@ export declare const audiocraft: (model: ModelData) => string[];
82
84
  export declare const whisperkit: () => string[];
83
85
  export declare const threedtopia_xl: (model: ModelData) => string[];
84
86
  export declare const hezar: (model: ModelData) => string[];
87
+ export declare const zonos: (model: ModelData) => string[];
85
88
  //# sourceMappingURL=model-libraries-snippets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-libraries-snippets.d.ts","sourceRoot":"","sources":["../../src/model-libraries-snippets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAkBjD,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAKjD,CAAC;AAkBF,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAKjD,CAAC;AAEF,eAAO,MAAM,OAAO,UAAW,SAAS,KAAG,MAAM,EAIhD,CAAC;AAEF,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAIjD,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,SAAS,KAAG,MAAM,EAkBlD,CAAC;AAaF,eAAO,MAAM,IAAI,UAAW,SAAS,KAAG,MAAM,EAY7C,CAAC;AAEF,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAIjD,CAAC;AAEF,eAAO,MAAM,KAAK,UAAW,SAAS,KAAG,MAAM,EAI9C,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,MAAM,EAcvC,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,SAAS,KAAG,MAAM,EA6C1D,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,SAAS,KAAG,MAAM,EAwBlD,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,MAA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stable_audio_tools = exports.sklearn = exports.seed_story = exports.saelens = exports.timm = exports.tensorflowtts = exports.relik = exports.pyannote_audio = exports.pyannote_audio_pipeline = exports.perception_encoder = exports.paddlenlp = exports.open_clip = exports.mesh_anything = exports.matanyone = exports.mars5_tts = exports.mamba_ssm = exports.tf_keras = exports.llama_cpp_python = exports.lightning_ir = exports.keras_hub = exports.keras = exports.htrflow = exports.indextts = exports.gliner = exports.flair = exports.fairseq = exports.espnet = exports.espnetASR = exports.espnetTTS = exports.edsnlp = exports.cartesia_mlx = exports.cartesia_pytorch = exports.diffusionkit = exports.diffusers = exports.dia = exports.derm_foundation = exports.depth_pro = exports.depth_anything_v2 = exports.cxr_foundation = exports.bm25s = exports.bertopic = exports.ben2 = exports.audioseal = exports.asteroid = exports.araclip = exports.allennlp = exports.adapters = void 0;
4
- exports.hezar = exports.threedtopia_xl = exports.whisperkit = exports.audiocraft = exports.anemoi = exports.pythae = exports.pxia = exports.outetts = exports.nemo = exports.model2vec = exports.mlxim = exports.mlx = exports.swarmformer = exports.birefnet = exports.ultralytics = exports.chattts = exports.voicecraft = exports.vfimamba = exports.sana = exports.sentis = exports.mlAgents = exports.stableBaselines3 = exports.fasttext = exports.peft = exports.transformersJS = exports.transformers = exports.terratorch = exports.speechbrain = exports.stanza = exports.span_marker = exports.spacy = exports.setfit = exports.sentenceTransformers = void 0;
3
+ exports.fastai = exports.stable_audio_tools = exports.sklearn = exports.seed_story = exports.saelens = exports.timm = exports.tensorflowtts = exports.relik = exports.pyannote_audio = exports.pyannote_audio_pipeline = exports.phantom_wan = exports.perception_encoder = exports.paddlenlp = exports.open_clip = exports.mesh_anything = exports.matanyone = exports.mars5_tts = exports.mamba_ssm = exports.tf_keras = exports.llama_cpp_python = exports.lightning_ir = exports.keras_hub = exports.keras = exports.htrflow = exports.indextts = exports.gliner = exports.flair = exports.fairseq = exports.espnet = exports.espnetASR = exports.espnetTTS = exports.edsnlp = exports.cartesia_mlx = exports.cartesia_pytorch = exports.diffusionkit = exports.diffusers = exports.describe_anything = exports.dia = exports.derm_foundation = exports.depth_pro = exports.depth_anything_v2 = exports.cxr_foundation = exports.bm25s = exports.bertopic = exports.ben2 = exports.audioseal = exports.asteroid = exports.araclip = exports.allennlp = exports.adapters = void 0;
4
+ exports.zonos = exports.hezar = exports.threedtopia_xl = exports.whisperkit = exports.audiocraft = exports.anemoi = exports.pythae = exports.pxia = exports.outetts = exports.nemo = exports.model2vec = exports.mlx = exports.mlxim = exports.swarmformer = exports.birefnet = exports.ultralytics = exports.chattts = exports.voicecraft = exports.vfimamba = exports.sana = exports.sentis = exports.mlAgents = exports.stableBaselines3 = exports.fasttext = exports.peft = exports.transformersJS = exports.transformers = exports.terratorch = exports.speechbrain = exports.stanza = exports.span_marker = exports.spacy = exports.setfit = exports.sentenceTransformers = exports.sampleFactory = exports.sam2 = void 0;
5
5
  const library_to_tasks_js_1 = require("./library-to-tasks.js");
6
6
  const inputs_js_1 = require("./snippets/inputs.js");
7
7
  const common_js_1 = require("./snippets/common.js");
@@ -225,6 +225,20 @@ output = model.generate(text)
225
225
  sf.write("simple.mp3", output, 44100)`,
226
226
  ];
227
227
  exports.dia = dia;
228
+ const describe_anything = (model) => [
229
+ `# pip install git+https://github.com/NVlabs/describe-anything
230
+ from huggingface_hub import snapshot_download
231
+ from dam import DescribeAnythingModel
232
+
233
+ snapshot_download(${model.id}, local_dir="checkpoints")
234
+
235
+ dam = DescribeAnythingModel(
236
+ model_path="checkpoints",
237
+ conv_mode="v1",
238
+ prompt_mode="focal_prompt",
239
+ )`,
240
+ ];
241
+ exports.describe_anything = describe_anything;
228
242
  const diffusersDefaultPrompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k";
229
243
  const diffusers_default = (model) => [
230
244
  `from diffusers import DiffusionPipeline
@@ -700,6 +714,18 @@ model = pe.VisionTransformer.from_config("${model.id}", pretrained=True)`;
700
714
  }
701
715
  };
702
716
  exports.perception_encoder = perception_encoder;
717
+ const phantom_wan = (model) => [
718
+ `from huggingface_hub import snapshot_download
719
+ from phantom_wan import WANI2V, configs
720
+
721
+ checkpoint_dir = snapshot_download("${model.id}")
722
+ wan_i2v = WanI2V(
723
+ config=configs.WAN_CONFIGS['i2v-14B'],
724
+ checkpoint_dir=checkpoint_dir,
725
+ )
726
+ video = wan_i2v.generate(text_prompt, image_prompt)`,
727
+ ];
728
+ exports.phantom_wan = phantom_wan;
703
729
  const pyannote_audio_pipeline = (model) => [
704
730
  `from pyannote.audio import Pipeline
705
731
 
@@ -1076,12 +1102,27 @@ const transformers = (model) => {
1076
1102
  ].join("\n");
1077
1103
  }
1078
1104
  if (model.pipeline_tag && library_to_tasks_js_1.LIBRARY_TASK_MAPPING.transformers?.includes(model.pipeline_tag)) {
1079
- const pipelineSnippet = ["# Use a pipeline as a high-level helper", "from transformers import pipeline", ""];
1080
- if (model.tags.includes("conversational") && model.config?.tokenizer_config?.chat_template) {
1081
- pipelineSnippet.push("messages = [", ' {"role": "user", "content": "Who are you?"},', "]");
1082
- }
1083
- pipelineSnippet.push(`pipe = pipeline("${model.pipeline_tag}", model="${model.id}"` + remote_code_snippet + ")");
1084
- if (model.tags.includes("conversational") && model.config?.tokenizer_config?.chat_template) {
1105
+ const pipelineSnippet = [
1106
+ "# Use a pipeline as a high-level helper",
1107
+ "from transformers import pipeline",
1108
+ "",
1109
+ `pipe = pipeline("${model.pipeline_tag}", model="${model.id}"` + remote_code_snippet + ")",
1110
+ ];
1111
+ if (model.tags.includes("conversational")) {
1112
+ if (model.tags.includes("image-text-to-text")) {
1113
+ pipelineSnippet.push("messages = [", [
1114
+ " {",
1115
+ ' "role": "user",',
1116
+ ' "content": [',
1117
+ ' {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},',
1118
+ ' {"type": "text", "text": "What animal is on the candy?"}',
1119
+ " ]",
1120
+ " },",
1121
+ ].join("\n"), "]");
1122
+ }
1123
+ else {
1124
+ pipelineSnippet.push("messages = [", ' {"role": "user", "content": "Who are you?"},', "]");
1125
+ }
1085
1126
  pipelineSnippet.push("pipe(messages)");
1086
1127
  }
1087
1128
  return [pipelineSnippet.join("\n"), autoSnippet];
@@ -1259,19 +1300,50 @@ model = SwarmFormerModel.from_pretrained("${model.id}")
1259
1300
  `,
1260
1301
  ];
1261
1302
  exports.swarmformer = swarmformer;
1262
- const mlx = (model) => [
1303
+ const mlx_unknown = (model) => [
1263
1304
  `pip install huggingface_hub hf_transfer
1264
1305
 
1265
1306
  export HF_HUB_ENABLE_HF_TRANSFER=1
1266
1307
  huggingface-cli download --local-dir ${nameWithoutNamespace(model.id)} ${model.id}`,
1267
1308
  ];
1268
- exports.mlx = mlx;
1309
+ const mlxlm = (model) => [
1310
+ `pip install --upgrade mlx-lm
1311
+
1312
+ mlx_lm.generate --model ${model.id} --prompt "Hello"`,
1313
+ ];
1314
+ const mlxchat = (model) => [
1315
+ `pip install --upgrade mlx-lm
1316
+
1317
+ mlx_lm.chat --model ${model.id}`,
1318
+ ];
1319
+ const mlxvlm = (model) => [
1320
+ `pip install --upgrade mlx-vlm
1321
+
1322
+ mlx_vlm.generate --model ${model.id} \\
1323
+ --prompt "Describe this image." \\
1324
+ --image "https://huggingface.co/datasets/huggingface/documentation-images/resolve/0052a70beed5bf71b92610a43a52df6d286cd5f3/diffusers/rabbit.jpg"`,
1325
+ ];
1269
1326
  const mlxim = (model) => [
1270
1327
  `from mlxim.model import create_model
1271
1328
 
1272
1329
  model = create_model(${model.id})`,
1273
1330
  ];
1274
1331
  exports.mlxim = mlxim;
1332
+ const mlx = (model) => {
1333
+ if (model.tags.includes("image-text-to-text")) {
1334
+ return mlxvlm(model);
1335
+ }
1336
+ if (model.tags.includes("conversational")) {
1337
+ if (model.config?.tokenizer_config?.chat_template) {
1338
+ return mlxchat(model);
1339
+ }
1340
+ else {
1341
+ return mlxlm(model);
1342
+ }
1343
+ }
1344
+ return mlx_unknown(model);
1345
+ };
1346
+ exports.mlx = mlx;
1275
1347
  const model2vec = (model) => [
1276
1348
  `from model2vec import StaticModel
1277
1349
 
@@ -1399,4 +1471,23 @@ const hezar = (model) => [
1399
1471
  model = Model.load("${model.id}")`,
1400
1472
  ];
1401
1473
  exports.hezar = hezar;
1474
+ const zonos = (model) => [
1475
+ `# pip install git+https://github.com/Zyphra/Zonos.git
1476
+ import torchaudio
1477
+ from zonos.model import Zonos
1478
+ from zonos.conditioning import make_cond_dict
1479
+
1480
+ model = Zonos.from_pretrained("${model.id}", device="cuda")
1481
+
1482
+ wav, sr = torchaudio.load("speaker.wav") # 5-10s reference clip
1483
+ speaker = model.make_speaker_embedding(wav, sr)
1484
+
1485
+ cond = make_cond_dict(text="Hello, world!", speaker=speaker, language="en-us")
1486
+ codes = model.generate(model.prepare_conditioning(cond))
1487
+
1488
+ audio = model.autoencoder.decode(codes)[0].cpu()
1489
+ torchaudio.save("sample.wav", audio, model.autoencoder.sampling_rate)
1490
+ `,
1491
+ ];
1492
+ exports.zonos = zonos;
1402
1493
  //#endregion
@@ -226,6 +226,13 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
226
226
  filter: false;
227
227
  countDownloads: string;
228
228
  };
229
+ "describe-anything": {
230
+ prettyLabel: string;
231
+ repoName: string;
232
+ repoUrl: string;
233
+ snippets: (model: ModelData) => string[];
234
+ filter: false;
235
+ };
229
236
  "dia-tts": {
230
237
  prettyLabel: string;
231
238
  repoName: string;
@@ -653,6 +660,14 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
653
660
  snippets: (model: ModelData) => string[];
654
661
  countDownloads: string;
655
662
  };
663
+ "phantom-wan": {
664
+ prettyLabel: string;
665
+ repoName: string;
666
+ repoUrl: string;
667
+ snippets: (model: ModelData) => string[];
668
+ filter: false;
669
+ countDownloads: string;
670
+ };
656
671
  pxia: {
657
672
  prettyLabel: string;
658
673
  repoName: string;
@@ -999,6 +1014,14 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
999
1014
  countDownloads: string;
1000
1015
  snippets: (model: ModelData) => string[];
1001
1016
  };
1017
+ zonos: {
1018
+ prettyLabel: string;
1019
+ repoName: string;
1020
+ repoUrl: string;
1021
+ docsUrl: string;
1022
+ snippets: (model: ModelData) => string[];
1023
+ filter: false;
1024
+ };
1002
1025
  "3dtopia-xl": {
1003
1026
  prettyLabel: string;
1004
1027
  repoName: string;
@@ -1010,5 +1033,5 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
1010
1033
  };
1011
1034
  export type ModelLibraryKey = keyof typeof MODEL_LIBRARIES_UI_ELEMENTS;
1012
1035
  export declare const ALL_MODEL_LIBRARY_KEYS: ModelLibraryKey[];
1013
- export declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "anemoi" | "araclip" | "asteroid" | "audiocraft" | "audioseal" | "ben2" | "bertopic" | "big_vision" | "birder" | "birefnet" | "bm25s" | "champ" | "chat_tts" | "colpali" | "comet" | "cosmos" | "cxr-foundation" | "deepforest" | "depth-anything-v2" | "depth-pro" | "derm-foundation" | "dia-tts" | "diffree" | "diffusers" | "diffusionkit" | "doctr" | "cartesia_pytorch" | "cartesia_mlx" | "clipscope" | "cosyvoice" | "cotracker" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "geometry-crafter" | "gliner" | "glyph-byt5" | "grok" | "hallo" | "hezar" | "htrflow" | "hunyuan-dit" | "hunyuan3d-2" | "imstoucan" | "index-tts" | "infinite-you" | "keras" | "tf-keras" | "keras-hub" | "k2" | "lightning-ir" | "liveportrait" | "llama-cpp-python" | "mini-omni2" | "mindspore" | "mamba-ssm" | "mars5-tts" | "matanyone" | "mesh-anything" | "merlin" | "medvae" | "mitie" | "ml-agents" | "mlx" | "mlx-image" | "mlc-llm" | "model2vec" | "moshi" | "nemo" | "open-oasis" | "open_clip" | "open-sora" | "outetts" | "paddlenlp" | "peft" | "perception-encoder" | "pxia" | "pyannote-audio" | "py-feat" | "pythae" | "recurrentgemma" | "relik" | "refiners" | "reverb" | "saelens" | "sam2" | "sample-factory" | "sapiens" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "ssr-speech" | "stable-audio-tools" | "diffusion-single-file" | "seed-story" | "soloaudio" | "stable-baselines3" | "stanza" | "swarmformer" | "f5-tts" | "genmo" | "tensorflowtts" | "tabpfn" | "terratorch" | "tic-clip" | "timesfm" | "timm" | "transformers" | "transformers.js" | "trellis" | "ultralytics" | "uni-3dar" | "unity-sentis" | "sana" | "vfi-mamba" | "voicecraft" | "wham" | "whisperkit" | "yolov10" | "3dtopia-xl")[];
1036
+ export declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "anemoi" | "araclip" | "asteroid" | "audiocraft" | "audioseal" | "ben2" | "bertopic" | "big_vision" | "birder" | "birefnet" | "bm25s" | "champ" | "chat_tts" | "colpali" | "comet" | "cosmos" | "cxr-foundation" | "deepforest" | "depth-anything-v2" | "depth-pro" | "derm-foundation" | "describe-anything" | "dia-tts" | "diffree" | "diffusers" | "diffusionkit" | "doctr" | "cartesia_pytorch" | "cartesia_mlx" | "clipscope" | "cosyvoice" | "cotracker" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "geometry-crafter" | "gliner" | "glyph-byt5" | "grok" | "hallo" | "hezar" | "htrflow" | "hunyuan-dit" | "hunyuan3d-2" | "imstoucan" | "index-tts" | "infinite-you" | "keras" | "tf-keras" | "keras-hub" | "k2" | "lightning-ir" | "liveportrait" | "llama-cpp-python" | "mini-omni2" | "mindspore" | "mamba-ssm" | "mars5-tts" | "matanyone" | "mesh-anything" | "merlin" | "medvae" | "mitie" | "ml-agents" | "mlx" | "mlx-image" | "mlc-llm" | "model2vec" | "moshi" | "nemo" | "open-oasis" | "open_clip" | "open-sora" | "outetts" | "paddlenlp" | "peft" | "perception-encoder" | "phantom-wan" | "pxia" | "pyannote-audio" | "py-feat" | "pythae" | "recurrentgemma" | "relik" | "refiners" | "reverb" | "saelens" | "sam2" | "sample-factory" | "sapiens" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "ssr-speech" | "stable-audio-tools" | "diffusion-single-file" | "seed-story" | "soloaudio" | "stable-baselines3" | "stanza" | "swarmformer" | "f5-tts" | "genmo" | "tensorflowtts" | "tabpfn" | "terratorch" | "tic-clip" | "timesfm" | "timm" | "transformers" | "transformers.js" | "trellis" | "ultralytics" | "uni-3dar" | "unity-sentis" | "sana" | "vfi-mamba" | "voicecraft" | "wham" | "whisperkit" | "yolov10" | "zonos" | "3dtopia-xl")[];
1014
1037
  //# sourceMappingURL=model-libraries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-libraries.d.ts","sourceRoot":"","sources":["../../src/model-libraries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEzE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,EAAE,CAAC;IAC1C;;;;;OAKG;IACH,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAu9BI,CAAC;AAE7C,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,2BAA2B,CAAC;AAEvE,eAAO,MAAM,sBAAsB,EAA+C,eAAe,EAAE,CAAC;AAEpG,eAAO,MAAM,8BAA8B,qzDAQ1B,CAAC"}
@@ -212,6 +212,13 @@ exports.MODEL_LIBRARIES_UI_ELEMENTS = {
212
212
  filter: false,
213
213
  countDownloads: `path:"scin_dataset_precomputed_embeddings.npz" OR path:"saved_model.pb"`,
214
214
  },
215
+ "describe-anything": {
216
+ prettyLabel: "Describe Anything",
217
+ repoName: "Describe Anything",
218
+ repoUrl: "https://github.com/NVlabs/describe-anything",
219
+ snippets: snippets.describe_anything,
220
+ filter: false,
221
+ },
215
222
  "dia-tts": {
216
223
  prettyLabel: "Dia",
217
224
  repoName: "Dia",
@@ -644,6 +651,14 @@ exports.MODEL_LIBRARIES_UI_ELEMENTS = {
644
651
  snippets: snippets.perception_encoder,
645
652
  countDownloads: `path_extension:"pt"`,
646
653
  },
654
+ "phantom-wan": {
655
+ prettyLabel: "Phantom",
656
+ repoName: "Phantom",
657
+ repoUrl: "https://github.com/Phantom-video/Phantom",
658
+ snippets: snippets.phantom_wan,
659
+ filter: false,
660
+ countDownloads: `path_extension:"pth"`,
661
+ },
647
662
  pxia: {
648
663
  prettyLabel: "pxia",
649
664
  repoName: "pxia",
@@ -991,6 +1006,14 @@ exports.MODEL_LIBRARIES_UI_ELEMENTS = {
991
1006
  countDownloads: `path_extension:"pt" OR path_extension:"safetensors"`,
992
1007
  snippets: snippets.ultralytics,
993
1008
  },
1009
+ zonos: {
1010
+ prettyLabel: "Zonos",
1011
+ repoName: "Zonos",
1012
+ repoUrl: "https://github.com/Zyphra/Zonos",
1013
+ docsUrl: "https://github.com/Zyphra/Zonos",
1014
+ snippets: snippets.zonos,
1015
+ filter: false,
1016
+ },
994
1017
  "3dtopia-xl": {
995
1018
  prettyLabel: "3DTopia-XL",
996
1019
  repoName: "3DTopia-XL",
@@ -119,7 +119,7 @@ exports.TASKS_MODEL_LIBRARIES = {
119
119
  /**
120
120
  * Return the whole TaskData object for a certain task.
121
121
  * If the partialTaskData argument is left undefined,
122
- * the default placholder data will be used.
122
+ * the default placeholder data will be used.
123
123
  */
124
124
  function getData(type, partialTaskData = data_js_17.default) {
125
125
  return {
@@ -1,3 +1,48 @@
1
+ export declare enum GGMLFileQuantizationType {
2
+ F32 = 0,
3
+ F16 = 1,
4
+ Q4_0 = 2,
5
+ Q4_1 = 3,
6
+ Q4_1_SOME_F16 = 4,
7
+ Q4_2 = 5,
8
+ Q4_3 = 6,
9
+ Q8_0 = 7,
10
+ Q5_0 = 8,
11
+ Q5_1 = 9,
12
+ Q2_K = 10,
13
+ Q3_K_S = 11,
14
+ Q3_K_M = 12,
15
+ Q3_K_L = 13,
16
+ Q4_K_S = 14,
17
+ Q4_K_M = 15,
18
+ Q5_K_S = 16,
19
+ Q5_K_M = 17,
20
+ Q6_K = 18,
21
+ IQ2_XXS = 19,
22
+ IQ2_XS = 20,
23
+ Q2_K_S = 21,
24
+ IQ3_XS = 22,
25
+ IQ3_XXS = 23,
26
+ IQ1_S = 24,
27
+ IQ4_NL = 25,
28
+ IQ3_S = 26,
29
+ IQ3_M = 27,
30
+ IQ2_S = 28,
31
+ IQ2_M = 29,
32
+ IQ4_XS = 30,
33
+ IQ1_M = 31,
34
+ BF16 = 32,
35
+ Q4_0_4_4 = 33,
36
+ Q4_0_4_8 = 34,
37
+ Q4_0_8_8 = 35,
38
+ TQ1_0 = 36,
39
+ TQ2_0 = 37
40
+ }
41
+ export declare const GGUF_QUANT_RE: RegExp;
42
+ export declare const GGUF_QUANT_RE_GLOBAL: RegExp;
43
+ export declare function parseGGUFQuantLabel(fname: string): string | undefined;
44
+ export declare const GGUF_QUANT_ORDER: GGMLFileQuantizationType[];
45
+ export declare function findNearestQuantType(quant: GGMLFileQuantizationType, availableQuants: GGMLFileQuantizationType[]): GGMLFileQuantizationType | undefined;
1
46
  export declare enum GGMLQuantizationType {
2
47
  F32 = 0,
3
48
  F16 = 1,
@@ -27,9 +72,8 @@ export declare enum GGMLQuantizationType {
27
72
  I64 = 27,
28
73
  F64 = 28,
29
74
  IQ1_M = 29,
30
- BF16 = 30
75
+ BF16 = 30,
76
+ TQ1_0 = 34,
77
+ TQ2_0 = 35
31
78
  }
32
- export declare const GGUF_QUANT_RE: RegExp;
33
- export declare const GGUF_QUANT_RE_GLOBAL: RegExp;
34
- export declare function parseGGUFQuantLabel(fname: string): string | undefined;
35
79
  //# sourceMappingURL=gguf.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gguf.d.ts","sourceRoot":"","sources":["../../src/gguf.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC/B,GAAG,IAAI;IACP,GAAG,IAAI;IACP,IAAI,IAAI;IACR,IAAI,IAAI;IACR,IAAI,IAAI;IACR,IAAI,IAAI;IACR,IAAI,IAAI;IACR,IAAI,IAAI;IACR,IAAI,KAAK;IACT,IAAI,KAAK;IACT,IAAI,KAAK;IACT,IAAI,KAAK;IACT,IAAI,KAAK;IAC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