mirror of
https://github.com/huggingface/candle.git
synced 2025-06-22 04:22:50 +00:00
Softmax numerical stability. (#267)
* Softmax numerical stability. * Fix the flash-attn test.
This commit is contained in:
@ -200,7 +200,7 @@ impl MultiHeadAttention {
|
||||
}
|
||||
let w = {
|
||||
let _timer = crate::Timer::new("qk::softmax");
|
||||
qk.softmax(candle::D::Minus1)?
|
||||
candle_nn::ops::softmax(&qk, candle::D::Minus1)?
|
||||
};
|
||||
let wv = {
|
||||
let _timer = crate::Timer::new("wv::matmul");
|
||||
|
Reference in New Issue
Block a user