smpanaro's picture
Add model
a76a14d
raw
history blame
5.56 kB
program(1.0)
[buildInfo = dict<tensor<string, []>, tensor<string, []>>({{"coremlc-component-MIL", "5.33.5"}, {"coremlc-version", "1877.40.3"}, {"coremltools-component-torch", "2.1.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "7.2"}})]
{
func main<ios16>(tensor<fp16, [1, 4096, 1, 64]> x) {
tensor<bool, []> var_6 = const()[name = tensor<string, []>("op_6"), val = tensor<bool, []>(true)];
tensor<fp16, [1, 4096, 1, 64]> var_13_cast_fp16 = mul(x = x, y = x)[name = tensor<string, []>("op_13_cast_fp16")];
tensor<int32, [1]> var_14 = const()[name = tensor<string, []>("op_14"), val = tensor<int32, [1]>([1])];
tensor<fp16, [1, 1, 1, 64]> norm_x_cast_fp16 = reduce_mean(axes = var_14, keep_dims = var_6, x = var_13_cast_fp16)[name = tensor<string, []>("norm_x_cast_fp16")];
tensor<fp16, []> var_16_to_fp16 = const()[name = tensor<string, []>("op_16_to_fp16"), val = tensor<fp16, []>(0x1.5p-17)];
tensor<fp16, [1, 1, 1, 64]> var_17_cast_fp16 = add(x = norm_x_cast_fp16, y = var_16_to_fp16)[name = tensor<string, []>("op_17_cast_fp16")];
tensor<fp16, []> var_18_epsilon_0_to_fp16 = const()[name = tensor<string, []>("op_18_epsilon_0_to_fp16"), val = tensor<fp16, []>(0x1p-24)];
tensor<fp16, [1, 1, 1, 64]> var_18_cast_fp16 = rsqrt(epsilon = var_18_epsilon_0_to_fp16, x = var_17_cast_fp16)[name = tensor<string, []>("op_18_cast_fp16")];
tensor<fp16, [1, 4096, 1, 64]> x_normed_1_cast_fp16 = mul(x = x, y = var_18_cast_fp16)[name = tensor<string, []>("x_normed_1_cast_fp16")];
tensor<fp16, [1, 4096, 1, 1]> ln_f_weight_to_fp16 = const()[name = tensor<string, []>("ln_f_weight_to_fp16"), val = tensor<fp16, [1, 4096, 1, 1]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(64)))];
tensor<fp16, [1, 4096, 1, 64]> x_cast_fp16 = mul(x = x_normed_1_cast_fp16, y = ln_f_weight_to_fp16)[name = tensor<string, []>("x_cast_fp16")];
tensor<int32, [1]> var_23_axes_0 = const()[name = tensor<string, []>("op_23_axes_0"), val = tensor<int32, [1]>([2])];
tensor<fp16, [1, 4096, 64]> var_23_cast_fp16 = squeeze(axes = var_23_axes_0, x = x_cast_fp16)[name = tensor<string, []>("op_23_cast_fp16")];
tensor<int32, [3]> var_26_perm_0 = const()[name = tensor<string, []>("op_26_perm_0"), val = tensor<int32, [3]>([0, 2, 1])];
tensor<int32, [2]> concat_4 = const()[name = tensor<string, []>("concat_4"), val = tensor<int32, [2]>([64, 4096])];
tensor<fp16, [1, 64, 4096]> transpose_4 = transpose(perm = var_26_perm_0, x = var_23_cast_fp16)[name = tensor<string, []>("transpose_4")];
tensor<fp16, [64, 4096]> reshape_0_cast_fp16 = reshape(shape = concat_4, x = transpose_4)[name = tensor<string, []>("reshape_0_cast_fp16")];
tensor<bool, []> matmul_0_transpose_x_0 = const()[name = tensor<string, []>("matmul_0_transpose_x_0"), val = tensor<bool, []>(false)];
tensor<bool, []> matmul_0_transpose_y_0 = const()[name = tensor<string, []>("matmul_0_transpose_y_0"), val = tensor<bool, []>(false)];
tensor<fp16, [4096, 16384]> transpose_1_to_fp16 = const()[name = tensor<string, []>("transpose_1_to_fp16"), val = tensor<fp16, [4096, 16384]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(8320)))];
tensor<fp16, [64, 16384]> matmul_0_cast_fp16 = matmul(transpose_x = matmul_0_transpose_x_0, transpose_y = matmul_0_transpose_y_0, x = reshape_0_cast_fp16, y = transpose_1_to_fp16)[name = tensor<string, []>("matmul_0_cast_fp16")];
tensor<int32, [3]> concat_8 = const()[name = tensor<string, []>("concat_8"), val = tensor<int32, [3]>([1, 64, 16384])];
tensor<fp16, [1, 64, 16384]> reshape_2_cast_fp16 = reshape(shape = concat_8, x = matmul_0_cast_fp16)[name = tensor<string, []>("reshape_2_cast_fp16")];
tensor<bool, []> matmul_1_transpose_x_0 = const()[name = tensor<string, []>("matmul_1_transpose_x_0"), val = tensor<bool, []>(false)];
tensor<bool, []> matmul_1_transpose_y_0 = const()[name = tensor<string, []>("matmul_1_transpose_y_0"), val = tensor<bool, []>(false)];
tensor<fp16, [4096, 15616]> transpose_3_to_fp16 = const()[name = tensor<string, []>("transpose_3_to_fp16"), val = tensor<fp16, [4096, 15616]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(134226112)))];
tensor<fp16, [64, 15616]> matmul_1_cast_fp16 = matmul(transpose_x = matmul_1_transpose_x_0, transpose_y = matmul_1_transpose_y_0, x = reshape_0_cast_fp16, y = transpose_3_to_fp16)[name = tensor<string, []>("matmul_1_cast_fp16")];
tensor<int32, [3]> concat_16 = const()[name = tensor<string, []>("concat_16"), val = tensor<int32, [3]>([1, 64, 15616])];
tensor<fp16, [1, 64, 15616]> reshape_5_cast_fp16 = reshape(shape = concat_16, x = matmul_1_cast_fp16)[name = tensor<string, []>("reshape_5_cast_fp16")];
tensor<int32, []> var_41 = const()[name = tensor<string, []>("op_41"), val = tensor<int32, []>(-1)];
tensor<bool, []> var_42_interleave_0 = const()[name = tensor<string, []>("op_42_interleave_0"), val = tensor<bool, []>(false)];
tensor<fp16, [1, 64, 32000]> logits = concat(axis = var_41, interleave = var_42_interleave_0, values = (reshape_2_cast_fp16, reshape_5_cast_fp16))[name = tensor<string, []>("op_42_cast_fp16")];
} -> (logits);
}