spark-nlp 5.5.3__py2.py3-none-any.whl → 6.0.1__py2.py3-none-any.whl

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.

Potentially problematic release.


This version of spark-nlp might be problematic. Click here for more details.

Files changed (37) hide show
  1. {spark_nlp-5.5.3.dist-info → spark_nlp-6.0.1.dist-info}/METADATA +20 -11
  2. {spark_nlp-5.5.3.dist-info → spark_nlp-6.0.1.dist-info}/RECORD +36 -17
  3. {spark_nlp-5.5.3.dist-info → spark_nlp-6.0.1.dist-info}/WHEEL +1 -1
  4. sparknlp/__init__.py +2 -2
  5. sparknlp/annotator/classifier_dl/__init__.py +4 -0
  6. sparknlp/annotator/classifier_dl/albert_for_multiple_choice.py +161 -0
  7. sparknlp/annotator/classifier_dl/bert_for_multiple_choice.py +2 -2
  8. sparknlp/annotator/classifier_dl/distilbert_for_multiple_choice.py +161 -0
  9. sparknlp/annotator/classifier_dl/roberta_for_multiple_choice.py +161 -0
  10. sparknlp/annotator/classifier_dl/xlm_roberta_for_multiple_choice.py +149 -0
  11. sparknlp/annotator/cleaners/__init__.py +15 -0
  12. sparknlp/annotator/cleaners/cleaner.py +202 -0
  13. sparknlp/annotator/cleaners/extractor.py +191 -0
  14. sparknlp/annotator/cv/__init__.py +9 -1
  15. sparknlp/annotator/cv/gemma3_for_multimodal.py +351 -0
  16. sparknlp/annotator/cv/janus_for_multimodal.py +356 -0
  17. sparknlp/annotator/cv/llava_for_multimodal.py +328 -0
  18. sparknlp/annotator/cv/mllama_for_multimodal.py +340 -0
  19. sparknlp/annotator/cv/paligemma_for_multimodal.py +308 -0
  20. sparknlp/annotator/cv/phi3_vision_for_multimodal.py +328 -0
  21. sparknlp/annotator/cv/qwen2vl_transformer.py +332 -0
  22. sparknlp/annotator/cv/smolvlm_transformer.py +432 -0
  23. sparknlp/annotator/embeddings/auto_gguf_embeddings.py +10 -6
  24. sparknlp/annotator/seq2seq/__init__.py +3 -0
  25. sparknlp/annotator/seq2seq/auto_gguf_model.py +8 -503
  26. sparknlp/annotator/seq2seq/auto_gguf_vision_model.py +333 -0
  27. sparknlp/annotator/seq2seq/cohere_transformer.py +357 -0
  28. sparknlp/annotator/seq2seq/llama3_transformer.py +4 -4
  29. sparknlp/annotator/seq2seq/olmo_transformer.py +326 -0
  30. sparknlp/base/image_assembler.py +58 -0
  31. sparknlp/common/properties.py +605 -96
  32. sparknlp/internal/__init__.py +127 -2
  33. sparknlp/reader/enums.py +19 -0
  34. sparknlp/reader/pdf_to_text.py +111 -0
  35. sparknlp/reader/sparknlp_reader.py +222 -14
  36. spark_nlp-5.5.3.dist-info/.uuid +0 -1
  37. {spark_nlp-5.5.3.dist-info → spark_nlp-6.0.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,191 @@
1
+ # Copyright 2017-2025 John Snow Labs
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """Contains classes for Extractor."""
15
+ from sparknlp.common import *
16
+
17
+ class Extractor(AnnotatorModel):
18
+ name = "Extractor"
19
+
20
+ inputAnnotatorTypes = [AnnotatorType.DOCUMENT]
21
+
22
+ outputAnnotatorType = AnnotatorType.CHUNK
23
+
24
+ emailDateTimeTzPattern = Param(Params._dummy(),
25
+ "emailDateTimeTzPattern",
26
+ "Specifies the date-time pattern for email timestamps, including time zone formatting.",
27
+ typeConverter=TypeConverters.toString)
28
+
29
+ emailAddress = Param(
30
+ Params._dummy(),
31
+ "emailAddress",
32
+ "Specifies the pattern for email addresses.",
33
+ typeConverter=TypeConverters.toString
34
+ )
35
+
36
+ ipAddressPattern = Param(
37
+ Params._dummy(),
38
+ "ipAddressPattern",
39
+ "Specifies the pattern for IP addresses.",
40
+ typeConverter=TypeConverters.toString
41
+ )
42
+
43
+ ipAddressNamePattern = Param(
44
+ Params._dummy(),
45
+ "ipAddressNamePattern",
46
+ "Specifies the pattern for IP addresses with names.",
47
+ typeConverter=TypeConverters.toString
48
+ )
49
+
50
+ mapiIdPattern = Param(
51
+ Params._dummy(),
52
+ "mapiIdPattern",
53
+ "Specifies the pattern for MAPI IDs.",
54
+ typeConverter=TypeConverters.toString
55
+ )
56
+
57
+ usPhoneNumbersPattern = Param(
58
+ Params._dummy(),
59
+ "usPhoneNumbersPattern",
60
+ "Specifies the pattern for US phone numbers.",
61
+ typeConverter=TypeConverters.toString
62
+ )
63
+
64
+ imageUrlPattern = Param(
65
+ Params._dummy(),
66
+ "imageUrlPattern",
67
+ "Specifies the pattern for image URLs.",
68
+ typeConverter=TypeConverters.toString
69
+ )
70
+
71
+ textPattern = Param(
72
+ Params._dummy(),
73
+ "textPattern",
74
+ "Specifies the pattern for text after and before.",
75
+ typeConverter=TypeConverters.toString
76
+ )
77
+
78
+ extractorMode = Param(
79
+ Params._dummy(),
80
+ "extractorMode",
81
+ "possible values: " +
82
+ "email_date, email_address, ip_address, ip_address_name, mapi_id, us_phone_numbers, image_urls, bullets, text_after, text_before",
83
+ typeConverter=TypeConverters.toString
84
+ )
85
+
86
+ index = Param(
87
+ Params._dummy(),
88
+ "index",
89
+ "Specifies the index of the pattern to extract in text after or before",
90
+ typeConverter=TypeConverters.toInt
91
+ )
92
+
93
+ def setEmailDateTimeTzPattern(self, value):
94
+ """Sets specifies the date-time pattern for email timestamps, including time zone formatting.
95
+
96
+ Parameters
97
+ ----------
98
+ value : str
99
+ Specifies the date-time pattern for email timestamps, including time zone formatting.
100
+ """
101
+ return self._set(emailDateTimeTzPattern=value)
102
+
103
+ def setEmailAddress(self, value):
104
+ """Sets the pattern for email addresses.
105
+
106
+ Parameters
107
+ ----------
108
+ value : str
109
+ Specifies the pattern for email addresses.
110
+ """
111
+ return self._set(emailAddress=value)
112
+
113
+ def setIpAddressPattern(self, value):
114
+ """Sets the pattern for IP addresses.
115
+
116
+ Parameters
117
+ ----------
118
+ value : str
119
+ Specifies the pattern for IP addresses.
120
+ """
121
+ return self._set(ipAddressPattern=value)
122
+
123
+ def setIpAddressNamePattern(self, value):
124
+ """Sets the pattern for IP addresses with names.
125
+
126
+ Parameters
127
+ ----------
128
+ value : str
129
+ Specifies the pattern for IP addresses with names.
130
+ """
131
+ return self._set(ipAddressNamePattern=value)
132
+
133
+ def setMapiIdPattern(self, value):
134
+ """Sets the pattern for MAPI IDs.
135
+
136
+ Parameters
137
+ ----------
138
+ value : str
139
+ Specifies the pattern for MAPI IDs.
140
+ """
141
+ return self._set(mapiIdPattern=value)
142
+
143
+ def setUsPhoneNumbersPattern(self, value):
144
+ """Sets the pattern for US phone numbers.
145
+
146
+ Parameters
147
+ ----------
148
+ value : str
149
+ Specifies the pattern for US phone numbers.
150
+ """
151
+ return self._set(usPhoneNumbersPattern=value)
152
+
153
+ def setImageUrlPattern(self, value):
154
+ """Sets the pattern for image URLs.
155
+
156
+ Parameters
157
+ ----------
158
+ value : str
159
+ Specifies the pattern for image URLs.
160
+ """
161
+ return self._set(imageUrlPattern=value)
162
+
163
+ def setTextPattern(self, value):
164
+ """Sets the pattern for text after and before.
165
+
166
+ Parameters
167
+ ----------
168
+ value : str
169
+ Specifies the pattern for text after and before.
170
+ """
171
+ return self._set(textPattern=value)
172
+
173
+ def setExtractorMode(self, value):
174
+ return self._set(extractorMode=value)
175
+
176
+ def setIndex(self, value):
177
+ """Sets the index of the pattern to extract in text after or before.
178
+
179
+ Parameters
180
+ ----------
181
+ value : int
182
+ Specifies the index of the pattern to extract in text after or before.
183
+ """
184
+ return self._set(index=value)
185
+
186
+ @keyword_only
187
+ def __init__(self, classname="com.johnsnowlabs.nlp.annotators.cleaners.Extractor", java_model=None):
188
+ super(Extractor, self).__init__(
189
+ classname=classname,
190
+ java_model=java_model
191
+ )
@@ -16,4 +16,12 @@ from sparknlp.annotator.cv.swin_for_image_classification import *
16
16
  from sparknlp.annotator.cv.convnext_for_image_classification import *
17
17
  from sparknlp.annotator.cv.vision_encoder_decoder_for_image_captioning import *
18
18
  from sparknlp.annotator.cv.clip_for_zero_shot_classification import *
19
- from sparknlp.annotator.cv.blip_for_question_answering import *
19
+ from sparknlp.annotator.cv.blip_for_question_answering import *
20
+ from sparknlp.annotator.cv.janus_for_multimodal import *
21
+ from sparknlp.annotator.cv.mllama_for_multimodal import *
22
+ from sparknlp.annotator.cv.qwen2vl_transformer import *
23
+ from sparknlp.annotator.cv.llava_for_multimodal import *
24
+ from sparknlp.annotator.cv.phi3_vision_for_multimodal import *
25
+ from sparknlp.annotator.cv.smolvlm_transformer import *
26
+ from sparknlp.annotator.cv.paligemma_for_multimodal import *
27
+ from sparknlp.annotator.cv.gemma3_for_multimodal import *
@@ -0,0 +1,351 @@
1
+ # Copyright 2017-2024 John Snow Labs
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ from sparknlp.common import *
16
+
17
+ class Gemma3ForMultiModal(AnnotatorModel,
18
+ HasBatchedAnnotateImage,
19
+ HasImageFeatureProperties,
20
+ HasEngine,
21
+ HasGeneratorProperties):
22
+ """Gemma3ForMultiModal can load Gemma 3 Vision models for visual question answering.
23
+ The model consists of a vision encoder, a text encoder, a text decoder and a model merger.
24
+ The vision encoder will encode the input image, the text encoder will encode the input text,
25
+ the model merger will merge the image and text embeddings, and the text decoder will output the answer.
26
+
27
+ Gemma 3 is a family of lightweight, state-of-the-art open models from Google, built from the same
28
+ research and technology used to create the Gemini models. It features:
29
+ - Large 128K context window
30
+ - Multilingual support in over 140 languages
31
+ - Multimodal capabilities handling both text and image inputs
32
+ - Optimized for deployment on limited resources (laptops, desktops, cloud)
33
+
34
+ Pretrained models can be loaded with :meth:`.pretrained` of the companion
35
+ object:
36
+
37
+ >>> visualQA = Gemma3ForMultiModal.pretrained() \
38
+ ... .setInputCols(["image_assembler"]) \
39
+ ... .setOutputCol("answer")
40
+
41
+ The default model is ``"gemma3_4b_it_int4"``, if no name is
42
+ provided.
43
+
44
+ For available pretrained models please see the `Models Hub
45
+ <https://sparknlp.org/models?task=Question+Answering>`__.
46
+
47
+ ====================== ======================
48
+ Input Annotation types Output Annotation type
49
+ ====================== ======================
50
+ ``IMAGE`` ``DOCUMENT``
51
+ ====================== ======================
52
+
53
+ Parameters
54
+ ----------
55
+ batchSize
56
+ Batch size. Large values allows faster processing but requires more
57
+ memory, by default 1
58
+ minOutputLength
59
+ Minimum length of the sequence to be generated, by default 0
60
+ maxOutputLength
61
+ Maximum length of output text, by default 20
62
+ doSample
63
+ Whether or not to use sampling; use greedy decoding otherwise, by default False
64
+ temperature
65
+ The value used to module the next token probabilities, by default 0.6
66
+ topK
67
+ The number of highest probability vocabulary tokens to keep for top-k-filtering, by default -1
68
+ topP
69
+ If set to float < 1, only the most probable tokens with probabilities that add up to ``top_p`` or higher are kept for generation, by default 0.9
70
+ repetitionPenalty
71
+ The parameter for repetition penalty. 1.0 means no penalty, by default 1.0
72
+ noRepeatNgramSize
73
+ If set to int > 0, all ngrams of that size can only occur once, by default 3
74
+ beamSize
75
+ The Number of beams for beam search, by default 1
76
+ maxInputLength
77
+ Maximum length of input text, by default 4096
78
+
79
+ Examples
80
+ --------
81
+ >>> import sparknlp
82
+ >>> from sparknlp.base import *
83
+ >>> from sparknlp.annotator import *
84
+ >>> from pyspark.ml import Pipeline
85
+ >>> from pyspark.sql.functions import lit
86
+ >>>
87
+ >>> imageDF = spark.read.format("image").load(images_path)
88
+ >>> testDF = imageDF.withColumn("text", lit("<bos><start_of_turn>user\nYou are a helpful assistant.\n\n<start_of_image>Describe this image in detail.<end_of_turn>\n<start_of_turn>model\n"))
89
+ >>>
90
+ >>> imageAssembler = ImageAssembler() \
91
+ ... .setInputCol("image") \
92
+ ... .setOutputCol("image_assembler")
93
+ >>>
94
+ >>> visualQA = Gemma3ForMultiModal.pretrained() \
95
+ ... .setInputCols("image_assembler") \
96
+ ... .setOutputCol("answer")
97
+ >>>
98
+ >>> pipeline = Pipeline().setStages([
99
+ ... imageAssembler,
100
+ ... visualQA
101
+ ... ])
102
+ >>>
103
+ >>> result = pipeline.fit(testDF).transform(testDF)
104
+ >>> result.select("image_assembler.origin", "answer.result").show(truncate=False)
105
+ """
106
+
107
+ name = "Gemma3ForMultiModal"
108
+
109
+ inputAnnotatorTypes = [AnnotatorType.IMAGE]
110
+
111
+ outputAnnotatorType = AnnotatorType.DOCUMENT
112
+
113
+ configProtoBytes = Param(Params._dummy(),
114
+ "configProtoBytes",
115
+ "ConfigProto from tensorflow, serialized into byte array. Get with "
116
+ "config_proto.SerializeToString()",
117
+ TypeConverters.toListInt)
118
+
119
+ minOutputLength = Param(Params._dummy(), "minOutputLength", "Minimum length of the sequence to be generated",
120
+ typeConverter=TypeConverters.toInt)
121
+
122
+ maxOutputLength = Param(Params._dummy(), "maxOutputLength", "Maximum length of output text",
123
+ typeConverter=TypeConverters.toInt)
124
+
125
+ doSample = Param(Params._dummy(), "doSample", "Whether or not to use sampling; use greedy decoding otherwise",
126
+ typeConverter=TypeConverters.toBoolean)
127
+
128
+ temperature = Param(Params._dummy(), "temperature", "The value used to module the next token probabilities",
129
+ typeConverter=TypeConverters.toFloat)
130
+
131
+ topK = Param(Params._dummy(), "topK",
132
+ "The number of highest probability vocabulary tokens to keep for top-k-filtering",
133
+ typeConverter=TypeConverters.toInt)
134
+
135
+ topP = Param(Params._dummy(), "topP",
136
+ "If set to float < 1, only the most probable tokens with probabilities that add up to ``top_p`` or higher are kept for generation",
137
+ typeConverter=TypeConverters.toFloat)
138
+
139
+ repetitionPenalty = Param(Params._dummy(), "repetitionPenalty",
140
+ "The parameter for repetition penalty. 1.0 means no penalty. See `this paper <https://arxiv.org/pdf/1909.05858.pdf>`__ for more details",
141
+ typeConverter=TypeConverters.toFloat)
142
+
143
+ noRepeatNgramSize = Param(Params._dummy(), "noRepeatNgramSize",
144
+ "If set to int > 0, all ngrams of that size can only occur once",
145
+ typeConverter=TypeConverters.toInt)
146
+
147
+ ignoreTokenIds = Param(Params._dummy(), "ignoreTokenIds",
148
+ "A list of token ids which are ignored in the decoder's output",
149
+ typeConverter=TypeConverters.toListInt)
150
+ beamSize = Param(Params._dummy(), "beamSize",
151
+ "The Number of beams for beam search.",
152
+ typeConverter=TypeConverters.toInt)
153
+
154
+ maxInputLength = Param(Params._dummy(), "maxInputLength", "Maximum length of input text",
155
+ typeConverter=TypeConverters.toInt)
156
+
157
+ def setMaxSentenceSize(self, value):
158
+ """Sets Maximum sentence length that the annotator will process, by
159
+ default 50.
160
+
161
+ Parameters
162
+ ----------
163
+ value : int
164
+ Maximum sentence length that the annotator will process
165
+ """
166
+ return self._set(maxSentenceLength=value)
167
+
168
+ def setIgnoreTokenIds(self, value):
169
+ """A list of token ids which are ignored in the decoder's output.
170
+
171
+ Parameters
172
+ ----------
173
+ value : List[int]
174
+ The words to be filtered out
175
+ """
176
+ return self._set(ignoreTokenIds=value)
177
+
178
+ def setConfigProtoBytes(self, b):
179
+ """Sets configProto from tensorflow, serialized into byte array.
180
+
181
+ Parameters
182
+ ----------
183
+ b : List[int]
184
+ ConfigProto from tensorflow, serialized into byte array
185
+ """
186
+ return self._set(configProtoBytes=b)
187
+
188
+ def setMinOutputLength(self, value):
189
+ """Sets minimum length of the sequence to be generated.
190
+
191
+ Parameters
192
+ ----------
193
+ value : int
194
+ Minimum length of the sequence to be generated
195
+ """
196
+ return self._set(minOutputLength=value)
197
+
198
+ def setMaxOutputLength(self, value):
199
+ """Sets maximum length of output text.
200
+
201
+ Parameters
202
+ ----------
203
+ value : int
204
+ Maximum length of output text
205
+ """
206
+ return self._set(maxOutputLength=value)
207
+
208
+ def setDoSample(self, value):
209
+ """Sets whether or not to use sampling, use greedy decoding otherwise.
210
+
211
+ Parameters
212
+ ----------
213
+ value : bool
214
+ Whether or not to use sampling; use greedy decoding otherwise
215
+ """
216
+ return self._set(doSample=value)
217
+
218
+ def setTemperature(self, value):
219
+ """Sets the value used to module the next token probabilities.
220
+
221
+ Parameters
222
+ ----------
223
+ value : float
224
+ The value used to module the next token probabilities
225
+ """
226
+ return self._set(temperature=value)
227
+
228
+ def setTopK(self, value):
229
+ """Sets the number of highest probability vocabulary tokens to keep for
230
+ top-k-filtering.
231
+
232
+ Parameters
233
+ ----------
234
+ value : int
235
+ Number of highest probability vocabulary tokens to keep
236
+ """
237
+ return self._set(topK=value)
238
+
239
+ def setTopP(self, value):
240
+ """Sets the top cumulative probability for vocabulary tokens.
241
+
242
+ If set to float < 1, only the most probable tokens with probabilities
243
+ that add up to ``topP`` or higher are kept for generation.
244
+
245
+ Parameters
246
+ ----------
247
+ value : float
248
+ Cumulative probability for vocabulary tokens
249
+ """
250
+ return self._set(topP=value)
251
+
252
+ def setRepetitionPenalty(self, value):
253
+ """Sets the parameter for repetition penalty. 1.0 means no penalty.
254
+
255
+ Parameters
256
+ ----------
257
+ value : float
258
+ The repetition penalty
259
+
260
+ References
261
+ ----------
262
+ See `Ctrl: A Conditional Transformer Language Model For Controllable
263
+ Generation <https://arxiv.org/pdf/1909.05858.pdf>`__ for more details.
264
+ """
265
+ return self._set(repetitionPenalty=value)
266
+
267
+ def setNoRepeatNgramSize(self, value):
268
+ """Sets size of n-grams that can only occur once.
269
+
270
+ If set to int > 0, all ngrams of that size can only occur once.
271
+
272
+ Parameters
273
+ ----------
274
+ value : int
275
+ N-gram size can only occur once
276
+ """
277
+ return self._set(noRepeatNgramSize=value)
278
+
279
+ def setBeamSize(self, value):
280
+ """Sets the number of beam size for beam search, by default `4`.
281
+
282
+ Parameters
283
+ ----------
284
+ value : int
285
+ Number of beam size for beam search
286
+ """
287
+ return self._set(beamSize=value)
288
+
289
+ @keyword_only
290
+ def __init__(self, classname="com.johnsnowlabs.nlp.annotators.cv.Gemma3ForMultiModal",
291
+ java_model=None):
292
+ super(Gemma3ForMultiModal, self).__init__(
293
+ classname=classname,
294
+ java_model=java_model
295
+ )
296
+ self._setDefault(
297
+ batchSize=1,
298
+ minOutputLength=0,
299
+ maxOutputLength=20,
300
+ doSample=False,
301
+ temperature=0.6,
302
+ topK=-1,
303
+ topP=0.9,
304
+ repetitionPenalty=1.0,
305
+ noRepeatNgramSize=3,
306
+ ignoreTokenIds=[],
307
+ beamSize=1,
308
+ maxInputLength=4096,
309
+ )
310
+
311
+ @staticmethod
312
+ def loadSavedModel(folder, spark_session, use_openvino=False):
313
+ """Loads a locally saved model.
314
+
315
+ Parameters
316
+ ----------
317
+ folder : str
318
+ Folder of the saved model
319
+ spark_session : pyspark.sql.SparkSession
320
+ The current SparkSession
321
+
322
+ Returns
323
+ -------
324
+ Gemma3ForMultiModal
325
+ The restored model
326
+ """
327
+ from sparknlp.internal import _Gemma3ForMultiModalLoader
328
+ jModel = _Gemma3ForMultiModalLoader(folder, spark_session._jsparkSession, use_openvino)._java_obj
329
+ return Gemma3ForMultiModal(java_model=jModel)
330
+
331
+ @staticmethod
332
+ def pretrained(name="gemma3_4b_it_int4", lang="en", remote_loc=None):
333
+ """Downloads and loads a pretrained model.
334
+
335
+ Parameters
336
+ ----------
337
+ name : str, optional
338
+ Name of the pretrained model, by default "gemma3_4b_it_int4"
339
+ lang : str, optional
340
+ Language of the pretrained model, by default "en"
341
+ remote_loc : str, optional
342
+ Optional remote address of the resource, by default None. Will use
343
+ Spark NLPs repositories otherwise.
344
+
345
+ Returns
346
+ -------
347
+ Gemma3ForMultiModal
348
+ The restored model
349
+ """
350
+ from sparknlp.pretrained import ResourceDownloader
351
+ return ResourceDownloader.downloadModel(Gemma3ForMultiModal, name, lang, remote_loc)