mediapipe-nightly 0.10.10.post20240219__cp38-cp38-macosx_11_0_x86_64.whl → 0.10.10.post20240221__cp38-cp38-macosx_11_0_x86_64.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-38-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_nightly-0.10.10.post20240219.dist-info → mediapipe_nightly-0.10.10.post20240221.dist-info}/METADATA +1 -1
- {mediapipe_nightly-0.10.10.post20240219.dist-info → mediapipe_nightly-0.10.10.post20240221.dist-info}/RECORD +10 -10
- {mediapipe_nightly-0.10.10.post20240219.dist-info → mediapipe_nightly-0.10.10.post20240221.dist-info}/LICENSE +0 -0
- {mediapipe_nightly-0.10.10.post20240219.dist-info → mediapipe_nightly-0.10.10.post20240221.dist-info}/WHEEL +0 -0
- {mediapipe_nightly-0.10.10.post20240219.dist-info → mediapipe_nightly-0.10.10.post20240221.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')
|
@@ -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.post20240221
|
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,4 +1,4 @@
|
|
1
|
-
mediapipe/__init__.py,sha256=
|
1
|
+
mediapipe/__init__.py,sha256=HMF8PlJekLmUJA-rh8bf9X9ODy9JqwX9L3rOdHZMLZg,816
|
2
2
|
mediapipe/tasks/__init__.py,sha256=sVJS2p8J2PNVl8DLRPVY6KLpHenP_z3QVPRU0x_iL5g,571
|
3
3
|
mediapipe/tasks/python/__init__.py,sha256=wIM_WOWboOVI1MeehN8fkN_DjoA0MEBVw5mShAd8AS4,858
|
4
4
|
mediapipe/tasks/python/benchmark/__init__.py,sha256=epEucluzX0HinwBZoS7Tgb19j_qgfTuBf-vBkqemch8,587
|
@@ -90,9 +90,9 @@ mediapipe/tasks/python/genai/converter/converter_base.py,sha256=nRIhPYUg2pkUZcmw
|
|
90
90
|
mediapipe/tasks/python/genai/converter/pytorch_converter.py,sha256=RiuCr2aXbZVn3Ssa3OcSx_RQK56rfZRCpvG7qYIji4w,10675
|
91
91
|
mediapipe/tasks/python/genai/converter/__init__.py,sha256=jfUkinDJR5BVldnbJMbo5vIr2Xc5Z4TTnaCJTNoAUvg,893
|
92
92
|
mediapipe/tasks/python/genai/converter/converter_factory.py,sha256=2K16PZBQym0WhXM2HOdBMHMugykohoD4OTaOIo-UKko,2928
|
93
|
-
mediapipe/tasks/python/genai/converter/llm_converter.py,sha256=
|
93
|
+
mediapipe/tasks/python/genai/converter/llm_converter.py,sha256=srOhUwscJ6p4kICoi7bBdvkes5RvVfuHoUzh1HRsU6k,7827
|
94
94
|
mediapipe/tasks/python/genai/converter/quantization_util_test.py,sha256=ICujhTFeREGuHGmNk1PlBpf1AUThFvv-Wl5UuZ-xWAk,9060
|
95
|
-
mediapipe/tasks/python/genai/converter/weight_bins_writer.py,sha256=
|
95
|
+
mediapipe/tasks/python/genai/converter/weight_bins_writer.py,sha256=qrsjTWw99u-VDNhtHbnbDfMypx4sGfGyY8mMBXYnQtA,4347
|
96
96
|
mediapipe/tasks/python/metadata/metadata.py,sha256=EECQnM-Af0angD60jaBBOuNMgt7HExH6SqVtVMFNHGc,33763
|
97
97
|
mediapipe/tasks/python/metadata/metadata_displayer_cli.py,sha256=tLhF0B1mXG0igFTA9nPh8t1efRpRw2hQ00XpTPYdk_o,1202
|
98
98
|
mediapipe/tasks/python/metadata/__init__.py,sha256=YGHXQMz1ZGPcNgSXggu03b0USZKE8d9Xqvn6NDUl898,586
|
@@ -304,7 +304,7 @@ mediapipe/python/solution_base.py,sha256=48PszV6dCssQUkyPBaqhqVehVjPtskawtGUc54k
|
|
304
304
|
mediapipe/python/timestamp_test.py,sha256=oWKTZMsV586jH57OBV30rihcymETyGC29VbYURNLJQQ,2528
|
305
305
|
mediapipe/python/image_frame_test.py,sha256=ZSjdE-an2t8i6MiA4_Xri91VMH5_CCx45fjhWUQptMY,8602
|
306
306
|
mediapipe/python/__init__.py,sha256=xTuq4e55ofMUGUpV81ZbVzYHmjMmzt9dBOfS4ugFN1c,1428
|
307
|
-
mediapipe/python/_framework_bindings.cpython-38-darwin.so,sha256=
|
307
|
+
mediapipe/python/_framework_bindings.cpython-38-darwin.so,sha256=C97tVQkC3oAbifvlN0aaq3y_CDYQRxPRwryX98tvpK4,78070339
|
308
308
|
mediapipe/python/solution_base_test.py,sha256=1u5Lo4aEUrMKj8Ha_34XMyKnI-3A1AvpaX3MCI0b2MM,15632
|
309
309
|
mediapipe/python/packet_creator.py,sha256=34MBIMwykbZSLV-gdVYTzK8R07yzWV5yg1HuyRbS4d0,11414
|
310
310
|
mediapipe/python/packet_getter.py,sha256=QkBxKCjXrOC6j2dJ5zcVNGaPB6zjurKztQpW5kOYLj4,4205
|
@@ -377,7 +377,7 @@ mediapipe/framework/stream_handler/fixed_size_input_stream_handler_pb2.py,sha256
|
|
377
377
|
mediapipe/framework/stream_handler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
378
378
|
mediapipe/framework/stream_handler/timestamp_align_input_stream_handler_pb2.py,sha256=Te6j6EgjmL5w3qs4kk5SnkJILDkua9cNQM0GQfNv2PY,1604
|
379
379
|
mediapipe/framework/stream_handler/sync_set_input_stream_handler_pb2.py,sha256=ld5VHlpCHO1NFaEjXMsRxAoiDKzsd1cvmQMTqTWcNwU,1811
|
380
|
-
mediapipe/model_maker/__init__.py,sha256=
|
380
|
+
mediapipe/model_maker/__init__.py,sha256=IswWcmeOPaRBNNdVp3K6m_ISXrI9_Enxnp-1kiaUEKs,1153
|
381
381
|
mediapipe/model_maker/setup.py,sha256=GaOQVu7uTMp3gjpDHIVV45GEnLvSrgvg-BJoJAJXMbI,4064
|
382
382
|
mediapipe/examples/__init__.py,sha256=bglKd2k2C7QGT1i-vstURXPJX2Cvq9FO9opr6cVeBp0,571
|
383
383
|
mediapipe/examples/desktop/__init__.py,sha256=bglKd2k2C7QGT1i-vstURXPJX2Cvq9FO9opr6cVeBp0,571
|
@@ -559,8 +559,8 @@ mediapipe/modules/selfie_segmentation/selfie_segmentation.tflite,sha256=nuFo7HyP
|
|
559
559
|
mediapipe/modules/palm_detection/palm_detection_full.tflite,sha256=GxTpQixq0AbN5lgaRsi5DdVzwHq385NLVYnnzqP4mlQ,2339846
|
560
560
|
mediapipe/modules/palm_detection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
561
561
|
mediapipe/modules/palm_detection/palm_detection_lite.tflite,sha256=6aSq3fkN2laocjUwPPAOTC0_socl9o_Yh3KZfayQXBg,1985440
|
562
|
-
mediapipe_nightly-0.10.10.
|
563
|
-
mediapipe_nightly-0.10.10.
|
564
|
-
mediapipe_nightly-0.10.10.
|
565
|
-
mediapipe_nightly-0.10.10.
|
566
|
-
mediapipe_nightly-0.10.10.
|
562
|
+
mediapipe_nightly-0.10.10.post20240221.dist-info/RECORD,,
|
563
|
+
mediapipe_nightly-0.10.10.post20240221.dist-info/LICENSE,sha256=hwfu8FM5h-_FsVXWR2HutuIHk_ULm9Gmja0c9HGdDtg,12331
|
564
|
+
mediapipe_nightly-0.10.10.post20240221.dist-info/WHEEL,sha256=ne9oAesYhmqqzZoZWVnfbfuFiLIE1hGPUf33054jNWs,109
|
565
|
+
mediapipe_nightly-0.10.10.post20240221.dist-info/top_level.txt,sha256=LG-epD1oIiiHFRqLp--7jacjB3dbx2RfMcLYjCIhmxU,175
|
566
|
+
mediapipe_nightly-0.10.10.post20240221.dist-info/METADATA,sha256=n5NsAbtFC7eTYg8PVJytALqX5qMVya42iexL_nytaC4,9672
|
File without changes
|
File without changes
|
File without changes
|