keras-hub-nightly 0.22.0.dev202506180415__py3-none-any.whl → 0.22.0.dev202506200412__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.
@@ -16,9 +16,12 @@ class TransformerEncoder(keras.layers.Layer):
16
16
  paper [Attention is All You Need](https://arxiv.org/abs/1706.03762). Users
17
17
  can instantiate multiple instances of this class to stack up an encoder.
18
18
 
19
- This layer will correctly compute an attention mask from an implicit
20
- Keras padding mask (for example, by passing `mask_zero=True` to a
21
- `keras.layers.Embedding` layer). See the Masking and Padding
19
+ This layer will compute an attention mask, prioritizing explicitly provided
20
+ masks (a `padding_mask` or a custom `attention_mask`) over an implicit Keras
21
+ padding mask (for example, by passing `mask_zero=True` to a
22
+ `keras.layers.Embedding` layer). If both a `padding_mask` and a
23
+ `attention_mask` are provided, they will be combined to determine the final
24
+ mask. See the Masking and Padding
22
25
  [guide](https://keras.io/guides/understanding_masking_and_padding/)
23
26
  for more details.
24
27
 
@@ -65,7 +65,7 @@ class Gemma3InterleaveEmbeddings(keras.layers.Layer):
65
65
  to_add = ops.multiply(
66
66
  keras.ops.arange(batch_size, dtype="int32"), seq_length
67
67
  )
68
- to_add = ops.expand_dims(to_add, axis=-1)
68
+ to_add = ops.cast(ops.expand_dims(to_add, axis=-1), "int32")
69
69
  vision_indices = ops.add(vision_indices, to_add)
70
70
 
71
71
  # indices should be of shape `(num_updates, 1)`. `num_updates` is
keras_hub/src/version.py CHANGED
@@ -1,7 +1,7 @@
1
1
  from keras_hub.src.api_export import keras_hub_export
2
2
 
3
3
  # Unique source of truth for the version number.
4
- __version__ = "0.22.0.dev202506180415"
4
+ __version__ = "0.22.0.dev202506200412"
5
5
 
6
6
 
7
7
  @keras_hub_export("keras_hub.version")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: keras-hub-nightly
3
- Version: 0.22.0.dev202506180415
3
+ Version: 0.22.0.dev202506200412
4
4
  Summary: Pretrained models for Keras.
5
5
  Author-email: Keras team <keras-users@googlegroups.com>
6
6
  License-Expression: Apache-2.0
@@ -5,7 +5,7 @@ keras_hub/models/__init__.py,sha256=7MhCw7S-uIPcko-R6g5a-Jy1idKe7BwlI836PfekhHc,
5
5
  keras_hub/samplers/__init__.py,sha256=aFQIkiqbZpi8vjrPp2MVII4QUfE-eQjra5fMeHsoy7k,886
6
6
  keras_hub/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  keras_hub/src/api_export.py,sha256=9pQZK27JObxWZ96QPLBp1OBsjWigh1iuV6RglPGMRk0,1499
8
- keras_hub/src/version.py,sha256=2hNvfHz4S0wj344nl9k-pgW2y3AOUUqjPetOLMc-oQk,222
8
+ keras_hub/src/version.py,sha256=cRojk1vM3WQcqlh-tsDNWY7wjwa8zo00OULVUJo4yj8,222
9
9
  keras_hub/src/layers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  keras_hub/src/layers/modeling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  keras_hub/src/layers/modeling/alibi_bias.py,sha256=1XBTHI52L_iJDhN_w5ydu_iMhCuTgQAxEPwcLA6BPuk,4411
@@ -22,7 +22,7 @@ keras_hub/src/layers/modeling/rotary_embedding.py,sha256=BuMD2dCyZi73Eokddx8Q9cF
22
22
  keras_hub/src/layers/modeling/sine_position_encoding.py,sha256=NAPW9HaVTMNZgUJNzA3l1B3C_FNvaY7IW-5tQgFgnNg,3453
23
23
  keras_hub/src/layers/modeling/token_and_position_embedding.py,sha256=Q-MhVHZSd_W2eWjDCj-s7wo3z8UHmgZ-7j7hElkaXBQ,5263
24
24
  keras_hub/src/layers/modeling/transformer_decoder.py,sha256=50KLxaZwaQglWIcFotx3BFh6RwCMXRvGZNXHQBrJ5KM,21172
25
- keras_hub/src/layers/modeling/transformer_encoder.py,sha256=Qe19_aR6w4PTFbzvBmSP8-ggiAuOJcgCzaJWcjdzA9c,10625
25
+ keras_hub/src/layers/modeling/transformer_encoder.py,sha256=kKPGfjpdhqGJs4MmRyx7fk9xU_2TAS-gLGhq9FZdU0w,10828
26
26
  keras_hub/src/layers/modeling/transformer_layer_utils.py,sha256=FuznrW33iG50B-VDN8R1RjuA5JG72yNMJ1TBgWLxR0E,3487
27
27
  keras_hub/src/layers/preprocessing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
28
  keras_hub/src/layers/preprocessing/audio_converter.py,sha256=YGh_kQw65a1Z6S5zzSNVP-ChyLYHq3-eOYpOS53xIN8,4156
@@ -208,7 +208,7 @@ keras_hub/src/models/gemma3/gemma3_causal_lm.py,sha256=U3C9TWlIz8VefAxQ0wJ6bDz18
208
208
  keras_hub/src/models/gemma3/gemma3_causal_lm_preprocessor.py,sha256=vjt4N-zr0Eb5kvkOR-WUgskDTNe64L_6tYnhyNb6xaE,29601
209
209
  keras_hub/src/models/gemma3/gemma3_decoder_block.py,sha256=6PLlpDxxF67stDv74fw9nNgUHBWmTLx6qGygJwyu5FY,10819
210
210
  keras_hub/src/models/gemma3/gemma3_image_converter.py,sha256=czi5JrTyKiK0nFzvonviBIX8jjvLHqvGNA9RyheB31k,536
211
- keras_hub/src/models/gemma3/gemma3_interleave_embeddings.py,sha256=_Q5hvhA93HAJe-A2IBRKVu0_RDVht61lFQiYse_9Rm4,4597
211
+ keras_hub/src/models/gemma3/gemma3_interleave_embeddings.py,sha256=CfYdudk5En9iU6vEnrcrEWIztloD1r8VzF2extqAhAM,4616
212
212
  keras_hub/src/models/gemma3/gemma3_presets.py,sha256=tVxug3rX3w_lqZlFfyqUlVdOrfBjN0GJY5ooBx1Fe0M,5124
213
213
  keras_hub/src/models/gemma3/gemma3_tokenizer.py,sha256=ZaBclFIwzJkSXDuZMBQLHUKV8RWEdZ_dsJMvMcc3qXw,3215
214
214
  keras_hub/src/models/gemma3/gemma3_vision_encoder.py,sha256=7XI0oBjIfJItV5w90t5bWb3C2KzjhvDnIC7wjIq4Cns,20850
@@ -517,7 +517,7 @@ keras_hub/src/utils/transformers/preset_loader.py,sha256=K5FzDAtCuXS9rmZc0Zj7UCw
517
517
  keras_hub/src/utils/transformers/safetensor_utils.py,sha256=CYUHyA4y-B61r7NDnCsFb4t_UmSwZ1k9L-8gzEd6KRg,3339
518
518
  keras_hub/tokenizers/__init__.py,sha256=uMjjm0mzUkRb0e4Ac_JK8aJ9cKGUi5UqmzWoWAFJprE,4164
519
519
  keras_hub/utils/__init__.py,sha256=jXPqVGBpJr_PpYmqD8aDG-fRMlxH-ulqCR2SZMn288Y,646
520
- keras_hub_nightly-0.22.0.dev202506180415.dist-info/METADATA,sha256=_tpLfAf4CEf8GVYtW_4YjPPUwD3ozW3KZmmAXmnbHc4,7393
521
- keras_hub_nightly-0.22.0.dev202506180415.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
522
- keras_hub_nightly-0.22.0.dev202506180415.dist-info/top_level.txt,sha256=N4J6piIWBKa38A4uV-CnIopnOEf8mHAbkNXafXm_CuA,10
523
- keras_hub_nightly-0.22.0.dev202506180415.dist-info/RECORD,,
520
+ keras_hub_nightly-0.22.0.dev202506200412.dist-info/METADATA,sha256=3G33fdky-5tgO9KH9_jN-ffXZmqliXjbhIKmI7lqvO0,7393
521
+ keras_hub_nightly-0.22.0.dev202506200412.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
522
+ keras_hub_nightly-0.22.0.dev202506200412.dist-info/top_level.txt,sha256=N4J6piIWBKa38A4uV-CnIopnOEf8mHAbkNXafXm_CuA,10
523
+ keras_hub_nightly-0.22.0.dev202506200412.dist-info/RECORD,,