pulsatrix 1.1.0
Loading...
Searching...
No Matches
pulsatrix::CausalLmBatch Struct Reference

A right-padded training batch. More...

#include <lm_scoring.hpp>

Collaboration diagram for pulsatrix::CausalLmBatch:

Public Attributes

Tensor ids
 (N, L) token ids as floats: prompt, then completion but its last token
 
Tensor targets
 (N, L): the next token where it is a completion token, else kIgnoreIndex
 
std::vector< int64_t > lengths
 each row's real length, |prompt| + |completion| - 1
 
int64_t target_tokens = 0
 completion tokens in the batch, the loss's token count
 

Detailed Description

A right-padded training batch.

Member Data Documentation

◆ ids

Tensor pulsatrix::CausalLmBatch::ids

(N, L) token ids as floats: prompt, then completion but its last token

◆ lengths

std::vector<int64_t> pulsatrix::CausalLmBatch::lengths

each row's real length, |prompt| + |completion| - 1

◆ target_tokens

int64_t pulsatrix::CausalLmBatch::target_tokens = 0

completion tokens in the batch, the loss's token count

◆ targets

Tensor pulsatrix::CausalLmBatch::targets

(N, L): the next token where it is a completion token, else kIgnoreIndex


The documentation for this struct was generated from the following file: