Api: encoded
Api members in the encoded family.
| Member |
|---|
encoded_attention_mask |
encoded_cu_seqlens |
encoded_free |
encoded_ids_at / f_encoded_ids_at |
encoded_input_ids |
encoded_num_sequences |
encoded_seq_lengths |
encoded_attention_mask
fn encoded_attention_mask(self, e: &Encoded) -> Option<Tensor>
Wraps api-table member encoded_attention_mask.
the attention mask, or NULL (padded path only); a non-NULL return is RETAINED; the caller releases it
A NULL return maps to None.
encoded_cu_seqlens
fn encoded_cu_seqlens(self, e: &Encoded) -> Option<Tensor>
Wraps api-table member encoded_cu_seqlens.
exclusive prefix sums (the varlen offset table), or NULL; a non-NULL return is RETAINED; the caller releases it
A NULL return maps to None.
encoded_free
fn encoded_free(self, e: &Encoded)
Wraps api-table member encoded_free.
encoded_ids_at / f_encoded_ids_at
fn f_encoded_ids_at(self, e: &Encoded, i: usize) -> Result<Vec<i32>>
fn encoded_ids_at(self, e: &Encoded, i: usize) -> Vec<i32>
Wraps api-table member encoded_ids_at.
row i's token ids; two-call sizing (buf NULL sizes; count carries capacity in, required count out)
encoded_input_ids
fn encoded_input_ids(self, e: &Encoded) -> Option<Tensor>
Wraps api-table member encoded_input_ids.
the input-id tensor, or NULL when the encode did not build tensors; a non-NULL return is RETAINED; the caller releases it
A NULL return maps to None.
encoded_num_sequences
fn encoded_num_sequences(self, e: &Encoded) -> usize
Wraps api-table member encoded_num_sequences.
how many id rows the encode produced
encoded_seq_lengths
fn encoded_seq_lengths(self, e: &Encoded) -> Option<Tensor>
Wraps api-table member encoded_seq_lengths.
per-sequence token counts, or NULL; a non-NULL return is RETAINED ; the caller releases it
A NULL return maps to None.