mirror of
https://github.com/huggingface/candle.git
synced 2025-06-15 18:28:24 +00:00
Clippy fixes for 1.81.0. (#2461)
* Clippy fixes for 1.81.0. * Another fix.
This commit is contained in:
@ -275,7 +275,7 @@ impl Llama {
|
||||
let lm_head = linear(cfg.dim, cfg.vocab_size, vb.pp("lm_head"))?;
|
||||
let norm = rms_norm(cfg.dim, cfg.norm_eps, vb.pp("model.norm"))?;
|
||||
let blocks: Vec<_> = (0..cfg.n_layers)
|
||||
.map(|i| Block::load(vb.pp(&format!("model.layers.{i}")), cache, cfg).unwrap())
|
||||
.map(|i| Block::load(vb.pp(format!("model.layers.{i}")), cache, cfg).unwrap())
|
||||
.collect();
|
||||
Ok(Self::new(wte, blocks, norm, lm_head))
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ impl C2f {
|
||||
let cv2 = ConvBlock::load(vb.pp("cv2"), (2 + n) * c, c2, 1, 1, None)?;
|
||||
let mut bottleneck = Vec::with_capacity(n);
|
||||
for idx in 0..n {
|
||||
let b = Bottleneck::load(vb.pp(&format!("bottleneck.{idx}")), c, c, shortcut)?;
|
||||
let b = Bottleneck::load(vb.pp(format!("bottleneck.{idx}")), c, c, shortcut)?;
|
||||
bottleneck.push(b)
|
||||
}
|
||||
Ok(Self {
|
||||
|
Reference in New Issue
Block a user