| program(1.3) |
| [buildInfo = dict<string, string>({{"coremlc-component-MIL", "3510.2.1"}, {"coremlc-version", "3500.32.1"}, {"coremltools-component-torch", "2.5.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "9.0"}})] |
| { |
| func main<ios18>(tensor<int32, [1, ?]> input_ids) [FlexibleShapeInformation = tuple<tuple<string, dict<string, tensor<int32, [?]>>>, tuple<string, dict<string, dict<string, tensor<int32, [?]>>>>>((("DefaultShapes", {{"input_ids", [1, 1]}}), ("EnumeratedShapes", {{"79ae981e", {{"input_ids", [1, 1]}}}, {"ed9b58c8", {{"input_ids", [1, 64]}}}})))] { |
| int32 hidden_states_batch_dims_0 = const()[name = string("hidden_states_batch_dims_0"), val = int32(0)]; |
| bool hidden_states_validate_indices_0 = const()[name = string("hidden_states_validate_indices_0"), val = bool(false)]; |
| tensor<fp16, [32256, 2048]> embed_tokens_weight_to_fp16 = const()[name = string("embed_tokens_weight_to_fp16"), val = tensor<fp16, [32256, 2048]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(64)))]; |
| string input_ids_to_int16_dtype_0 = const()[name = string("input_ids_to_int16_dtype_0"), val = string("int16")]; |
| string cast_1_dtype_0 = const()[name = string("cast_1_dtype_0"), val = string("int32")]; |
| int32 greater_equal_0_y_0 = const()[name = string("greater_equal_0_y_0"), val = int32(0)]; |
| tensor<int16, [1, ?]> input_ids_to_int16 = cast(dtype = input_ids_to_int16_dtype_0, x = input_ids)[name = string("cast_4")]; |
| tensor<int32, [1, ?]> cast_1 = cast(dtype = cast_1_dtype_0, x = input_ids_to_int16)[name = string("cast_3")]; |
| tensor<bool, [1, ?]> greater_equal_0 = greater_equal(x = cast_1, y = greater_equal_0_y_0)[name = string("greater_equal_0")]; |
| int32 slice_by_index_0 = const()[name = string("slice_by_index_0"), val = int32(32256)]; |
| tensor<int32, [1, ?]> add_0 = add(x = cast_1, y = slice_by_index_0)[name = string("add_0")]; |
| tensor<int32, [1, ?]> select_0 = select(a = cast_1, b = add_0, cond = greater_equal_0)[name = string("select_0")]; |
| int32 hidden_states_cast_fp16_cast_uint16_axis_0 = const()[name = string("hidden_states_cast_fp16_cast_uint16_axis_0"), val = int32(0)]; |
| string select_0_to_int16_dtype_0 = const()[name = string("select_0_to_int16_dtype_0"), val = string("int16")]; |
| tensor<int16, [1, ?]> select_0_to_int16 = cast(dtype = select_0_to_int16_dtype_0, x = select_0)[name = string("cast_2")]; |
| tensor<fp16, [1, ?, 2048]> hidden_states = gather(axis = hidden_states_cast_fp16_cast_uint16_axis_0, batch_dims = hidden_states_batch_dims_0, indices = select_0_to_int16, validate_indices = hidden_states_validate_indices_0, x = embed_tokens_weight_to_fp16)[name = string("hidden_states_cast_fp16_cast_uint16_cast_uint16")]; |
| } -> (hidden_states); |
| } |