Ling-3.0-tiny-ONNX / foundry-cpu /cpu_interface.json
hecz-showcase's picture TechWithRay's picture
[Ling] Add a working Foundry Local CPU adapter for the BF16 model (#1)
d00cac4
Raw History Blame Contribute Delete
31.3 kB
{ "profile": "bf16_cpu", "source_revision": "c4007c791db3c2fd9e82770bd2bbbd950744bc52", "source_weights_sha256": "bc3030ea87f8b8ed93fa403db30d06afc1184cca2b84347549128bfe3a0156dc", "status": "GENERATED_NOT_VALIDATED", "graphs": [ { "file": "onnx/decode.onnx", "state_mapping": [ { "layer": 0, "kind": "kda", "key": "conv_q", "next_decode_input": "past.0.conv_q", "output": "present.0.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 0, "kind": "kda", "key": "conv_k", "next_decode_input": "past.0.conv_k", "output": "present.0.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 0, "kind": "kda", "key": "conv_v", "next_decode_input": "past.0.conv_v", "output": "present.0.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 0, "kind": "kda", "key": "state", "next_decode_input": "past.0.state", "output": "present.0.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 1, "kind": "kda", "key": "conv_q", "next_decode_input": "past.1.conv_q", "output": "present.1.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 1, "kind": "kda", "key": "conv_k", "next_decode_input": "past.1.conv_k", "output": "present.1.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 1, "kind": "kda", "key": "conv_v", "next_decode_input": "past.1.conv_v", "output": "present.1.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 1, "kind": "kda", "key": "state", "next_decode_input": "past.1.state", "output": "present.1.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 2, "kind": "kda", "key": "conv_q", "next_decode_input": "past.2.conv_q", "output": "present.2.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 2, "kind": "kda", "key": "conv_k", "next_decode_input": "past.2.conv_k", "output": "present.2.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 2, "kind": "kda", "key": "conv_v", "next_decode_input": "past.2.conv_v", "output": "present.2.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 2, "kind": "kda", "key": "state", "next_decode_input": "past.2.state", "output": "present.2.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 3, "kind": "mla", "key": "key", "next_decode_input": "past.3.key", "output": "present.3.key", "dtype": "FLOAT", "shape": [ 1, 16, "total_tokens", 192 ] }, { "layer": 3, "kind": "mla", "key": "value", "next_decode_input": "past.3.value", "output": "present.3.value", "dtype": "FLOAT", "shape": [ 1, 16, "total_tokens", 128 ] }, { "layer": 4, "kind": "kda", "key": "conv_q", "next_decode_input": "past.4.conv_q", "output": "present.4.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 4, "kind": "kda", "key": "conv_k", "next_decode_input": "past.4.conv_k", "output": "present.4.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 4, "kind": "kda", "key": "conv_v", "next_decode_input": "past.4.conv_v", "output": "present.4.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 4, "kind": "kda", "key": "state", "next_decode_input": "past.4.state", "output": "present.4.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 5, "kind": "kda", "key": "conv_q", "next_decode_input": "past.5.conv_q", "output": "present.5.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 5, "kind": "kda", "key": "conv_k", "next_decode_input": "past.5.conv_k", "output": "present.5.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 5, "kind": "kda", "key": "conv_v", "next_decode_input": "past.5.conv_v", "output": "present.5.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 5, "kind": "kda", "key": "state", "next_decode_input": "past.5.state", "output": "present.5.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 6, "kind": "kda", "key": "conv_q", "next_decode_input": "past.6.conv_q", "output": "present.6.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 6, "kind": "kda", "key": "conv_k", "next_decode_input": "past.6.conv_k", "output": "present.6.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 6, "kind": "kda", "key": "conv_v", "next_decode_input": "past.6.conv_v", "output": "present.6.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 6, "kind": "kda", "key": "state", "next_decode_input": "past.6.state", "output": "present.6.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 7, "kind": "mla", "key": "key", "next_decode_input": "past.7.key", "output": "present.7.key", "dtype": "FLOAT", "shape": [ 1, 16, "total_tokens", 192 ] }, { "layer": 7, "kind": "mla", "key": "value", "next_decode_input": "past.7.value", "output": "present.7.value", "dtype": "FLOAT", "shape": [ 1, 16, "total_tokens", 128 ] }, { "layer": 8, "kind": "kda", "key": "conv_q", "next_decode_input": "past.8.conv_q", "output": "present.8.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 8, "kind": "kda", "key": "conv_k", "next_decode_input": "past.8.conv_k", "output": "present.8.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 8, "kind": "kda", "key": "conv_v", "next_decode_input": "past.8.conv_v", "output": "present.8.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 8, "kind": "kda", "key": "state", "next_decode_input": "past.8.state", "output": "present.8.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 9, "kind": "kda", "key": "conv_q", "next_decode_input": "past.9.conv_q", "output": "present.9.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 9, "kind": "kda", "key": "conv_k", "next_decode_input": "past.9.conv_k", "output": "present.9.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 9, "kind": "kda", "key": "conv_v", "next_decode_input": "past.9.conv_v", "output": "present.9.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 9, "kind": "kda", "key": "state", "next_decode_input": "past.9.state", "output": "present.9.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 10, "kind": "kda", "key": "conv_q", "next_decode_input": "past.10.conv_q", "output": "present.10.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 10, "kind": "kda", "key": "conv_k", "next_decode_input": "past.10.conv_k", "output": "present.10.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 10, "kind": "kda", "key": "conv_v", "next_decode_input": "past.10.conv_v", "output": "present.10.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 10, "kind": "kda", "key": "state", "next_decode_input": "past.10.state", "output": "present.10.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 11, "kind": "mla", "key": "key", "next_decode_input": "past.11.key", "output": "present.11.key", "dtype": "FLOAT", "shape": [ 1, 16, "total_tokens", 192 ] }, { "layer": 11, "kind": "mla", "key": "value", "next_decode_input": "past.11.value", "output": "present.11.value", "dtype": "FLOAT", "shape": [ 1, 16, "total_tokens", 128 ] }, { "layer": 12, "kind": "kda", "key": "conv_q", "next_decode_input": "past.12.conv_q", "output": "present.12.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 12, "kind": "kda", "key": "conv_k", "next_decode_input": "past.12.conv_k", "output": "present.12.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 12, "kind": "kda", "key": "conv_v", "next_decode_input": "past.12.conv_v", "output": "present.12.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 12, "kind": "kda", "key": "state", "next_decode_input": "past.12.state", "output": "present.12.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 13, "kind": "kda", "key": "conv_q", "next_decode_input": "past.13.conv_q", "output": "present.13.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 13, "kind": "kda", "key": "conv_k", "next_decode_input": "past.13.conv_k", "output": "present.13.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 13, "kind": "kda", "key": "conv_v", "next_decode_input": "past.13.conv_v", "output": "present.13.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 13, "kind": "kda", "key": "state", "next_decode_input": "past.13.state", "output": "present.13.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 14, "kind": "kda", "key": "conv_q", "next_decode_input": "past.14.conv_q", "output": "present.14.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 14, "kind": "kda", "key": "conv_k", "next_decode_input": "past.14.conv_k", "output": "present.14.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 14, "kind": "kda", "key": "conv_v", "next_decode_input": "past.14.conv_v", "output": "present.14.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 14, "kind": "kda", "key": "state", "next_decode_input": "past.14.state", "output": "present.14.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 15, "kind": "mla", "key": "key", "next_decode_input": "past.15.key", "output": "present.15.key", "dtype": "FLOAT", "shape": [ 1, 16, "total_tokens", 192 ] }, { "layer": 15, "kind": "mla", "key": "value", "next_decode_input": "past.15.value", "output": "present.15.value", "dtype": "FLOAT", "shape": [ 1, 16, "total_tokens", 128 ] }, { "layer": 16, "kind": "kda", "key": "conv_q", "next_decode_input": "past.16.conv_q", "output": "present.16.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 16, "kind": "kda", "key": "conv_k", "next_decode_input": "past.16.conv_k", "output": "present.16.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 16, "kind": "kda", "key": "conv_v", "next_decode_input": "past.16.conv_v", "output": "present.16.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 16, "kind": "kda", "key": "state", "next_decode_input": "past.16.state", "output": "present.16.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 17, "kind": "kda", "key": "conv_q", "next_decode_input": "past.17.conv_q", "output": "present.17.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 17, "kind": "kda", "key": "conv_k", "next_decode_input": "past.17.conv_k", "output": "present.17.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 17, "kind": "kda", "key": "conv_v", "next_decode_input": "past.17.conv_v", "output": "present.17.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 17, "kind": "kda", "key": "state", "next_decode_input": "past.17.state", "output": "present.17.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 18, "kind": "kda", "key": "conv_q", "next_decode_input": "past.18.conv_q", "output": "present.18.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 18, "kind": "kda", "key": "conv_k", "next_decode_input": "past.18.conv_k", "output": "present.18.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 18, "kind": "kda", "key": "conv_v", "next_decode_input": "past.18.conv_v", "output": "present.18.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 18, "kind": "kda", "key": "state", "next_decode_input": "past.18.state", "output": "present.18.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 19, "kind": "mla", "key": "key", "next_decode_input": "past.19.key", "output": "present.19.key", "dtype": "FLOAT", "shape": [ 1, 16, "total_tokens", 192 ] }, { "layer": 19, "kind": "mla", "key": "value", "next_decode_input": "past.19.value", "output": "present.19.value", "dtype": "FLOAT", "shape": [ 1, 16, "total_tokens", 128 ] }, { "layer": 20, "kind": "kda", "key": "conv_q", "next_decode_input": "past.20.conv_q", "output": "present.20.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 20, "kind": "kda", "key": "conv_k", "next_decode_input": "past.20.conv_k", "output": "present.20.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 20, "kind": "kda", "key": "conv_v", "next_decode_input": "past.20.conv_v", "output": "present.20.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 20, "kind": "kda", "key": "state", "next_decode_input": "past.20.state", "output": "present.20.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 21, "kind": "kda", "key": "conv_q", "next_decode_input": "past.21.conv_q", "output": "present.21.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 21, "kind": "kda", "key": "conv_k", "next_decode_input": "past.21.conv_k", "output": "present.21.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 21, "kind": "kda", "key": "conv_v", "next_decode_input": "past.21.conv_v", "output": "present.21.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 21, "kind": "kda", "key": "state", "next_decode_input": "past.21.state", "output": "present.21.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 22, "kind": "kda", "key": "conv_q", "next_decode_input": "past.22.conv_q", "output": "present.22.conv_q", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 22, "kind": "kda", "key": "conv_k", "next_decode_input": "past.22.conv_k", "output": "present.22.conv_k", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 22, "kind": "kda", "key": "conv_v", "next_decode_input": "past.22.conv_v", "output": "present.22.conv_v", "dtype": "FLOAT", "shape": [ 1, 2048, 4 ] }, { "layer": 22, "kind": "kda", "key": "state", "next_decode_input": "past.22.state", "output": "present.22.state", "dtype": "FLOAT", "shape": [ 1, 16, 128, 128 ] }, { "layer": 23, "kind": "mla", "key": "key", "next_decode_input": "past.23.key", "output": "present.23.key", "dtype": "FLOAT", "shape": [ 1, 16, "total_tokens", 192 ] }, { "layer": 23, "kind": "mla", "key": "value", "next_decode_input": "past.23.value", "output": "present.23.value", "dtype": "FLOAT", "shape": [ 1, 16, "total_tokens", 128 ] } ], "inputs": [ "input_ids", "position_ids", "past.0.state", "past.0.conv_q", "past.0.conv_k", "past.0.conv_v", "past.1.state", "past.1.conv_q", "past.1.conv_k", "past.1.conv_v", "past.2.state", "past.2.conv_q", "past.2.conv_k", "past.2.conv_v", "past.3.key", "past.3.value", "past.4.state", "past.4.conv_q", "past.4.conv_k", "past.4.conv_v", "past.5.state", "past.5.conv_q", "past.5.conv_k", "past.5.conv_v", "past.6.state", "past.6.conv_q", "past.6.conv_k", "past.6.conv_v", "past.7.key", "past.7.value", "past.8.state", "past.8.conv_q", "past.8.conv_k", "past.8.conv_v", "past.9.state", "past.9.conv_q", "past.9.conv_k", "past.9.conv_v", "past.10.state", "past.10.conv_q", "past.10.conv_k", "past.10.conv_v", "past.11.key", "past.11.value", "past.12.state", "past.12.conv_q", "past.12.conv_k", "past.12.conv_v", "past.13.state", "past.13.conv_q", "past.13.conv_k", "past.13.conv_v", "past.14.state", "past.14.conv_q", "past.14.conv_k", "past.14.conv_v", "past.15.key", "past.15.value", "past.16.state", "past.16.conv_q", "past.16.conv_k", "past.16.conv_v", "past.17.state", "past.17.conv_q", "past.17.conv_k", "past.17.conv_v", "past.18.state", "past.18.conv_q", "past.18.conv_k", "past.18.conv_v", "past.19.key", "past.19.value", "past.20.state", "past.20.conv_q", "past.20.conv_k", "past.20.conv_v", "past.21.state", "past.21.conv_q", "past.21.conv_k", "past.21.conv_v", "past.22.state", "past.22.conv_q", "past.22.conv_k", "past.22.conv_v", "past.23.key", "past.23.value" ], "outputs": [ "logits", "present.0.conv_q", "present.0.conv_k", "present.0.conv_v", "present.0.state", "present.1.conv_q", "present.1.conv_k", "present.1.conv_v", "present.1.state", "present.2.conv_q", "present.2.conv_k", "present.2.conv_v", "present.2.state", "present.3.key", "present.3.value", "present.4.conv_q", "present.4.conv_k", "present.4.conv_v", "present.4.state", "present.5.conv_q", "present.5.conv_k", "present.5.conv_v", "present.5.state", "present.6.conv_q", "present.6.conv_k", "present.6.conv_v", "present.6.state", "present.7.key", "present.7.value", "present.8.conv_q", "present.8.conv_k", "present.8.conv_v", "present.8.state", "present.9.conv_q", "present.9.conv_k", "present.9.conv_v", "present.9.state", "present.10.conv_q", "present.10.conv_k", "present.10.conv_v", "present.10.state", "present.11.key", "present.11.value", "present.12.conv_q", "present.12.conv_k", "present.12.conv_v", "present.12.state", "present.13.conv_q", "present.13.conv_k", "present.13.conv_v", "present.13.state", "present.14.conv_q", "present.14.conv_k", "present.14.conv_v", "present.14.state", "present.15.key", "present.15.value", "present.16.conv_q", "present.16.conv_k", "present.16.conv_v", "present.16.state", "present.17.conv_q", "present.17.conv_k", "present.17.conv_v", "present.17.state", "present.18.conv_q", "present.18.conv_k", "present.18.conv_v", "present.18.state", "present.19.key", "present.19.value", "present.20.conv_q", "present.20.conv_k", "present.20.conv_v", "present.20.state", "present.21.conv_q", "present.21.conv_k", "present.21.conv_v", "present.21.state", "present.22.conv_q", "present.22.conv_k", "present.22.conv_v", "present.22.state", "present.23.key", "present.23.value" ] } ] }
{
"profile": "bf16_cpu",
"source_revision": "c4007c791db3c2fd9e82770bd2bbbd950744bc52",
"source_weights_sha256": "bc3030ea87f8b8ed93fa403db30d06afc1184cca2b84347549128bfe3a0156dc",
"status": "GENERATED_NOT_VALIDATED",
"graphs": [
{
"file": "onnx/decode.onnx",
"state_mapping": [
{
"layer": 0,
"kind": "kda",
"key": "conv_q",
"next_decode_input": "past.0.conv_q",
"output": "present.0.conv_q",
"dtype": "FLOAT",
"shape": [
1,
2048,
4
]
},
{
"layer": 0,
"kind": "kda",
"key": "conv_k",
"next_decode_input": "past.0.conv_k",
"output": "present.0.conv_k",
"dtype": "FLOAT",
"shape": [
1,
2048,
4
]
},
{
"layer": 0,
"kind": "kda",
"key": "conv_v",
"next_decode_input": "past.0.conv_v",
"output": "present.0.conv_v",
"dtype": "FLOAT",
"shape": [
1,
2048,
4
]
},
{
"layer": 0,
"kind": "kda",
"key": "state",
"next_decode_input": "past.0.state",
"output": "present.0.state",
"dtype": "FLOAT",
"shape": [
1,
16,
128,
128
]
},
{
"layer": 1,
"kind": "kda",
"key": "conv_q",
"next_decode_input": "past.1.conv_q",
"output": "present.1.conv_q",
"dtype": "FLOAT",
"shape": [
1,
2048,
4
]
},
{
"layer": 1,
"kind": "kda",
"key": "conv_k",
"next_decode_input": "past.1.conv_k",
"output": "present.1.conv_k",
"dtype": "FLOAT",
"shape": [
1,
2048,
4
]
},
{
"layer": 1,
"kind": "kda",
"key": "conv_v",
"next_decode_input": "past.1.conv_v",
"output": "present.1.conv_v",
"dtype": "FLOAT",
"shape": [
1,
2048,
4
]