[API 2.0] Add transformer apis (#26418)
* Add MultiHeadAttention api.
test=develop
* Add MultiHeadAttention cache type and gen_cache.
test=develop
* Add TransformerEncoderLayer and TransformerEncoder.
test=develop
* Add Transformer decoder apis.
test=develop
* Add Transformer api.
test=develop
* add unittests for transformer api
* add unittests for transformer api
* Fix some bugs in Transformer apis.
test=develop
* add unittests for encoder, decoder and transformer
* clean conflicts infor in code
* clean Chinese comments
* Add TransformerDecoderCell and TransformerBeamSearchDecoder.
test=develop
* Remove TransformerDecoderCell and TransformerBeamSearchDecoder temporarily.
test=develop
* Add import for Transformer apis.
test=develop
* Update usage of weight_attr and Tensor in Transformer api docs.
test=develop
* Update Transformer apis by renaming MultiheadAttention and cal_kv according to comments.
test=develop
* Fix MultiHeadAttention in test_transformer_api.py.
test=develop
Co-authored-by: NLiuChiaChi <709153940@qq.com>
Showing
此差异已折叠。
想要评论请 注册 或 登录