pub struct PreferencePair {
pub prompt: PreferencePrompt,
pub chosen: PreferenceResponse,
pub rejected: PreferenceResponse,
pub metadata: PreferenceMetadata,
}Expand description
Preference pair for DPO/RLHF
Fields§
§prompt: PreferencePromptInput prompt
chosen: PreferenceResponseChosen (preferred) response
rejected: PreferenceResponseRejected response
metadata: PreferenceMetadataMetadata
Trait Implementations§
Source§impl Clone for PreferencePair
impl Clone for PreferencePair
Source§fn clone(&self) -> PreferencePair
fn clone(&self) -> PreferencePair
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 PreferencePair
impl Debug for PreferencePair
Source§impl<'de> Deserialize<'de> for PreferencePair
impl<'de> Deserialize<'de> for PreferencePair
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 PreferencePair
impl RefUnwindSafe for PreferencePair
impl Send for PreferencePair
impl Sync for PreferencePair
impl Unpin for PreferencePair
impl UnwindSafe for PreferencePair
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