mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 10:38:54 +00:00
Whisper tweaks (#85)
* Isolate the decoding bits of the whisper example. * Decode -> Decoder. * Add the suppress tokens filter. * More suppress tokens.
This commit is contained in:
@ -15,7 +15,7 @@ impl<'a> VarBuilder<'a> {
|
||||
pub fn from_safetensors(
|
||||
safetensors: Vec<SafeTensors<'a>>,
|
||||
dtype: DType,
|
||||
device: Device,
|
||||
device: &Device,
|
||||
) -> Self {
|
||||
let mut routing = HashMap::new();
|
||||
for (index, sf) in safetensors.iter().enumerate() {
|
||||
@ -25,7 +25,7 @@ impl<'a> VarBuilder<'a> {
|
||||
}
|
||||
Self {
|
||||
safetensors: Some((routing, safetensors)),
|
||||
device,
|
||||
device: device.clone(),
|
||||
dtype,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user