pub struct SqueezeAlbertConfig {Show 20 fields
pub attention_probs_dropout_prob: f64,
pub embedding_size: i64,
pub hidden_act: Activation,
pub hidden_dropout_prob: f64,
pub hidden_size: i64,
pub initializer_range: f64,
pub inner_group_num: i64,
pub intermediate_size: i64,
pub max_position_embeddings: i64,
pub num_attention_heads: i64,
pub num_hidden_groups: i64,
pub num_hidden_layers: i64,
pub type_vocab_size: i64,
pub vocab_size: i64,
pub q_groups: i64,
pub k_groups: i64,
pub v_groups: i64,
pub post_attention_groups: i64,
pub intermediate_groups: i64,
pub output_groups: i64,
}Expand description
SqueezeALBERT model configuration.
This is the union set of the SqueezeBERT and ALBERT configurations:
- SqueezeBERT uses
q_groups,k_groups,v_groups,post_attention_groups,intermediate_groups, andoutput_groupsto configure the number of groups in grouped convolutions. - ALBERT uses
num_hidden_groupsto configure the number of layer groups andembedding_sizeto configure the size of piece embeddings.
Fields§
§attention_probs_dropout_prob: f64§embedding_size: i64§initializer_range: f64§inner_group_num: i64§intermediate_size: i64§max_position_embeddings: i64§num_attention_heads: i64§type_vocab_size: i64§vocab_size: i64§q_groups: i64§k_groups: i64§v_groups: i64§post_attention_groups: i64§intermediate_groups: i64§output_groups: i64Trait Implementations§
Source§impl Debug for SqueezeAlbertConfig
impl Debug for SqueezeAlbertConfig
Source§impl Default for SqueezeAlbertConfig
impl Default for SqueezeAlbertConfig
Source§impl<'de> Deserialize<'de> for SqueezeAlbertConfigwhere
SqueezeAlbertConfig: Default,
impl<'de> Deserialize<'de> for SqueezeAlbertConfigwhere
SqueezeAlbertConfig: Default,
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 From<&SqueezeAlbertConfig> for AlbertConfig
impl From<&SqueezeAlbertConfig> for AlbertConfig
Source§fn from(albert_config: &SqueezeAlbertConfig) -> Self
fn from(albert_config: &SqueezeAlbertConfig) -> Self
Converts to this type from the input type.
Source§impl From<&SqueezeAlbertConfig> for BertConfig
impl From<&SqueezeAlbertConfig> for BertConfig
Source§fn from(albert_config: &SqueezeAlbertConfig) -> Self
fn from(albert_config: &SqueezeAlbertConfig) -> Self
Converts to this type from the input type.
Source§impl From<&SqueezeAlbertConfig> for SqueezeBertConfig
impl From<&SqueezeAlbertConfig> for SqueezeBertConfig
Source§fn from(config: &SqueezeAlbertConfig) -> Self
fn from(config: &SqueezeAlbertConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SqueezeAlbertConfig
impl RefUnwindSafe for SqueezeAlbertConfig
impl Send for SqueezeAlbertConfig
impl Sync for SqueezeAlbertConfig
impl Unpin for SqueezeAlbertConfig
impl UnwindSafe for SqueezeAlbertConfig
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> 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