lightseq
lightseq copied to clipboard
ValueError: Sequence length 713 exceeds the limit 300.
Fairseq working fine, but lightseq (same params) throw this error, Here I found relevent code
why need MAX_SEQ_LENGTH = 300?
Can someone help me please
Fairseq working fine, but lightseq (same params) throw this error, Here I found relevent code
why need MAX_SEQ_LENGTH = 300?
Can someone help me please
You can manually change MAX_SEQ_LENGTH
to the maximal sequence length of your dataset, and then use pip install -e .
to compile the source code.
We set MAX_SEQ_LENGTH=300
here to reduce the pre-allocated GPU memory, and this can handle most of the NLP tasks.
Thanks for your reply, I set MAX_SEQ_LENGTH to 512 according to this, and also set fairseq max-source-positions = 512, now working fine.
and I still have a small question: fairseq's model size = 964M, lightseq's model size = 1.2G with almost same parmas, why they are not the same size? Is the model structure of lightseq more complicated?
Thanks again.