InvalidArgumentError: seq_len should <= 1024, but received seq_len is
Created by: Dabulv
Environment python 3.6.9 paddlepaddle-gpu 1.8.1.post97
Problem Why limits the max sequence length of bert encoder? I just use 2-layers of transformers and I want deal with longer sequence.
Traceback
C++ Call Stacks (More useful to developers):
0 std::string paddle::platform::GetTraceBackString<std::string const&>(std::string const&, char const*, int) 1 paddle::operators::math::MultiHeadGPUComputeFunctor::operator()(paddle::platform::CUDADeviceContext const&, int, int, int, int, float*, float const*, float*, float, float) 2 paddle::operators::MultiHeadMatMulV2Kernel<paddle::platform::CUDADeviceContext, float>::Compute(paddle::framework::ExecutionContext const&) const 3 std::_Function_handler<void (paddle::framework::ExecutionContext const&), paddle::framework::OpKernelRegistrarFunctor<paddle::platform::CUDAPlace, false, 0ul, paddle::operators::MultiHeadMatMulV2Kernel<paddle::platform::CUDADeviceContext, float> >::operator()(char const*, char const*, int) const::{lambda(paddle::framework::ExecutionContext const&)#1 (closed)}>::_M_invoke(std::_Any_data const&, paddle::framework::ExecutionContext const&) 4 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&, paddle::framework::RuntimeContext*) const 5 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&) const 6 paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, paddle::platform::Place const&) 7 paddle::framework::NaiveExecutor::Run() 8 paddle::AnalysisPredictor::Run(std::vector<paddle::PaddleTensor, std::allocatorpaddle::PaddleTensor > const&, std::vector<paddle::PaddleTensor, std::allocatorpaddle::PaddleTensor >*, int)
Error Message Summary:
InvalidArgumentError: seq_len should <= 1024, but received seq_len is:1221 [Hint: Expected seq_len <= 1024, but received seq_len:1221 > 1024:1024.] at (/paddle/paddle/fluid/operators/math/bert_encoder_functor.cu:200)