donjuanplatinum 1 год назад
Родитель
Сommit
0d716a791c
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      candle_demo/src/codegeex4.rs
  2. 1 1
      candle_demo/src/main.rs

+ 1 - 1
candle_demo/src/codegeex4.rs

@@ -68,7 +68,7 @@ impl RotaryEmbedding {
         let inv_freq_len = inv_freq.len();
         let inv_freq = Tensor::from_vec(inv_freq, (1, inv_freq_len), dev)?.to_dtype(dtype)?;
         let t = Tensor::arange(0u32, cfg.seq_length as u32, dev)?
-            .to_dtype(dtype)?
+            .to_dtype(dtype).expect("unalbe to dytpe in Rotray Embedding new")
             .reshape((cfg.seq_length, 1))?;
         let freqs = t.matmul(&inv_freq)?;
         let cache = Tensor::stack(&[&freqs.cos()?, &freqs.sin()?], D::Minus1)?;

+ 1 - 1
candle_demo/src/main.rs

@@ -174,7 +174,7 @@ fn main() -> Result<(),()> {
     );
     println!(
         "temp: {:.2} repeat-penalty: {:.2} repeat-last-n: {}",
-        args.temperature.unwrap_or(0.),
+        args.temperature.unwrap_or(0.95),
         args.repeat_penalty,
         args.repeat_last_n
     );