optimum-rbln 0.9.2rc0__py3-none-any.whl → 0.9.2rc1__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.

@@ -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.2rc0'
32
- __version_tuple__ = version_tuple = (0, 9, 2, 'rc0')
31
+ __version__ = version = '0.9.2rc1'
32
+ __version_tuple__ = version_tuple = (0, 9, 2, 'rc1')
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -28,23 +28,23 @@ class RBLNColPaliForRetrievalConfig(RBLNModelConfig):
28
28
  including vision tower settings and multi-sequence length support.
29
29
 
30
30
  Example usage:
31
- ```python
32
- from optimum.rbln import RBLNColPaliForRetrieval, RBLNColPaliForRetrievalConfig
33
-
34
- # Create a configuration object
35
- config = RBLNColPaliForRetrievalConfig(
36
- max_seq_lens=1152,
37
- output_hidden_states=False,
38
- tensor_parallel_size=4
39
- )
40
-
41
- # Use the configuration with from_pretrained
42
- model = RBLNColPaliForRetrieval.from_pretrained(
43
- "vidore/colpali-v1.3-hf",
44
- export=True,
45
- rbln_config=config
46
- )
47
- ```
31
+ ```python
32
+ from optimum.rbln import RBLNColPaliForRetrieval, RBLNColPaliForRetrievalConfig
33
+
34
+ # Create a configuration object
35
+ config = RBLNColPaliForRetrievalConfig(
36
+ max_seq_lens=1152,
37
+ output_hidden_states=False,
38
+ tensor_parallel_size=4
39
+ )
40
+
41
+ # Use the configuration with from_pretrained
42
+ model = RBLNColPaliForRetrieval.from_pretrained(
43
+ "vidore/colpali-v1.3-hf",
44
+ export=True,
45
+ rbln_config=config
46
+ )
47
+ ```
48
48
  """
49
49
 
50
50
  submodules = ["vision_tower"]
@@ -20,6 +20,37 @@ from ..decoderonly.configuration_decoderonly import RBLNDecoderOnlyModelConfig
20
20
 
21
21
 
22
22
  class RBLNColQwen2ForRetrievalConfig(RBLNDecoderOnlyModelConfig):
23
+ """
24
+ Configuration class for RBLN ColQwen2 models for document retrieval.
25
+
26
+ This class extends RBLNModelConfig with specific configurations for ColQwen2 models,
27
+ including vision tower settings and multi-sequence length support.
28
+
29
+ Example usage:
30
+ ```python
31
+ from optimum.rbln import RBLNColQwen2ForRetrievalConfig, RBLNColQwen2ForRetrievalConfig
32
+
33
+ # Create a configuration object
34
+ config = RBLNColQwen2ForRetrievalConfig(
35
+ visual={
36
+ "max_seq_lens": 6400,
37
+ "device": 0,
38
+ },
39
+ max_seq_len=32_768,
40
+ tensor_parallel_size=4,
41
+ device=[0, 1, 2, 3],
42
+ output_hidden_states=False,
43
+ )
44
+
45
+ # Use the configuration with from_pretrained
46
+ model = RBLNColQwen2ForRetrieval.from_pretrained(
47
+ "vidore/colqwen2-v1.0-hf",
48
+ export=True,
49
+ rbln_config=config
50
+ )
51
+ ```
52
+ """
53
+
23
54
  submodules = ["visual"]
24
55
 
25
56
  def __init__(
@@ -51,6 +51,63 @@ from .colqwen2_architecture import ColQwen2LanguageModelWrapper
51
51
 
52
52
 
53
53
  class RBLNColQwen2ForRetrieval(RBLNDecoderOnlyModel):
54
+ """
55
+ The ColQwen Model transformer for document retrieval using vision-language models.
56
+ This model inherits from [`RBLNDecoderOnlyModel`]. Check the superclass documentation for the generic methods the library implements for all its models.
57
+
58
+ A class to convert and run pre-trained transformers based `ColQwen2ForRetrieval` model on RBLN devices.
59
+ It implements the methods to convert a pre-trained transformers `ColQwen2ForRetrieval` model into a RBLN transformer model by:
60
+
61
+ - transferring the checkpoint weights of the original into an optimized RBLN graph,
62
+ - compiling the resulting graph using the RBLN compiler.
63
+
64
+ **Configuration:**
65
+ This model uses [`RBLNColQwen2ForRetrievalConfig`] for configuration. When calling methods like `from_pretrained` or `from_model`,
66
+ the `rbln_config` parameter should be an instance of [`RBLNColQwen2ForRetrievalConfig`] or a dictionary conforming to its structure.
67
+
68
+ See the [`RBLNColQwen2ForRetrievalConfig`] class for all available configuration options.
69
+
70
+ Examples:
71
+ ```python
72
+ from optimum.rbln import RBLNColQwen2ForRetrieval
73
+
74
+ # Using a config dictionary
75
+ rbln_config = {
76
+ "visual": {
77
+ "max_seq_lens": 6400,
78
+ },
79
+ "max_seq_len": 32_768,
80
+ "tensor_parallel_size": 4,
81
+ "device": [0, 1, 2, 3],
82
+ "output_hidden_states": False,
83
+ }
84
+ model = RBLNColQwen2ForRetrieval.from_pretrained(
85
+ "vidore/colqwen2-v1.0-hf",
86
+ export=True,
87
+ rbln_config=rbln_config
88
+ )
89
+
90
+ # Using a RBLNColQwen2ForRetrievalConfig instance (recommended for type checking)
91
+ from optimum.rbln import RBLNColQwen2ForRetrievalConfig
92
+
93
+ config = RBLNColQwen2ForRetrievalConfig(
94
+ visual={
95
+ "max_seq_lens": 6400,
96
+ "device": 0,
97
+ },
98
+ max_seq_len=32_768,
99
+ tensor_parallel_size=4,
100
+ device=[0, 1, 2, 3],
101
+ output_hidden_states=False,
102
+ )
103
+ model = RBLNColQwen2ForRetrieval.from_pretrained(
104
+ "vidore/colqwen2-v1.0-hf",
105
+ export=True,
106
+ rbln_config=config
107
+ )
108
+ ```
109
+ """
110
+
54
111
  main_input_name = "inputs_embeds"
55
112
  auto_model_class = None
56
113
  _rbln_submodules = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: optimum-rbln
3
- Version: 0.9.2rc0
3
+ Version: 0.9.2rc1
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=ns14slnkiDevAQCeOXQoejSnzfk3WNuie4cyYiMQZSc,18980
2
- optimum/rbln/__version__.py,sha256=eX7dIgcPHT2s34NRv665o56Hk3CKxWFMF5u_b-pQWPA,714
2
+ optimum/rbln/__version__.py,sha256=WozqVRDHdwcyqBUlRJldKeU9qimFW1KUCZdsg_ks-Fg,714
3
3
  optimum/rbln/cli.py,sha256=944P_f9btDyFryHfHzxUKQvwXWYD1hrceDuK6SWNQcQ,22832
4
4
  optimum/rbln/configuration_utils.py,sha256=uLjMsWyYz-4SQ2wbvYqDUZcau29EjU-AghF4q1LNGxw,37260
5
5
  optimum/rbln/modeling.py,sha256=50BE-bpn-GMImXjQGrG5rqnhofg1DHs6jyS2CzprPBY,16247
@@ -102,12 +102,12 @@ optimum/rbln/transformers/models/clip/configuration_clip.py,sha256=Ea8TCVmMayydf
102
102
  optimum/rbln/transformers/models/clip/modeling_clip.py,sha256=BLAYJAtv_2ZnKOlZ8iDBr2Su3bKM_eMWeUSK9MOaj7I,13198
103
103
  optimum/rbln/transformers/models/colpali/__init__.py,sha256=n3rueXT_oC0N8myoZiic0YkVK24CW5hZBPa-0L8so6Y,119
104
104
  optimum/rbln/transformers/models/colpali/colpali_architecture.py,sha256=TCOW3v5l9fIt1uIFtWa8ZAxq1cdCER8gXWjmbLQD20M,8079
105
- optimum/rbln/transformers/models/colpali/configuration_colpali.py,sha256=_HuZBVV-ponml95UapkYpRhffZy53-9jSZknx7hID7o,3348
105
+ optimum/rbln/transformers/models/colpali/configuration_colpali.py,sha256=qjaUC7S9kCZBWL9LsXnEo0woxsksPSHJpqA3TRTx6KE,3408
106
106
  optimum/rbln/transformers/models/colpali/modeling_colpali.py,sha256=2lHxvtrK3x2GOv7r-5nZelmjezm3ehe6Qf28cMdNmoQ,17961
107
107
  optimum/rbln/transformers/models/colqwen2/__init__.py,sha256=gEKc5X4uGME4XKySDD1H6JlT89jaMvZ00HqbDVXNHU8,123
108
108
  optimum/rbln/transformers/models/colqwen2/colqwen2_architecture.py,sha256=spIH6d-09asUBSqhuJN9NAK2Ke7Kv1RP7HdwMOcxf_s,8732
109
- optimum/rbln/transformers/models/colqwen2/configuration_colqwen2.py,sha256=7c31acILXiIeOatZ73YEbgvEAhKACL3KzsLjik-fvII,1691
110
- optimum/rbln/transformers/models/colqwen2/modeling_colqwen2.py,sha256=jPwu3FPezkBBWLIBMKUfFFsburNBi7JzGX7IyA_yX4U,16362
109
+ optimum/rbln/transformers/models/colqwen2/configuration_colqwen2.py,sha256=_HYOLR2O8xjEJvXn7LRU_BSxdysMXmJ7oEhCLhaG2z0,2649
110
+ optimum/rbln/transformers/models/colqwen2/modeling_colqwen2.py,sha256=Iy5wa3Aa-Vfjv4FTyDvL-KtyGAB9nBuGCPXz_Alv_l0,18598
111
111
  optimum/rbln/transformers/models/decoderonly/__init__.py,sha256=pKBXAtE3y_6nnwYfQJjdPmWqUwxuJ0lr8rrqkgyH07M,1126
112
112
  optimum/rbln/transformers/models/decoderonly/configuration_decoderonly.py,sha256=GX-IwTe6ywM9hmyquIu66y0YgIVZS5JNIz8LKAb4Ow8,17003
113
113
  optimum/rbln/transformers/models/decoderonly/configuration_lora.py,sha256=5DuTs2vy7jF7MLy161QD_KvCTaNW-5Mok7hBH0yK44U,17356
@@ -250,8 +250,8 @@ optimum/rbln/utils/model_utils.py,sha256=4k5879Kh75m3x_vS4-qOGfqsOiAvc2kdNFFfvsF
250
250
  optimum/rbln/utils/runtime_utils.py,sha256=Sf0YOUeJkhByArEgqofb_THvFBYdMVIgF_MGvhL4i-w,8540
251
251
  optimum/rbln/utils/save_utils.py,sha256=hG5uOtYmecSXZuGTvCXsTM-SiyZpr5q3InUGCCq_jzQ,3619
252
252
  optimum/rbln/utils/submodule.py,sha256=SKLnM3KsX8_rv3HauO4oB2-JSjzuadQjRwo_BhMUzLI,6362
253
- optimum_rbln-0.9.2rc0.dist-info/METADATA,sha256=lQVSk-maixwy-qvGSDnbTyoh2W9sDMJ76nUSN6UaMZ0,5351
254
- optimum_rbln-0.9.2rc0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
255
- optimum_rbln-0.9.2rc0.dist-info/entry_points.txt,sha256=-orKDGKfLypxlPlTz8-ZkmdKULNvax9yeCCCn-q89n4,59
256
- optimum_rbln-0.9.2rc0.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
257
- optimum_rbln-0.9.2rc0.dist-info/RECORD,,
253
+ optimum_rbln-0.9.2rc1.dist-info/METADATA,sha256=yxmUuYsEcOT081Qt2J0S_07MHZ4V-QnYPILasp45SiU,5351
254
+ optimum_rbln-0.9.2rc1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
255
+ optimum_rbln-0.9.2rc1.dist-info/entry_points.txt,sha256=-orKDGKfLypxlPlTz8-ZkmdKULNvax9yeCCCn-q89n4,59
256
+ optimum_rbln-0.9.2rc1.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
257
+ optimum_rbln-0.9.2rc1.dist-info/RECORD,,