MCPcopy Create free account
hub / github.com/SkyworkAI/Skywork / tokenize_function

Function tokenize_function

train/pt_data_preprocess.py:27–29  ·  view source on GitHub ↗
(examples)

Source from the content-addressed store, hash-verified

25 tokenizer = AutoTokenizer.from_pretrained(args.tokenizer_path, use_fast=False, trust_remote_code=True)
26
27 def tokenize_function(examples):
28 output = tokenizer(examples[args.text_field])
29 return output
30
31 block_size = args.block_size
32 # Main data processing function that will concatenate all texts from our dataset and generate chunks of block_size.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected