optimum-rbln 0.9.2a8__py3-none-any.whl → 0.9.2a9__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 optimum-rbln might be problematic. Click here for more details.
- optimum/rbln/__version__.py +2 -2
- optimum/rbln/transformers/modeling_generic.py +14 -0
- {optimum_rbln-0.9.2a8.dist-info → optimum_rbln-0.9.2a9.dist-info}/METADATA +1 -1
- {optimum_rbln-0.9.2a8.dist-info → optimum_rbln-0.9.2a9.dist-info}/RECORD +6 -6
- {optimum_rbln-0.9.2a8.dist-info → optimum_rbln-0.9.2a9.dist-info}/WHEEL +0 -0
- {optimum_rbln-0.9.2a8.dist-info → optimum_rbln-0.9.2a9.dist-info}/licenses/LICENSE +0 -0
optimum/rbln/__version__.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.9.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 9, 2, '
|
|
31
|
+
__version__ = version = '0.9.2a9'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 9, 2, 'a9')
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -267,6 +267,20 @@ class RBLNModelForImageClassification(RBLNImageModel):
|
|
|
267
267
|
class RBLNModelForDepthEstimation(RBLNImageModel):
|
|
268
268
|
auto_model_class = AutoModelForDepthEstimation
|
|
269
269
|
|
|
270
|
+
@classmethod
|
|
271
|
+
def wrap_model_if_needed(cls, model: "PreTrainedModel", rbln_config: RBLNImageModelConfig):
|
|
272
|
+
class ImageModelWrapper(nn.Module):
|
|
273
|
+
def __init__(self, model: "PreTrainedModel", rbln_config: RBLNImageModelConfig):
|
|
274
|
+
super().__init__()
|
|
275
|
+
self.model = model
|
|
276
|
+
self.rbln_config = rbln_config
|
|
277
|
+
|
|
278
|
+
def forward(self, *args, **kwargs):
|
|
279
|
+
output = self.model(*args, **kwargs)
|
|
280
|
+
return output.predicted_depth
|
|
281
|
+
|
|
282
|
+
return ImageModelWrapper(model, rbln_config).eval()
|
|
283
|
+
|
|
270
284
|
|
|
271
285
|
class RBLNModelForAudioClassification(RBLNModel):
|
|
272
286
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: optimum-rbln
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.2a9
|
|
4
4
|
Summary: Optimum RBLN is the interface between the HuggingFace Transformers and Diffusers libraries and RBLN accelerators. It provides a set of tools enabling easy model loading and inference on single and multiple rbln device settings for different downstream tasks.
|
|
5
5
|
Project-URL: Homepage, https://rebellions.ai
|
|
6
6
|
Project-URL: Documentation, https://docs.rbln.ai
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
optimum/rbln/__init__.py,sha256=AZ-7X3ZCjMNcz4mkC_98y-HWRw38ijh8gETJet9tiyM,18828
|
|
2
|
-
optimum/rbln/__version__.py,sha256=
|
|
2
|
+
optimum/rbln/__version__.py,sha256=HMy-1phh_nbuJQmcZSa0Ur4DfzVX1f9gIenxK4mol1A,712
|
|
3
3
|
optimum/rbln/configuration_utils.py,sha256=uLjMsWyYz-4SQ2wbvYqDUZcau29EjU-AghF4q1LNGxw,37260
|
|
4
4
|
optimum/rbln/modeling.py,sha256=h-Iiku3l9KWF1fBpg3loG74VWU13_n7VjVdry5OC06A,16082
|
|
5
5
|
optimum/rbln/modeling_base.py,sha256=blTZgayOh5U7zNhbrdyMuS1fq1-xd6N7y64I0lXDMU0,27589
|
|
@@ -75,7 +75,7 @@ optimum/rbln/ops/sliding_window_attn.py,sha256=EQrV_yRGc5z6kvwEsAcLP028bJWkQg2UP
|
|
|
75
75
|
optimum/rbln/transformers/__init__.py,sha256=hyv53b_d_IJ9KYsDogTmKHDNuXIGNCFkrJI21RHE5ak,12573
|
|
76
76
|
optimum/rbln/transformers/configuration_generic.py,sha256=rM4XY1a_UlRf3ZCZkCav59JKRuvqiEEUUgnqNlgdcv8,5207
|
|
77
77
|
optimum/rbln/transformers/modeling_attention_utils.py,sha256=aLyOaq4me1m-JMmnKbuyNQageDxNU2jjEhGE_ew2P5o,11465
|
|
78
|
-
optimum/rbln/transformers/modeling_generic.py,sha256=
|
|
78
|
+
optimum/rbln/transformers/modeling_generic.py,sha256=QGqIEA9OtoqwWSCPfnctb-tkchut1S6uFZxXV6t6na8,14196
|
|
79
79
|
optimum/rbln/transformers/modeling_outputs.py,sha256=cd8ZlhHAGq7S6i5-QK6TJCxgORvoPMnZpqPBlUc_pMY,1177
|
|
80
80
|
optimum/rbln/transformers/modeling_rope_utils.py,sha256=6Zg3r-TeUk4WQAlr95pqfhuoAD_RQ4njT1rbO9uPL0Q,14379
|
|
81
81
|
optimum/rbln/transformers/models/__init__.py,sha256=yzcjyHCHH4-Mi26N34HzNs7Tl5HjjT1rrwQ8f_W2_nc,13532
|
|
@@ -245,7 +245,7 @@ optimum/rbln/utils/model_utils.py,sha256=4k5879Kh75m3x_vS4-qOGfqsOiAvc2kdNFFfvsF
|
|
|
245
245
|
optimum/rbln/utils/runtime_utils.py,sha256=wVIYE4KS7RNVc1y-5X41SmNdLz_Gpk7zlguKfujRbYo,7649
|
|
246
246
|
optimum/rbln/utils/save_utils.py,sha256=hG5uOtYmecSXZuGTvCXsTM-SiyZpr5q3InUGCCq_jzQ,3619
|
|
247
247
|
optimum/rbln/utils/submodule.py,sha256=SKLnM3KsX8_rv3HauO4oB2-JSjzuadQjRwo_BhMUzLI,6362
|
|
248
|
-
optimum_rbln-0.9.
|
|
249
|
-
optimum_rbln-0.9.
|
|
250
|
-
optimum_rbln-0.9.
|
|
251
|
-
optimum_rbln-0.9.
|
|
248
|
+
optimum_rbln-0.9.2a9.dist-info/METADATA,sha256=nhW42StzOuSElqP-G-c2yagwfBL0R6kf2d1_6kMN6dc,5350
|
|
249
|
+
optimum_rbln-0.9.2a9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
250
|
+
optimum_rbln-0.9.2a9.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
251
|
+
optimum_rbln-0.9.2a9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|