mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 18:48:51 +00:00
Line-up the llama implementation with the python-transformers one. (#271)
* Line-up the llama implementation with the python-transformers one. * Also lineup the multiprocess version.
This commit is contained in:
@ -225,7 +225,7 @@ impl RmsNorm {
|
||||
let (b_sz, seq_len, hidden_size) = x.shape().dims3()?;
|
||||
let norm_x = (x.sqr()?.sum_keepdim(2)? / hidden_size as f64)?;
|
||||
let norm_x = norm_x.broadcast_as((b_sz, seq_len, hidden_size))?;
|
||||
let x_normed = (x / (norm_x + 1e-6)?.sqrt()?)?;
|
||||
let x_normed = (x / (norm_x + 1e-5)?.sqrt()?)?;
|
||||
let size = self.scale.shape().dims1()?;
|
||||
let scale = self
|
||||
.scale
|
||||
|
Reference in New Issue
Block a user