pub struct ResourceConfig {
pub context_length: u32,
pub temperature: f32,
pub top_p: f32,
pub top_k: u32,
pub max_tokens: u32,
pub gpu_layers: Option<u32>,
pub threads: Option<u32>,
pub batch_size: u32,
}
Expand description
资源配置
Fields§
§context_length: u32
§temperature: f32
§top_p: f32
§top_k: u32
§max_tokens: u32
§gpu_layers: Option<u32>
§threads: Option<u32>
§batch_size: u32
Trait Implementations§
Source§impl Clone for ResourceConfig
impl Clone for ResourceConfig
Source§fn clone(&self) -> ResourceConfig
fn clone(&self) -> ResourceConfig
Returns a duplicate 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 ResourceConfig
impl Debug for ResourceConfig
Source§impl<'de> Deserialize<'de> for ResourceConfig
impl<'de> Deserialize<'de> for ResourceConfig
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
Auto Trait Implementations§
impl Freeze for ResourceConfig
impl RefUnwindSafe for ResourceConfig
impl Send for ResourceConfig
impl Sync for ResourceConfig
impl Unpin for ResourceConfig
impl UnwindSafe for ResourceConfig
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