mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 10:38:54 +00:00
Add from_iter and arange, use it in the doctests. (#145)
This commit is contained in:
@ -209,7 +209,6 @@ fn main() -> Result<()> {
|
||||
index_pos += ctxt.len();
|
||||
|
||||
let next_token = if let Some(temperature) = args.temperature {
|
||||
println!("Sampling with temperature {temperature:?}");
|
||||
let prs = (&logits / temperature)?.softmax(D::Minus1)?;
|
||||
let logits_v: Vec<f32> = prs.to_vec1()?;
|
||||
let distr = rand::distributions::WeightedIndex::new(&logits_v)?;
|
||||
|
Reference in New Issue
Block a user