mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 02:38:10 +00:00
Add the original whisper names as comment.
This commit is contained in:
@ -77,18 +77,20 @@ impl HiddenAct {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The names in comments correspond to the original implementation:
|
||||||
|
// https://github.com/openai/whisper/blob/f572f2161ba831bae131364c3bffdead7af6d210/whisper/model.py#L17
|
||||||
#[derive(Debug, Clone, PartialEq, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Deserialize)]
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
pub num_mel_bins: usize,
|
pub num_mel_bins: usize, // n_mels
|
||||||
pub max_source_positions: usize,
|
pub max_source_positions: usize, // n_audio_ctx
|
||||||
pub d_model: usize,
|
pub d_model: usize, // n_audio_state
|
||||||
pub encoder_attention_heads: usize,
|
pub encoder_attention_heads: usize, // n_audio_head
|
||||||
pub encoder_layers: usize,
|
pub encoder_layers: usize, // n_audio_layer
|
||||||
pub vocab_size: usize,
|
pub vocab_size: usize, // n_vocab
|
||||||
pub max_target_positions: usize,
|
pub max_target_positions: usize, // n_text_ctx
|
||||||
// pub n_text_state: usize,
|
// pub n_text_state: usize,
|
||||||
pub decoder_attention_heads: usize,
|
pub decoder_attention_heads: usize, // n_text_head
|
||||||
pub decoder_layers: usize,
|
pub decoder_layers: usize, // n_text_layer
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Config {
|
impl Config {
|
||||||
|
Reference in New Issue
Block a user