program(1.0) [buildInfo = dict, tensor>({{"coremlc-component-MIL", "3510.2.1"}, {"coremlc-version", "3500.32.1"}, {"coremltools-component-torch", "2.7.1"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "9.0"}})] { func main(tensor input_ids) [FlexibleShapeInformation = tuple, dict, tensor>>, tuple, dict, list, ?>>>>((("DefaultShapes", {{"input_ids", [1, 1]}}), ("RangeDims", {{"input_ids", [[1, 1], [1, 64]]}})))] { tensor var_7 = const()[name = tensor("op_7"), val = tensor(128)]; tensor var_14 = const()[name = tensor("op_14"), val = tensor(0)]; tensor var_16 = const()[name = tensor("op_16"), val = tensor(-1)]; tensor var_17 = const()[name = tensor("op_17"), val = tensor(1)]; tensor var_23_shape = shape(x = input_ids)[name = tensor("op_23_shape")]; tensor gather_0_indices_0 = const()[name = tensor("gather_0_indices_0"), val = tensor(1)]; tensor gather_0_axis_0 = const()[name = tensor("gather_0_axis_0"), val = tensor(0)]; tensor gather_0_batch_dims_0 = const()[name = tensor("gather_0_batch_dims_0"), val = tensor(0)]; tensor gather_0 = gather(axis = gather_0_axis_0, batch_dims = gather_0_batch_dims_0, indices = gather_0_indices_0, x = var_23_shape)[name = tensor("gather_0")]; tensor var_27_axis_0 = const()[name = tensor("op_27_axis_0"), val = tensor(0)]; tensor var_27_batch_dims_0 = const()[name = tensor("op_27_batch_dims_0"), val = tensor(0)]; tensor encoder_embed_tokens_weight_to_fp16 = const()[name = tensor("encoder_embed_tokens_weight_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(64)))]; tensor var_27_cast_fp16 = gather(axis = var_27_axis_0, batch_dims = var_27_batch_dims_0, indices = input_ids, x = encoder_embed_tokens_weight_to_fp16)[name = tensor("op_27_cast_fp16")]; tensor const_0 = const()[name = tensor("const_0"), val = tensor(1)]; tensor var_37 = range_1d(end = gather_0, start = var_14, step = const_0)[name = tensor("op_37")]; tensor concat_1 = const()[name = tensor("concat_1"), val = tensor([1, -1])]; tensor expand_dims_0_axes_0 = const()[name = tensor("expand_dims_0_axes_0"), val = tensor([0])]; tensor expand_dims_0 = expand_dims(axes = expand_dims_0_axes_0, x = var_37)[name = tensor("expand_dims_0")]; tensor shape_0 = shape(x = expand_dims_0)[name = tensor("shape_0")]; tensor equal_0 = const()[name = tensor("equal_0"), val = tensor([false, true])]; tensor select_0 = select(a = shape_0, b = concat_1, cond = equal_0)[name = tensor("select_0")]; tensor real_div_0 = real_div(x = select_0, y = shape_0)[name = tensor("real_div_0")]; tensor positions = tile(reps = real_div_0, x = expand_dims_0)[name = tensor("positions")]; tensor var_40 = const()[name = tensor("op_40"), val = tensor(2)]; tensor input_3 = add(x = positions, y = var_40)[name = tensor("input_3")]; tensor embed_pos_1_axis_0 = const()[name = tensor("embed_pos_1_axis_0"), val = tensor(0)]; tensor embed_pos_1_batch_dims_0 = const()[name = tensor("embed_pos_1_batch_dims_0"), val = tensor(0)]; tensor encoder_embed_positions_weight_to_fp16 = const()[name = tensor("encoder_embed_positions_weight_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(16256)))]; tensor embed_pos_1_cast_fp16 = gather(axis = embed_pos_1_axis_0, batch_dims = embed_pos_1_batch_dims_0, indices = input_3, x = encoder_embed_positions_weight_to_fp16)[name = tensor("embed_pos_1_cast_fp16")]; tensor input_5_cast_fp16 = add(x = var_27_cast_fp16, y = embed_pos_1_cast_fp16)[name = tensor("input_5_cast_fp16")]; tensor input_7_axes_0 = const()[name = tensor("input_7_axes_0"), val = tensor([-1])]; tensor encoder_layernorm_embedding_weight_to_fp16 = const()[name = tensor("encoder_layernorm_embedding_weight_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(33216)))]; tensor encoder_layernorm_embedding_bias_to_fp16 = const()[name = tensor("encoder_layernorm_embedding_bias_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(33536)))]; tensor var_8_to_fp16 = const()[name = tensor("op_8_to_fp16"), val = tensor(0x1.5p-17)]; tensor input_7_cast_fp16 = layer_norm(axes = input_7_axes_0, beta = encoder_layernorm_embedding_bias_to_fp16, epsilon = var_8_to_fp16, gamma = encoder_layernorm_embedding_weight_to_fp16, x = input_5_cast_fp16)[name = tensor("input_7_cast_fp16")]; tensor var_59_shape_cast_fp16 = shape(x = input_7_cast_fp16)[name = tensor("op_59_shape_cast_fp16")]; tensor gather_3_indices_0 = const()[name = tensor("gather_3_indices_0"), val = tensor(0)]; tensor gather_3_axis_0 = const()[name = tensor("gather_3_axis_0"), val = tensor(0)]; tensor gather_3_batch_dims_0 = const()[name = tensor("gather_3_batch_dims_0"), val = tensor(0)]; tensor gather_3 = gather(axis = gather_3_axis_0, batch_dims = gather_3_batch_dims_0, indices = gather_3_indices_0, x = var_59_shape_cast_fp16)[name = tensor("gather_3")]; tensor gather_4_indices_0 = const()[name = tensor("gather_4_indices_0"), val = tensor(1)]; tensor gather_4_axis_0 = const()[name = tensor("gather_4_axis_0"), val = tensor(0)]; tensor gather_4_batch_dims_0 = const()[name = tensor("gather_4_batch_dims_0"), val = tensor(0)]; tensor gather_4 = gather(axis = gather_4_axis_0, batch_dims = gather_4_batch_dims_0, indices = gather_4_indices_0, x = var_59_shape_cast_fp16)[name = tensor("gather_4")]; tensor encoder_layers_0_self_attn_q_proj_weight_to_fp16 = const()[name = tensor("encoder_layers_0_self_attn_q_proj_weight_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(33856)))]; tensor encoder_layers_0_self_attn_q_proj_bias_to_fp16 = const()[name = tensor("encoder_layers_0_self_attn_q_proj_bias_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(66688)))]; tensor linear_0_cast_fp16 = linear(bias = encoder_layers_0_self_attn_q_proj_bias_to_fp16, weight = encoder_layers_0_self_attn_q_proj_weight_to_fp16, x = input_7_cast_fp16)[name = tensor("linear_0_cast_fp16")]; tensor encoder_layers_0_self_attn_k_proj_weight_to_fp16 = const()[name = tensor("encoder_layers_0_self_attn_k_proj_weight_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(67008)))]; tensor encoder_layers_0_self_attn_k_proj_bias_to_fp16 = const()[name = tensor("encoder_layers_0_self_attn_k_proj_bias_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(99840)))]; tensor linear_1_cast_fp16 = linear(bias = encoder_layers_0_self_attn_k_proj_bias_to_fp16, weight = encoder_layers_0_self_attn_k_proj_weight_to_fp16, x = input_7_cast_fp16)[name = tensor("linear_1_cast_fp16")]; tensor concat_2_axis_0 = const()[name = tensor("concat_2_axis_0"), val = tensor(0)]; tensor concat_2_interleave_0 = const()[name = tensor("concat_2_interleave_0"), val = tensor(false)]; tensor concat_2 = concat(axis = concat_2_axis_0, interleave = concat_2_interleave_0, values = (gather_3, var_16, var_17, var_7))[name = tensor("concat_2")]; tensor var_68_cast_fp16 = reshape(shape = concat_2, x = linear_1_cast_fp16)[name = tensor("op_68_cast_fp16")]; tensor encoder_layers_0_self_attn_v_proj_weight_to_fp16 = const()[name = tensor("encoder_layers_0_self_attn_v_proj_weight_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(100160)))]; tensor encoder_layers_0_self_attn_v_proj_bias_to_fp16 = const()[name = tensor("encoder_layers_0_self_attn_v_proj_bias_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(132992)))]; tensor linear_2_cast_fp16 = linear(bias = encoder_layers_0_self_attn_v_proj_bias_to_fp16, weight = encoder_layers_0_self_attn_v_proj_weight_to_fp16, x = input_7_cast_fp16)[name = tensor("linear_2_cast_fp16")]; tensor var_75_cast_fp16 = reshape(shape = concat_2, x = linear_2_cast_fp16)[name = tensor("op_75_cast_fp16")]; tensor var_76_perm_0 = const()[name = tensor("op_76_perm_0"), val = tensor([0, 2, 1, 3])]; tensor concat_4_axis_0 = const()[name = tensor("concat_4_axis_0"), val = tensor(0)]; tensor concat_4_interleave_0 = const()[name = tensor("concat_4_interleave_0"), val = tensor(false)]; tensor concat_4 = concat(axis = concat_4_axis_0, interleave = concat_4_interleave_0, values = (gather_3, gather_4, var_17, var_7))[name = tensor("concat_4")]; tensor var_79_cast_fp16 = reshape(shape = concat_4, x = linear_0_cast_fp16)[name = tensor("op_79_cast_fp16")]; tensor mul_0_y_0_to_fp16 = const()[name = tensor("mul_0_y_0_to_fp16"), val = tensor(0x1.6ap-4)]; tensor mul_0_cast_fp16 = mul(x = var_79_cast_fp16, y = mul_0_y_0_to_fp16)[name = tensor("mul_0_cast_fp16")]; tensor matmul_0_transpose_y_0 = const()[name = tensor("matmul_0_transpose_y_0"), val = tensor(true)]; tensor matmul_0_transpose_x_0 = const()[name = tensor("matmul_0_transpose_x_0"), val = tensor(false)]; tensor transpose_4_perm_0 = const()[name = tensor("transpose_4_perm_0"), val = tensor([0, 2, -3, -1])]; tensor transpose_5_perm_0 = const()[name = tensor("transpose_5_perm_0"), val = tensor([0, 2, -3, -1])]; tensor transpose_5 = transpose(perm = transpose_5_perm_0, x = var_68_cast_fp16)[name = tensor("transpose_7")]; tensor transpose_4 = transpose(perm = transpose_4_perm_0, x = mul_0_cast_fp16)[name = tensor("transpose_8")]; tensor matmul_0_cast_fp16 = matmul(transpose_x = matmul_0_transpose_x_0, transpose_y = matmul_0_transpose_y_0, x = transpose_4, y = transpose_5)[name = tensor("matmul_0_cast_fp16")]; tensor softmax_0_axis_0 = const()[name = tensor("softmax_0_axis_0"), val = tensor(-1)]; tensor softmax_0_cast_fp16 = softmax(axis = softmax_0_axis_0, x = matmul_0_cast_fp16)[name = tensor("softmax_0_cast_fp16")]; tensor attn_output_1_transpose_x_0 = const()[name = tensor("attn_output_1_transpose_x_0"), val = tensor(false)]; tensor attn_output_1_transpose_y_0 = const()[name = tensor("attn_output_1_transpose_y_0"), val = tensor(false)]; tensor var_76_cast_fp16 = transpose(perm = var_76_perm_0, x = var_75_cast_fp16)[name = tensor("transpose_9")]; tensor attn_output_1_cast_fp16 = matmul(transpose_x = attn_output_1_transpose_x_0, transpose_y = attn_output_1_transpose_y_0, x = softmax_0_cast_fp16, y = var_76_cast_fp16)[name = tensor("attn_output_1_cast_fp16")]; tensor attn_output_perm_0 = const()[name = tensor("attn_output_perm_0"), val = tensor([0, 2, 1, 3])]; tensor concat_5_axis_0 = const()[name = tensor("concat_5_axis_0"), val = tensor(0)]; tensor concat_5_interleave_0 = const()[name = tensor("concat_5_interleave_0"), val = tensor(false)]; tensor concat_5 = concat(axis = concat_5_axis_0, interleave = concat_5_interleave_0, values = (gather_3, gather_4, var_7))[name = tensor("concat_5")]; tensor attn_output_cast_fp16 = transpose(perm = attn_output_perm_0, x = attn_output_1_cast_fp16)[name = tensor("transpose_6")]; tensor input_9_cast_fp16 = reshape(shape = concat_5, x = attn_output_cast_fp16)[name = tensor("input_9_cast_fp16")]; tensor encoder_layers_0_self_attn_out_proj_weight_to_fp16 = const()[name = tensor("encoder_layers_0_self_attn_out_proj_weight_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(133312)))]; tensor encoder_layers_0_self_attn_out_proj_bias_to_fp16 = const()[name = tensor("encoder_layers_0_self_attn_out_proj_bias_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(166144)))]; tensor linear_3_cast_fp16 = linear(bias = encoder_layers_0_self_attn_out_proj_bias_to_fp16, weight = encoder_layers_0_self_attn_out_proj_weight_to_fp16, x = input_9_cast_fp16)[name = tensor("linear_3_cast_fp16")]; tensor input_13_cast_fp16 = add(x = input_7_cast_fp16, y = linear_3_cast_fp16)[name = tensor("input_13_cast_fp16")]; tensor input_15_axes_0 = const()[name = tensor("input_15_axes_0"), val = tensor([-1])]; tensor encoder_layers_0_self_attn_layer_norm_weight_to_fp16 = const()[name = tensor("encoder_layers_0_self_attn_layer_norm_weight_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(166464)))]; tensor encoder_layers_0_self_attn_layer_norm_bias_to_fp16 = const()[name = tensor("encoder_layers_0_self_attn_layer_norm_bias_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(166784)))]; tensor input_15_cast_fp16 = layer_norm(axes = input_15_axes_0, beta = encoder_layers_0_self_attn_layer_norm_bias_to_fp16, epsilon = var_8_to_fp16, gamma = encoder_layers_0_self_attn_layer_norm_weight_to_fp16, x = input_13_cast_fp16)[name = tensor("input_15_cast_fp16")]; tensor encoder_layers_0_fc1_weight_to_fp16 = const()[name = tensor("encoder_layers_0_fc1_weight_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(167104)))]; tensor encoder_layers_0_fc1_bias_to_fp16 = const()[name = tensor("encoder_layers_0_fc1_bias_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(429312)))]; tensor linear_4_cast_fp16 = linear(bias = encoder_layers_0_fc1_bias_to_fp16, weight = encoder_layers_0_fc1_weight_to_fp16, x = input_15_cast_fp16)[name = tensor("linear_4_cast_fp16")]; tensor input_19_mode_0 = const()[name = tensor("input_19_mode_0"), val = tensor("EXACT")]; tensor input_19_cast_fp16 = gelu(mode = input_19_mode_0, x = linear_4_cast_fp16)[name = tensor("input_19_cast_fp16")]; tensor encoder_layers_0_fc2_weight_to_fp16 = const()[name = tensor("encoder_layers_0_fc2_weight_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(431424)))]; tensor encoder_layers_0_fc2_bias_to_fp16 = const()[name = tensor("encoder_layers_0_fc2_bias_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(693632)))]; tensor linear_5_cast_fp16 = linear(bias = encoder_layers_0_fc2_bias_to_fp16, weight = encoder_layers_0_fc2_weight_to_fp16, x = input_19_cast_fp16)[name = tensor("linear_5_cast_fp16")]; tensor input_cast_fp16 = add(x = input_15_cast_fp16, y = linear_5_cast_fp16)[name = tensor("input_cast_fp16")]; tensor var_108_axes_0 = const()[name = tensor("op_108_axes_0"), val = tensor([-1])]; tensor encoder_layers_0_final_layer_norm_weight_to_fp16 = const()[name = tensor("encoder_layers_0_final_layer_norm_weight_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(693952)))]; tensor encoder_layers_0_final_layer_norm_bias_to_fp16 = const()[name = tensor("encoder_layers_0_final_layer_norm_bias_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(694272)))]; tensor encoder_hidden_states = layer_norm(axes = var_108_axes_0, beta = encoder_layers_0_final_layer_norm_bias_to_fp16, epsilon = var_8_to_fp16, gamma = encoder_layers_0_final_layer_norm_weight_to_fp16, x = input_cast_fp16)[name = tensor("op_108_cast_fp16")]; } -> (encoder_hidden_states); }