program(1.3) [buildInfo = dict({{"coremlc-component-MIL", "3520.4.1"}, {"coremlc-version", "3520.5.1"}, {"coremltools-component-torch", "2.6.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "8.3.0"}})] { func main(tensor emotion_adv, tensor prompt_speech_tokens, tensor speaker_emb) { int32 prompt_emb_1_axis_0 = const()[name = string("prompt_emb_1_axis_0"), val = int32(0)]; int32 prompt_emb_1_batch_dims_0 = const()[name = string("prompt_emb_1_batch_dims_0"), val = int32(0)]; bool prompt_emb_1_validate_indices_0 = const()[name = string("prompt_emb_1_validate_indices_0"), val = bool(false)]; tensor speech_emb_weight_to_fp16 = const()[name = string("speech_emb_weight_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(64)))]; string prompt_speech_tokens_to_int16_dtype_0 = const()[name = string("prompt_speech_tokens_to_int16_dtype_0"), val = string("int16")]; tensor prompt_speech_tokens_to_int16 = cast(dtype = prompt_speech_tokens_to_int16_dtype_0, x = prompt_speech_tokens)[name = string("cast_18")]; tensor prompt_emb_1_cast_fp16_cast_uint16 = gather(axis = prompt_emb_1_axis_0, batch_dims = prompt_emb_1_batch_dims_0, indices = prompt_speech_tokens_to_int16, validate_indices = prompt_emb_1_validate_indices_0, x = speech_emb_weight_to_fp16)[name = string("prompt_emb_1_cast_fp16_cast_uint16")]; tensor var_31_to_fp16 = const()[name = string("op_31_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(16783488)))]; tensor h_1_cast_fp16 = add(x = prompt_emb_1_cast_fp16_cast_uint16, y = var_31_to_fp16)[name = string("h_1_cast_fp16")]; string speaker_emb_to_fp16_dtype_0 = const()[name = string("speaker_emb_to_fp16_dtype_0"), val = string("fp16")]; tensor cond_enc_spkr_enc_weight_to_fp16 = const()[name = string("cond_enc_spkr_enc_weight_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(17090752)))]; tensor cond_enc_spkr_enc_bias_to_fp16 = const()[name = string("cond_enc_spkr_enc_bias_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(17615104)))]; tensor speaker_emb_to_fp16 = cast(dtype = speaker_emb_to_fp16_dtype_0, x = speaker_emb)[name = string("cast_17")]; tensor linear_0_cast_fp16 = linear(bias = cond_enc_spkr_enc_bias_to_fp16, weight = cond_enc_spkr_enc_weight_to_fp16, x = speaker_emb_to_fp16)[name = string("linear_0_cast_fp16")]; tensor cond_spkr_axes_0 = const()[name = string("cond_spkr_axes_0"), val = tensor([1])]; tensor cond_spkr_cast_fp16 = expand_dims(axes = cond_spkr_axes_0, x = linear_0_cast_fp16)[name = string("cond_spkr_cast_fp16")]; tensor input_9_axes_0 = const()[name = string("input_9_axes_0"), val = tensor([-1])]; tensor cond_enc_perceiver_attn_norm_weight_to_fp16 = const()[name = string("cond_enc_perceiver_attn_norm_weight_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(17617216)))]; tensor cond_enc_perceiver_attn_norm_bias_to_fp16 = const()[name = string("cond_enc_perceiver_attn_norm_bias_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(17619328)))]; fp16 var_51_to_fp16 = const()[name = string("op_51_to_fp16"), val = fp16(0x1.5p-17)]; tensor input_9_cast_fp16 = layer_norm(axes = input_9_axes_0, beta = cond_enc_perceiver_attn_norm_bias_to_fp16, epsilon = var_51_to_fp16, gamma = cond_enc_perceiver_attn_norm_weight_to_fp16, x = h_1_cast_fp16)[name = string("input_9_cast_fp16")]; tensor cond_enc_perceiver_attn_to_k_weight_to_fp16 = const()[name = string("cond_enc_perceiver_attn_to_k_weight_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(17621440)))]; tensor cond_enc_perceiver_attn_to_k_bias_to_fp16 = const()[name = string("cond_enc_perceiver_attn_to_k_bias_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(19718656)))]; tensor linear_2_cast_fp16 = linear(bias = cond_enc_perceiver_attn_to_k_bias_to_fp16, weight = cond_enc_perceiver_attn_to_k_weight_to_fp16, x = input_9_cast_fp16)[name = string("linear_2_cast_fp16")]; tensor cond_enc_perceiver_attn_to_v_weight_to_fp16 = const()[name = string("cond_enc_perceiver_attn_to_v_weight_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(19720768)))]; tensor cond_enc_perceiver_attn_to_v_bias_to_fp16 = const()[name = string("cond_enc_perceiver_attn_to_v_bias_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(21817984)))]; tensor linear_3_cast_fp16 = linear(bias = cond_enc_perceiver_attn_to_v_bias_to_fp16, weight = cond_enc_perceiver_attn_to_v_weight_to_fp16, x = input_9_cast_fp16)[name = string("linear_3_cast_fp16")]; tensor var_99 = const()[name = string("op_99"), val = tensor([1, 150, 4, 256])]; tensor x_7_cast_fp16 = reshape(shape = var_99, x = linear_2_cast_fp16)[name = string("x_7_cast_fp16")]; tensor var_105 = const()[name = string("op_105"), val = tensor([1, 150, 4, 256])]; tensor x_11_cast_fp16 = reshape(shape = var_105, x = linear_3_cast_fp16)[name = string("x_11_cast_fp16")]; tensor q_1_to_fp16 = const()[name = string("q_1_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(21820096)))]; tensor transpose_10_perm_0 = const()[name = string("transpose_10_perm_0"), val = tensor([0, 2, 1, 3])]; tensor transpose_11_perm_0 = const()[name = string("transpose_11_perm_0"), val = tensor([0, 2, 1, 3])]; tensor transpose_11 = transpose(perm = transpose_11_perm_0, x = x_11_cast_fp16)[name = string("transpose_20")]; tensor transpose_10 = transpose(perm = transpose_10_perm_0, x = x_7_cast_fp16)[name = string("transpose_21")]; tensor x_13_cast_fp16 = scaled_dot_product_attention(key = transpose_10, query = q_1_to_fp16, value = transpose_11)[name = string("x_13_cast_fp16")]; tensor var_112 = const()[name = string("op_112"), val = tensor([0, 2, 1, 3])]; tensor var_115 = const()[name = string("op_115"), val = tensor([1, 32, -1])]; tensor var_113_cast_fp16 = transpose(perm = var_112, x = x_13_cast_fp16)[name = string("transpose_19")]; tensor input_11_cast_fp16 = reshape(shape = var_115, x = var_113_cast_fp16)[name = string("input_11_cast_fp16")]; tensor cond_enc_perceiver_attn_proj_out_weight_to_fp16 = const()[name = string("cond_enc_perceiver_attn_proj_out_weight_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(21885696)))]; tensor cond_enc_perceiver_attn_proj_out_bias_to_fp16 = const()[name = string("cond_enc_perceiver_attn_proj_out_bias_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(23982912)))]; tensor linear_4_cast_fp16 = linear(bias = cond_enc_perceiver_attn_proj_out_bias_to_fp16, weight = cond_enc_perceiver_attn_proj_out_weight_to_fp16, x = input_11_cast_fp16)[name = string("linear_4_cast_fp16")]; tensor cond_enc_perceiver_pre_attention_query_to_fp16 = const()[name = string("cond_enc_perceiver_pre_attention_query_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(23985024)))]; tensor var_120_cast_fp16 = add(x = cond_enc_perceiver_pre_attention_query_to_fp16, y = linear_4_cast_fp16)[name = string("op_120_cast_fp16")]; tensor input_13_axes_0 = const()[name = string("input_13_axes_0"), val = tensor([-1])]; tensor input_13_cast_fp16 = layer_norm(axes = input_13_axes_0, beta = cond_enc_perceiver_attn_norm_bias_to_fp16, epsilon = var_51_to_fp16, gamma = cond_enc_perceiver_attn_norm_weight_to_fp16, x = var_120_cast_fp16)[name = string("input_13_cast_fp16")]; tensor cond_enc_perceiver_attn_to_q_weight_to_fp16 = const()[name = string("cond_enc_perceiver_attn_to_q_weight_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(24050624)))]; tensor cond_enc_perceiver_attn_to_q_bias_to_fp16 = const()[name = string("cond_enc_perceiver_attn_to_q_bias_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(26147840)))]; tensor linear_5_cast_fp16 = linear(bias = cond_enc_perceiver_attn_to_q_bias_to_fp16, weight = cond_enc_perceiver_attn_to_q_weight_to_fp16, x = input_13_cast_fp16)[name = string("linear_5_cast_fp16")]; tensor linear_6_cast_fp16 = linear(bias = cond_enc_perceiver_attn_to_k_bias_to_fp16, weight = cond_enc_perceiver_attn_to_k_weight_to_fp16, x = input_13_cast_fp16)[name = string("linear_6_cast_fp16")]; tensor linear_7_cast_fp16 = linear(bias = cond_enc_perceiver_attn_to_v_bias_to_fp16, weight = cond_enc_perceiver_attn_to_v_weight_to_fp16, x = input_13_cast_fp16)[name = string("linear_7_cast_fp16")]; tensor var_150 = const()[name = string("op_150"), val = tensor([1, 32, 4, 256])]; tensor x_19_cast_fp16 = reshape(shape = var_150, x = linear_5_cast_fp16)[name = string("x_19_cast_fp16")]; tensor var_156 = const()[name = string("op_156"), val = tensor([1, 32, 4, 256])]; tensor x_23_cast_fp16 = reshape(shape = var_156, x = linear_6_cast_fp16)[name = string("x_23_cast_fp16")]; tensor var_162 = const()[name = string("op_162"), val = tensor([1, 32, 4, 256])]; tensor x_27_cast_fp16 = reshape(shape = var_162, x = linear_7_cast_fp16)[name = string("x_27_cast_fp16")]; tensor transpose_12_perm_0 = const()[name = string("transpose_12_perm_0"), val = tensor([0, 2, 1, 3])]; tensor transpose_13_perm_0 = const()[name = string("transpose_13_perm_0"), val = tensor([0, 2, 1, 3])]; tensor transpose_14_perm_0 = const()[name = string("transpose_14_perm_0"), val = tensor([0, 2, 1, 3])]; tensor transpose_14 = transpose(perm = transpose_14_perm_0, x = x_27_cast_fp16)[name = string("transpose_16")]; tensor transpose_13 = transpose(perm = transpose_13_perm_0, x = x_23_cast_fp16)[name = string("transpose_17")]; tensor transpose_12 = transpose(perm = transpose_12_perm_0, x = x_19_cast_fp16)[name = string("transpose_18")]; tensor x_29_cast_fp16 = scaled_dot_product_attention(key = transpose_13, query = transpose_12, value = transpose_14)[name = string("x_29_cast_fp16")]; tensor var_169 = const()[name = string("op_169"), val = tensor([0, 2, 1, 3])]; tensor var_172 = const()[name = string("op_172"), val = tensor([1, 32, -1])]; tensor var_170_cast_fp16 = transpose(perm = var_169, x = x_29_cast_fp16)[name = string("transpose_15")]; tensor input_17_cast_fp16 = reshape(shape = var_172, x = var_170_cast_fp16)[name = string("input_17_cast_fp16")]; tensor linear_8_cast_fp16 = linear(bias = cond_enc_perceiver_attn_proj_out_bias_to_fp16, weight = cond_enc_perceiver_attn_proj_out_weight_to_fp16, x = input_17_cast_fp16)[name = string("linear_8_cast_fp16")]; tensor var_177_cast_fp16 = add(x = var_120_cast_fp16, y = linear_8_cast_fp16)[name = string("op_177_cast_fp16")]; string emotion_adv_to_fp16_dtype_0 = const()[name = string("emotion_adv_to_fp16_dtype_0"), val = string("fp16")]; tensor cond_enc_emotion_adv_fc_weight_to_fp16 = const()[name = string("cond_enc_emotion_adv_fc_weight_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(26149952)))]; tensor linear_9_bias_0_to_fp16 = const()[name = string("linear_9_bias_0_to_fp16"), val = tensor(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(26152064)))]; tensor emotion_adv_to_fp16 = cast(dtype = emotion_adv_to_fp16_dtype_0, x = emotion_adv)[name = string("cast_16")]; tensor linear_9_cast_fp16 = linear(bias = linear_9_bias_0_to_fp16, weight = cond_enc_emotion_adv_fc_weight_to_fp16, x = emotion_adv_to_fp16)[name = string("linear_9_cast_fp16")]; int32 var_189 = const()[name = string("op_189"), val = int32(1)]; bool var_190_interleave_0 = const()[name = string("op_190_interleave_0"), val = bool(false)]; tensor cond_emb = concat(axis = var_189, interleave = var_190_interleave_0, values = (cond_spkr_cast_fp16, var_177_cast_fp16, linear_9_cast_fp16))[name = string("op_190_cast_fp16")]; } -> (cond_emb); }