Created
June 4, 2024 22:21
-
-
Save joecummings/642eaa9ce539ad93360ee3f999dbcfa3 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
from torchtune.models.llama3 import llama3_tokenizer | |
from torchtune.datasets import instruct_dataset | |
tokenizer = llama3_tokenizer("./model/original/tokenizer.model") | |
dataset = instruct_dataset( | |
tokenizer=tokenizer, | |
source="TIGER-Lab/WebInstructSub", | |
template="torchtune.data.AlpacaInstructTemplate", | |
column_map={ | |
"instruction": "question", | |
"output": "answer", | |
}, | |
max_seq_len=3072, | |
packed=True, | |
split="train", | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment