pub struct WhisperConfig {Show 26 fields
pub vocab_size: usize,
pub d_model: usize,
pub encoder_layers: usize,
pub decoder_layers: usize,
pub encoder_attention_heads: usize,
pub decoder_attention_heads: usize,
pub encoder_ffn_dim: usize,
pub decoder_ffn_dim: usize,
pub dropout: f32,
pub attention_dropout: f32,
pub activation_dropout: f32,
pub activation_function: String,
pub init_std: f32,
pub layer_norm_eps: f32,
pub scale_embedding: bool,
pub use_cache: bool,
pub is_encoder_decoder: bool,
pub pad_token_id: i64,
pub bos_token_id: i64,
pub eos_token_id: i64,
pub decoder_start_token_id: i64,
pub max_source_positions: usize,
pub max_target_positions: usize,
pub num_mel_bins: usize,
pub num_hidden_layers: usize,
pub hidden_size: usize,
}Fields§
§vocab_size: usize§d_model: usize§encoder_layers: usize§decoder_layers: usize§encoder_attention_heads: usize§decoder_attention_heads: usize§encoder_ffn_dim: usize§decoder_ffn_dim: usize§dropout: f32§attention_dropout: f32§activation_dropout: f32§activation_function: String§init_std: f32§layer_norm_eps: f32§scale_embedding: bool§use_cache: bool§is_encoder_decoder: bool§pad_token_id: i64§bos_token_id: i64§eos_token_id: i64§decoder_start_token_id: i64§max_source_positions: usize§max_target_positions: usize§num_mel_bins: usizeImplementations§
Source§impl WhisperConfig
impl WhisperConfig
Sourcepub fn from_gguf_config(gguf: &GGUFModelConfig) -> Self
pub fn from_gguf_config(gguf: &GGUFModelConfig) -> Self
Create WhisperConfig from GGUF model configuration
Sourcepub fn encoder_head_dim(&self) -> usize
pub fn encoder_head_dim(&self) -> usize
Get head dimension for encoder
Sourcepub fn decoder_head_dim(&self) -> usize
pub fn decoder_head_dim(&self) -> usize
Get head dimension for decoder
Trait Implementations§
Source§impl Clone for WhisperConfig
impl Clone for WhisperConfig
Source§fn clone(&self) -> WhisperConfig
fn clone(&self) -> WhisperConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WhisperConfig
impl Debug for WhisperConfig
Source§impl Default for WhisperConfig
impl Default for WhisperConfig
Source§impl<'de> Deserialize<'de> for WhisperConfig
impl<'de> Deserialize<'de> for WhisperConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl ModelConfig for WhisperConfig
impl ModelConfig for WhisperConfig
Auto Trait Implementations§
impl Freeze for WhisperConfig
impl RefUnwindSafe for WhisperConfig
impl Send for WhisperConfig
impl Sync for WhisperConfig
impl Unpin for WhisperConfig
impl UnsafeUnpin for WhisperConfig
impl UnwindSafe for WhisperConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more