diff options
author | Nicolas Patry <patry.nicolas@protonmail.com> | 2023-07-29 16:38:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-29 16:38:35 +0200 |
commit | 40c80bfbb2d43f1177eed83821fa1795d3ebea19 (patch) | |
tree | 1bc2c925c16d23498807dde1b75e5ca7c2b56cfe /candle-examples/examples/llama2-c | |
parent | 97d8712ba507dbdb06c639b0c6b8857e454bb269 (diff) | |
parent | 07eb899729cfcc8f2548103eed779c0e4c5b034c (diff) | |
download | candle-40c80bfbb2d43f1177eed83821fa1795d3ebea19.tar.gz candle-40c80bfbb2d43f1177eed83821fa1795d3ebea19.tar.bz2 candle-40c80bfbb2d43f1177eed83821fa1795d3ebea19.zip |
Merge branch 'main' into update_multiprocess
Diffstat (limited to 'candle-examples/examples/llama2-c')
-rw-r--r-- | candle-examples/examples/llama2-c/model.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/candle-examples/examples/llama2-c/model.rs b/candle-examples/examples/llama2-c/model.rs index 6d9e4bcd..9e1c3eda 100644 --- a/candle-examples/examples/llama2-c/model.rs +++ b/candle-examples/examples/llama2-c/model.rs @@ -47,9 +47,8 @@ impl Cache { if let Some(mask) = masks.get(&t) { Ok(mask.clone()) } else { - // TODO: If we support bool or u8 tensors, this would be better. let mask: Vec<_> = (0..t) - .flat_map(|i| (0..t).map(move |j| u32::from(j > i))) + .flat_map(|i| (0..t).map(move |j| u8::from(j > i))) .collect(); let mask = Tensor::from_slice(&mask, (t, t), &self.device)?; masks.insert(t, mask.clone()); |