-
-
Save manujosephv/089a78e85a61c31fdafc379a84c80fe5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def load_dataset(train_path,test_path,tokenizer): | |
train_dataset = TextDataset( | |
tokenizer=tokenizer, | |
file_path=train_path, | |
block_size=128) | |
test_dataset = TextDataset( | |
tokenizer=tokenizer, | |
file_path=test_path, | |
block_size=128) | |
data_collator = DataCollatorForLanguageModeling( | |
tokenizer=tokenizer, mlm=False, | |
) | |
return train_dataset,test_dataset,data_collator | |
train_dataset,test_dataset,data_collator = load_dataset(train_mod_path,test_mod_path,tokenizer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment