microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
14.15k stars 2.86k forks source link

Does onnxruntime support bert with relative position embedding #7713

Open trouble-maker007 opened 3 years ago

trouble-maker007 commented 3 years ago

I have train a bert with relative position embedding, that improve the performance, I doubt that does onnxruntime support relative position embedding like nezha, roformer

tianleiwu commented 3 years ago

@trouble-maker007, are you able to export the model to onnx model? If so, let us know if onnxruntime cannot inference the model.

I guess it only change the part of embedding layer, and the attention layers are not changed. So most our optimizations (like attention, layer normalization and GELU fusions) for BERT model can still be applied.