Commit e0783ae
add CTC batched beam search (#13337)
* add ctc beam decoding
Signed-off-by: lilithgrigoryan <[email protected]>
* add utils
Signed-off-by: lilithgrigoryan <[email protected]>
* first working
Signed-off-by: lilithgrigoryan <[email protected]>
* working cuda graphs
Signed-off-by: lilithgrigoryan <[email protected]>
* fix bugs with cudagraohs
Signed-off-by: lilithgrigoryan <[email protected]>
* working
Signed-off-by: lilithgrigoryan <[email protected]>
* small fix
Signed-off-by: lilithgrigoryan <[email protected]>
* minor fix
Signed-off-by: lilithgrigoryan <[email protected]>
* add logging
Signed-off-by: lilithgrigoryan <[email protected]>
* add print
Signed-off-by: lilithgrigoryan <[email protected]>
* to log sum exp
Signed-off-by: lilithgrigoryan <[email protected]>
* back to max score
Signed-off-by: lilithgrigoryan <[email protected]>
* fix bug in cudagraphs, save before refactor
Signed-off-by: lilithgrigoryan <[email protected]>
* rm log10
Signed-off-by: lilithgrigoryan <[email protected]>
* rm prints
Signed-off-by: lilithgrigoryan <[email protected]>
* add reallocation
Signed-off-by: lilithgrigoryan <[email protected]>
* rm logprobs from state
Signed-off-by: lilithgrigoryan <[email protected]>
* rm nexts from state
Signed-off-by: lilithgrigoryan <[email protected]>
* rm prev lm states
Signed-off-by: lilithgrigoryan <[email protected]>
* small clean up
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up cuda graphs
Signed-off-by: lilithgrigoryan <[email protected]>
* cudagraph working
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up torch working
Signed-off-by: lilithgrigoryan <[email protected]>
* Apply isort and black reformatting
Signed-off-by: lilithgrigoryan <[email protected]>
* rm files
Signed-off-by: lilithgrigoryan <[email protected]>
* save
Signed-off-by: lilithgrigoryan <[email protected]>
* add flatten
Signed-off-by: lilithgrigoryan <[email protected]>
* Apply isort and black reformatting
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up
Signed-off-by: lilithgrigoryan <[email protected]>
* add timestamps
Signed-off-by: lilithgrigoryan <[email protected]>
* rm file
Signed-off-by: lilithgrigoryan <[email protected]>
* Apply isort and black reformatting
Signed-off-by: lilithgrigoryan <[email protected]>
* rename file
Signed-off-by: lilithgrigoryan <[email protected]>
* add batched beam tests
Signed-off-by: lilithgrigoryan <[email protected]>
* Apply isort and black reformatting
Signed-off-by: lilithgrigoryan <[email protected]>
* add tests
Signed-off-by: lilithgrigoryan <[email protected]>
* Apply isort and black reformatting
Signed-off-by: lilithgrigoryan <[email protected]>
* changed return type
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up
Signed-off-by: lilithgrigoryan <[email protected]>
* Apply isort and black reformatting
Signed-off-by: lilithgrigoryan <[email protected]>
* minor changes
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up
Signed-off-by: lilithgrigoryan <[email protected]>
* renamed variables
Signed-off-by: lilithgrigoryan <[email protected]>
* changed is_tdt to model_type
Signed-off-by: lilithgrigoryan <[email protected]>
* unified batched beam hyps
Signed-off-by: lilithgrigoryan <[email protected]>
* Apply isort and black reformatting
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up
Signed-off-by: lilithgrigoryan <[email protected]>
* Update cuda_program_name
Co-authored-by: Vladimir Bataev <[email protected]>
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up and and commments
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up and small fixes
Signed-off-by: lilithgrigoryan <[email protected]>
* Apply isort and black reformatting
Signed-off-by: lilithgrigoryan <[email protected]>
* fix
Signed-off-by: lilithgrigoryan <[email protected]>
* fix tests
Signed-off-by: lilithgrigoryan <[email protected]>
* added check on model type
Signed-off-by: lilithgrigoryan <[email protected]>
* minor change
Signed-off-by: lilithgrigoryan <[email protected]>
* rm repetitions LM scoring
Signed-off-by: lilithgrigoryan <[email protected]>
* add enum model type
Signed-off-by: lilithgrigoryan <[email protected]>
* add enum model type
Signed-off-by: lilithgrigoryan <[email protected]>
* Apply isort and black reformatting
Signed-off-by: lilithgrigoryan <[email protected]>
* fix lm repetitions for cudahraphs
Signed-off-by: lilithgrigoryan <[email protected]>
* Apply isort and black reformatting
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up
Signed-off-by: lilithgrigoryan <[email protected]>
* clean up
Signed-off-by: lilithgrigoryan <[email protected]>
---------
Signed-off-by: lilithgrigoryan <[email protected]>
Signed-off-by: lilithgrigoryan <[email protected]>
Signed-off-by: lilithgrigoryan <[email protected]>
Co-authored-by: lilithgrigoryan <[email protected]>
Co-authored-by: oliver könig <[email protected]>
Co-authored-by: Vladimir Bataev <[email protected]>1 parent 3d3bd66 commit e0783ae
File tree
13 files changed
+1615
-129
lines changed- nemo/collections/asr/parts
- submodules
- utils
- scripts/asr_language_modeling/ngram_lm
- tests/collections/asr/decoding
13 files changed
+1615
-129
lines changedLines changed: 696 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 124 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
207 | | - | |
| 208 | + | |
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
| |||
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
230 | | - | |
| 231 | + | |
231 | 232 | | |
232 | | - | |
| 233 | + | |
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
| |||
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
263 | | - | |
| 264 | + | |
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
267 | | - | |
| 268 | + | |
268 | 269 | | |
269 | 270 | | |
270 | 271 | | |
| |||
349 | 350 | | |
350 | 351 | | |
351 | 352 | | |
352 | | - | |
| 353 | + | |
353 | 354 | | |
354 | | - | |
| 355 | + | |
355 | 356 | | |
356 | 357 | | |
357 | 358 | | |
| |||
367 | 368 | | |
368 | 369 | | |
369 | 370 | | |
370 | | - | |
| 371 | + | |
371 | 372 | | |
372 | | - | |
| 373 | + | |
373 | 374 | | |
374 | 375 | | |
375 | 376 | | |
| |||
451 | 452 | | |
452 | 453 | | |
453 | 454 | | |
454 | | - | |
| 455 | + | |
455 | 456 | | |
456 | 457 | | |
457 | 458 | | |
| |||
533 | 534 | | |
534 | 535 | | |
535 | 536 | | |
536 | | - | |
| 537 | + | |
537 | 538 | | |
538 | | - | |
| 539 | + | |
539 | 540 | | |
540 | 541 | | |
541 | 542 | | |
| |||
550 | 551 | | |
551 | 552 | | |
552 | 553 | | |
553 | | - | |
| 554 | + | |
554 | 555 | | |
555 | 556 | | |
556 | 557 | | |
557 | 558 | | |
558 | 559 | | |
559 | 560 | | |
560 | 561 | | |
561 | | - | |
| 562 | + | |
562 | 563 | | |
563 | 564 | | |
564 | 565 | | |
| |||
877 | 878 | | |
878 | 879 | | |
879 | 880 | | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
880 | 983 | | |
881 | 984 | | |
882 | 985 | | |
| |||
906 | 1009 | | |
907 | 1010 | | |
908 | 1011 | | |
| 1012 | + | |
909 | 1013 | | |
910 | | - | |
911 | | - | |
912 | | - | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
913 | 1020 | | |
914 | 1021 | | |
915 | 1022 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
270 | 284 | | |
271 | 285 | | |
272 | 286 | | |
| |||
294 | 308 | | |
295 | 309 | | |
296 | 310 | | |
297 | | - | |
| 311 | + | |
298 | 312 | | |
299 | | - | |
| 313 | + | |
300 | 314 | | |
301 | 315 | | |
302 | 316 | | |
| |||
310 | 324 | | |
311 | 325 | | |
312 | 326 | | |
313 | | - | |
| 327 | + | |
314 | 328 | | |
315 | | - | |
| 329 | + | |
316 | 330 | | |
317 | 331 | | |
318 | 332 | | |
| |||
327 | 341 | | |
328 | 342 | | |
329 | 343 | | |
330 | | - | |
| 344 | + | |
331 | 345 | | |
332 | | - | |
| 346 | + | |
333 | 347 | | |
334 | 348 | | |
335 | 349 | | |
| |||
357 | 371 | | |
358 | 372 | | |
359 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
360 | 390 | | |
361 | 391 | | |
362 | 392 | | |
| |||
1051 | 1081 | | |
1052 | 1082 | | |
1053 | 1083 | | |
1054 | | - | |
| 1084 | + | |
1055 | 1085 | | |
1056 | | - | |
| 1086 | + | |
1057 | 1087 | | |
1058 | 1088 | | |
1059 | 1089 | | |
1060 | | - | |
| 1090 | + | |
1061 | 1091 | | |
1062 | | - | |
| 1092 | + | |
1063 | 1093 | | |
1064 | 1094 | | |
1065 | 1095 | | |
| |||
1340 | 1370 | | |
1341 | 1371 | | |
1342 | 1372 | | |
1343 | | - | |
| 1373 | + | |
1344 | 1374 | | |
1345 | | - | |
| 1375 | + | |
1346 | 1376 | | |
1347 | 1377 | | |
1348 | 1378 | | |
1349 | | - | |
| 1379 | + | |
1350 | 1380 | | |
1351 | | - | |
| 1381 | + | |
1352 | 1382 | | |
1353 | 1383 | | |
1354 | 1384 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
0 commit comments