program(1.0) [buildInfo = dict, tensor>({{"coremlc-component-MIL", "3510.2.1"}, {"coremlc-version", "3500.32.1"}, {"coremltools-component-torch", "2.10.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "8.1"}})] { func main(tensor c, tensor h, tensor token) { tensor y_1_axis_0 = const()[name = tensor("y_1_axis_0"), val = tensor(0)]; tensor y_1_batch_dims_0 = const()[name = tensor("y_1_batch_dims_0"), val = tensor(0)]; tensor y_1_validate_indices_0 = const()[name = tensor("y_1_validate_indices_0"), val = tensor(false)]; tensor decoder_prediction_embed_weight_to_fp16 = const()[name = tensor("decoder_prediction_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 token_to_int16 = cast(dtype = token_to_int16_dtype_0, x = token)[name = tensor("cast_6")]; tensor y_1_cast_fp16_cast_uint16 = gather(axis = y_1_axis_0, batch_dims = y_1_batch_dims_0, indices = token_to_int16, validate_indices = y_1_validate_indices_0, x = decoder_prediction_embed_weight_to_fp16)[name = tensor("y_1_cast_fp16_cast_uint16")]; tensor input_1_perm_0 = const()[name = tensor("input_1_perm_0"), val = tensor([1, 0, 2])]; tensor split_0_num_splits_0 = const()[name = tensor("split_0_num_splits_0"), val = tensor(2)]; tensor split_0_axis_0 = const()[name = tensor("split_0_axis_0"), val = tensor(0)]; tensor split_0_cast_fp16_0, tensor split_0_cast_fp16_1 = split(axis = split_0_axis_0, num_splits = split_0_num_splits_0, x = h)[name = tensor("split_0_cast_fp16")]; tensor split_1_num_splits_0 = const()[name = tensor("split_1_num_splits_0"), val = tensor(2)]; tensor split_1_axis_0 = const()[name = tensor("split_1_axis_0"), val = tensor(0)]; tensor split_1_cast_fp16_0, tensor split_1_cast_fp16_1 = split(axis = split_1_axis_0, num_splits = split_1_num_splits_0, x = c)[name = tensor("split_1_cast_fp16")]; tensor input0_1_lstm_layer_0_lstm_h0_squeeze_axes_0 = const()[name = tensor("input0_1_lstm_layer_0_lstm_h0_squeeze_axes_0"), val = tensor([0])]; tensor input0_1_lstm_layer_0_lstm_h0_squeeze_cast_fp16 = squeeze(axes = input0_1_lstm_layer_0_lstm_h0_squeeze_axes_0, x = split_0_cast_fp16_0)[name = tensor("input0_1_lstm_layer_0_lstm_h0_squeeze_cast_fp16")]; tensor input0_1_lstm_layer_0_lstm_c0_squeeze_axes_0 = const()[name = tensor("input0_1_lstm_layer_0_lstm_c0_squeeze_axes_0"), val = tensor([0])]; tensor input0_1_lstm_layer_0_lstm_c0_squeeze_cast_fp16 = squeeze(axes = input0_1_lstm_layer_0_lstm_c0_squeeze_axes_0, x = split_1_cast_fp16_0)[name = tensor("input0_1_lstm_layer_0_lstm_c0_squeeze_cast_fp16")]; tensor input0_1_lstm_layer_0_direction_0 = const()[name = tensor("input0_1_lstm_layer_0_direction_0"), val = tensor("forward")]; tensor input0_1_lstm_layer_0_output_sequence_0 = const()[name = tensor("input0_1_lstm_layer_0_output_sequence_0"), val = tensor(true)]; tensor input0_1_lstm_layer_0_recurrent_activation_0 = const()[name = tensor("input0_1_lstm_layer_0_recurrent_activation_0"), val = tensor("sigmoid")]; tensor input0_1_lstm_layer_0_cell_activation_0 = const()[name = tensor("input0_1_lstm_layer_0_cell_activation_0"), val = tensor("tanh")]; tensor input0_1_lstm_layer_0_activation_0 = const()[name = tensor("input0_1_lstm_layer_0_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(10487168)))]; tensor concat_2_to_fp16 = const()[name = tensor("concat_2_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(13764032)))]; tensor concat_0_to_fp16 = const()[name = tensor("concat_0_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(17040896)))]; tensor input_1_cast_fp16 = transpose(perm = input_1_perm_0, x = y_1_cast_fp16_cast_uint16)[name = tensor("transpose_1")]; tensor input0_1_lstm_layer_0_cast_fp16_0, tensor input0_1_lstm_layer_0_cast_fp16_1, tensor input0_1_lstm_layer_0_cast_fp16_2 = lstm(activation = input0_1_lstm_layer_0_activation_0, bias = concat_0_to_fp16, cell_activation = input0_1_lstm_layer_0_cell_activation_0, direction = input0_1_lstm_layer_0_direction_0, initial_c = input0_1_lstm_layer_0_lstm_c0_squeeze_cast_fp16, initial_h = input0_1_lstm_layer_0_lstm_h0_squeeze_cast_fp16, output_sequence = input0_1_lstm_layer_0_output_sequence_0, recurrent_activation = input0_1_lstm_layer_0_recurrent_activation_0, weight_hh = concat_2_to_fp16, weight_ih = concat_1_to_fp16, x = input_1_cast_fp16)[name = tensor("input0_1_lstm_layer_0_cast_fp16")]; tensor input0_1_lstm_h0_squeeze_axes_0 = const()[name = tensor("input0_1_lstm_h0_squeeze_axes_0"), val = tensor([0])]; tensor input0_1_lstm_h0_squeeze_cast_fp16 = squeeze(axes = input0_1_lstm_h0_squeeze_axes_0, x = split_0_cast_fp16_1)[name = tensor("input0_1_lstm_h0_squeeze_cast_fp16")]; tensor input0_1_lstm_c0_squeeze_axes_0 = const()[name = tensor("input0_1_lstm_c0_squeeze_axes_0"), val = tensor([0])]; tensor input0_1_lstm_c0_squeeze_cast_fp16 = squeeze(axes = input0_1_lstm_c0_squeeze_axes_0, x = split_1_cast_fp16_1)[name = tensor("input0_1_lstm_c0_squeeze_cast_fp16")]; tensor input0_1_direction_0 = const()[name = tensor("input0_1_direction_0"), val = tensor("forward")]; tensor input0_1_output_sequence_0 = const()[name = tensor("input0_1_output_sequence_0"), val = tensor(true)]; tensor input0_1_recurrent_activation_0 = const()[name = tensor("input0_1_recurrent_activation_0"), val = tensor("sigmoid")]; tensor input0_1_cell_activation_0 = const()[name = tensor("input0_1_cell_activation_0"), val = tensor("tanh")]; tensor input0_1_activation_0 = const()[name = tensor("input0_1_activation_0"), val = tensor("tanh")]; tensor concat_4_to_fp16 = const()[name = tensor("concat_4_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(17046080)))]; tensor concat_5_to_fp16 = const()[name = tensor("concat_5_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(20322944)))]; tensor concat_3_to_fp16 = const()[name = tensor("concat_3_to_fp16"), val = tensor(BLOBFILE(path = tensor("@model_path/weights/weight.bin"), offset = tensor(23599808)))]; tensor input0_1_cast_fp16_0, tensor input0_1_cast_fp16_1, tensor input0_1_cast_fp16_2 = lstm(activation = input0_1_activation_0, bias = concat_3_to_fp16, cell_activation = input0_1_cell_activation_0, direction = input0_1_direction_0, initial_c = input0_1_lstm_c0_squeeze_cast_fp16, initial_h = input0_1_lstm_h0_squeeze_cast_fp16, output_sequence = input0_1_output_sequence_0, recurrent_activation = input0_1_recurrent_activation_0, weight_hh = concat_5_to_fp16, weight_ih = concat_4_to_fp16, x = input0_1_lstm_layer_0_cast_fp16_0)[name = tensor("input0_1_cast_fp16")]; tensor var_33_axis_0 = const()[name = tensor("op_33_axis_0"), val = tensor(0)]; tensor h_out = stack(axis = var_33_axis_0, values = (input0_1_lstm_layer_0_cast_fp16_1, input0_1_cast_fp16_1))[name = tensor("op_33_cast_fp16")]; tensor var_34_axis_0 = const()[name = tensor("op_34_axis_0"), val = tensor(0)]; tensor c_out = stack(axis = var_34_axis_0, values = (input0_1_lstm_layer_0_cast_fp16_2, input0_1_cast_fp16_2))[name = tensor("op_34_cast_fp16")]; tensor var_44_perm_0 = const()[name = tensor("op_44_perm_0"), val = tensor([1, 0, 2])]; tensor decoder_output = transpose(perm = var_44_perm_0, x = input0_1_cast_fp16_0)[name = tensor("transpose_0")]; } -> (decoder_output, h_out, c_out); }