File size: 16,496 Bytes
586ce6c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
program(1.3)
[buildInfo = dict<string, string>({{"coremlc-component-MIL", "3600.16.1"}, {"coremlc-version", "3600.25.1"}, {"coremltools-component-milinternal", ""}, {"coremltools-version", "9.0"}})]
{
    func main<ios18>(tensor<fp16, [51912, 8]> coef, tensor<fp16, [51912, 512]> s, tensor<fp16, [17304, 184]> x) {
            tensor<fp16, [512, 184]> linear_7_weight_0 = const()[name = string("linear_7_weight_0"), val = tensor<fp16, [512, 184]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(64)))];
            tensor<fp16, [512]> linear_7_bias_0 = const()[name = string("linear_7_bias_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(188544)))];
            tensor<fp16, [17304, 512]> linear_7 = linear(bias = linear_7_bias_0, weight = linear_7_weight_0, x = x)[name = string("linear_7")];
            fp16 mul_12_y_0 = const()[name = string("mul_12_y_0"), val = fp16(0x1p-4)];
            tensor<fp16, [17304, 512]> mul_12 = mul(x = linear_7, y = mul_12_y_0)[name = string("mul_12")];
            tensor<fp16, [17304, 512]> tanh_5 = tanh(x = mul_12)[name = string("tanh_5")];
            fp16 add_13_x_0 = const()[name = string("add_13_x_0"), val = fp16(0x1p+0)];
            tensor<fp16, [17304, 512]> add_13 = add(x = add_13_x_0, y = tanh_5)[name = string("add_13")];
            tensor<fp16, [17304, 512]> mul_13 = mul(x = mul_12, y = add_13)[name = string("mul_13")];
            tensor<fp16, [512, 512]> linear_8_weight_0 = const()[name = string("linear_8_weight_0"), val = tensor<fp16, [512, 512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(189632)))];
            tensor<fp16, [512]> linear_8_bias_0 = const()[name = string("linear_8_bias_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(713984)))];
            tensor<fp16, [17304, 512]> linear_8 = linear(bias = linear_8_bias_0, weight = linear_8_weight_0, x = mul_13)[name = string("linear_8")];
            tensor<int32, [1]> layer_norm_5_axes_0 = const()[name = string("layer_norm_5_axes_0"), val = tensor<int32, [1]>([-1])];
            tensor<fp16, [512]> layer_norm_5_gamma_0 = const()[name = string("layer_norm_5_gamma_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(715072)))];
            tensor<fp16, [512]> layer_norm_5_beta_0 = const()[name = string("layer_norm_5_beta_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(716160)))];
            fp16 layer_norm_5_epsilon_0 = const()[name = string("layer_norm_5_epsilon_0"), val = fp16(0x1.4f8p-5)];
            tensor<fp16, [17304, 512]> layer_norm_5 = layer_norm(axes = layer_norm_5_axes_0, beta = layer_norm_5_beta_0, epsilon = layer_norm_5_epsilon_0, gamma = layer_norm_5_gamma_0, x = linear_8)[name = string("layer_norm_5")];
            tensor<fp16, [512, 512]> linear_9_weight_0 = const()[name = string("linear_9_weight_0"), val = tensor<fp16, [512, 512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(717248)))];
            tensor<fp16, [512]> linear_9_bias_0 = const()[name = string("linear_9_bias_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(1241600)))];
            tensor<fp16, [17304, 512]> linear_9 = linear(bias = linear_9_bias_0, weight = linear_9_weight_0, x = layer_norm_5)[name = string("linear_9")];
            fp16 mul_14_y_0 = const()[name = string("mul_14_y_0"), val = fp16(0x1p-3)];
            tensor<fp16, [17304, 512]> mul_14 = mul(x = linear_9, y = mul_14_y_0)[name = string("mul_14")];
            tensor<fp16, [17304, 512]> tanh_6 = tanh(x = mul_14)[name = string("tanh_6")];
            fp16 add_14_x_0 = const()[name = string("add_14_x_0"), val = fp16(0x1p+0)];
            tensor<fp16, [17304, 512]> add_14 = add(x = add_14_x_0, y = tanh_6)[name = string("add_14")];
            tensor<fp16, [17304, 512]> mul_15 = mul(x = mul_14, y = add_14)[name = string("mul_15")];
            tensor<fp16, [512, 512]> linear_10_weight_0 = const()[name = string("linear_10_weight_0"), val = tensor<fp16, [512, 512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(1242688)))];
            tensor<fp16, [512]> linear_10_bias_0 = const()[name = string("linear_10_bias_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(1767040)))];
            tensor<fp16, [17304, 512]> linear_10 = linear(bias = linear_10_bias_0, weight = linear_10_weight_0, x = mul_15)[name = string("linear_10")];
            tensor<int32, [1]> layer_norm_6_axes_0 = const()[name = string("layer_norm_6_axes_0"), val = tensor<int32, [1]>([-1])];
            tensor<fp16, [512]> layer_norm_6_gamma_0 = const()[name = string("layer_norm_6_gamma_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(1768128)))];
            tensor<fp16, [512]> layer_norm_6_beta_0 = const()[name = string("layer_norm_6_beta_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(1769216)))];
            fp16 layer_norm_6_epsilon_0 = const()[name = string("layer_norm_6_epsilon_0"), val = fp16(0x1.4f8p-7)];
            tensor<fp16, [17304, 512]> layer_norm_6 = layer_norm(axes = layer_norm_6_axes_0, beta = layer_norm_6_beta_0, epsilon = layer_norm_6_epsilon_0, gamma = layer_norm_6_gamma_0, x = linear_10)[name = string("layer_norm_6")];
            tensor<fp16, [17304, 512]> add_15 = add(x = layer_norm_5, y = layer_norm_6)[name = string("add_15")];
            tensor<fp16, [512, 512]> linear_11_weight_0 = const()[name = string("linear_11_weight_0"), val = tensor<fp16, [512, 512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(1770304)))];
            tensor<fp16, [512]> linear_11_bias_0 = const()[name = string("linear_11_bias_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2294656)))];
            tensor<fp16, [17304, 512]> linear_11 = linear(bias = linear_11_bias_0, weight = linear_11_weight_0, x = add_15)[name = string("linear_11")];
            tensor<fp16, [512, 8]> linear_12_weight_0 = const()[name = string("linear_12_weight_0"), val = tensor<fp16, [512, 8]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2295744)))];
            tensor<fp16, [512]> linear_12_bias_0 = const()[name = string("linear_12_bias_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2304000)))];
            tensor<fp16, [51912, 512]> linear_12 = linear(bias = linear_12_bias_0, weight = linear_12_weight_0, x = coef)[name = string("linear_12")];
            tensor<fp16, [51912, 512]> add_16 = add(x = linear_12, y = s)[name = string("add_16")];
            int32 concat_0_axis_0 = const()[name = string("concat_0_axis_0"), val = int32(0)];
            bool concat_0_interleave_0 = const()[name = string("concat_0_interleave_0"), val = bool(false)];
            tensor<fp16, [51912, 512]> concat_0 = concat(axis = concat_0_axis_0, interleave = concat_0_interleave_0, values = (linear_11, linear_11, linear_11))[name = string("concat_0")];
            tensor<fp16, [51912, 512]> add_17 = add(x = add_16, y = concat_0)[name = string("add_17")];
            fp16 mul_16_y_0 = const()[name = string("mul_16_y_0"), val = fp16(0x1p-4)];
            tensor<fp16, [51912, 512]> mul_16 = mul(x = add_17, y = mul_16_y_0)[name = string("mul_16")];
            tensor<fp16, [51912, 512]> tanh_7 = tanh(x = mul_16)[name = string("tanh_7")];
            fp16 add_18_x_0 = const()[name = string("add_18_x_0"), val = fp16(0x1p+0)];
            tensor<fp16, [51912, 512]> add_18 = add(x = add_18_x_0, y = tanh_7)[name = string("add_18")];
            tensor<fp16, [51912, 512]> mul_17 = mul(x = mul_16, y = add_18)[name = string("mul_17")];
            tensor<fp16, [512, 512]> linear_13_weight_0 = const()[name = string("linear_13_weight_0"), val = tensor<fp16, [512, 512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2305088)))];
            tensor<fp16, [512]> linear_13_bias_0 = const()[name = string("linear_13_bias_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2829440)))];
            tensor<fp16, [51912, 512]> linear_13 = linear(bias = linear_13_bias_0, weight = linear_13_weight_0, x = mul_17)[name = string("linear_13")];
            tensor<int32, [1]> layer_norm_7_axes_0 = const()[name = string("layer_norm_7_axes_0"), val = tensor<int32, [1]>([-1])];
            tensor<fp16, [512]> layer_norm_7_gamma_0 = const()[name = string("layer_norm_7_gamma_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2830528)))];
            tensor<fp16, [512]> layer_norm_7_beta_0 = const()[name = string("layer_norm_7_beta_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2831616)))];
            fp16 layer_norm_7_epsilon_0 = const()[name = string("layer_norm_7_epsilon_0"), val = fp16(0x1.4f8p-11)];
            tensor<fp16, [51912, 512]> layer_norm_7 = layer_norm(axes = layer_norm_7_axes_0, beta = layer_norm_7_beta_0, epsilon = layer_norm_7_epsilon_0, gamma = layer_norm_7_gamma_0, x = linear_13)[name = string("layer_norm_7")];
            tensor<int32, [2]> slice_by_index_0_begin_0 = const()[name = string("slice_by_index_0_begin_0"), val = tensor<int32, [2]>([0, 0])];
            tensor<int32, [2]> slice_by_index_0_end_0 = const()[name = string("slice_by_index_0_end_0"), val = tensor<int32, [2]>([17304, 512])];
            tensor<fp16, [17304, 512]> slice_by_index_0 = slice_by_index(begin = slice_by_index_0_begin_0, end = slice_by_index_0_end_0, x = layer_norm_7)[name = string("slice_by_index_0")];
            tensor<int32, [2]> slice_by_index_1_begin_0 = const()[name = string("slice_by_index_1_begin_0"), val = tensor<int32, [2]>([17304, 0])];
            tensor<int32, [2]> slice_by_index_1_end_0 = const()[name = string("slice_by_index_1_end_0"), val = tensor<int32, [2]>([34608, 512])];
            tensor<fp16, [17304, 512]> slice_by_index_1 = slice_by_index(begin = slice_by_index_1_begin_0, end = slice_by_index_1_end_0, x = layer_norm_7)[name = string("slice_by_index_1")];
            tensor<int32, [2]> slice_by_index_2_begin_0 = const()[name = string("slice_by_index_2_begin_0"), val = tensor<int32, [2]>([34608, 0])];
            tensor<int32, [2]> slice_by_index_2_end_0 = const()[name = string("slice_by_index_2_end_0"), val = tensor<int32, [2]>([51912, 512])];
            tensor<fp16, [17304, 512]> slice_by_index_2 = slice_by_index(begin = slice_by_index_2_begin_0, end = slice_by_index_2_end_0, x = layer_norm_7)[name = string("slice_by_index_2")];
            tensor<fp16, [17304, 512]> add_19 = add(x = slice_by_index_0, y = slice_by_index_1)[name = string("add_19")];
            tensor<fp16, [17304, 512]> add_20 = add(x = add_19, y = slice_by_index_2)[name = string("add_20")];
            tensor<fp16, [512, 512]> linear_14_weight_0 = const()[name = string("linear_14_weight_0"), val = tensor<fp16, [512, 512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2832704)))];
            tensor<fp16, [512]> linear_14_bias_0 = const()[name = string("linear_14_bias_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(3357056)))];
            tensor<fp16, [17304, 512]> linear_14 = linear(bias = linear_14_bias_0, weight = linear_14_weight_0, x = add_15)[name = string("linear_14")];
            tensor<fp16, [512, 512]> linear_15_weight_0 = const()[name = string("linear_15_weight_0"), val = tensor<fp16, [512, 512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(3358144)))];
            tensor<fp16, [17304, 512]> linear_15 = linear(bias = linear_12_bias_0, weight = linear_15_weight_0, x = add_20)[name = string("linear_15")];
            tensor<fp16, [17304, 512]> add_21 = add(x = linear_14, y = linear_15)[name = string("add_21")];
            fp16 mul_18_y_0 = const()[name = string("mul_18_y_0"), val = fp16(0x1p-4)];
            tensor<fp16, [17304, 512]> mul_18 = mul(x = add_21, y = mul_18_y_0)[name = string("mul_18")];
            tensor<fp16, [17304, 512]> tanh_8 = tanh(x = mul_18)[name = string("tanh_8")];
            fp16 add_22_x_0 = const()[name = string("add_22_x_0"), val = fp16(0x1p+0)];
            tensor<fp16, [17304, 512]> add_22 = add(x = add_22_x_0, y = tanh_8)[name = string("add_22")];
            tensor<fp16, [17304, 512]> mul_19 = mul(x = mul_18, y = add_22)[name = string("mul_19")];
            tensor<fp16, [512, 512]> linear_16_weight_0 = const()[name = string("linear_16_weight_0"), val = tensor<fp16, [512, 512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(3882496)))];
            tensor<fp16, [512]> linear_16_bias_0 = const()[name = string("linear_16_bias_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(4406848)))];
            tensor<fp16, [17304, 512]> linear_16 = linear(bias = linear_16_bias_0, weight = linear_16_weight_0, x = mul_19)[name = string("linear_16")];
            tensor<int32, [1]> layer_norm_8_axes_0 = const()[name = string("layer_norm_8_axes_0"), val = tensor<int32, [1]>([-1])];
            tensor<fp16, [512]> layer_norm_8_gamma_0 = const()[name = string("layer_norm_8_gamma_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(4407936)))];
            tensor<fp16, [512]> layer_norm_8_beta_0 = const()[name = string("layer_norm_8_beta_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(4409024)))];
            fp16 layer_norm_8_epsilon_0 = const()[name = string("layer_norm_8_epsilon_0"), val = fp16(0x1.4f8p-7)];
            tensor<fp16, [17304, 512]> layer_norm_8 = layer_norm(axes = layer_norm_8_axes_0, beta = layer_norm_8_beta_0, epsilon = layer_norm_8_epsilon_0, gamma = layer_norm_8_gamma_0, x = linear_16)[name = string("layer_norm_8")];
            tensor<fp16, [17304, 512]> add_23 = add(x = add_15, y = layer_norm_8)[name = string("add_23")];
            tensor<fp16, [512, 512]> linear_17_weight_0 = const()[name = string("linear_17_weight_0"), val = tensor<fp16, [512, 512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(4410112)))];
            tensor<fp16, [512]> linear_17_bias_0 = const()[name = string("linear_17_bias_0"), val = tensor<fp16, [512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(4934464)))];
            tensor<fp16, [17304, 512]> linear_17 = linear(bias = linear_17_bias_0, weight = linear_17_weight_0, x = add_23)[name = string("linear_17")];
            fp16 mul_20_y_0 = const()[name = string("mul_20_y_0"), val = fp16(0x1p-2)];
            tensor<fp16, [17304, 512]> mul_20 = mul(x = linear_17, y = mul_20_y_0)[name = string("mul_20")];
            tensor<fp16, [17304, 512]> tanh_9 = tanh(x = mul_20)[name = string("tanh_9")];
            fp16 add_24_x_0 = const()[name = string("add_24_x_0"), val = fp16(0x1p+0)];
            tensor<fp16, [17304, 512]> add_24 = add(x = add_24_x_0, y = tanh_9)[name = string("add_24")];
            tensor<fp16, [17304, 512]> mul_21 = mul(x = mul_20, y = add_24)[name = string("mul_21")];
            tensor<fp16, [83, 512]> linear_18_weight_0 = const()[name = string("linear_18_weight_0"), val = tensor<fp16, [83, 512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(4935552)))];
            tensor<fp16, [83]> linear_18_bias_0 = const()[name = string("linear_18_bias_0"), val = tensor<fp16, [83]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(5020608)))];
            tensor<fp16, [17304, 83]> linear_18 = linear(bias = linear_18_bias_0, weight = linear_18_weight_0, x = mul_21)[name = string("linear_18")];
            fp16 mul_22_y_0 = const()[name = string("mul_22_y_0"), val = fp16(0x1p-2)];
            tensor<fp16, [17304, 83]> mul_22 = mul(x = linear_18, y = mul_22_y_0)[name = string("mul_22")];
            tensor<fp16, [17304, 83]> out = identity(x = mul_22)[name = string("out")];
        } -> (out);
}