ai-edge-torch-nightly 0.4.0.dev20250318__py3-none-any.whl → 0.4.0.dev20250320__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.
@@ -20,6 +20,7 @@ import enum
20
20
  from typing import Callable, Optional, Sequence, Tuple, Union
21
21
  from ai_edge_torch.generative.layers import rotary_position_embedding
22
22
 
23
+
23
24
  @enum.unique
24
25
  class ActivationType(enum.Enum):
25
26
  """Different activation functions supported by the default builder."""
@@ -227,6 +228,11 @@ class ModelConfig:
227
228
  # forward pass. Defaults to a standard implementation.
228
229
  build_rope: Callable = rotary_position_embedding.build_rope
229
230
 
231
+ # Whether or not to use a mask cache. Mask cache can speed up inference when
232
+ # statically exporting models. However, it is not supported in the dynamic
233
+ # export.
234
+ use_mask_cache: bool = True
235
+
230
236
  @property
231
237
  def kv_cache_max(self) -> int:
232
238
  if self.kv_cache_max_len > 0:
ai_edge_torch/version.py CHANGED
@@ -13,4 +13,4 @@
13
13
  # limitations under the License.
14
14
  # ==============================================================================
15
15
 
16
- __version__ = "0.4.0.dev20250318"
16
+ __version__ = "0.4.0.dev20250320"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ai-edge-torch-nightly
3
- Version: 0.4.0.dev20250318
3
+ Version: 0.4.0.dev20250320
4
4
  Summary: Supporting PyTorch models with the Google AI Edge TFLite runtime.
5
5
  Home-page: https://github.com/google-ai-edge/ai-edge-torch
6
6
  Keywords: On-Device ML,AI,Google,TFLite,PyTorch,LLMs,GenAI
@@ -2,7 +2,7 @@ ai_edge_torch/__init__.py,sha256=8sPR_5uXJA4NEE0nIwNdSl-ADOJEoR8hAgYvBQDY70Y,120
2
2
  ai_edge_torch/_config.py,sha256=AiqhbcheF7j_ozIGDLC89k1we95aVgFDa-tR6h7UI0s,2529
3
3
  ai_edge_torch/conftest.py,sha256=r0GTrhMRhlmOGrrkvumHN8hkmyug6WvF60vWq8wRIBI,758
4
4
  ai_edge_torch/model.py,sha256=N-pNpTxzhaFGhWhnSGd70lBzb9VlEhTOq5mddU7bvvI,5542
5
- ai_edge_torch/version.py,sha256=zu1aA3wScDZlbYd8QjsUCUetRdYO1ohDGgwRI1UfxcY,706
5
+ ai_edge_torch/version.py,sha256=WmhysEoEUKF7351GkQLaTMjyIxWKNi_l81Yyi0V3oY8,706
6
6
  ai_edge_torch/_convert/__init__.py,sha256=hHLluseD2R0Hh4W6XZRIXY_dRQeYudjsrKGf6LZz65g,671
7
7
  ai_edge_torch/_convert/conversion.py,sha256=gpXQnifODU-mWxkUZw_3ov1lEYBw1SPVIcqj5k7pTGo,5550
8
8
  ai_edge_torch/_convert/conversion_utils.py,sha256=Sr8qXVcTwc-ZnZmK7yxVrIOOp1S_vNrwzC0zUvLTI2o,2160
@@ -150,7 +150,7 @@ ai_edge_torch/generative/layers/builder.py,sha256=LXGuSHIx6QZAzLFm7aJvlzoMPgQwbX
150
150
  ai_edge_torch/generative/layers/feed_forward.py,sha256=hdICat-8gW7-vxDAevJQ8NQ-mynllPiqLdXQMF6JMnc,4189
151
151
  ai_edge_torch/generative/layers/kv_cache.py,sha256=jwbt0-2fd_CNWS2fp4nf0zvh6kk5citINGlFC_RtEUU,6540
152
152
  ai_edge_torch/generative/layers/lora.py,sha256=hsvWLLOnW7HQ0AysOZu30x_cetMquDd1tjfyLz8HCSU,17892
153
- ai_edge_torch/generative/layers/model_config.py,sha256=wNsZDzZQoimOKdZ9FWMCktPj-pQ_0D7084hgzMT5XYo,8155
153
+ ai_edge_torch/generative/layers/model_config.py,sha256=nLXvTkDAIHJQ0PTaWODF8oxJQoJ-K8D10cKR9229SAw,8355
154
154
  ai_edge_torch/generative/layers/normalization.py,sha256=MbwH-n80Fob5YvjBzdqDjBizMHLzSJGYRDdbD-rL5C0,6174
155
155
  ai_edge_torch/generative/layers/rotary_position_embedding.py,sha256=975zR202MdIrILJ7blceAcxrNqX1ZCN0ECKG1gz-bV8,2655
156
156
  ai_edge_torch/generative/layers/scaled_dot_product_attention.py,sha256=vp8dVx6tOe99neJhpbrtIt5fvN5NFw19JVH1v0yi5Mg,4154
@@ -239,8 +239,8 @@ ai_edge_torch/testing/__init__.py,sha256=_yGgvnBZWb7T3IN3mc4x1sS4vM96HZwM8pwIcPG
239
239
  ai_edge_torch/testing/export.py,sha256=dguMa-aEi-WDPnmGBUs2IPdEmt2IVmHOELH19uiJ1uU,3014
240
240
  ai_edge_torch/testing/model_coverage/__init__.py,sha256=5P8J6Zk5YYtDvTBucFvB9NGSRI7Gw_24WnrbhXgycEE,765
241
241
  ai_edge_torch/testing/model_coverage/model_coverage.py,sha256=UPB448aMDUyC0HNYVqio2rcJPnDN0tBQMP08J6vPYew,4718
242
- ai_edge_torch_nightly-0.4.0.dev20250318.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
243
- ai_edge_torch_nightly-0.4.0.dev20250318.dist-info/METADATA,sha256=IYXbw81k_JFN7OaZOVBVFPsiKrzzX6xG-79zAQv4gdA,1966
244
- ai_edge_torch_nightly-0.4.0.dev20250318.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
245
- ai_edge_torch_nightly-0.4.0.dev20250318.dist-info/top_level.txt,sha256=5KXRaF2hwkApYxf7Y8y_tVb9aulGTlbOoNdbx1aKRkE,14
246
- ai_edge_torch_nightly-0.4.0.dev20250318.dist-info/RECORD,,
242
+ ai_edge_torch_nightly-0.4.0.dev20250320.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
243
+ ai_edge_torch_nightly-0.4.0.dev20250320.dist-info/METADATA,sha256=QLqMSv9Ib_W93oJ8wlfO6m6PvQdCevTD016gv1bE-kk,1966
244
+ ai_edge_torch_nightly-0.4.0.dev20250320.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
245
+ ai_edge_torch_nightly-0.4.0.dev20250320.dist-info/top_level.txt,sha256=5KXRaF2hwkApYxf7Y8y_tVb9aulGTlbOoNdbx1aKRkE,14
246
+ ai_edge_torch_nightly-0.4.0.dev20250320.dist-info/RECORD,,