ai-edge-torch-nightly 0.2.0.dev20240717__py3-none-any.whl → 0.2.0.dev20240718__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 ai-edge-torch-nightly might be problematic. Click here for more details.

@@ -109,13 +109,13 @@ class TestQuantizeConvert(unittest.TestCase):
109
109
 
110
110
  @parameterized.expand(
111
111
  [
112
- (quant_recipes.full_fp16_recipe(), 0.65),
113
- (quant_recipes.full_int8_dynamic_recipe(), 0.47),
114
- (_attention_int8_dynamic_recipe(), 0.89),
115
- (_feedforward_int8_dynamic_recipe(), 0.72),
112
+ (quant_recipes.full_fp16_recipe()),
113
+ (quant_recipes.full_int8_dynamic_recipe()),
114
+ (_attention_int8_dynamic_recipe()),
115
+ (_feedforward_int8_dynamic_recipe()),
116
116
  ]
117
117
  )
118
- def test_quantize_convert_toy_sizes(self, quant_config, expected_compression):
118
+ def test_quantize_convert_toy_sizes(self, quant_config):
119
119
  config = toy_model.get_model_config()
120
120
  pytorch_model = toy_model.ToySingleLayerModel(config)
121
121
  idx = torch.unsqueeze(torch.arange(0, 100), 0)
@@ -125,10 +125,10 @@ class TestQuantizeConvert(unittest.TestCase):
125
125
  pytorch_model, (idx, input_pos), quant_config=quant_config
126
126
  )
127
127
  float_model = ai_edge_torch.convert(pytorch_model, (idx, input_pos))
128
- self.assertAlmostEqual(
129
- len(quantized_model._tflite_model) / len(float_model._tflite_model),
130
- expected_compression,
131
- delta=0.01,
128
+ self.assertLess(
129
+ len(quantized_model._tflite_model),
130
+ len(float_model._tflite_model),
131
+ "Quantized model isn't smaller than F32 model.",
132
132
  )
133
133
 
134
134
  def test_quantize_convert_compare_toy(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ai-edge-torch-nightly
3
- Version: 0.2.0.dev20240717
3
+ Version: 0.2.0.dev20240718
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
@@ -95,7 +95,7 @@ ai_edge_torch/generative/quantize/ai_edge_quantizer_glue/translate_recipe.py,sha
95
95
  ai_edge_torch/generative/test/__init__.py,sha256=hHLluseD2R0Hh4W6XZRIXY_dRQeYudjsrKGf6LZz65g,671
96
96
  ai_edge_torch/generative/test/loader_test.py,sha256=N88CbrLW7Q2x1EyurwdXQ6YjsA-ySQcPxpZH3QOGp-M,3317
97
97
  ai_edge_torch/generative/test/test_model_conversion.py,sha256=LsPTrLC1I4JW2GowTS3V9Eu257vLHr2Yj5f_qaFUX84,7589
98
- ai_edge_torch/generative/test/test_quantize.py,sha256=TxZwe2cCTfwq9t2thBuYiLdp5Xu2cspCbQgziZ3Oo7k,5269
98
+ ai_edge_torch/generative/test/test_quantize.py,sha256=QbF7LC9olJFGXqlAVGciac7xXc4rDtCSr71tTIYuqPk,5230
99
99
  ai_edge_torch/generative/utilities/__init__.py,sha256=-_jxnnFnCgnTU4oTm4MnRsvL5lqhomBNdFBbqfmfHPo,720
100
100
  ai_edge_torch/generative/utilities/loader.py,sha256=NTaCrU2qmeJpqdAau13ZgyeOpwATqhZB68GY0LZjU6A,11438
101
101
  ai_edge_torch/generative/utilities/stable_diffusion_loader.py,sha256=zixjZryUaCSDKmfPkQvYwbPJhUyTmZ4AK_lWN8iFo68,33324
@@ -114,8 +114,8 @@ ai_edge_torch/quantize/quant_config.py,sha256=eO9Ra160ITjQSyRBEGy6nNIVH3gYacSWDd
114
114
  ai_edge_torch/testing/__init__.py,sha256=hHLluseD2R0Hh4W6XZRIXY_dRQeYudjsrKGf6LZz65g,671
115
115
  ai_edge_torch/testing/model_coverage/__init__.py,sha256=5P8J6Zk5YYtDvTBucFvB9NGSRI7Gw_24WnrbhXgycEE,765
116
116
  ai_edge_torch/testing/model_coverage/model_coverage.py,sha256=kzIulTldq8R9E-lAZsvfSTvLu3FYEX7b9DyYM3qisXM,4485
117
- ai_edge_torch_nightly-0.2.0.dev20240717.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
118
- ai_edge_torch_nightly-0.2.0.dev20240717.dist-info/METADATA,sha256=K97HftSRap5QsdWC9otDhPNk0Ueo7HhjebEr0UMkrPM,1745
119
- ai_edge_torch_nightly-0.2.0.dev20240717.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
120
- ai_edge_torch_nightly-0.2.0.dev20240717.dist-info/top_level.txt,sha256=5KXRaF2hwkApYxf7Y8y_tVb9aulGTlbOoNdbx1aKRkE,14
121
- ai_edge_torch_nightly-0.2.0.dev20240717.dist-info/RECORD,,
117
+ ai_edge_torch_nightly-0.2.0.dev20240718.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
118
+ ai_edge_torch_nightly-0.2.0.dev20240718.dist-info/METADATA,sha256=r8YZWPZEhL5gi1oIR9sDZppTSZIuxeHH5isLO4NiSj8,1745
119
+ ai_edge_torch_nightly-0.2.0.dev20240718.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
120
+ ai_edge_torch_nightly-0.2.0.dev20240718.dist-info/top_level.txt,sha256=5KXRaF2hwkApYxf7Y8y_tVb9aulGTlbOoNdbx1aKRkE,14
121
+ ai_edge_torch_nightly-0.2.0.dev20240718.dist-info/RECORD,,