update for sherpa-ncnn v2.0

#1
by csukuangfj - opened
export-for-ncnn-fr-streaming-zipformer.sh CHANGED
@@ -46,7 +46,7 @@ pnnx joiner_jit_trace-pnnx.pt
46
  # 7767517
47
  # -2028 2547
48
  # +2029 2547
49
- # +SherpaMetaData sherpa_meta_data1 0 0 0=2 1=32 2=4 3=7 -23316=5,2,4,3,2,4 -23317=5,384,384,384,384,384 -23318=5,192,192,192,192,192 -23319=5,1,2,4,8,2 -23320=5,31,31,31,31,31
50
  # Input in0 0 1 in0
51
  # Input in1 0 1 in1
52
  # Split splitncnn_0 1 2 in1 2 3
@@ -61,11 +61,12 @@ pnnx joiner_jit_trace-pnnx.pt
61
  # (5) 1=32, attribute 1, 32 is the value of --decode-chunk-len
62
  # (6) 2=4, attribute 2, 4 is the value of --num-left-chunks
63
  # (7) 3=7, attribute 3, 7 is the pad length. The first subsampling layer is using (x_len - 7) // 2, so we use 7 here
64
- # (8) -23316=5,2,4,3,2,4, attribute 16, this is an array attribute. It is attribute 16 since -23300 - (-23316) = 16
 
65
  # the first element of the array is the length of the array, which is 5 in our case.
66
  # 2,4,3,2,4 is the value of --num-encoder-layers
67
- # (9) -23317=5,384,384,384,384,384, attribute 17. 384,384,384,384,384 is the value of --encoder-dims
68
- # (10) -23318=5,192,192,192,192,192, attribute 18, 192,192,192,192,192 is the value of --attention-dims
69
- # (11) -23319=5,1,2,4,8,2, attribute 19, 1,2,4,8,2 is the value of --zipformer-downsampling-factors
70
- # (12) -23320=5,31,31,31,31,31, attribute 20, 31,31,31,31,31 is the value of --cnn-module-kernels
71
 
 
46
  # 7767517
47
  # -2028 2547
48
  # +2029 2547
49
+ # +SherpaMetaData sherpa_meta_data1 0 0 0=2 1=32 2=4 3=7 15=1 -23316=5,2,4,3,2,4 -23317=5,384,384,384,384,384 -23318=5,192,192,192,192,192 -23319=5,1,2,4,8,2 -23320=5,31,31,31,31,31
50
  # Input in0 0 1 in0
51
  # Input in1 0 1 in1
52
  # Split splitncnn_0 1 2 in1 2 3
 
61
  # (5) 1=32, attribute 1, 32 is the value of --decode-chunk-len
62
  # (6) 2=4, attribute 2, 4 is the value of --num-left-chunks
63
  # (7) 3=7, attribute 3, 7 is the pad length. The first subsampling layer is using (x_len - 7) // 2, so we use 7 here
64
+ # (8) 15=1, attribute 15, 1 is the model version. We require it >= 1 for sherpa-ncnn v2.0
65
+ # (9) -23316=5,2,4,3,2,4, attribute 16, this is an array attribute. It is attribute 16 since -23300 - (-23316) = 16
66
  # the first element of the array is the length of the array, which is 5 in our case.
67
  # 2,4,3,2,4 is the value of --num-encoder-layers
68
+ # (10) -23317=5,384,384,384,384,384, attribute 17. 384,384,384,384,384 is the value of --encoder-dims
69
+ # (11) -23318=5,192,192,192,192,192, attribute 18, 192,192,192,192,192 is the value of --attention-dims
70
+ # (12) -23319=5,1,2,4,8,2, attribute 19, 1,2,4,8,2 is the value of --zipformer-downsampling-factors
71
+ # (13) -23320=5,31,31,31,31,31, attribute 20, 31,31,31,31,31 is the value of --cnn-module-kernels
72