@@ -5,6 +5,7 @@ package falcon
55import (
66 core "dappco.re/go"
77 "dappco.re/go/inference/model"
8+ "dappco.re/go/inference/model/attn"
89 "dappco.re/go/inference/model/safetensors"
910)
1011
@@ -27,11 +28,11 @@ func init() {
2728 }
2829 headDim := cfg .HiddenSize / cfg .NumAttentionHeads
2930 if cfg .NewDecoderArchitecture && cfg .NumKVHeads > 0 {
30- tensors = model .SplitGroupedQKV (tensors , p + "query_key_value" , p + "query" , p + "key" , p + "value" , cfg .NumAttentionHeads , cfg .NumKVHeads , headDim )
31+ tensors = attn .SplitGroupedQKV (tensors , p + "query_key_value" , p + "query" , p + "key" , p + "value" , cfg .NumAttentionHeads , cfg .NumKVHeads , headDim )
3132 } else if cfg .MultiQuery {
32- tensors = model .SplitContiguousQKV (tensors , p + "query_key_value" , p + "query" , p + "key" , p + "value" , cfg .NumAttentionHeads * headDim , headDim )
33+ tensors = attn .SplitContiguousQKV (tensors , p + "query_key_value" , p + "query" , p + "key" , p + "value" , cfg .NumAttentionHeads * headDim , headDim )
3334 } else {
34- tensors = model .SplitInterleavedQKV (tensors , p + "query_key_value" , p + "query" , p + "key" , p + "value" , cfg .NumAttentionHeads , headDim )
35+ tensors = attn .SplitInterleavedQKV (tensors , p + "query_key_value" , p + "query" , p + "key" , p + "value" , cfg .NumAttentionHeads , headDim )
3536 }
3637 }
3738 return tensors
0 commit comments