Struct aiha::models::bloom::BloomModelConfig
source · pub struct BloomModelConfig { /* private fields */ }
Expand description
A struct representing a BLOOM model configuration
Implementations§
source§impl BloomModelConfig
impl BloomModelConfig
BLOOM model implementation
sourcepub fn new(
params: BloomParams,
model_type: String,
available_libraries: Vec<ModelLibraries>
) -> BloomModelConfig
pub fn new( params: BloomParams, model_type: String, available_libraries: Vec<ModelLibraries> ) -> BloomModelConfig
Build a new BloomModelConfig
struct based on the provided parameters
Trait Implementations§
source§impl Clone for BloomModelConfig
impl Clone for BloomModelConfig
source§fn clone(&self) -> BloomModelConfig
fn clone(&self) -> BloomModelConfig
Returns a copy of the value. Read more
1.0.0 · 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 BloomModelConfig
impl Debug for BloomModelConfig
source§impl<'de> Deserialize<'de> for BloomModelConfig
impl<'de> Deserialize<'de> for BloomModelConfig
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 ModelConfigTrait for BloomModelConfig
impl ModelConfigTrait for BloomModelConfig
Implementation of the ModelConfigTrait
trait for BloomModelConfig
Returns the model hidden size
source§fn intermediate_size(&self) -> i32
fn intermediate_size(&self) -> i32
Returns the model intermediate size
source§fn max_position_embeddings(&self) -> i32
fn max_position_embeddings(&self) -> i32
Returns the model max position embeddings
source§fn num_attention_heads(&self) -> i32
fn num_attention_heads(&self) -> i32
Returns the model number of attention heads
Returns the model number of hidden layers
source§fn model_type(&self) -> &str
fn model_type(&self) -> &str
Returns the model type
source§fn available_libraries(&self) -> &[ModelLibraries]
fn available_libraries(&self) -> &[ModelLibraries]
Returns the model libraries
Auto Trait Implementations§
impl RefUnwindSafe for BloomModelConfig
impl Send for BloomModelConfig
impl Sync for BloomModelConfig
impl Unpin for BloomModelConfig
impl UnwindSafe for BloomModelConfig
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