thu-coai / DA-Transformer

Official Implementation for the ICML2022 paper "Directed Acyclic Transformer for Non-Autoregressive Machine Translation"
Other
118 stars 15 forks source link

dag_best_alignment: graph size is too small #11

Open bbo0924 opened 1 year ago

bbo0924 commented 1 year ago

Hello, this is great work in NAT and I like it. I tried to modify the src-upsample-scale and make the lambda smaller, like 2 or 4. But it is raise an error: "dag_best_alignment.cu:68: calculate_maxalpha_kernel: block: [0,77,0], thread: [0,244,0] Assertion output_len >= target_len && "dag_best_alignment: graph size is too small (smaller than target length)" failed." Do you know how to fix this error? Thank you

hzhwcmhf commented 1 year ago

Try filtering out samples that satisfying target length / source length > src_upsample_scale in your dataset. If you still have problem, please you specify the dataset and your training script?

MeWannaSleep commented 1 year ago

@hzhwcmhf @bbo0924 what's is src-upsample-scale?I have encountered the same error, and in the readme I only to find --upsample-scale and decode---upsample-scale,please help

hzhwcmhf commented 1 year ago

@MeWannaSleep --src-upsample-scale is an argument in previous version. You can now use --upsample-scale and --decode-upsample-scale to control the upsampling rate in training and inference, respectively.

If you met the same error, now you can use --filter-ratio to automatically remove samples satisfying target length / source length > filter_ratio or source length / target length > filter_ratio. I recommend using a smaller filter-ratio than upsample-scale, e.g., --upsample-scale 4 --filter-ratio 2

MeWannaSleep commented 1 year ago

@hzhwcmhf 大哥,能不能加个微信请教一下啊,这个项目我搞了快一周了就是跑不起来,求求了

hzhwcmhf commented 1 year ago

@hzhwcmhf 大哥,能不能加个微信请教一下啊,这个项目我搞了快一周了就是跑不起来,求求了

你发个邮件到我邮箱吧 huangfei382@163.com 邮箱发你微信号