Download programs/39/attention_4096.json from Yanun/clef-ane-lut6: direct link, hf CLI and curl.
- Browser
- Download file 20.6 kB
-
https://huggingface.co/Yanun/clef-ane-lut6/resolve/main/programs/39/attention_4096.json
- Command line
-
hf download hf://Yanun/clef-ane-lut6/programs/39/attention_4096.json
-
curl -L -o attention_4096.json https://huggingface.co/Yanun/clef-ane-lut6/resolve/main/programs/39/attention_4096.json
20.6 kB
| {"format_version":1,"text":"program(1.3)\n[buildInfo = dict<string, string>({{\"coremlc-component-MIL\", \"3510.2.1\"}, {\"coremlc-version\", \"3505.4.1\"}, {\"coremltools-component-milinternal\", \"\"}, {\"coremltools-version\", \"9.0\"}})]\n{\n func main<ios18>(tensor<fp16, [1, 5120, 1, 128]> hid_in, tensor<fp16, [1, 4, 4096, 256]> k_cache, tensor<fp16, [1, 4, 4096, 256]> v_cache, tensor<fp16, [1, 1, 128, 64]> cos_in, tensor<fp16, [1, 1, 128, 64]> sin_in, tensor<fp16, [1, 1, 1, 4096]> mask_in) {\n tensor<fp16, [1, 5120, 1, 1]> norm_w_1 = const()[name = string(\"norm_w_1\"), val = tensor<fp16, [1, 5120, 1, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(64)))];\n tensor<fp16, [1, 5120, 1, 128]> abs_2 = abs(x=hid_in)[name = string(\"abs_2\")];\n tensor<int32, [1]> iv_3 = const()[name = string(\"iv_3\"), val = tensor<int32, [1]>([1])];\n bool b_4 = const()[name = string(\"b_4\"), val = bool(true)];\n tensor<fp16, [1, 1, 1, 128]> reduce_max_5 = reduce_max(x=abs_2, axes=iv_3, keep_dims=b_4)[name = string(\"reduce_max_5\")];\n fp16 c_6 = const()[name = string(\"c_6\"), val = fp16(0.062500000000)];\n tensor<fp16, [1, 1, 1, 128]> maximum_7 = maximum(x=reduce_max_5, y=c_6)[name = string(\"maximum_7\")];\n fp16 c_8 = const()[name = string(\"c_8\"), val = fp16(1.000000000000)];\n tensor<fp16, [1, 1, 1, 128]> real_div_9 = real_div(x=c_8, y=maximum_7)[name = string(\"real_div_9\")];\n tensor<fp16, [1, 5120, 1, 128]> mul_10 = mul(x=hid_in, y=real_div_9)[name = string(\"mul_10\")];\n fp16 c_11 = const()[name = string(\"c_11\"), val = fp16(2.000000000000)];\n tensor<fp16, [1, 5120, 1, 128]> pow_12 = pow(x=mul_10, y=c_11)[name = string(\"pow_12\")];\n tensor<fp16, [1, 1, 1, 128]> reduce_sum_13 = reduce_sum(x=pow_12, axes=iv_3, keep_dims=b_4)[name = string(\"reduce_sum_13\")];\n fp16 c_14 = const()[name = string(\"c_14\"), val = fp16(0.000195312500)];\n tensor<fp16, [1, 1, 1, 128]> mul_15 = mul(x=reduce_sum_13, y=c_14)[name = string(\"mul_15\")];\n tensor<fp16, [1, 1, 1, 128]> pow_16 = pow(x=real_div_9, y=c_11)[name = string(\"pow_16\")];\n fp16 c_17 = const()[name = string(\"c_17\"), val = fp16(0.000001000000)];\n tensor<fp16, [1, 1, 1, 128]> mul_18 = mul(x=pow_16, y=c_17)[name = string(\"mul_18\")];\n tensor<fp16, [1, 1, 1, 128]> add_19 = add(x=mul_15, y=mul_18)[name = string(\"add_19\")];\n fp16 c_20 = const()[name = string(\"c_20\"), val = fp16(0.000000000000)];\n tensor<fp16, [1, 1, 1, 128]> rsqrt_21 = rsqrt(x=add_19, epsilon=c_20)[name = string(\"rsqrt_21\")];\n tensor<fp16, [1, 5120, 1, 128]> mul_22 = mul(x=mul_10, y=rsqrt_21)[name = string(\"mul_22\")];\n tensor<fp16, [1, 5120, 1, 128]> mul_23 = mul(x=mul_22, y=norm_w_1)[name = string(\"mul_23\")];\n tensor<fp16, [768, 1, 1, 1, 64, 1]> w_q_lut_24 = const()[name = string(\"w_q_lut_24\"), val = tensor<fp16, [768, 1, 1, 1, 64, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(47196352)))];\n tensor<fp16, [12288, 5120, 1, 1]> w_q_25 = constexpr_lut_to_dense(indices = tensor<uint6, [12288, 5120, 1, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(10368))), lut = w_q_lut_24)[name = string(\"w_q_25\")];\n tensor<int32, [2]> iv_26 = const()[name = string(\"iv_26\"), val = tensor<int32, [2]>([1, 1])];\n int32 i_27 = const()[name = string(\"i_27\"), val = int32(1)];\n tensor<int32, [4]> iv_28 = const()[name = string(\"iv_28\"), val = tensor<int32, [4]>([0, 0, 0, 0])];\n string str_29 = const()[name = string(\"str_29\"), val = string(\"valid\")];\n tensor<fp16, [1, 12288, 1, 128]> conv_30 = conv(dilations=iv_26, groups=i_27, pad=iv_28, pad_type=str_29, strides=iv_26, weight=w_q_25, x=mul_23)[name = string(\"conv_30\")];\n tensor<int32, [4]> iv_31 = const()[name = string(\"iv_31\"), val = tensor<int32, [4]>([1, 6144, 1, 128])];\n tensor<fp16, [1, 6144, 1, 128]> slice_by_size_32 = slice_by_size(x=conv_30, begin=iv_28, size=iv_31)[name = string(\"slice_by_size_32\")];\n tensor<int32, [4]> iv_33 = const()[name = string(\"iv_33\"), val = tensor<int32, [4]>([1, 24, 256, 128])];\n tensor<fp16, [1, 24, 256, 128]> reshape_34 = reshape(shape=iv_33, x=slice_by_size_32)[name = string(\"reshape_34\")];\n tensor<int32, [4]> iv_35 = const()[name = string(\"iv_35\"), val = tensor<int32, [4]>([0, 1, 3, 2])];\n tensor<fp16, [1, 24, 128, 256]> transpose_36 = transpose(perm=iv_35, x=reshape_34)[name = string(\"transpose_36\")];\n tensor<int32, [4]> iv_37 = const()[name = string(\"iv_37\"), val = tensor<int32, [4]>([0, 6144, 0, 0])];\n tensor<fp16, [1, 6144, 1, 128]> slice_by_size_38 = slice_by_size(x=conv_30, begin=iv_37, size=iv_31)[name = string(\"slice_by_size_38\")];\n tensor<fp16, [1, 24, 256, 128]> reshape_39 = reshape(shape=iv_33, x=slice_by_size_38)[name = string(\"reshape_39\")];\n tensor<fp16, [1, 24, 128, 256]> transpose_40 = transpose(perm=iv_35, x=reshape_39)[name = string(\"transpose_40\")];\n tensor<fp16, [64, 1, 1, 1, 64, 1]> w_k_lut_41 = const()[name = string(\"w_k_lut_41\"), val = tensor<fp16, [64, 1, 1, 1, 64, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(51226944)))];\n tensor<fp16, [1024, 5120, 1, 1]> w_k_42 = constexpr_lut_to_dense(indices = tensor<uint6, [1024, 5120, 1, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(47294720))), lut = w_k_lut_41)[name = string(\"w_k_42\")];\n tensor<fp16, [1, 1024, 1, 128]> conv_43 = conv(dilations=iv_26, groups=i_27, pad=iv_28, pad_type=str_29, strides=iv_26, weight=w_k_42, x=mul_23)[name = string(\"conv_43\")];\n tensor<int32, [4]> iv_44 = const()[name = string(\"iv_44\"), val = tensor<int32, [4]>([1, 4, 256, 128])];\n tensor<fp16, [1, 4, 256, 128]> reshape_45 = reshape(shape=iv_44, x=conv_43)[name = string(\"reshape_45\")];\n tensor<fp16, [1, 4, 128, 256]> transpose_46 = transpose(perm=iv_35, x=reshape_45)[name = string(\"transpose_46\")];\n tensor<fp16, [64, 1, 1, 1, 64, 1]> w_v_lut_47 = const()[name = string(\"w_v_lut_47\"), val = tensor<fp16, [64, 1, 1, 1, 64, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(55167424)))];\n tensor<fp16, [1024, 5120, 1, 1]> w_v_48 = constexpr_lut_to_dense(indices = tensor<uint6, [1024, 5120, 1, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(51235200))), lut = w_v_lut_47)[name = string(\"w_v_48\")];\n tensor<fp16, [1, 1024, 1, 128]> conv_49 = conv(dilations=iv_26, groups=i_27, pad=iv_28, pad_type=str_29, strides=iv_26, weight=w_v_48, x=mul_23)[name = string(\"conv_49\")];\n tensor<fp16, [1, 4, 256, 128]> reshape_50 = reshape(shape=iv_44, x=conv_49)[name = string(\"reshape_50\")];\n tensor<fp16, [1, 4, 128, 256]> transpose_51 = transpose(perm=iv_35, x=reshape_50)[name = string(\"transpose_51\")];\n tensor<fp16, [1, 1, 1, 256]> q_norm_w_52 = const()[name = string(\"q_norm_w_52\"), val = tensor<fp16, [1, 1, 1, 256]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(55175680)))];\n tensor<fp16, [1, 1, 1, 256]> k_norm_w_53 = const()[name = string(\"k_norm_w_53\"), val = tensor<fp16, [1, 1, 1, 256]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(55176256)))];\n tensor<fp16, [1, 24, 128, 256]> abs_54 = abs(x=transpose_36)[name = string(\"abs_54\")];\n tensor<int32, [1]> iv_55 = const()[name = string(\"iv_55\"), val = tensor<int32, [1]>([3])];\n tensor<fp16, [1, 24, 128, 1]> reduce_max_56 = reduce_max(x=abs_54, axes=iv_55, keep_dims=b_4)[name = string(\"reduce_max_56\")];\n tensor<fp16, [1, 24, 128, 1]> maximum_57 = maximum(x=reduce_max_56, y=c_6)[name = string(\"maximum_57\")];\n tensor<fp16, [1, 24, 128, 1]> real_div_58 = real_div(x=c_8, y=maximum_57)[name = string(\"real_div_58\")];\n tensor<fp16, [1, 24, 128, 256]> mul_59 = mul(x=transpose_36, y=real_div_58)[name = string(\"mul_59\")];\n tensor<fp16, [1, 24, 128, 256]> pow_60 = pow(x=mul_59, y=c_11)[name = string(\"pow_60\")];\n tensor<fp16, [1, 24, 128, 1]> reduce_sum_61 = reduce_sum(x=pow_60, axes=iv_55, keep_dims=b_4)[name = string(\"reduce_sum_61\")];\n fp16 c_62 = const()[name = string(\"c_62\"), val = fp16(0.003906250000)];\n tensor<fp16, [1, 24, 128, 1]> mul_63 = mul(x=reduce_sum_61, y=c_62)[name = string(\"mul_63\")];\n tensor<fp16, [1, 24, 128, 1]> pow_64 = pow(x=real_div_58, y=c_11)[name = string(\"pow_64\")];\n tensor<fp16, [1, 24, 128, 1]> mul_65 = mul(x=pow_64, y=c_17)[name = string(\"mul_65\")];\n tensor<fp16, [1, 24, 128, 1]> add_66 = add(x=mul_63, y=mul_65)[name = string(\"add_66\")];\n tensor<fp16, [1, 24, 128, 1]> rsqrt_67 = rsqrt(x=add_66, epsilon=c_20)[name = string(\"rsqrt_67\")];\n tensor<fp16, [1, 24, 128, 256]> mul_68 = mul(x=mul_59, y=rsqrt_67)[name = string(\"mul_68\")];\n tensor<fp16, [1, 24, 128, 256]> mul_69 = mul(x=mul_68, y=q_norm_w_52)[name = string(\"mul_69\")];\n tensor<int32, [4]> iv_70 = const()[name = string(\"iv_70\"), val = tensor<int32, [4]>([1, 24, 128, 32])];\n tensor<fp16, [1, 24, 128, 32]> slice_by_size_71 = slice_by_size(x=mul_69, begin=iv_28, size=iv_70)[name = string(\"slice_by_size_71\")];\n tensor<int32, [4]> iv_72 = const()[name = string(\"iv_72\"), val = tensor<int32, [4]>([0, 0, 0, 32])];\n tensor<fp16, [1, 24, 128, 32]> slice_by_size_73 = slice_by_size(x=mul_69, begin=iv_72, size=iv_70)[name = string(\"slice_by_size_73\")];\n fp16 c_74 = const()[name = string(\"c_74\"), val = fp16(-1.000000000000)];\n tensor<fp16, [1, 24, 128, 32]> mul_75 = mul(x=slice_by_size_73, y=c_74)[name = string(\"mul_75\")];\n int32 i_76 = const()[name = string(\"i_76\"), val = int32(3)];\n bool b_77 = const()[name = string(\"b_77\"), val = bool(false)];\n tensor<fp16, [1, 24, 128, 64]> concat_78 = concat(axis=i_76, interleave=b_77, values=(mul_75, slice_by_size_71))[name = string(\"concat_78\")];\n tensor<fp16, [1, 24, 128, 64]> concat_79 = concat(axis=i_76, interleave=b_77, values=(slice_by_size_71, slice_by_size_73))[name = string(\"concat_79\")];\n tensor<fp16, [1, 24, 128, 64]> mul_80 = mul(x=concat_79, y=cos_in)[name = string(\"mul_80\")];\n tensor<fp16, [1, 24, 128, 64]> mul_81 = mul(x=concat_78, y=sin_in)[name = string(\"mul_81\")];\n tensor<fp16, [1, 24, 128, 64]> add_82 = add(x=mul_80, y=mul_81)[name = string(\"add_82\")];\n tensor<int32, [4]> iv_83 = const()[name = string(\"iv_83\"), val = tensor<int32, [4]>([0, 0, 0, 64])];\n tensor<int32, [4]> iv_84 = const()[name = string(\"iv_84\"), val = tensor<int32, [4]>([1, 24, 128, 192])];\n tensor<fp16, [1, 24, 128, 192]> slice_by_size_85 = slice_by_size(x=mul_69, begin=iv_83, size=iv_84)[name = string(\"slice_by_size_85\")];\n tensor<fp16, [1, 24, 128, 256]> concat_86 = concat(axis=i_76, interleave=b_77, values=(add_82, slice_by_size_85))[name = string(\"concat_86\")];\n tensor<fp16, [1, 4, 128, 256]> abs_87 = abs(x=transpose_46)[name = string(\"abs_87\")];\n tensor<fp16, [1, 4, 128, 1]> reduce_max_88 = reduce_max(x=abs_87, axes=iv_55, keep_dims=b_4)[name = string(\"reduce_max_88\")];\n tensor<fp16, [1, 4, 128, 1]> maximum_89 = maximum(x=reduce_max_88, y=c_6)[name = string(\"maximum_89\")];\n tensor<fp16, [1, 4, 128, 1]> real_div_90 = real_div(x=c_8, y=maximum_89)[name = string(\"real_div_90\")];\n tensor<fp16, [1, 4, 128, 256]> mul_91 = mul(x=transpose_46, y=real_div_90)[name = string(\"mul_91\")];\n tensor<fp16, [1, 4, 128, 256]> pow_92 = pow(x=mul_91, y=c_11)[name = string(\"pow_92\")];\n tensor<fp16, [1, 4, 128, 1]> reduce_sum_93 = reduce_sum(x=pow_92, axes=iv_55, keep_dims=b_4)[name = string(\"reduce_sum_93\")];\n tensor<fp16, [1, 4, 128, 1]> mul_94 = mul(x=reduce_sum_93, y=c_62)[name = string(\"mul_94\")];\n tensor<fp16, [1, 4, 128, 1]> pow_95 = pow(x=real_div_90, y=c_11)[name = string(\"pow_95\")];\n tensor<fp16, [1, 4, 128, 1]> mul_96 = mul(x=pow_95, y=c_17)[name = string(\"mul_96\")];\n tensor<fp16, [1, 4, 128, 1]> add_97 = add(x=mul_94, y=mul_96)[name = string(\"add_97\")];\n tensor<fp16, [1, 4, 128, 1]> rsqrt_98 = rsqrt(x=add_97, epsilon=c_20)[name = string(\"rsqrt_98\")];\n tensor<fp16, [1, 4, 128, 256]> mul_99 = mul(x=mul_91, y=rsqrt_98)[name = string(\"mul_99\")];\n tensor<fp16, [1, 4, 128, 256]> mul_100 = mul(x=mul_99, y=k_norm_w_53)[name = string(\"mul_100\")];\n tensor<int32, [4]> iv_101 = const()[name = string(\"iv_101\"), val = tensor<int32, [4]>([1, 4, 128, 32])];\n tensor<fp16, [1, 4, 128, 32]> slice_by_size_102 = slice_by_size(x=mul_100, begin=iv_28, size=iv_101)[name = string(\"slice_by_size_102\")];\n tensor<fp16, [1, 4, 128, 32]> slice_by_size_103 = slice_by_size(x=mul_100, begin=iv_72, size=iv_101)[name = string(\"slice_by_size_103\")];\n tensor<fp16, [1, 4, 128, 32]> mul_104 = mul(x=slice_by_size_103, y=c_74)[name = string(\"mul_104\")];\n tensor<fp16, [1, 4, 128, 64]> concat_105 = concat(axis=i_76, interleave=b_77, values=(mul_104, slice_by_size_102))[name = string(\"concat_105\")];\n tensor<fp16, [1, 4, 128, 64]> concat_106 = concat(axis=i_76, interleave=b_77, values=(slice_by_size_102, slice_by_size_103))[name = string(\"concat_106\")];\n tensor<fp16, [1, 4, 128, 64]> mul_107 = mul(x=concat_106, y=cos_in)[name = string(\"mul_107\")];\n tensor<fp16, [1, 4, 128, 64]> mul_108 = mul(x=concat_105, y=sin_in)[name = string(\"mul_108\")];\n tensor<fp16, [1, 4, 128, 64]> add_109 = add(x=mul_107, y=mul_108)[name = string(\"add_109\")];\n tensor<int32, [4]> iv_110 = const()[name = string(\"iv_110\"), val = tensor<int32, [4]>([1, 4, 128, 192])];\n tensor<fp16, [1, 4, 128, 192]> slice_by_size_111 = slice_by_size(x=mul_100, begin=iv_83, size=iv_110)[name = string(\"slice_by_size_111\")];\n tensor<fp16, [1, 4, 128, 256]> concat_112 = concat(axis=i_76, interleave=b_77, values=(add_109, slice_by_size_111))[name = string(\"concat_112\")];\n tensor<int32, [4]> iv_113 = const()[name = string(\"iv_113\"), val = tensor<int32, [4]>([1, 4, 768, 256])];\n tensor<fp16, [1, 4, 768, 256]> reshape_114 = reshape(shape=iv_113, x=concat_86)[name = string(\"reshape_114\")];\n tensor<fp16, [1, 4, 768, 4096]> matmul_115 = matmul(transpose_x=b_77, transpose_y=b_4, x=reshape_114, y=k_cache)[name = string(\"matmul_115\")];\n tensor<fp16, [1, 4, 768, 4096]> mul_116 = mul(x=matmul_115, y=c_6)[name = string(\"mul_116\")];\n tensor<fp16, [1, 4, 768, 4096]> add_117 = add(x=mul_116, y=mask_in)[name = string(\"add_117\")];\n tensor<fp16, [1, 4, 768, 128]> matmul_118 = matmul(transpose_x=b_77, transpose_y=b_4, x=reshape_114, y=concat_112)[name = string(\"matmul_118\")];\n tensor<fp16, [1, 4, 768, 128]> mul_119 = mul(x=matmul_118, y=c_6)[name = string(\"mul_119\")];\n tensor<fp16, [1, 1, 768, 128]> own_mask_120 = const()[name = string(\"own_mask_120\"), val = tensor<fp16, [1, 1, 768, 128]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(55176832)))];\n tensor<fp16, [1, 4, 768, 128]> add_121 = add(x=mul_119, y=own_mask_120)[name = string(\"add_121\")];\n tensor<fp16, [1, 4, 768, 1]> reduce_max_122 = reduce_max(x=add_117, axes=iv_55, keep_dims=b_4)[name = string(\"reduce_max_122\")];\n tensor<fp16, [1, 4, 768, 1]> reduce_max_123 = reduce_max(x=add_121, axes=iv_55, keep_dims=b_4)[name = string(\"reduce_max_123\")];\n tensor<fp16, [1, 4, 768, 1]> maximum_124 = maximum(x=reduce_max_122, y=reduce_max_123)[name = string(\"maximum_124\")];\n tensor<fp16, [1, 4, 768, 4096]> sub_125 = sub(x=add_117, y=maximum_124)[name = string(\"sub_125\")];\n tensor<fp16, [1, 4, 768, 4096]> exp_126 = exp(x=sub_125)[name = string(\"exp_126\")];\n tensor<fp16, [1, 4, 768, 128]> sub_127 = sub(x=add_121, y=maximum_124)[name = string(\"sub_127\")];\n tensor<fp16, [1, 4, 768, 128]> exp_128 = exp(x=sub_127)[name = string(\"exp_128\")];\n tensor<fp16, [1, 4, 768, 1]> reduce_sum_129 = reduce_sum(x=exp_126, axes=iv_55, keep_dims=b_4)[name = string(\"reduce_sum_129\")];\n tensor<fp16, [1, 4, 768, 1]> reduce_sum_130 = reduce_sum(x=exp_128, axes=iv_55, keep_dims=b_4)[name = string(\"reduce_sum_130\")];\n tensor<fp16, [1, 4, 768, 1]> add_131 = add(x=reduce_sum_129, y=reduce_sum_130)[name = string(\"add_131\")];\n tensor<fp16, [1, 4, 768, 1]> real_div_132 = real_div(x=c_8, y=add_131)[name = string(\"real_div_132\")];\n fp16 c_133 = const()[name = string(\"c_133\"), val = fp16(16.000000000000)];\n tensor<fp16, [1, 4, 768, 1]> mul_134 = mul(x=real_div_132, y=c_133)[name = string(\"mul_134\")];\n tensor<fp16, [1, 4, 768, 4096]> mul_135 = mul(x=exp_126, y=mul_134)[name = string(\"mul_135\")];\n tensor<fp16, [1, 4, 768, 256]> matmul_136 = matmul(transpose_x=b_77, transpose_y=b_77, x=mul_135, y=v_cache)[name = string(\"matmul_136\")];\n tensor<fp16, [1, 4, 768, 128]> mul_137 = mul(x=exp_128, y=mul_134)[name = string(\"mul_137\")];\n tensor<fp16, [1, 4, 768, 256]> matmul_138 = matmul(transpose_x=b_77, transpose_y=b_77, x=mul_137, y=transpose_51)[name = string(\"matmul_138\")];\n tensor<fp16, [1, 4, 768, 256]> add_139 = add(x=matmul_136, y=matmul_138)[name = string(\"add_139\")];\n tensor<fp16, [1, 4, 768, 256]> mul_140 = mul(x=add_139, y=c_6)[name = string(\"mul_140\")];\n tensor<int32, [4]> iv_141 = const()[name = string(\"iv_141\"), val = tensor<int32, [4]>([1, 24, 128, 256])];\n tensor<fp16, [1, 24, 128, 256]> reshape_142 = reshape(shape=iv_141, x=mul_140)[name = string(\"reshape_142\")];\n tensor<fp16, [1, 24, 128, 256]> mul_143 = mul(x=transpose_40, y=c_74)[name = string(\"mul_143\")];\n tensor<fp16, [1, 24, 128, 256]> exp_144 = exp(x=mul_143)[name = string(\"exp_144\")];\n tensor<fp16, [1, 24, 128, 256]> add_145 = add(x=exp_144, y=c_8)[name = string(\"add_145\")];\n tensor<fp16, [1, 24, 128, 256]> real_div_146 = real_div(x=c_8, y=add_145)[name = string(\"real_div_146\")];\n tensor<fp16, [1, 24, 128, 256]> mul_147 = mul(x=reshape_142, y=real_div_146)[name = string(\"mul_147\")];\n tensor<fp16, [1, 24, 256, 128]> transpose_148 = transpose(perm=iv_35, x=mul_147)[name = string(\"transpose_148\")];\n tensor<fp16, [1, 6144, 1, 128]> reshape_149 = reshape(shape=iv_31, x=transpose_148)[name = string(\"reshape_149\")];\n tensor<fp16, [320, 1, 1, 1, 64, 1]> w_o_lut_150 = const()[name = string(\"w_o_lut_150\"), val = tensor<fp16, [320, 1, 1, 1, 64, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(78966528)))];\n tensor<fp16, [5120, 6144, 1, 1]> w_o_151 = constexpr_lut_to_dense(indices = tensor<uint6, [5120, 6144, 1, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(55373504))), lut = w_o_lut_150)[name = string(\"w_o_151\")];\n tensor<fp16, [1, 5120, 1, 128]> conv_152 = conv(dilations=iv_26, groups=i_27, pad=iv_28, pad_type=str_29, strides=iv_26, weight=w_o_151, x=reshape_149)[name = string(\"conv_152\")];\n tensor<fp16, [1, 5120, 1, 128]> add_153 = add(x=hid_in, y=conv_152)[name = string(\"add_153\")];\n tensor<fp16, [1, 5120, 1, 128]> hid_out = identity(x=add_153)[name = string(\"hid_out\")];\n tensor<fp16, [1, 4, 128, 256]> k_out = identity(x=concat_112)[name = string(\"k_out\")];\n tensor<fp16, [1, 4, 128, 256]> v_out = identity(x=transpose_51)[name = string(\"v_out\")];\n } -> (hid_out, k_out, v_out);\n}\n","weight_file":"programs/39/attention.bin","inputs":[{"name":"hid_in","shape":[1,5120,1,128],"dtype":"fp16"},{"name":"k_cache","shape":[1,4,4096,256],"dtype":"fp16"},{"name":"v_cache","shape":[1,4,4096,256],"dtype":"fp16"},{"name":"cos_in","shape":[1,1,128,64],"dtype":"fp16"},{"name":"sin_in","shape":[1,1,128,64],"dtype":"fp16"},{"name":"mask_in","shape":[1,1,1,4096],"dtype":"fp16"}],"outputs":[{"name":"hid_out","shape":[1,5120,1,128],"dtype":"fp16"},{"name":"k_out","shape":[1,4,128,256],"dtype":"fp16"},{"name":"v_out","shape":[1,4,128,256],"dtype":"fp16"}]} | |