ai-edge-torch-nightly 0.2.0.dev20240701__py3-none-any.whl → 0.2.0.dev20240702__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.
- ai_edge_torch/generative/examples/gemma/convert_to_tflite.py +2 -2
- ai_edge_torch/generative/examples/gemma/gemma.py +1 -1
- ai_edge_torch/generative/examples/phi2/convert_to_tflite.py +2 -2
- ai_edge_torch/generative/examples/phi2/phi2.py +1 -1
- ai_edge_torch/generative/examples/stable_diffusion/clip.py +2 -2
- ai_edge_torch/generative/examples/stable_diffusion/convert_to_tflite.py +1 -1
- ai_edge_torch/generative/examples/t5/convert_to_tflite.py +12 -12
- ai_edge_torch/generative/examples/t5/t5.py +2 -2
- ai_edge_torch/generative/examples/test_models/toy_model.py +1 -1
- ai_edge_torch/generative/examples/test_models/toy_model_with_external_kv_cache.py +2 -2
- ai_edge_torch/generative/examples/test_models/toy_model_with_kv_cache.py +2 -2
- ai_edge_torch/generative/examples/tiny_llama/convert_to_tflite.py +2 -2
- ai_edge_torch/generative/examples/tiny_llama/tiny_llama.py +1 -1
- ai_edge_torch/generative/quantize/example.py +1 -1
- ai_edge_torch/generative/test/test_model_conversion.py +8 -8
- ai_edge_torch/generative/test/test_quantize.py +2 -2
- {ai_edge_torch_nightly-0.2.0.dev20240701.dist-info → ai_edge_torch_nightly-0.2.0.dev20240702.dist-info}/METADATA +1 -1
- {ai_edge_torch_nightly-0.2.0.dev20240701.dist-info → ai_edge_torch_nightly-0.2.0.dev20240702.dist-info}/RECORD +21 -21
- {ai_edge_torch_nightly-0.2.0.dev20240701.dist-info → ai_edge_torch_nightly-0.2.0.dev20240702.dist-info}/LICENSE +0 -0
- {ai_edge_torch_nightly-0.2.0.dev20240701.dist-info → ai_edge_torch_nightly-0.2.0.dev20240702.dist-info}/WHEEL +0 -0
- {ai_edge_torch_nightly-0.2.0.dev20240701.dist-info → ai_edge_torch_nightly-0.2.0.dev20240702.dist-info}/top_level.txt +0 -0
|
@@ -45,9 +45,9 @@ def convert_gemma_to_tflite(
|
|
|
45
45
|
checkpoint_path, kv_cache_max_len=kv_cache_max_len
|
|
46
46
|
)
|
|
47
47
|
# Tensors used to trace the model graph during conversion.
|
|
48
|
-
prefill_tokens = torch.full((1, prefill_seq_len), 0, dtype=torch.
|
|
48
|
+
prefill_tokens = torch.full((1, prefill_seq_len), 0, dtype=torch.long)
|
|
49
49
|
prefill_input_pos = torch.arange(0, prefill_seq_len)
|
|
50
|
-
decode_token = torch.tensor([[0]], dtype=torch.
|
|
50
|
+
decode_token = torch.tensor([[0]], dtype=torch.long)
|
|
51
51
|
decode_input_pos = torch.tensor([0], dtype=torch.int64)
|
|
52
52
|
|
|
53
53
|
quant_config = quant_recipes.full_linear_int8_dynamic_recipe() if quantize else None
|
|
@@ -163,7 +163,7 @@ def define_and_run_2b() -> None:
|
|
|
163
163
|
checkpoint_path = os.path.join(Path.home(), "Downloads/llm_data/gemma-2b")
|
|
164
164
|
model = build_2b_model(checkpoint_path, kv_cache_max_len=kv_cache_max_len)
|
|
165
165
|
idx = torch.from_numpy(np.array([[1, 2, 3, 4]]))
|
|
166
|
-
tokens = torch.full((1, kv_cache_max_len), 0, dtype=torch.
|
|
166
|
+
tokens = torch.full((1, kv_cache_max_len), 0, dtype=torch.long, device="cpu")
|
|
167
167
|
tokens[0, :4] = idx
|
|
168
168
|
input_pos = torch.arange(0, kv_cache_max_len)
|
|
169
169
|
print("running an inference")
|
|
@@ -43,9 +43,9 @@ def convert_phi2_to_tflite(
|
|
|
43
43
|
"""
|
|
44
44
|
pytorch_model = phi2.build_model(checkpoint_path, kv_cache_max_len=kv_cache_max_len)
|
|
45
45
|
# Tensors used to trace the model graph during conversion.
|
|
46
|
-
prefill_tokens = torch.full((1, prefill_seq_len), 0, dtype=torch.
|
|
46
|
+
prefill_tokens = torch.full((1, prefill_seq_len), 0, dtype=torch.long)
|
|
47
47
|
prefill_input_pos = torch.arange(0, prefill_seq_len)
|
|
48
|
-
decode_token = torch.tensor([[0]], dtype=torch.
|
|
48
|
+
decode_token = torch.tensor([[0]], dtype=torch.long)
|
|
49
49
|
decode_input_pos = torch.tensor([0], dtype=torch.int64)
|
|
50
50
|
|
|
51
51
|
quant_config = quant_recipes.full_linear_int8_dynamic_recipe() if quantize else None
|
|
@@ -153,7 +153,7 @@ def define_and_run() -> None:
|
|
|
153
153
|
checkpoint_path = os.path.join(Path.home(), "Downloads/llm_data/phi2")
|
|
154
154
|
model = build_model(checkpoint_path, kv_cache_max_len=kv_cache_max_len)
|
|
155
155
|
idx = torch.from_numpy(np.array([[1, 2, 3, 4]]))
|
|
156
|
-
tokens = torch.full((1, kv_cache_max_len), 0, dtype=torch.
|
|
156
|
+
tokens = torch.full((1, kv_cache_max_len), 0, dtype=torch.long, device="cpu")
|
|
157
157
|
tokens[0, :4] = idx
|
|
158
158
|
input_pos = torch.arange(0, kv_cache_max_len)
|
|
159
159
|
print("running an inference")
|
|
@@ -60,8 +60,8 @@ class CLIP(nn.Module):
|
|
|
60
60
|
)
|
|
61
61
|
|
|
62
62
|
@torch.inference_mode
|
|
63
|
-
def forward(self, tokens: torch.
|
|
64
|
-
tokens = tokens.type(torch.
|
|
63
|
+
def forward(self, tokens: torch.LongTensor) -> torch.FloatTensor:
|
|
64
|
+
tokens = tokens.type(torch.long)
|
|
65
65
|
|
|
66
66
|
state = self.tok_embedding(tokens) + self.tok_embedding_position
|
|
67
67
|
for layer in self.transformer_blocks:
|
|
@@ -61,7 +61,7 @@ def convert_stable_diffusion_to_tflite(
|
|
|
61
61
|
n_tokens = 77
|
|
62
62
|
timestamp = 0
|
|
63
63
|
len_prompt = 1
|
|
64
|
-
prompt_tokens = torch.full((1, n_tokens), 0, dtype=torch.
|
|
64
|
+
prompt_tokens = torch.full((1, n_tokens), 0, dtype=torch.long)
|
|
65
65
|
input_image = torch.full((1, 3, image_height, image_width), 0, dtype=torch.float32)
|
|
66
66
|
noise = torch.full(
|
|
67
67
|
(len_prompt, 4, image_height // 8, image_width // 8), 0, dtype=torch.float32
|
|
@@ -30,23 +30,23 @@ def convert_t5_to_tflite_singlesig(checkpoint_path: str):
|
|
|
30
30
|
|
|
31
31
|
# encoder
|
|
32
32
|
seq_len = 512
|
|
33
|
-
prefill_e_tokens = torch.full((1, seq_len), 0, dtype=torch.
|
|
33
|
+
prefill_e_tokens = torch.full((1, seq_len), 0, dtype=torch.long)
|
|
34
34
|
prompt_e_token = [1, 2, 3, 4, 5, 6]
|
|
35
35
|
prefill_e_tokens[0, : len(prompt_e_token)] = torch.tensor(
|
|
36
|
-
prompt_e_token, dtype=torch.
|
|
36
|
+
prompt_e_token, dtype=torch.long
|
|
37
37
|
)
|
|
38
38
|
prefill_e_input_pos = torch.arange(0, seq_len)
|
|
39
|
-
prefill_d_tokens = torch.full((1, seq_len), 0, dtype=torch.
|
|
39
|
+
prefill_d_tokens = torch.full((1, seq_len), 0, dtype=torch.long)
|
|
40
40
|
prompt_d_token = [1, 2, 3, 4, 5, 6]
|
|
41
41
|
prefill_d_tokens[0, : len(prompt_d_token)] = torch.tensor(
|
|
42
|
-
prompt_d_token, dtype=torch.
|
|
42
|
+
prompt_d_token, dtype=torch.long
|
|
43
43
|
)
|
|
44
44
|
prefill_d_input_pos = torch.arange(0, seq_len)
|
|
45
45
|
|
|
46
46
|
# decoder
|
|
47
|
-
decode_token = torch.tensor([[1]], dtype=torch.
|
|
47
|
+
decode_token = torch.tensor([[1]], dtype=torch.long)
|
|
48
48
|
decode_input_pos = torch.tensor([0], dtype=torch.int64)
|
|
49
|
-
decode_d_token = torch.tensor([[1]], dtype=torch.
|
|
49
|
+
decode_d_token = torch.tensor([[1]], dtype=torch.long)
|
|
50
50
|
decode_d_input_pos = torch.tensor([0], dtype=torch.int64)
|
|
51
51
|
|
|
52
52
|
# Pad mask for self attention only on "real" tokens.
|
|
@@ -78,23 +78,23 @@ def convert_t5_to_tflite_multisig(checkpoint_path: str):
|
|
|
78
78
|
|
|
79
79
|
# encoder
|
|
80
80
|
seq_len = 512
|
|
81
|
-
prefill_e_tokens = torch.full((1, seq_len), 0, dtype=torch.
|
|
81
|
+
prefill_e_tokens = torch.full((1, seq_len), 0, dtype=torch.long)
|
|
82
82
|
prompt_e_token = [1, 2, 3, 4, 5, 6]
|
|
83
83
|
prefill_e_tokens[0, : len(prompt_e_token)] = torch.tensor(
|
|
84
|
-
prompt_e_token, dtype=torch.
|
|
84
|
+
prompt_e_token, dtype=torch.long
|
|
85
85
|
)
|
|
86
86
|
prefill_e_input_pos = torch.arange(0, seq_len)
|
|
87
|
-
prefill_d_tokens = torch.full((1, seq_len), 0, dtype=torch.
|
|
87
|
+
prefill_d_tokens = torch.full((1, seq_len), 0, dtype=torch.long)
|
|
88
88
|
prompt_d_token = [1, 2, 3, 4, 5, 6]
|
|
89
89
|
prefill_d_tokens[0, : len(prompt_d_token)] = torch.tensor(
|
|
90
|
-
prompt_d_token, dtype=torch.
|
|
90
|
+
prompt_d_token, dtype=torch.long
|
|
91
91
|
)
|
|
92
92
|
prefill_d_input_pos = torch.arange(0, seq_len)
|
|
93
93
|
|
|
94
94
|
# decoder
|
|
95
|
-
decode_token = torch.tensor([[1]], dtype=torch.
|
|
95
|
+
decode_token = torch.tensor([[1]], dtype=torch.long)
|
|
96
96
|
decode_input_pos = torch.tensor([0], dtype=torch.int64)
|
|
97
|
-
decode_d_token = torch.tensor([[1]], dtype=torch.
|
|
97
|
+
decode_d_token = torch.tensor([[1]], dtype=torch.long)
|
|
98
98
|
decode_d_input_pos = torch.tensor([0], dtype=torch.int64)
|
|
99
99
|
|
|
100
100
|
# Pad mask for self attention only on "real" tokens.
|
|
@@ -562,7 +562,7 @@ def define_and_run_t5(checkpoint_path: str) -> None:
|
|
|
562
562
|
model = build_t5_model(checkpoint_path)
|
|
563
563
|
|
|
564
564
|
idx = get_sample_encoder_input_ids()
|
|
565
|
-
tokens = torch.full((1, 512), 0, dtype=torch.
|
|
565
|
+
tokens = torch.full((1, 512), 0, dtype=torch.long, device="cpu")
|
|
566
566
|
tokens[0, :77] = idx
|
|
567
567
|
input_pos = torch.arange(0, 512)
|
|
568
568
|
|
|
@@ -586,7 +586,7 @@ def define_and_run_t5_split(checkpoint_path: str) -> None:
|
|
|
586
586
|
t5_decoder_model = build_t5_decoder_model(config, embedding_layer, checkpoint_path)
|
|
587
587
|
idx = get_sample_encoder_input_ids()
|
|
588
588
|
|
|
589
|
-
tokens = torch.full((1, 512), 0, dtype=torch.
|
|
589
|
+
tokens = torch.full((1, 512), 0, dtype=torch.long, device="cpu")
|
|
590
590
|
tokens[0, :77] = idx
|
|
591
591
|
input_pos = torch.arange(0, 512)
|
|
592
592
|
|
|
@@ -93,7 +93,7 @@ def define_and_run() -> None:
|
|
|
93
93
|
)
|
|
94
94
|
|
|
95
95
|
model = ToySingleLayerModel(config)
|
|
96
|
-
idx = torch.unsqueeze(torch.arange(0, KV_CACHE_MAX_LEN
|
|
96
|
+
idx = torch.unsqueeze(torch.arange(0, KV_CACHE_MAX_LEN), 0)
|
|
97
97
|
input_pos = torch.arange(0, KV_CACHE_MAX_LEN)
|
|
98
98
|
print('running an inference')
|
|
99
99
|
print(
|
|
@@ -115,13 +115,13 @@ def get_model_config() -> cfg.ModelConfig:
|
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
def get_sample_prefill_inputs() -> Tuple[torch.Tensor, torch.Tensor]:
|
|
118
|
-
idx = torch.unsqueeze(torch.arange(0, 100
|
|
118
|
+
idx = torch.unsqueeze(torch.arange(0, 100), 0)
|
|
119
119
|
input_pos = torch.arange(0, 100)
|
|
120
120
|
return idx, input_pos
|
|
121
121
|
|
|
122
122
|
|
|
123
123
|
def get_sample_decode_inputs() -> Tuple[torch.Tensor, torch.Tensor]:
|
|
124
|
-
idx = torch.tensor([[1]], dtype=torch.
|
|
124
|
+
idx = torch.tensor([[1]], dtype=torch.long)
|
|
125
125
|
input_pos = torch.tensor([10])
|
|
126
126
|
return idx, input_pos
|
|
127
127
|
|
|
@@ -103,13 +103,13 @@ def get_model_config() -> cfg.ModelConfig:
|
|
|
103
103
|
|
|
104
104
|
|
|
105
105
|
def get_sample_prefill_inputs() -> Tuple[torch.Tensor, torch.Tensor]:
|
|
106
|
-
idx = torch.unsqueeze(torch.arange(0, 100
|
|
106
|
+
idx = torch.unsqueeze(torch.arange(0, 100), 0)
|
|
107
107
|
input_pos = torch.arange(0, 100)
|
|
108
108
|
return idx, input_pos
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
def get_sample_decode_inputs() -> Tuple[torch.Tensor, torch.Tensor]:
|
|
112
|
-
idx = torch.tensor([[1]], dtype=torch.
|
|
112
|
+
idx = torch.tensor([[1]], dtype=torch.long)
|
|
113
113
|
input_pos = torch.tensor([10], dtype=torch.int64)
|
|
114
114
|
return idx, input_pos
|
|
115
115
|
|
|
@@ -45,9 +45,9 @@ def convert_tiny_llama_to_tflite(
|
|
|
45
45
|
checkpoint_path, kv_cache_max_len=kv_cache_max_len
|
|
46
46
|
)
|
|
47
47
|
# Tensors used to trace the model graph during conversion.
|
|
48
|
-
prefill_tokens = torch.full((1, prefill_seq_len), 0, dtype=torch.
|
|
48
|
+
prefill_tokens = torch.full((1, prefill_seq_len), 0, dtype=torch.long)
|
|
49
49
|
prefill_input_pos = torch.arange(0, prefill_seq_len)
|
|
50
|
-
decode_token = torch.tensor([[0]], dtype=torch.
|
|
50
|
+
decode_token = torch.tensor([[0]], dtype=torch.long)
|
|
51
51
|
decode_input_pos = torch.tensor([0], dtype=torch.int64)
|
|
52
52
|
|
|
53
53
|
quant_config = quant_recipes.full_linear_int8_dynamic_recipe() if quantize else None
|
|
@@ -153,7 +153,7 @@ def define_and_run() -> None:
|
|
|
153
153
|
checkpoint_path = os.path.join(Path.home(), "Downloads/llm_data/tiny_llama")
|
|
154
154
|
model = build_model(checkpoint_path, kv_cache_max_len=kv_cache_max_len)
|
|
155
155
|
idx = torch.from_numpy(np.array([[1, 2, 3, 4]]))
|
|
156
|
-
tokens = torch.full((1, kv_cache_max_len), 0, dtype=torch.
|
|
156
|
+
tokens = torch.full((1, kv_cache_max_len), 0, dtype=torch.long, device="cpu")
|
|
157
157
|
tokens[0, :4] = idx
|
|
158
158
|
input_pos = torch.arange(0, kv_cache_max_len)
|
|
159
159
|
print("running an inference")
|
|
@@ -26,7 +26,7 @@ def main():
|
|
|
26
26
|
config = gemma.get_fake_model_config_2b_for_test()
|
|
27
27
|
model = gemma.Gemma(config)
|
|
28
28
|
idx = torch.from_numpy(np.array([[1, 2, 3, 4]]))
|
|
29
|
-
tokens = torch.full((1, 10), 0, dtype=torch.
|
|
29
|
+
tokens = torch.full((1, 10), 0, dtype=torch.long, device="cpu")
|
|
30
30
|
tokens[0, :4] = idx
|
|
31
31
|
input_pos = torch.arange(0, 10)
|
|
32
32
|
|
|
@@ -35,7 +35,7 @@ class TestModelConversion(unittest.TestCase):
|
|
|
35
35
|
def test_toy_model_with_kv_cache(self):
|
|
36
36
|
config = toy_model_with_kv_cache.get_model_config()
|
|
37
37
|
pytorch_model = toy_model_with_kv_cache.ToyModelWithKV(config)
|
|
38
|
-
idx, input_pos = torch.tensor([[1]], dtype=torch.
|
|
38
|
+
idx, input_pos = torch.tensor([[1]], dtype=torch.long), torch.tensor(
|
|
39
39
|
[10], dtype=torch.int64
|
|
40
40
|
)
|
|
41
41
|
|
|
@@ -59,7 +59,7 @@ class TestModelConversion(unittest.TestCase):
|
|
|
59
59
|
config = toy_model_with_kv_cache.get_model_config()
|
|
60
60
|
config.batch_size = 2
|
|
61
61
|
pytorch_model = toy_model_with_kv_cache.ToyModelWithKV(config)
|
|
62
|
-
idx, input_pos = torch.tensor([[1], [2]], dtype=torch.
|
|
62
|
+
idx, input_pos = torch.tensor([[1], [2]], dtype=torch.long), torch.tensor(
|
|
63
63
|
[10], dtype=torch.int64
|
|
64
64
|
)
|
|
65
65
|
|
|
@@ -83,7 +83,7 @@ class TestModelConversion(unittest.TestCase):
|
|
|
83
83
|
config = toy_model_with_kv_cache.get_model_config()
|
|
84
84
|
config.enable_hlfb = True
|
|
85
85
|
pytorch_model = toy_model_with_kv_cache.ToyModelWithKV(config)
|
|
86
|
-
idx, input_pos = torch.tensor([[1]], dtype=torch.
|
|
86
|
+
idx, input_pos = torch.tensor([[1]], dtype=torch.long), torch.tensor(
|
|
87
87
|
[10], dtype=torch.int64
|
|
88
88
|
)
|
|
89
89
|
|
|
@@ -109,7 +109,7 @@ class TestModelConversion(unittest.TestCase):
|
|
|
109
109
|
pytorch_model = tiny_llama.TinyLLamma(config)
|
|
110
110
|
|
|
111
111
|
idx = torch.from_numpy(np.array([[1, 2, 3, 4]]))
|
|
112
|
-
tokens = torch.full((1, 10), 0, dtype=torch.
|
|
112
|
+
tokens = torch.full((1, 10), 0, dtype=torch.long, device="cpu")
|
|
113
113
|
tokens[0, :4] = idx
|
|
114
114
|
input_pos = torch.arange(0, 10)
|
|
115
115
|
|
|
@@ -135,13 +135,13 @@ class TestModelConversion(unittest.TestCase):
|
|
|
135
135
|
|
|
136
136
|
# prefill
|
|
137
137
|
seq_len = 10
|
|
138
|
-
prefill_tokens = torch.full((1, seq_len), 0, dtype=torch.
|
|
138
|
+
prefill_tokens = torch.full((1, seq_len), 0, dtype=torch.long, device="cpu")
|
|
139
139
|
prompt_token = torch.from_numpy(np.array([1, 2, 3, 4]))
|
|
140
140
|
prefill_tokens[0, : len(prompt_token)] = prompt_token
|
|
141
141
|
prefill_input_pos = torch.arange(0, seq_len)
|
|
142
142
|
|
|
143
143
|
# decode
|
|
144
|
-
decode_token = torch.tensor([[1]], dtype=torch.
|
|
144
|
+
decode_token = torch.tensor([[1]], dtype=torch.long)
|
|
145
145
|
decode_input_pos = torch.tensor([5], dtype=torch.int64)
|
|
146
146
|
|
|
147
147
|
edge_model = (
|
|
@@ -183,7 +183,7 @@ class TestModelConversion(unittest.TestCase):
|
|
|
183
183
|
model = gemma.Gemma(config)
|
|
184
184
|
|
|
185
185
|
idx = torch.from_numpy(np.array([[1, 2, 3, 4]]))
|
|
186
|
-
tokens = torch.full((1, 10), 0, dtype=torch.
|
|
186
|
+
tokens = torch.full((1, 10), 0, dtype=torch.long, device="cpu")
|
|
187
187
|
tokens[0, :4] = idx
|
|
188
188
|
input_pos = torch.arange(0, 10)
|
|
189
189
|
|
|
@@ -210,7 +210,7 @@ class TestModelConversion(unittest.TestCase):
|
|
|
210
210
|
pytorch_model = phi2.Phi2(config)
|
|
211
211
|
|
|
212
212
|
idx = torch.from_numpy(np.array([[1, 2, 3, 4]]))
|
|
213
|
-
tokens = torch.full((1, 10), 0, dtype=torch.
|
|
213
|
+
tokens = torch.full((1, 10), 0, dtype=torch.long, device="cpu")
|
|
214
214
|
tokens[0, :4] = idx
|
|
215
215
|
input_pos = torch.arange(0, 10)
|
|
216
216
|
|
|
@@ -119,7 +119,7 @@ class TestQuantizeConvert(unittest.TestCase):
|
|
|
119
119
|
self.skipTest("b/346896669")
|
|
120
120
|
config = toy_model_with_kv_cache.get_model_config()
|
|
121
121
|
pytorch_model = toy_model_with_kv_cache.ToyModelWithKV(config)
|
|
122
|
-
idx, input_pos = torch.tensor([[1]], dtype=torch.
|
|
122
|
+
idx, input_pos = torch.tensor([[1]], dtype=torch.long), torch.tensor(
|
|
123
123
|
[10], dtype=torch.int64
|
|
124
124
|
)
|
|
125
125
|
|
|
@@ -137,7 +137,7 @@ class TestQuantizeConvert(unittest.TestCase):
|
|
|
137
137
|
self.skipTest("b/338288901")
|
|
138
138
|
config = toy_model_with_kv_cache.get_model_config()
|
|
139
139
|
pytorch_model = toy_model_with_kv_cache.ToyModelWithKV(config)
|
|
140
|
-
idx, input_pos = torch.tensor([[1]], dtype=torch.
|
|
140
|
+
idx, input_pos = torch.tensor([[1]], dtype=torch.long), torch.tensor(
|
|
141
141
|
[10], dtype=torch.int64
|
|
142
142
|
)
|
|
143
143
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ai-edge-torch-nightly
|
|
3
|
-
Version: 0.2.0.
|
|
3
|
+
Version: 0.2.0.dev20240702
|
|
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
|
|
@@ -36,15 +36,15 @@ ai_edge_torch/experimental/__init__.py,sha256=hHLluseD2R0Hh4W6XZRIXY_dRQeYudjsrK
|
|
|
36
36
|
ai_edge_torch/generative/__init__.py,sha256=hHLluseD2R0Hh4W6XZRIXY_dRQeYudjsrKGf6LZz65g,671
|
|
37
37
|
ai_edge_torch/generative/examples/__init__.py,sha256=hHLluseD2R0Hh4W6XZRIXY_dRQeYudjsrKGf6LZz65g,671
|
|
38
38
|
ai_edge_torch/generative/examples/gemma/__init__.py,sha256=hHLluseD2R0Hh4W6XZRIXY_dRQeYudjsrKGf6LZz65g,671
|
|
39
|
-
ai_edge_torch/generative/examples/gemma/convert_to_tflite.py,sha256=
|
|
40
|
-
ai_edge_torch/generative/examples/gemma/gemma.py,sha256=
|
|
39
|
+
ai_edge_torch/generative/examples/gemma/convert_to_tflite.py,sha256=dZv3r24uHsTMokEdnl3nf7LpmV0q7FLnVtCuHn5AuUs,2538
|
|
40
|
+
ai_edge_torch/generative/examples/gemma/gemma.py,sha256=1lZfXGHmbII4rFu0U2B9NzlJCRhphxtmQtkCHQ39_uw,5935
|
|
41
41
|
ai_edge_torch/generative/examples/phi2/__init__.py,sha256=hHLluseD2R0Hh4W6XZRIXY_dRQeYudjsrKGf6LZz65g,671
|
|
42
|
-
ai_edge_torch/generative/examples/phi2/convert_to_tflite.py,sha256=
|
|
43
|
-
ai_edge_torch/generative/examples/phi2/phi2.py,sha256=
|
|
42
|
+
ai_edge_torch/generative/examples/phi2/convert_to_tflite.py,sha256=6nOuwx9q3AUlYcjXRRXSr_3M2JKqdJ-vUf-uE3VFYHE,2512
|
|
43
|
+
ai_edge_torch/generative/examples/phi2/phi2.py,sha256=PMhKC6JCAMYSj2F3UmWHWK4rTcXD-B6PuehaoDccRqk,5562
|
|
44
44
|
ai_edge_torch/generative/examples/stable_diffusion/__init__.py,sha256=hHLluseD2R0Hh4W6XZRIXY_dRQeYudjsrKGf6LZz65g,671
|
|
45
45
|
ai_edge_torch/generative/examples/stable_diffusion/attention.py,sha256=Lo4Dq7a3Kg-lyH56iqGtqCo5UaClQHRCTDdNagXGTo8,3535
|
|
46
|
-
ai_edge_torch/generative/examples/stable_diffusion/clip.py,sha256=
|
|
47
|
-
ai_edge_torch/generative/examples/stable_diffusion/convert_to_tflite.py,sha256=
|
|
46
|
+
ai_edge_torch/generative/examples/stable_diffusion/clip.py,sha256=qU1wVEcn_biwCuDguZljhlLGzpLIqgqC31Dh_lXquQc,3720
|
|
47
|
+
ai_edge_torch/generative/examples/stable_diffusion/convert_to_tflite.py,sha256=wVEjsKd5JCIiYf5GF19rOXs2NHscZh0D69mxaS4f0Sk,4182
|
|
48
48
|
ai_edge_torch/generative/examples/stable_diffusion/decoder.py,sha256=RgxedILk7iNMb0mhE4VkCs6d7BnFzYhR3vspUkC0-1o,11425
|
|
49
49
|
ai_edge_torch/generative/examples/stable_diffusion/diffusion.py,sha256=sRevfsmCun7zbceJbOstLKNUsLwzQDsGm7Mi2JmlREg,26021
|
|
50
50
|
ai_edge_torch/generative/examples/stable_diffusion/encoder.py,sha256=mgbxkeFDMkNIGmnbcFTIFPu8EWKokghiviYIOB2lE3Q,3437
|
|
@@ -57,16 +57,16 @@ ai_edge_torch/generative/examples/stable_diffusion/samplers/k_euler_ancestral.py
|
|
|
57
57
|
ai_edge_torch/generative/examples/stable_diffusion/samplers/k_lms.py,sha256=iPYX9ZSaxwSak2KI44j6TEr_g4pdxS3xpka4u0trjbo,2788
|
|
58
58
|
ai_edge_torch/generative/examples/stable_diffusion/samplers/sampler.py,sha256=5iRfU5MO6GR6K3WrdddIU_9U7ZZGEEb7zGKVY1WFl-8,1340
|
|
59
59
|
ai_edge_torch/generative/examples/t5/__init__.py,sha256=hHLluseD2R0Hh4W6XZRIXY_dRQeYudjsrKGf6LZz65g,671
|
|
60
|
-
ai_edge_torch/generative/examples/t5/convert_to_tflite.py,sha256=
|
|
61
|
-
ai_edge_torch/generative/examples/t5/t5.py,sha256=
|
|
60
|
+
ai_edge_torch/generative/examples/t5/convert_to_tflite.py,sha256=bWtwtUacvJOEDUpuYvLTgkP7oTkXKJA-Tf4FPxlD1Cw,4536
|
|
61
|
+
ai_edge_torch/generative/examples/t5/t5.py,sha256=L6YrVzUEzP-Imb8W28LdukFGrx1aWSzz1kyYK_9RFZM,21087
|
|
62
62
|
ai_edge_torch/generative/examples/t5/t5_attention.py,sha256=rkMwi-NJGBXHm5S57Rsj1LbcoVdyRkS7GmIBuU6F_2E,8274
|
|
63
63
|
ai_edge_torch/generative/examples/test_models/__init__.py,sha256=hHLluseD2R0Hh4W6XZRIXY_dRQeYudjsrKGf6LZz65g,671
|
|
64
|
-
ai_edge_torch/generative/examples/test_models/toy_model.py,sha256=
|
|
65
|
-
ai_edge_torch/generative/examples/test_models/toy_model_with_external_kv_cache.py,sha256=
|
|
66
|
-
ai_edge_torch/generative/examples/test_models/toy_model_with_kv_cache.py,sha256=
|
|
64
|
+
ai_edge_torch/generative/examples/test_models/toy_model.py,sha256=CUXsQ_IU96NaCg9jyfeKI0Zz2iWDkJUsPJyPR1Pgz7I,3813
|
|
65
|
+
ai_edge_torch/generative/examples/test_models/toy_model_with_external_kv_cache.py,sha256=zwCmCnhr-vhBwHqv9i7xMasdBGVNqAGxZvWsncsJn58,5543
|
|
66
|
+
ai_edge_torch/generative/examples/test_models/toy_model_with_kv_cache.py,sha256=lfYUiem_Pbn3vGgPx84BeI8n7rN3-1fImwCLm8Eo2U8,4853
|
|
67
67
|
ai_edge_torch/generative/examples/tiny_llama/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
68
|
-
ai_edge_torch/generative/examples/tiny_llama/convert_to_tflite.py,sha256=
|
|
69
|
-
ai_edge_torch/generative/examples/tiny_llama/tiny_llama.py,sha256=
|
|
68
|
+
ai_edge_torch/generative/examples/tiny_llama/convert_to_tflite.py,sha256=E4I5OlC4zyl5cxiiu7uTED-zcwYRu210lP1zuT3xLBE,2566
|
|
69
|
+
ai_edge_torch/generative/examples/tiny_llama/tiny_llama.py,sha256=IFRLPG9wz_aLl_zV_6CETCjSM03ukA6bZqqyDLVACuw,5651
|
|
70
70
|
ai_edge_torch/generative/fx_passes/__init__.py,sha256=aXvYiaHDvETIrh0Q9DDZA_ZBiazGk80DT6nt7lLtC1o,1172
|
|
71
71
|
ai_edge_torch/generative/fx_passes/remove_sdpa_zero_mask_pass.py,sha256=IehLwFNwa0C9fnk1pmNmyfuAwwWbuwdyKy46BSqNVdI,1948
|
|
72
72
|
ai_edge_torch/generative/layers/__init__.py,sha256=hHLluseD2R0Hh4W6XZRIXY_dRQeYudjsrKGf6LZz65g,671
|
|
@@ -84,7 +84,7 @@ ai_edge_torch/generative/layers/unet/blocks_2d.py,sha256=H45wsXA6iJi_Mjd66NiQrh7
|
|
|
84
84
|
ai_edge_torch/generative/layers/unet/builder.py,sha256=NmJiZ2-e1wbv9jnvI3VCyUJlONV5ZAOz-RTc7ipAZ5U,1872
|
|
85
85
|
ai_edge_torch/generative/layers/unet/model_config.py,sha256=FrIO-CR8aRIV2i8aFqom_4S7WCEDLMyYwo6U0oFyn7A,9097
|
|
86
86
|
ai_edge_torch/generative/quantize/__init__.py,sha256=hHLluseD2R0Hh4W6XZRIXY_dRQeYudjsrKGf6LZz65g,671
|
|
87
|
-
ai_edge_torch/generative/quantize/example.py,sha256=
|
|
87
|
+
ai_edge_torch/generative/quantize/example.py,sha256=t-YwyKSPAG-OZC1DfH-0vfie2RHHpTSQjxUY-tmhu5g,1543
|
|
88
88
|
ai_edge_torch/generative/quantize/quant_attrs.py,sha256=n1Fm8BFC8gJa_oiwwAOOghJyHtOXYZ4q-5ZRy4pHrIw,1957
|
|
89
89
|
ai_edge_torch/generative/quantize/quant_recipe.py,sha256=Y8zahKw7b_h7ajPaJZVef4jG-MoqImRCpVSbFtV_i24,5139
|
|
90
90
|
ai_edge_torch/generative/quantize/quant_recipe_utils.py,sha256=-vd6Qp0BdXJVKg4f0_hhwbKOi3QPIAPVqyXnJ-ZnISQ,1915
|
|
@@ -94,8 +94,8 @@ ai_edge_torch/generative/quantize/ai_edge_quantizer_glue/__init__.py,sha256=47DE
|
|
|
94
94
|
ai_edge_torch/generative/quantize/ai_edge_quantizer_glue/translate_recipe.py,sha256=qUB4f2DoB14dLkNPWf6TZodpT81mfAJeWM-lCAmkuHY,5735
|
|
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
|
-
ai_edge_torch/generative/test/test_model_conversion.py,sha256=
|
|
98
|
-
ai_edge_torch/generative/test/test_quantize.py,sha256=
|
|
97
|
+
ai_edge_torch/generative/test/test_model_conversion.py,sha256=LsPTrLC1I4JW2GowTS3V9Eu257vLHr2Yj5f_qaFUX84,7589
|
|
98
|
+
ai_edge_torch/generative/test/test_quantize.py,sha256=IjCbCPWzIgXk3s7y7SJsg2usIxhOqs3PuhFvEYR4Sdw,5388
|
|
99
99
|
ai_edge_torch/generative/utilities/__init__.py,sha256=-_jxnnFnCgnTU4oTm4MnRsvL5lqhomBNdFBbqfmfHPo,720
|
|
100
100
|
ai_edge_torch/generative/utilities/loader.py,sha256=Hs92478j1g4jQGvbdP1aWvOy907HjwqQZE-NFy6HELo,11326
|
|
101
101
|
ai_edge_torch/generative/utilities/stable_diffusion_loader.py,sha256=7ChqrnthD7I-Be6vkRvYTRhbGQ3tqMbikLpjY5HpSzE,30890
|
|
@@ -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=EIyKz-HY70DguWuSrJal8LpYXQ5ZSEUf3ZrVl7jikFM,4286
|
|
117
|
-
ai_edge_torch_nightly-0.2.0.
|
|
118
|
-
ai_edge_torch_nightly-0.2.0.
|
|
119
|
-
ai_edge_torch_nightly-0.2.0.
|
|
120
|
-
ai_edge_torch_nightly-0.2.0.
|
|
121
|
-
ai_edge_torch_nightly-0.2.0.
|
|
117
|
+
ai_edge_torch_nightly-0.2.0.dev20240702.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
118
|
+
ai_edge_torch_nightly-0.2.0.dev20240702.dist-info/METADATA,sha256=yNbT2nyEGorcu8dwcB351bUhe0SLBaFWGhwOUBJE9zA,1748
|
|
119
|
+
ai_edge_torch_nightly-0.2.0.dev20240702.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
120
|
+
ai_edge_torch_nightly-0.2.0.dev20240702.dist-info/top_level.txt,sha256=5KXRaF2hwkApYxf7Y8y_tVb9aulGTlbOoNdbx1aKRkE,14
|
|
121
|
+
ai_edge_torch_nightly-0.2.0.dev20240702.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|