Tokenize Function • AI Agents Framework

tokenize_function: Tokenizes a batch of text prompts with padding and truncation enabled.

tokenize_function

Function

</div>

This function is defined in the train module.

Tokenizes a batch of text prompts with padding and truncation enabled.

Signature

python
def tokenize_function(examples: Any, hf_tokenizer: Any, max_length: Any) -> Any

Parameters

ParamField Any

No description available.

ParamField Any

No description available.

ParamField Any

No description available.

Returns

ResponseField Any

The result of the operation.

Uses

  • hf_tokenizer
  • value.tolist

Used By

Source

View on GitHub

praisonai/train.py at line 83