hand
This commit is contained in:
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+27
@@ -0,0 +1,27 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: mediapipe/tasks/cc/genai/inference/calculators/detokenizer_calculator.proto
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf.internal import builder as _builder
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nKmediapipe/tasks/cc/genai/inference/calculators/detokenizer_calculator.proto\x12\x10odml.infra.proto\"q\n\x1c\x44\x65tokenizerCalculatorOptions\x12\x16\n\x0espm_model_file\x18\x01 \x01(\t\x12\x13\n\x0bstop_tokens\x18\x04 \x03(\t\x12\x18\n\x10num_output_heads\x18\x05 \x01(\x05J\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04\x42@\n\x1b\x63om.google.odml.infra.protoB!DetokenizerCalculatorOptionsProtob\x06proto3')
|
||||
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mediapipe.tasks.cc.genai.inference.calculators.detokenizer_calculator_pb2', _globals)
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
_globals['DESCRIPTOR']._options = None
|
||||
_globals['DESCRIPTOR']._serialized_options = b'\n\033com.google.odml.infra.protoB!DetokenizerCalculatorOptionsProto'
|
||||
_globals['_DETOKENIZERCALCULATOROPTIONS']._serialized_start=97
|
||||
_globals['_DETOKENIZERCALCULATOROPTIONS']._serialized_end=210
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: mediapipe/tasks/cc/genai/inference/calculators/llm_gpu_calculator.proto
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf.internal import builder as _builder
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
from mediapipe.tasks.cc.genai.inference.proto import llm_file_metadata_pb2 as mediapipe_dot_tasks_dot_cc_dot_genai_dot_inference_dot_proto_dot_llm__file__metadata__pb2
|
||||
from mediapipe.tasks.cc.genai.inference.proto import llm_params_pb2 as mediapipe_dot_tasks_dot_cc_dot_genai_dot_inference_dot_proto_dot_llm__params__pb2
|
||||
from mediapipe.tasks.cc.genai.inference.proto import sampler_params_pb2 as mediapipe_dot_tasks_dot_cc_dot_genai_dot_inference_dot_proto_dot_sampler__params__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nGmediapipe/tasks/cc/genai/inference/calculators/llm_gpu_calculator.proto\x12\x10odml.infra.proto\x1a@mediapipe/tasks/cc/genai/inference/proto/llm_file_metadata.proto\x1a\x39mediapipe/tasks/cc/genai/inference/proto/llm_params.proto\x1a=mediapipe/tasks/cc/genai/inference/proto/sampler_params.proto\"\xf8\x04\n\x17LlmGpuCalculatorOptions\x12\x13\n\x0bweight_path\x18\x01 \x01(\t\x12N\n\x0egpu_model_info\x18\n \x01(\x0b\x32\x36.odml.infra.proto.LlmGpuCalculatorOptions.GpuModelInfo\x12\x19\n\x11num_decode_tokens\x18\x0c \x01(\x05\x12\x1b\n\x13sequence_batch_size\x18\x0e \x01(\x05\x12\x11\n\tlora_path\x18\x13 \x01(\t\x12\x37\n\x0ellm_parameters\x18\x14 \x01(\x0b\x32\x1f.odml.infra.proto.LlmParameters\x12\x18\n\x10num_output_heads\x18\x16 \x01(\x05\x12\x12\n\nlora_ranks\x18\x1d \x03(\x05\x12;\n\x0esampler_params\x18\x1f \x01(\x0b\x32#.odml.infra.proto.SamplerParameters\x1a\xc0\x01\n\x0cGpuModelInfo\x12\x1c\n\x14\x61llow_precision_loss\x18\x01 \x01(\x08\x12\x1a\n\x12\x65nable_fast_tuning\x18\x02 \x01(\x08\x12\x1b\n\x13\x65nable_winograd_opt\x18\x03 \x01(\x08\x12\x15\n\ruse_low_power\x18\x04 \x01(\x08\x12\x1e\n\x16prefer_texture_weights\x18\x05 \x01(\x08\x12\"\n\x1a\x65nable_host_mapped_pointer\x18\x06 \x01(\x08J\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06J\x04\x08\x06\x10\x07J\x04\x08\x07\x10\x08J\x04\x08\x08\x10\tJ\x04\x08\t\x10\nJ\x04\x08\x0b\x10\x0cJ\x04\x08\r\x10\x0eJ\x04\x08\x17\x10\x1cJ\x04\x08\x1e\x10\x1f\x42;\n\x1b\x63om.google.odml.infra.protoB\x1cLlmGpuCalculatorOptionsProtob\x06proto3')
|
||||
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mediapipe.tasks.cc.genai.inference.calculators.llm_gpu_calculator_pb2', _globals)
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
_globals['DESCRIPTOR']._options = None
|
||||
_globals['DESCRIPTOR']._serialized_options = b'\n\033com.google.odml.infra.protoB\034LlmGpuCalculatorOptionsProto'
|
||||
_globals['_LLMGPUCALCULATOROPTIONS']._serialized_start=282
|
||||
_globals['_LLMGPUCALCULATOROPTIONS']._serialized_end=914
|
||||
_globals['_LLMGPUCALCULATOROPTIONS_GPUMODELINFO']._serialized_start=650
|
||||
_globals['_LLMGPUCALCULATOROPTIONS_GPUMODELINFO']._serialized_end=842
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: mediapipe/tasks/cc/genai/inference/calculators/model_data_calculator.proto
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf.internal import builder as _builder
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nJmediapipe/tasks/cc/genai/inference/calculators/model_data_calculator.proto\x12\x10odml.infra.proto\"\\\n\x1aModelDataCalculatorOptions\x12\x13\n\x0bweight_path\x18\x01 \x01(\t\x12\x11\n\tlora_path\x18\x02 \x01(\t\x12\x16\n\x0espm_model_file\x18\x03 \x01(\tB>\n\x1b\x63om.google.odml.infra.protoB\x1fModelDataCalculatorOptionsProtob\x06proto3')
|
||||
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mediapipe.tasks.cc.genai.inference.calculators.model_data_calculator_pb2', _globals)
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
_globals['DESCRIPTOR']._options = None
|
||||
_globals['DESCRIPTOR']._serialized_options = b'\n\033com.google.odml.infra.protoB\037ModelDataCalculatorOptionsProto'
|
||||
_globals['_MODELDATACALCULATOROPTIONS']._serialized_start=96
|
||||
_globals['_MODELDATACALCULATOROPTIONS']._serialized_end=188
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: mediapipe/tasks/cc/genai/inference/calculators/tokenizer_calculator.proto
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf.internal import builder as _builder
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nImediapipe/tasks/cc/genai/inference/calculators/tokenizer_calculator.proto\x12\x10odml.infra.proto\"\x8d\x02\n\x1aTokenizerCalculatorOptions\x12\x12\n\nmax_tokens\x18\x01 \x01(\x05\x12\x18\n\x0espm_model_file\x18\x02 \x01(\tH\x00\x12Y\n\x11tflite_model_file\x18\x04 \x01(\x0b\x32<.odml.infra.proto.TokenizerCalculatorOptions.TfLiteModelFileH\x00\x12\x16\n\x0estart_token_id\x18\x03 \x01(\x05\x1a:\n\x0fTfLiteModelFile\x12!\n\x19spm_model_key_in_metadata\x18\x02 \x01(\tJ\x04\x08\x01\x10\x02\x42\x0c\n\nmodel_fileJ\x04\x08\x05\x10\x06\x42>\n\x1b\x63om.google.odml.infra.protoB\x1fTokenizerCalculatorOptionsProtob\x06proto3')
|
||||
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mediapipe.tasks.cc.genai.inference.calculators.tokenizer_calculator_pb2', _globals)
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
_globals['DESCRIPTOR']._options = None
|
||||
_globals['DESCRIPTOR']._serialized_options = b'\n\033com.google.odml.infra.protoB\037TokenizerCalculatorOptionsProto'
|
||||
_globals['_TOKENIZERCALCULATOROPTIONS']._serialized_start=96
|
||||
_globals['_TOKENIZERCALCULATOROPTIONS']._serialized_end=365
|
||||
_globals['_TOKENIZERCALCULATOROPTIONS_TFLITEMODELFILE']._serialized_start=287
|
||||
_globals['_TOKENIZERCALCULATOROPTIONS_TFLITEMODELFILE']._serialized_end=345
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+32
@@ -0,0 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: mediapipe/tasks/cc/genai/inference/proto/llm_file_metadata.proto
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf.internal import builder as _builder
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
from mediapipe.tasks.cc.genai.inference.proto import llm_params_pb2 as mediapipe_dot_tasks_dot_cc_dot_genai_dot_inference_dot_proto_dot_llm__params__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n@mediapipe/tasks/cc/genai/inference/proto/llm_file_metadata.proto\x12\x10odml.infra.proto\x1a\x39mediapipe/tasks/cc/genai/inference/proto/llm_params.proto\"\xe8\x02\n\x0fLlmFileMetadata\x12=\n\x07tensors\x18\x01 \x03(\x0b\x32,.odml.infra.proto.LlmFileMetadata.TensorInfo\x12\x35\n\x0cmodel_params\x18\x02 \x01(\x0b\x32\x1f.odml.infra.proto.LlmParameters\x12\x11\n\tlora_rank\x18\x03 \x01(\x05\x1a\xcb\x01\n\nTensorInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06offset\x18\x02 \x01(\x04\x12\x0c\n\x04size\x18\x03 \x01(\x04\x12H\n\tdata_type\x18\x04 \x01(\x0e\x32\x35.odml.infra.proto.LlmFileMetadata.TensorInfo.DataType\"G\n\x08\x44\x61taType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07\x46LOAT32\x10\x01\x12\x08\n\x04INT8\x10\x02\x12\x08\n\x04INT4\x10\x03\x12\t\n\x05UINT4\x10\x04\x42\x33\n\x1b\x63om.google.odml.infra.protoB\x14LlmFileMetadataProtob\x06proto3')
|
||||
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mediapipe.tasks.cc.genai.inference.proto.llm_file_metadata_pb2', _globals)
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
_globals['DESCRIPTOR']._options = None
|
||||
_globals['DESCRIPTOR']._serialized_options = b'\n\033com.google.odml.infra.protoB\024LlmFileMetadataProto'
|
||||
_globals['_LLMFILEMETADATA']._serialized_start=146
|
||||
_globals['_LLMFILEMETADATA']._serialized_end=506
|
||||
_globals['_LLMFILEMETADATA_TENSORINFO']._serialized_start=303
|
||||
_globals['_LLMFILEMETADATA_TENSORINFO']._serialized_end=506
|
||||
_globals['_LLMFILEMETADATA_TENSORINFO_DATATYPE']._serialized_start=435
|
||||
_globals['_LLMFILEMETADATA_TENSORINFO_DATATYPE']._serialized_end=506
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: mediapipe/tasks/cc/genai/inference/proto/llm_params.proto
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf.internal import builder as _builder
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
from mediapipe.tasks.cc.genai.inference.proto import transformer_params_pb2 as mediapipe_dot_tasks_dot_cc_dot_genai_dot_inference_dot_proto_dot_transformer__params__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n9mediapipe/tasks/cc/genai/inference/proto/llm_params.proto\x12\x10odml.infra.proto\x1a\x41mediapipe/tasks/cc/genai/inference/proto/transformer_params.proto\"\xa1\x03\n\rLlmParameters\x12G\n\x16transformer_parameters\x18\x01 \x01(\x0b\x32\'.odml.infra.proto.TransformerParameters\x12\x12\n\nvocab_size\x18\x02 \x01(\x05\x12\x18\n\x0estart_token_id\x18\x04 \x01(\x05H\x00\x12\x15\n\x0bstart_token\x18\x06 \x01(\tH\x00\x12\x13\n\x0bstop_tokens\x18\x05 \x03(\t\x12]\n\x1binput_output_normalizations\x18\x07 \x03(\x0e\x32\x38.odml.infra.proto.LlmParameters.InputOutputNormalization\"s\n\x18InputOutputNormalization\x12&\n\"INPUT_OUTPUT_NORMALIZATION_UNKNOWN\x10\x00\x12/\n+INPUT_OUTPUT_NORMALIZATION_BYTES_TO_UNICODE\x10\x01\x42\x13\n\x11start_token_unionJ\x04\x08\x03\x10\x04*\x8a\x02\n\x0cLlmModelType\x12\x1a\n\x16LLM_MODEL_TYPE_UNKNOWN\x10\x00\x12\x1f\n\x1bLLM_MODEL_TYPE_FALCON_RW_1B\x10\x05\x12\x1b\n\x17LLM_MODEL_TYPE_GEMMA_2B\x10\x06\x12\x1b\n\x17LLM_MODEL_TYPE_GEMMA_7B\x10\x0c\x12#\n\x1fLLM_MODEL_TYPE_STABLELM_4E1T_3B\x10\x08\x12\x18\n\x14LLM_MODEL_TYPE_PHI_2\x10\x0b\x12\x1a\n\x16LLM_MODEL_TYPE_TF_LITE\x10\x64\"\x04\x08\x01\x10\x01\"\x04\x08\x02\x10\x02\"\x04\x08\x03\x10\x03\"\x04\x08\x04\x10\x04\"\x04\x08\x07\x10\x07\"\x04\x08\t\x10\t\"\x04\x08\n\x10\nB1\n\x1b\x63om.google.odml.infra.protoB\x12LLMParametersProtob\x06proto3')
|
||||
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mediapipe.tasks.cc.genai.inference.proto.llm_params_pb2', _globals)
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
_globals['DESCRIPTOR']._options = None
|
||||
_globals['DESCRIPTOR']._serialized_options = b'\n\033com.google.odml.infra.protoB\022LLMParametersProto'
|
||||
_globals['_LLMMODELTYPE']._serialized_start=567
|
||||
_globals['_LLMMODELTYPE']._serialized_end=833
|
||||
_globals['_LLMPARAMETERS']._serialized_start=147
|
||||
_globals['_LLMPARAMETERS']._serialized_end=564
|
||||
_globals['_LLMPARAMETERS_INPUTOUTPUTNORMALIZATION']._serialized_start=422
|
||||
_globals['_LLMPARAMETERS_INPUTOUTPUTNORMALIZATION']._serialized_end=537
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: mediapipe/tasks/cc/genai/inference/proto/sampler_params.proto
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf.internal import builder as _builder
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n=mediapipe/tasks/cc/genai/inference/proto/sampler_params.proto\x12\x10odml.infra.proto\"\xd2\x01\n\x11SamplerParameters\x12\x36\n\x04type\x18\x01 \x01(\x0e\x32(.odml.infra.proto.SamplerParameters.Type\x12\t\n\x01k\x18\x02 \x01(\x05\x12\t\n\x01p\x18\x03 \x01(\x02\x12\x13\n\x0btemperature\x18\x04 \x01(\x02\x12\x11\n\x04seed\x18\x05 \x01(\x05H\x00\x88\x01\x01\">\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TOP_K\x10\x01\x12\t\n\x05TOP_P\x10\x02\x12\n\n\x06GREEDY\x10\x03\x42\x07\n\x05_seedB5\n\x1b\x63om.google.odml.infra.protoB\x16SamplerParametersProtob\x06proto3')
|
||||
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mediapipe.tasks.cc.genai.inference.proto.sampler_params_pb2', _globals)
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
_globals['DESCRIPTOR']._options = None
|
||||
_globals['DESCRIPTOR']._serialized_options = b'\n\033com.google.odml.infra.protoB\026SamplerParametersProto'
|
||||
_globals['_SAMPLERPARAMETERS']._serialized_start=84
|
||||
_globals['_SAMPLERPARAMETERS']._serialized_end=294
|
||||
_globals['_SAMPLERPARAMETERS_TYPE']._serialized_start=223
|
||||
_globals['_SAMPLERPARAMETERS_TYPE']._serialized_end=285
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: mediapipe/tasks/cc/genai/inference/proto/transformer_params.proto
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf.internal import builder as _builder
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nAmediapipe/tasks/cc/genai/inference/proto/transformer_params.proto\x12\x10odml.infra.proto\"\xcd\r\n\x15TransformerParameters\x12\x12\n\nbatch_size\x18\x01 \x01(\x05\x12\x16\n\x0emax_seq_length\x18\x02 \x01(\x05\x12\x15\n\rembedding_dim\x18\x03 \x01(\x05\x12\x18\n\x10hidden_dimension\x18\x04 \x01(\x05\x12\x16\n\x0ehead_dimension\x18\x05 \x01(\x05\x12\x11\n\tnum_heads\x18\x06 \x01(\x05\x12\x12\n\nnum_stacks\x18\x07 \x01(\x05\x12\x14\n\x0cnum_kv_heads\x18\t \x01(\x05\x12^\n\x17\x66\x65\x65\x64_forward_parameters\x18\x0b \x01(\x0b\x32=.odml.infra.proto.TransformerParameters.FeedForwardParameters\x12`\n\x18\x66inal_project_parameters\x18\x0c \x01(\x0b\x32>.odml.infra.proto.TransformerParameters.FinalProjectParameters\x12>\n\x08pre_norm\x18\r \x01(\x0e\x32,.odml.infra.proto.TransformerParameters.Norm\x12?\n\tpost_norm\x18\x0e \x01(\x0e\x32,.odml.infra.proto.TransformerParameters.Norm\x12@\n\nfinal_norm\x18\x0f \x01(\x0e\x32,.odml.infra.proto.TransformerParameters.Norm\x12\x62\n\x19self_attention_parameters\x18\x10 \x01(\x0b\x32?.odml.infra.proto.TransformerParameters.SelfAttentionParameters\x12+\n#skip_absolute_positional_embeddings\x18\x12 \x01(\x08\x1a\xf1\x01\n\x15\x46\x65\x65\x64\x46orwardParameters\x12\x0f\n\x07no_bias\x18\x01 \x01(\x08\x12\x46\n\nactivation\x18\x02 \x01(\x0e\x32\x32.odml.infra.proto.TransformerParameters.Activation\x12>\n\x08pre_norm\x18\x03 \x01(\x0e\x32,.odml.infra.proto.TransformerParameters.Norm\x12?\n\tpost_norm\x18\x04 \x01(\x0e\x32,.odml.infra.proto.TransformerParameters.Norm\x1a\x41\n\x16\x46inalProjectParameters\x12\x0f\n\x07no_bias\x18\x01 \x01(\x08\x12\x16\n\x0esoft_cap_value\x18\x02 \x01(\x02\x1a\xb1\x02\n\x17SelfAttentionParameters\x12\x13\n\x0bqkv_no_bias\x18\x01 \x01(\x08\x12\x19\n\x11post_proj_no_bias\x18\x02 \x01(\x08\x12V\n\x13\x61ttention_mask_type\x18\x03 \x01(\x0e\x32\x39.odml.infra.proto.TransformerParameters.AttentionMaskType\x12\x16\n\x0esoft_cap_value\x18\x04 \x01(\x02\x12]\n\x14\x61ttention_scale_type\x18\x05 \x01(\x0e\x32:.odml.infra.proto.TransformerParameters.AttentionScaleTypeH\x00\x88\x01\x01\x42\x17\n\x15_attention_scale_type\"<\n\x11\x41ttentionMaskType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06\x43\x41USAL\x10\x01\x12\n\n\x06PREFIX\x10\x02\"F\n\nActivation\x12\x1a\n\x16\x41\x43TIVATION_UNSPECIFIED\x10\x00\x12\x08\n\x04GELU\x10\x01\x12\x08\n\x04SILU\x10\x02\x12\x08\n\x04RELU\x10\x03\"G\n\x04Norm\x12\x14\n\x10NORM_UNSPECIFIED\x10\x00\x12\x0b\n\x07NO_NORM\x10\x01\x12\x0c\n\x08RMS_NORM\x10\x02\x12\x0e\n\nLAYER_NORM\x10\x03\"\x9f\x01\n\x12\x41ttentionScaleType\x12\x1a\n\x16SCALE_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n\x18SCALE_TYPE_PER_DIM_SCALE\x10\x01\x12 \n\x1cSCALE_TYPE_INV_SQRT_HEAD_DIM\x10\x02\x12-\n)SCALE_TYPE_INV_SQRT_D_MODEL_DIV_NUM_HEADS\x10\x03J\x04\x08\x08\x10\tJ\x04\x08\n\x10\x0bJ\x04\x08\x11\x10\x12\x42\x39\n\x1b\x63om.google.odml.infra.protoB\x1aTransformerParametersProtob\x06proto3')
|
||||
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mediapipe.tasks.cc.genai.inference.proto.transformer_params_pb2', _globals)
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
_globals['DESCRIPTOR']._options = None
|
||||
_globals['DESCRIPTOR']._serialized_options = b'\n\033com.google.odml.infra.protoB\032TransformerParametersProto'
|
||||
_globals['_TRANSFORMERPARAMETERS']._serialized_start=88
|
||||
_globals['_TRANSFORMERPARAMETERS']._serialized_end=1829
|
||||
_globals['_TRANSFORMERPARAMETERS_FEEDFORWARDPARAMETERS']._serialized_start=826
|
||||
_globals['_TRANSFORMERPARAMETERS_FEEDFORWARDPARAMETERS']._serialized_end=1067
|
||||
_globals['_TRANSFORMERPARAMETERS_FINALPROJECTPARAMETERS']._serialized_start=1069
|
||||
_globals['_TRANSFORMERPARAMETERS_FINALPROJECTPARAMETERS']._serialized_end=1134
|
||||
_globals['_TRANSFORMERPARAMETERS_SELFATTENTIONPARAMETERS']._serialized_start=1137
|
||||
_globals['_TRANSFORMERPARAMETERS_SELFATTENTIONPARAMETERS']._serialized_end=1442
|
||||
_globals['_TRANSFORMERPARAMETERS_ATTENTIONMASKTYPE']._serialized_start=1444
|
||||
_globals['_TRANSFORMERPARAMETERS_ATTENTIONMASKTYPE']._serialized_end=1504
|
||||
_globals['_TRANSFORMERPARAMETERS_ACTIVATION']._serialized_start=1506
|
||||
_globals['_TRANSFORMERPARAMETERS_ACTIVATION']._serialized_end=1576
|
||||
_globals['_TRANSFORMERPARAMETERS_NORM']._serialized_start=1578
|
||||
_globals['_TRANSFORMERPARAMETERS_NORM']._serialized_end=1649
|
||||
_globals['_TRANSFORMERPARAMETERS_ATTENTIONSCALETYPE']._serialized_start=1652
|
||||
_globals['_TRANSFORMERPARAMETERS_ATTENTIONSCALETYPE']._serialized_end=1811
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user