pub struct VoxtralAudioConfig {
pub num_mel_bins: usize,
pub max_source_positions: usize,
pub d_model: usize,
pub encoder_attention_heads: usize,
pub encoder_layers: usize,
pub intermediate_size: usize,
pub scale_embedding: bool,
}Expand description
Whisper-style audio encoder section (audio_config in HF JSON).
Fields§
§num_mel_bins: usize§max_source_positions: usize§d_model: usize§encoder_attention_heads: usize§encoder_layers: usize§intermediate_size: usize§scale_embedding: boolImplementations§
Source§impl VoxtralAudioConfig
impl VoxtralAudioConfig
pub fn head_dim(&self) -> usize
Sourcepub fn encoder_seq_len(&self, mel_frames: usize) -> usize
pub fn encoder_seq_len(&self, mel_frames: usize) -> usize
Sequence length after two stride convolutions (same as Whisper).
Sourcepub fn audio_token_count(&self, mel_frames: usize) -> usize
pub fn audio_token_count(&self, mel_frames: usize) -> usize
Audio frames after the 4× projector grouping.
pub fn tiny_synthetic() -> VoxtralAudioConfig
pub fn mini_3b() -> VoxtralAudioConfig
Trait Implementations§
Source§impl Clone for VoxtralAudioConfig
impl Clone for VoxtralAudioConfig
Source§fn clone(&self) -> VoxtralAudioConfig
fn clone(&self) -> VoxtralAudioConfig
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 VoxtralAudioConfig
impl Debug for VoxtralAudioConfig
Source§impl<'de> Deserialize<'de> for VoxtralAudioConfig
impl<'de> Deserialize<'de> for VoxtralAudioConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<VoxtralAudioConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<VoxtralAudioConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for VoxtralAudioConfig
impl RefUnwindSafe for VoxtralAudioConfig
impl Send for VoxtralAudioConfig
impl Sync for VoxtralAudioConfig
impl Unpin for VoxtralAudioConfig
impl UnsafeUnpin for VoxtralAudioConfig
impl UnwindSafe for VoxtralAudioConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>,
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