Download programs/21/mlp.json from Yanun/clef-flash-ane-lut6: direct link, hf CLI and curl.
- Browser
- Download file 9.38 kB
-
https://huggingface.co/Yanun/clef-flash-ane-lut6/resolve/main/programs/21/mlp.json
- Command line
-
hf download hf://Yanun/clef-flash-ane-lut6/programs/21/mlp.json
-
curl -L -o mlp.json https://huggingface.co/Yanun/clef-flash-ane-lut6/resolve/main/programs/21/mlp.json
9.38 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, 4096, 1, 128]> hid_in) {\n tensor<fp16, [1, 4096, 1, 1]> norm_w_1 = const()[name = string(\"norm_w_1\"), val = tensor<fp16, [1, 4096, 1, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(64)))];\n tensor<fp16, [1, 4096, 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, 4096, 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, 4096, 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.000244140625)];\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, 4096, 1, 128]> mul_22 = mul(x=mul_10, y=rsqrt_21)[name = string(\"mul_22\")];\n tensor<fp16, [1, 4096, 1, 128]> mul_23 = mul(x=mul_22, y=norm_w_1)[name = string(\"mul_23\")];\n tensor<fp16, [1536, 1, 1, 1, 64, 1]> w_gate_up_lut_24 = const()[name = string(\"w_gate_up_lut_24\"), val = tensor<fp16, [1536, 1, 1, 1, 64, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(75505856)))];\n tensor<fp16, [24576, 4096, 1, 1]> w_gate_up_25 = constexpr_lut_to_dense(indices = tensor<uint6, [24576, 4096, 1, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(8320))), lut = w_gate_up_lut_24)[name = string(\"w_gate_up_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, 24576, 1, 128]> conv_30 = conv(dilations=iv_26, groups=i_27, pad=iv_28, pad_type=str_29, strides=iv_26, weight=w_gate_up_25, x=mul_23)[name = string(\"conv_30\")];\n tensor<int32, [4]> iv_31 = const()[name = string(\"iv_31\"), val = tensor<int32, [4]>([1, 12288, 1, 128])];\n tensor<fp16, [1, 12288, 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]>([0, 12288, 0, 0])];\n tensor<fp16, [1, 12288, 1, 128]> slice_by_size_34 = slice_by_size(x=conv_30, begin=iv_33, size=iv_31)[name = string(\"slice_by_size_34\")];\n fp16 c_35 = const()[name = string(\"c_35\"), val = fp16(-1.000000000000)];\n tensor<fp16, [1, 12288, 1, 128]> mul_36 = mul(x=slice_by_size_32, y=c_35)[name = string(\"mul_36\")];\n tensor<fp16, [1, 12288, 1, 128]> exp_37 = exp(x=mul_36)[name = string(\"exp_37\")];\n tensor<fp16, [1, 12288, 1, 128]> add_38 = add(x=exp_37, y=c_8)[name = string(\"add_38\")];\n tensor<fp16, [1, 12288, 1, 128]> real_div_39 = real_div(x=slice_by_size_32, y=add_38)[name = string(\"real_div_39\")];\n tensor<fp16, [1, 12288, 1, 128]> mul_40 = mul(x=real_div_39, y=slice_by_size_34)[name = string(\"mul_40\")];\n tensor<fp16, [1, 12288, 1, 128]> abs_41 = abs(x=mul_40)[name = string(\"abs_41\")];\n tensor<fp16, [1, 1, 1, 128]> reduce_max_42 = reduce_max(x=abs_41, axes=iv_3, keep_dims=b_4)[name = string(\"reduce_max_42\")];\n fp16 c_43 = const()[name = string(\"c_43\"), val = fp16(4096.000000000000)];\n fp16 c_44 = const()[name = string(\"c_44\"), val = fp16(256.000000000000)];\n tensor<fp16, [1, 1, 1, 128]> maximum_45 = maximum(x=reduce_max_42, y=c_44)[name = string(\"maximum_45\")];\n tensor<fp16, [1, 1, 1, 128]> real_div_46 = real_div(x=c_43, y=maximum_45)[name = string(\"real_div_46\")];\n tensor<fp16, [1, 12288, 1, 128]> mul_47 = mul(x=mul_40, y=real_div_46)[name = string(\"mul_47\")];\n tensor<int32, [4]> iv_48 = const()[name = string(\"iv_48\"), val = tensor<int32, [4]>([1, 4096, 1, 128])];\n tensor<fp16, [1, 4096, 1, 128]> slice_by_size_49 = slice_by_size(x=mul_47, begin=iv_28, size=iv_48)[name = string(\"slice_by_size_49\")];\n tensor<fp16, [256, 1, 1, 1, 64, 1]> w_down0_lut_50 = const()[name = string(\"w_down0_lut_50\"), val = tensor<fp16, [256, 1, 1, 1, 64, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(88285504)))];\n tensor<fp16, [4096, 4096, 1, 1]> w_down0_51 = constexpr_lut_to_dense(indices = tensor<uint6, [4096, 4096, 1, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(75702528))), lut = w_down0_lut_50)[name = string(\"w_down0_51\")];\n tensor<fp16, [1, 4096, 1, 128]> conv_52 = conv(dilations=iv_26, groups=i_27, pad=iv_28, pad_type=str_29, strides=iv_26, weight=w_down0_51, x=slice_by_size_49)[name = string(\"conv_52\")];\n tensor<int32, [4]> iv_53 = const()[name = string(\"iv_53\"), val = tensor<int32, [4]>([0, 4096, 0, 0])];\n tensor<fp16, [1, 4096, 1, 128]> slice_by_size_54 = slice_by_size(x=mul_47, begin=iv_53, size=iv_48)[name = string(\"slice_by_size_54\")];\n tensor<fp16, [256, 1, 1, 1, 64, 1]> w_down1_lut_55 = const()[name = string(\"w_down1_lut_55\"), val = tensor<fp16, [256, 1, 1, 1, 64, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(100901312)))];\n tensor<fp16, [4096, 4096, 1, 1]> w_down1_56 = constexpr_lut_to_dense(indices = tensor<uint6, [4096, 4096, 1, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(88318336))), lut = w_down1_lut_55)[name = string(\"w_down1_56\")];\n tensor<fp16, [1, 4096, 1, 128]> conv_57 = conv(dilations=iv_26, groups=i_27, pad=iv_28, pad_type=str_29, strides=iv_26, weight=w_down1_56, x=slice_by_size_54)[name = string(\"conv_57\")];\n tensor<int32, [4]> iv_58 = const()[name = string(\"iv_58\"), val = tensor<int32, [4]>([0, 8192, 0, 0])];\n tensor<fp16, [1, 4096, 1, 128]> slice_by_size_59 = slice_by_size(x=mul_47, begin=iv_58, size=iv_48)[name = string(\"slice_by_size_59\")];\n tensor<fp16, [256, 1, 1, 1, 64, 1]> w_down2_lut_60 = const()[name = string(\"w_down2_lut_60\"), val = tensor<fp16, [256, 1, 1, 1, 64, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(113517120)))];\n tensor<fp16, [4096, 4096, 1, 1]> w_down2_61 = constexpr_lut_to_dense(indices = tensor<uint6, [4096, 4096, 1, 1]>(BLOBFILE(path = string(\"@model_path/weights/weight.bin\"), offset = uint64(100934144))), lut = w_down2_lut_60)[name = string(\"w_down2_61\")];\n tensor<fp16, [1, 4096, 1, 128]> conv_62 = conv(dilations=iv_26, groups=i_27, pad=iv_28, pad_type=str_29, strides=iv_26, weight=w_down2_61, x=slice_by_size_59)[name = string(\"conv_62\")];\n tensor<fp16, [1, 4096, 1, 128]> add_63 = add(x=conv_52, y=conv_57)[name = string(\"add_63\")];\n tensor<fp16, [1, 4096, 1, 128]> add_64 = add(x=add_63, y=conv_62)[name = string(\"add_64\")];\n tensor<fp16, [1, 1, 1, 128]> real_div_65 = real_div(x=c_8, y=real_div_46)[name = string(\"real_div_65\")];\n tensor<fp16, [1, 4096, 1, 128]> mul_66 = mul(x=add_64, y=real_div_65)[name = string(\"mul_66\")];\n tensor<fp16, [1, 4096, 1, 128]> add_67 = add(x=hid_in, y=mul_66)[name = string(\"add_67\")];\n tensor<fp16, [1, 4096, 1, 128]> hid_out = identity(x=add_67)[name = string(\"hid_out\")];\n } -> (hid_out);\n}\n","weight_file":"programs/21/mlp.bin","inputs":[{"name":"hid_in","shape":[1,4096,1,128],"dtype":"fp16"}],"outputs":[{"name":"hid_out","shape":[1,4096,1,128],"dtype":"fp16"}]} | |