pub struct AnswerSpan {
pub start: Vec<u32>,
pub end: u32,
pub values: Option<TokenText>,
}Expand description
Supervised chat records scored on the assistant’s answer only: every
target from the first token after start (the rendered generation
prompt, e.g. <|Bot|></think>) through the first end token (the
turn terminator) carries the LM loss; the prompt is context. This is
the multi-token sibling of focus_tokens — a JSON verdict, a number,
a sentence — where a one-token label does not fit.
Fields§
§start: Vec<u32>Token ids of the generation prompt; the answer starts right after its LAST occurrence in the record.
end: u32The turn terminator (one token); the last scored target.
values: Option<TokenText>Decoded text of every vocabulary id. When present, the answer’s
top-level JSON values are located in it and the held score grades
whole verdicts (answer_values): a question counts as correct only
when every token of its value is the argmax. Token accuracy over
the span alone is dominated by the braces, quotes and question ids
the model copies from the prompt.
Trait Implementations§
Source§impl Clone for AnswerSpan
impl Clone for AnswerSpan
Source§impl Debug for AnswerSpan
impl Debug for AnswerSpan
impl Eq for AnswerSpan
Source§impl PartialEq for AnswerSpan
impl PartialEq for AnswerSpan
impl StructuralPartialEq for AnswerSpan
Auto Trait Implementations§
impl Freeze for AnswerSpan
impl RefUnwindSafe for AnswerSpan
impl Send for AnswerSpan
impl Sync for AnswerSpan
impl Unpin for AnswerSpan
impl UnsafeUnpin for AnswerSpan
impl UnwindSafe for AnswerSpan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.