| program(1.3) |
| [buildInfo = dict<string, string>({{"coremlc-component-MIL", "3510.2.1"}, {"coremlc-version", "3500.32.1"}, {"coremltools-component-torch", "2.10.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "9.0"}})] |
| { |
| func main<ios18>(tensor<int32, [1]> input_ids) { |
| int32 embed_batch_dims_0 = const()[name = string("embed_batch_dims_0"), val = int32(0)]; |
| bool embed_validate_indices_0 = const()[name = string("embed_validate_indices_0"), val = bool(false)]; |
| tensor<fp16, [3072, 1024]> codec_embedding_weight_to_fp16 = const()[name = string("codec_embedding_weight_to_fp16"), val = tensor<fp16, [3072, 1024]>(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_2_dtype_0 = const()[name = string("cast_2_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_5")]; |
| tensor<int32, [1]> cast_2 = cast(dtype = cast_2_dtype_0, x = input_ids_to_int16)[name = string("cast_4")]; |
| tensor<bool, [1]> greater_equal_0 = greater_equal(x = cast_2, 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(3072)]; |
| tensor<int32, [1]> add_0 = add(x = cast_2, y = slice_by_index_0)[name = string("add_0")]; |
| tensor<int32, [1]> select_0 = select(a = cast_2, b = add_0, cond = greater_equal_0)[name = string("select_0")]; |
| int32 embed_cast_fp16_cast_uint16_axis_0 = const()[name = string("embed_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_3")]; |
| tensor<fp16, [1, 1024]> embed_cast_fp16_cast_uint16_cast_uint16 = gather(axis = embed_cast_fp16_cast_uint16_axis_0, batch_dims = embed_batch_dims_0, indices = select_0_to_int16, validate_indices = embed_validate_indices_0, x = codec_embedding_weight_to_fp16)[name = string("embed_cast_fp16_cast_uint16_cast_uint16")]; |
| tensor<int32, [1]> var_8_axes_0 = const()[name = string("op_8_axes_0"), val = tensor<int32, [1]>([-1])]; |
| tensor<fp16, [1, 1024, 1]> var_8_cast_fp16 = expand_dims(axes = var_8_axes_0, x = embed_cast_fp16_cast_uint16_cast_uint16)[name = string("op_8_cast_fp16")]; |
| tensor<int32, [1]> var_10_axes_0 = const()[name = string("op_10_axes_0"), val = tensor<int32, [1]>([-1])]; |
| tensor<fp16, [1, 1024, 1, 1]> input_embeds = expand_dims(axes = var_10_axes_0, x = var_8_cast_fp16)[name = string("op_10_cast_fp16")]; |
| } -> (input_embeds); |
| } |