pub struct BatchTokenizedQuestions {
pub input_ids: Vec<i64>,
pub attention_mask: Vec<i64>,
pub op_indices: Vec<i64>,
pub dims: ModelInputDimensions,
pub question_keys: Vec<String>,
pub candidate_counts: Vec<usize>,
pub option_keys_per_q: Vec<Vec<String>>,
}Expand description
複数質問を一括パッキングしたバッチトークナイズ結果構造体。
Fields§
§input_ids: Vec<i64>平坦化された入力トークン列テンソル用データ ([batch_size * sequence_length])。
attention_mask: Vec<i64>平坦化されたアテンションマスクテンソル用データ ([batch_size * sequence_length])。
op_indices: Vec<i64>平坦化された候補出現位置インデックステンソル用データ ([batch_size * num_options])。
パディング領域には Gather 層の境界外アクセスを防ぐためダミー値 0 が設定される。
dims: ModelInputDimensionsバッチテンソルの次元情報 (batch_size, sequence_length, num_options)。
question_keys: Vec<String>バッチ内に含まれる質問識別子キーの整列リスト。
candidate_counts: Vec<usize>各質問の本来の有効候補数 $K_i$ のリスト。
option_keys_per_q: Vec<Vec<String>>各質問のプロンプト出現順候補識別子キー列のリスト。
Trait Implementations§
Source§impl Clone for BatchTokenizedQuestions
impl Clone for BatchTokenizedQuestions
Source§fn clone(&self) -> BatchTokenizedQuestions
fn clone(&self) -> BatchTokenizedQuestions
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 moreSource§impl Debug for BatchTokenizedQuestions
impl Debug for BatchTokenizedQuestions
impl Eq for BatchTokenizedQuestions
Source§impl PartialEq for BatchTokenizedQuestions
impl PartialEq for BatchTokenizedQuestions
impl StructuralPartialEq for BatchTokenizedQuestions
Auto Trait Implementations§
impl Freeze for BatchTokenizedQuestions
impl RefUnwindSafe for BatchTokenizedQuestions
impl Send for BatchTokenizedQuestions
impl Sync for BatchTokenizedQuestions
impl Unpin for BatchTokenizedQuestions
impl UnsafeUnpin for BatchTokenizedQuestions
impl UnwindSafe for BatchTokenizedQuestions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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