mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 02:58:50 +00:00
Remove some dead-code annotations. (#629)
* Remove some dead-code annotations. * More dead code removal. * One more. * CI fix.
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
#![allow(dead_code)]
|
||||
#[cfg(feature = "mkl")]
|
||||
extern crate intel_mkl_src;
|
||||
|
||||
@ -185,16 +184,6 @@ struct ModelWeights {
|
||||
span_output: tracing::Span,
|
||||
}
|
||||
|
||||
struct WeightMap(HashMap<String, QTensor>);
|
||||
impl WeightMap {
|
||||
fn get(&mut self, name: &str) -> Result<QTensor> {
|
||||
match self.0.remove(name) {
|
||||
None => candle::bail!("cannot find tensor with name '{name}'"),
|
||||
Some(tensor) => Ok(tensor),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn precomput_freqs_cis(head_dim: usize, freq_base: f32) -> Result<(Tensor, Tensor)> {
|
||||
let theta: Vec<_> = (0..head_dim)
|
||||
.step_by(2)
|
||||
|
Reference in New Issue
Block a user