mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2026-04-10 12:33:42 +00:00
rename to dataloader v1
This commit is contained in:
@@ -27,7 +27,7 @@ class GPTDatasetV1(Dataset):
|
||||
return self.input_ids[idx], self.target_ids[idx]
|
||||
|
||||
|
||||
def create_dataloader(txt, batch_size=4, max_length=256, stride=128, shuffle=True):
|
||||
def create_dataloader_v1(txt, batch_size=4, max_length=256, stride=128, shuffle=True):
|
||||
# Initialize the tokenizer
|
||||
tokenizer = tiktoken.get_encoding("gpt2")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user