a2rl.Simulator.gpt_sample#

Simulator.gpt_sample(seq, cur_col_index, sample=True)[source]#

Predict the next GPT token given the input GPT tokens.

Parameters:
  • seq (ndarray) – This is GPT token sequence. (Not dataframe tokenized sequence)

  • cur_col_index (int) – Inform which column index to be predicted, so that filtering can be done to remove invalid token.

Return type:

ndarray

Returns:

Predicted next GPT token.