mediapipe-nightly 0.10.10.post20240220__cp310-cp310-macosx_11_0_universal2.whl → 0.10.10.post20240222__cp310-cp310-macosx_11_0_universal2.whl
Sign up to get free protection for your applications and to get access to all the features.
- mediapipe/__init__.py +1 -1
- mediapipe/model_maker/__init__.py +0 -1
- mediapipe/python/_framework_bindings.cpython-310-darwin.so +0 -0
- mediapipe/tasks/python/genai/converter/llm_converter.py +9 -7
- mediapipe/tasks/python/genai/converter/weight_bins_writer.py +2 -1
- mediapipe/version.txt +1 -1
- {mediapipe_nightly-0.10.10.post20240220.dist-info → mediapipe_nightly-0.10.10.post20240222.dist-info}/METADATA +1 -1
- {mediapipe_nightly-0.10.10.post20240220.dist-info → mediapipe_nightly-0.10.10.post20240222.dist-info}/RECORD +10 -10
- {mediapipe_nightly-0.10.10.post20240220.dist-info → mediapipe_nightly-0.10.10.post20240222.dist-info}/LICENSE +0 -0
- {mediapipe_nightly-0.10.10.post20240220.dist-info → mediapipe_nightly-0.10.10.post20240222.dist-info}/WHEEL +0 -0
- {mediapipe_nightly-0.10.10.post20240220.dist-info → mediapipe_nightly-0.10.10.post20240222.dist-info}/top_level.txt +0 -0
mediapipe/__init__.py
CHANGED
@@ -22,7 +22,6 @@ from mediapipe.model_maker.python.vision import gesture_recognizer
|
|
22
22
|
from mediapipe.model_maker.python.text import text_classifier
|
23
23
|
from mediapipe.model_maker.python.vision import object_detector
|
24
24
|
from mediapipe.model_maker.python.vision import face_stylizer
|
25
|
-
from mediapipe.model_maker.python.llm import llm_converter
|
26
25
|
|
27
26
|
# Remove duplicated and non-public API
|
28
27
|
del python
|
Binary file
|
@@ -107,6 +107,7 @@ def quantize_by_actions(
|
|
107
107
|
)
|
108
108
|
output_tensors[action.target_name] = (target_var, pack)
|
109
109
|
output_tensors[action.target_name + '_quantized_scale'] = (scale, False)
|
110
|
+
zp = None
|
110
111
|
else:
|
111
112
|
target_var, scale, zp = quantization_util.quantize_tensor(
|
112
113
|
var=action.tensor_value,
|
@@ -114,12 +115,13 @@ def quantize_by_actions(
|
|
114
115
|
sym=is_symmetric,
|
115
116
|
number_bits=action.quantize_bits,
|
116
117
|
)
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
118
|
+
if backend == 'cpu' and pack:
|
119
|
+
target_var, scale, zp = quantization_util.update_to_uint4(
|
120
|
+
target_var, scale, zp
|
121
|
+
)
|
122
|
+
output_tensors[action.target_name] = (target_var, pack)
|
123
|
+
output_tensors[action.target_name + '_quantized_scale'] = (scale, False)
|
124
|
+
if zp is not None:
|
123
125
|
output_tensors[action.target_name + '_quantized_zp'] = (zp, False)
|
124
126
|
else:
|
125
127
|
output_tensors[action.target_name] = (action.tensor_value, False)
|
@@ -170,7 +172,7 @@ def convert_checkpoint(config: ConversionConfig) -> None:
|
|
170
172
|
"""Converts the checkpoint to tflite file."""
|
171
173
|
logging.info('input folder: %s', config.input_ckpt)
|
172
174
|
|
173
|
-
if config.model_type == 'GEMMA_2B':
|
175
|
+
if config.model_type == 'GEMMA_2B' or config.model_type == 'GEMINI_XXS':
|
174
176
|
vocab_model_path = config.vocab_model_file
|
175
177
|
else:
|
176
178
|
vocab_model_path = convert_bpe_vocab(
|
@@ -18,6 +18,7 @@ import contextlib
|
|
18
18
|
import os
|
19
19
|
from typing import Dict, Tuple
|
20
20
|
|
21
|
+
from jax import numpy as jnp
|
21
22
|
import numpy as np
|
22
23
|
|
23
24
|
from mediapipe.tasks.python.genai.converter import converter_base
|
@@ -65,7 +66,7 @@ class WeightBinsWriter(converter_base.ModelWriterBase):
|
|
65
66
|
output = np.expand_dims(np.ravel(output), axis=-1)
|
66
67
|
# Extra pack needed for 4 bit. We always pack the weights along the
|
67
68
|
# first dimension since the tensor has already been squeezed.
|
68
|
-
output = quantization_util.pack_4bit(output, 0)
|
69
|
+
output = quantization_util.pack_4bit(output, 0, jnp.int8)
|
69
70
|
if 'combined_qkv' in var_name:
|
70
71
|
var_name = removeprefix(var_name, 'mld_vars.')
|
71
72
|
var_name_q = var_name.replace('combined_qkv', 'q')
|
mediapipe/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.10.10-
|
1
|
+
0.10.10-20240222
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: mediapipe-nightly
|
3
|
-
Version: 0.10.10.
|
3
|
+
Version: 0.10.10.post20240222
|
4
4
|
Summary: MediaPipe is the simplest way for researchers and developers to build world-class ML solutions and applications for mobile, edge, cloud and the web.
|
5
5
|
Home-page: https://github.com/google/mediapipe
|
6
6
|
Author: The MediaPipe Authors
|
@@ -1,9 +1,9 @@
|
|
1
|
-
mediapipe_nightly-0.10.10.
|
2
|
-
mediapipe_nightly-0.10.10.
|
3
|
-
mediapipe_nightly-0.10.10.
|
4
|
-
mediapipe_nightly-0.10.10.
|
5
|
-
mediapipe_nightly-0.10.10.
|
6
|
-
mediapipe/__init__.py,sha256=
|
1
|
+
mediapipe_nightly-0.10.10.post20240222.dist-info/RECORD,,
|
2
|
+
mediapipe_nightly-0.10.10.post20240222.dist-info/LICENSE,sha256=hwfu8FM5h-_FsVXWR2HutuIHk_ULm9Gmja0c9HGdDtg,12331
|
3
|
+
mediapipe_nightly-0.10.10.post20240222.dist-info/WHEEL,sha256=M8b9ULkaMplgMtp3yPg8hIiqGMbYy3WJOJ_rS5NiMpg,111
|
4
|
+
mediapipe_nightly-0.10.10.post20240222.dist-info/top_level.txt,sha256=LG-epD1oIiiHFRqLp--7jacjB3dbx2RfMcLYjCIhmxU,175
|
5
|
+
mediapipe_nightly-0.10.10.post20240222.dist-info/METADATA,sha256=32IuxIGnRbKmTb6XVijrGFNetlc0e-DLsWLEqHjX-XA,9672
|
6
|
+
mediapipe/__init__.py,sha256=uTa99CSg30uPHWpJZuHzDEBWRUynS1q04LKUWDIkRjU,816
|
7
7
|
mediapipe/tasks/__init__.py,sha256=sVJS2p8J2PNVl8DLRPVY6KLpHenP_z3QVPRU0x_iL5g,571
|
8
8
|
mediapipe/tasks/python/__init__.py,sha256=wIM_WOWboOVI1MeehN8fkN_DjoA0MEBVw5mShAd8AS4,858
|
9
9
|
mediapipe/tasks/python/benchmark/__init__.py,sha256=epEucluzX0HinwBZoS7Tgb19j_qgfTuBf-vBkqemch8,587
|
@@ -95,9 +95,9 @@ mediapipe/tasks/python/genai/converter/converter_base.py,sha256=nRIhPYUg2pkUZcmw
|
|
95
95
|
mediapipe/tasks/python/genai/converter/pytorch_converter.py,sha256=RiuCr2aXbZVn3Ssa3OcSx_RQK56rfZRCpvG7qYIji4w,10675
|
96
96
|
mediapipe/tasks/python/genai/converter/__init__.py,sha256=jfUkinDJR5BVldnbJMbo5vIr2Xc5Z4TTnaCJTNoAUvg,893
|
97
97
|
mediapipe/tasks/python/genai/converter/converter_factory.py,sha256=2K16PZBQym0WhXM2HOdBMHMugykohoD4OTaOIo-UKko,2928
|
98
|
-
mediapipe/tasks/python/genai/converter/llm_converter.py,sha256=
|
98
|
+
mediapipe/tasks/python/genai/converter/llm_converter.py,sha256=srOhUwscJ6p4kICoi7bBdvkes5RvVfuHoUzh1HRsU6k,7827
|
99
99
|
mediapipe/tasks/python/genai/converter/quantization_util_test.py,sha256=ICujhTFeREGuHGmNk1PlBpf1AUThFvv-Wl5UuZ-xWAk,9060
|
100
|
-
mediapipe/tasks/python/genai/converter/weight_bins_writer.py,sha256=
|
100
|
+
mediapipe/tasks/python/genai/converter/weight_bins_writer.py,sha256=qrsjTWw99u-VDNhtHbnbDfMypx4sGfGyY8mMBXYnQtA,4347
|
101
101
|
mediapipe/tasks/python/metadata/metadata.py,sha256=EECQnM-Af0angD60jaBBOuNMgt7HExH6SqVtVMFNHGc,33763
|
102
102
|
mediapipe/tasks/python/metadata/metadata_displayer_cli.py,sha256=tLhF0B1mXG0igFTA9nPh8t1efRpRw2hQ00XpTPYdk_o,1202
|
103
103
|
mediapipe/tasks/python/metadata/__init__.py,sha256=YGHXQMz1ZGPcNgSXggu03b0USZKE8d9Xqvn6NDUl898,586
|
@@ -306,7 +306,7 @@ mediapipe/util/analytics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
306
306
|
mediapipe/util/analytics/mediapipe_log_extension_pb2.py,sha256=UX1x8jckc8NQbUz-SXOKkb8co3JNIRX3rfaMs4_Dz8g,4319
|
307
307
|
mediapipe/util/analytics/mediapipe_logging_enums_pb2.py,sha256=9pxs-DNSQnXQe7E_LKokGDbD_G1FpmzzJw1jzex78lU,3781
|
308
308
|
mediapipe/python/solution_base.py,sha256=48PszV6dCssQUkyPBaqhqVehVjPtskawtGUc54k10DM,25624
|
309
|
-
mediapipe/python/_framework_bindings.cpython-310-darwin.so,sha256=
|
309
|
+
mediapipe/python/_framework_bindings.cpython-310-darwin.so,sha256=ExhUiSH2ac-IeDy3npL960Sfq6sJW5zdELdwwHE-RDI,78071347
|
310
310
|
mediapipe/python/timestamp_test.py,sha256=oWKTZMsV586jH57OBV30rihcymETyGC29VbYURNLJQQ,2528
|
311
311
|
mediapipe/python/image_frame_test.py,sha256=ZSjdE-an2t8i6MiA4_Xri91VMH5_CCx45fjhWUQptMY,8602
|
312
312
|
mediapipe/python/__init__.py,sha256=xTuq4e55ofMUGUpV81ZbVzYHmjMmzt9dBOfS4ugFN1c,1428
|
@@ -382,7 +382,7 @@ mediapipe/framework/stream_handler/fixed_size_input_stream_handler_pb2.py,sha256
|
|
382
382
|
mediapipe/framework/stream_handler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
383
383
|
mediapipe/framework/stream_handler/timestamp_align_input_stream_handler_pb2.py,sha256=Te6j6EgjmL5w3qs4kk5SnkJILDkua9cNQM0GQfNv2PY,1604
|
384
384
|
mediapipe/framework/stream_handler/sync_set_input_stream_handler_pb2.py,sha256=ld5VHlpCHO1NFaEjXMsRxAoiDKzsd1cvmQMTqTWcNwU,1811
|
385
|
-
mediapipe/model_maker/__init__.py,sha256=
|
385
|
+
mediapipe/model_maker/__init__.py,sha256=IswWcmeOPaRBNNdVp3K6m_ISXrI9_Enxnp-1kiaUEKs,1153
|
386
386
|
mediapipe/model_maker/setup.py,sha256=GaOQVu7uTMp3gjpDHIVV45GEnLvSrgvg-BJoJAJXMbI,4064
|
387
387
|
mediapipe/examples/__init__.py,sha256=bglKd2k2C7QGT1i-vstURXPJX2Cvq9FO9opr6cVeBp0,571
|
388
388
|
mediapipe/examples/desktop/__init__.py,sha256=bglKd2k2C7QGT1i-vstURXPJX2Cvq9FO9opr6cVeBp0,571
|
File without changes
|
File without changes
|
File without changes
|