intel / xFasterTransformer

Apache License 2.0
344 stars 60 forks source link

[Sample] Fix numeric overflow when calculate softmax. #326

Closed Duyi-Wang closed 4 months ago

pujiang2018 commented 4 months ago

need to firstly minus max element to avoid NaN issues.