pub struct BertHparams {
pub arch: String,
pub n_layer: usize,
pub n_embd: usize,
pub n_ff: usize,
pub n_head: usize,
pub n_head_kv: usize,
pub n_ctx_train: usize,
pub n_token_types: usize,
pub layer_norm_eps: f32,
pub pooling: PoolingType,
pub cls_id: u32,
pub sep_id: u32,
}Expand description
bert.* metadata, after the loader has checked it.
Fields§
§arch: String§n_layer: usize§n_embd: usize§n_ff: usize§n_head: usize§n_head_kv: usize§n_ctx_train: usizeHeight of the learned position table.
n_token_types: usize§layer_norm_eps: f32§pooling: PoolingType§cls_id: u32[CLS] / [SEP], from tokenizer.ggml.bos_token_id and
tokenizer.ggml.seperator_token_id (upstream’s spelling of the
key, typo included). See BertEncoder::wrap_special.
sep_id: u32Implementations§
Trait Implementations§
Source§impl Clone for BertHparams
impl Clone for BertHparams
Source§fn clone(&self) -> BertHparams
fn clone(&self) -> BertHparams
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 moreAuto Trait Implementations§
impl Freeze for BertHparams
impl RefUnwindSafe for BertHparams
impl Send for BertHparams
impl Sync for BertHparams
impl Unpin for BertHparams
impl UnsafeUnpin for BertHparams
impl UnwindSafe for BertHparams
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,
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