program(1.0) [buildInfo = dict, tensor>({{"coremlc-component-MIL", "3605.1.1"}, {"coremlc-version", "3600.25.1"}, {"coremltools-component-torch", "2.15.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "9.0"}})] { func main(tensor c, tensor h, tensor token) { tensor input_3_batch_dims_0 = const()[name = tensor("input_3_batch_dims_0"), val = tensor(0)]; tensor input_3_validate_indices_0 = const()[name = tensor("input_3_validate_indices_0"), val = tensor(false)]; tensor embed_weight_to_fp16 = const()[name = tensor("embed_weight_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(64)))]; tensor token_to_int16_dtype_0 = const()[name = tensor("token_to_int16_dtype_0"), val = tensor("int16")]; tensor cast_7_dtype_0 = const()[name = tensor("cast_7_dtype_0"), val = tensor("int32")]; tensor greater_equal_0_y_0 = const()[name = tensor("greater_equal_0_y_0"), val = tensor(0)]; tensor token_to_int16 = cast(dtype = token_to_int16_dtype_0, x = token)[name = tensor("cast_10")]; tensor cast_7 = cast(dtype = cast_7_dtype_0, x = token_to_int16)[name = tensor("cast_9")]; tensor greater_equal_0 = greater_equal(x = cast_7, y = greater_equal_0_y_0)[name = tensor("greater_equal_0")]; tensor slice_by_index_0 = const()[name = tensor("slice_by_index_0"), val = tensor(641)]; tensor add_1 = add(x = cast_7, y = slice_by_index_0)[name = tensor("add_1")]; tensor select_0 = select(a = cast_7, b = add_1, cond = greater_equal_0)[name = tensor("select_0")]; tensor input_3_cast_fp16_cast_uint16_axis_0 = const()[name = tensor("input_3_cast_fp16_cast_uint16_axis_0"), val = tensor(0)]; tensor select_0_to_int16_dtype_0 = const()[name = tensor("select_0_to_int16_dtype_0"), val = tensor("int16")]; tensor select_0_to_int16 = cast(dtype = select_0_to_int16_dtype_0, x = select_0)[name = tensor("cast_8")]; tensor input_3_cast_fp16_cast_uint16_cast_uint16 = gather(axis = input_3_cast_fp16_cast_uint16_axis_0, batch_dims = input_3_batch_dims_0, indices = select_0_to_int16, validate_indices = input_3_validate_indices_0, x = embed_weight_to_fp16)[name = tensor("input_3_cast_fp16_cast_uint16_cast_uint16")]; tensor input_3_batch_first_transpose_perm_0 = const()[name = tensor("input_3_batch_first_transpose_perm_0"), val = tensor([1, 0, 2])]; tensor g_batch_first_lstm_h0_squeeze_axes_0 = const()[name = tensor("g_batch_first_lstm_h0_squeeze_axes_0"), val = tensor([0])]; tensor g_batch_first_lstm_h0_squeeze_cast_fp16 = squeeze(axes = g_batch_first_lstm_h0_squeeze_axes_0, x = h)[name = tensor("g_batch_first_lstm_h0_squeeze_cast_fp16")]; tensor g_batch_first_lstm_c0_squeeze_axes_0 = const()[name = tensor("g_batch_first_lstm_c0_squeeze_axes_0"), val = tensor([0])]; tensor g_batch_first_lstm_c0_squeeze_cast_fp16 = squeeze(axes = g_batch_first_lstm_c0_squeeze_axes_0, x = c)[name = tensor("g_batch_first_lstm_c0_squeeze_cast_fp16")]; tensor g_batch_first_direction_0 = const()[name = tensor("g_batch_first_direction_0"), val = tensor("forward")]; tensor g_batch_first_output_sequence_0 = const()[name = tensor("g_batch_first_output_sequence_0"), val = tensor(true)]; tensor g_batch_first_recurrent_activation_0 = const()[name = tensor("g_batch_first_recurrent_activation_0"), val = tensor("sigmoid")]; tensor g_batch_first_cell_activation_0 = const()[name = tensor("g_batch_first_cell_activation_0"), val = tensor("tanh")]; tensor g_batch_first_activation_0 = const()[name = tensor("g_batch_first_activation_0"), val = tensor("tanh")]; tensor concat_1_to_fp16 = const()[name = tensor("concat_1_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(820608)))]; tensor concat_2_to_fp16 = const()[name = tensor("concat_2_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(4097472)))]; tensor concat_0_to_fp16 = const()[name = tensor("concat_0_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(7374336)))]; tensor input_3_batch_first_transpose_cast_fp16 = transpose(perm = input_3_batch_first_transpose_perm_0, x = input_3_cast_fp16_cast_uint16_cast_uint16)[name = tensor("transpose_1")]; tensor g_batch_first_cast_fp16_0, tensor g_batch_first_cast_fp16_1, tensor g_batch_first_cast_fp16_2 = lstm(activation = g_batch_first_activation_0, bias = concat_0_to_fp16, cell_activation = g_batch_first_cell_activation_0, direction = g_batch_first_direction_0, initial_c = g_batch_first_lstm_c0_squeeze_cast_fp16, initial_h = g_batch_first_lstm_h0_squeeze_cast_fp16, output_sequence = g_batch_first_output_sequence_0, recurrent_activation = g_batch_first_recurrent_activation_0, weight_hh = concat_2_to_fp16, weight_ih = concat_1_to_fp16, x = input_3_batch_first_transpose_cast_fp16)[name = tensor("g_batch_first_cast_fp16")]; tensor g_perm_0 = const()[name = tensor("g_perm_0"), val = tensor([1, 0, 2])]; tensor var_27_axes_0 = const()[name = tensor("op_27_axes_0"), val = tensor([0])]; tensor h_out = expand_dims(axes = var_27_axes_0, x = g_batch_first_cast_fp16_1)[name = tensor("op_27_cast_fp16")]; tensor var_28_axes_0 = const()[name = tensor("op_28_axes_0"), val = tensor([0])]; tensor c_out = expand_dims(axes = var_28_axes_0, x = g_batch_first_cast_fp16_2)[name = tensor("op_28_cast_fp16")]; tensor var_35 = const()[name = tensor("op_35"), val = tensor([1, 640])]; tensor g_cast_fp16 = transpose(perm = g_perm_0, x = g_batch_first_cast_fp16_0)[name = tensor("transpose_0")]; tensor input_cast_fp16 = reshape(shape = var_35, x = g_cast_fp16)[name = tensor("input_cast_fp16")]; tensor pred_proj_weight_to_fp16 = const()[name = tensor("pred_proj_weight_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(7379520)))]; tensor pred_proj_bias_to_fp16 = const()[name = tensor("pred_proj_bias_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(8198784)))]; tensor g = linear(bias = pred_proj_bias_to_fp16, weight = pred_proj_weight_to_fp16, x = input_cast_fp16)[name = tensor("linear_0_cast_fp16")]; } -> (g, h_out, c_out); }