cerebras.modelzoo.data_preparation.data_preprocessing.utils#
Functions
Since we do character-level FIM we need to detokenize, determine boundaries to split, and re-tokenize after splitting. |
|
Given a list of VSL sequences, generate input features and labels. |
|
Write the input params to file. |
|
Write outputs of execution |
|
Takes in an array of input_ids, mask, and labels, and performs the FIM operation to re-arrange into PSM and SPM format with some probability |
|
Takes in list of prefix/middle/suffix token lists, along with respective FIM (or AR) formats. |
|
Get all files of given filetypes from input directory. |
|
Retrieve configuration parameters :returns: |
|
Argparser definition for command line arguments from user. |
|
Recursively finds size of objects |
|
When performing FIM, we tokenize each chunk again after splitting. |
|
Helper for padding. |
|
Function to split the text into smaller sequences of length max_tok_len and then tokenize each of the smaller sequences. |
|
The goal of our truncation scheme is to avoid removing tokens from the middle section. |
|
Since we perform FIM at character-level, we potentially split characters in the middle of a word. |
|
Update config parameters with CLI arguments |
|
Detokenizer for wikitext. |