-
Notifications
You must be signed in to change notification settings - Fork 917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LoRA: add sort data flag #611
base: main
Are you sure you want to change the base?
Conversation
indices = np.arange(len(dataset)) | ||
indices = np.random.permutation(indices) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indices = np.arange(len(dataset)) | |
indices = np.random.permutation(indices) | |
indices = np.random.permutation(len(dataset)) |
# Make batches | ||
batch_idx = [ | ||
indices[i : i + batch_size] | ||
for i in range(0, len(indices) - batch_size + 1, batch_size) | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you pull this out of the if statement and remove the duplicate one above?
@@ -75,6 +75,11 @@ def build_parser(): | |||
type=str, | |||
help="Directory with {train, valid, test}.jsonl files", | |||
) | |||
parser.add_argument( | |||
"--sort-by-data-length", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind changing this to --sort-data-by-length
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay reviewing! Do you mind addressing the comments then we can merge it?
I will address comments like this and the need to resolve code conflicts later. |
see #583