alexwengg's picture
Add canary-1b-v2 CoreML (int4 ANE + projection + preprocessor + vocab)
75c1b53 verified
Raw
History Blame Contribute Delete
1.67 kB
program(1.0)
[buildInfo = dict<tensor<string, []>, tensor<string, []>>({{"coremlc-component-MIL", "3520.4.1"}, {"coremlc-version", "3520.5.1"}, {"coremltools-component-torch", "2.7.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "9.0"}})]
{
func main<ios17>(tensor<fp32, [1, 1024]> hidden) {
tensor<string, []> hidden_to_fp16_dtype_0 = const()[name = tensor<string, []>("hidden_to_fp16_dtype_0"), val = tensor<string, []>("fp16")];
tensor<fp16, [16384, 1024]> lin_weight_to_fp16 = const()[name = tensor<string, []>("lin_weight_to_fp16"), val = tensor<fp16, [16384, 1024]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(64)))];
tensor<fp16, [16384]> lin_bias_to_fp16 = const()[name = tensor<string, []>("lin_bias_to_fp16"), val = tensor<fp16, [16384]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(33554560)))];
tensor<fp16, [1, 1024]> hidden_to_fp16 = cast(dtype = hidden_to_fp16_dtype_0, x = hidden)[name = tensor<string, []>("cast_1")];
tensor<fp16, [1, 16384]> linear_0_cast_fp16 = linear(bias = lin_bias_to_fp16, weight = lin_weight_to_fp16, x = hidden_to_fp16)[name = tensor<string, []>("linear_0_cast_fp16")];
tensor<string, []> linear_0_cast_fp16_to_fp32_dtype_0 = const()[name = tensor<string, []>("linear_0_cast_fp16_to_fp32_dtype_0"), val = tensor<string, []>("fp32")];
tensor<fp32, [1, 16384]> logits = cast(dtype = linear_0_cast_fp16_to_fp32_dtype_0, x = linear_0_cast_fp16)[name = tensor<string, []>("cast_0")];
} -> (logits);
}