Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[paraformer] support chunk mask #2282

Merged
merged 5 commits into from
Jan 8, 2024
Merged

Conversation

Mddct
Copy link
Collaborator

@Mddct Mddct commented Jan 8, 2024

重构encoder 支持wenet/transformer/encoder's dynamic chunk training

QA

0 为什么要支持paraformer mask training?

尝试使用pretrain的非流paraformer,fintune训练u2++ like的流式模型,看是否可以得到好的效果

  • ctc for streaming
  • cif + paraformer decoder for two-pass rescoring

1 为什么要有:IdentitySubsampling?

因为wenet顺序是: cmvn->subsampling->pos emb
paraformer 顺序是: lfr(subsampling) ->cmvn -> pos_emb
所以这里实现了个IdentitySubsampling, 什么也不做,只是调用了pos emb class,保持接口不变

2 paraformer fsm block中有padding, 可能对流式训练有影响(训练和推理chunk不一致)
TODO

example:
ctc_weight: 0.3
use_dynamic_chunk: true

Screenshot 2024-01-08 at 17 03 27

Next PR

  • paraformer recipe
  • paraformer chunk(先不管上述padding) recipe

@Mddct Mddct marked this pull request as ready for review January 8, 2024 09:30
@xingchensong xingchensong merged commit 51dfa71 into main Jan 8, 2024
6 checks passed
@xingchensong xingchensong deleted the Mddct-paraformer-chunk-mask branch January 8, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants