Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

madroidmaq
Copy link
Contributor

see #583

Comment on lines +102 to +103
indices = np.arange(len(dataset))
indices = np.random.permutation(indices)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
indices = np.arange(len(dataset))
indices = np.random.permutation(indices)
indices = np.random.permutation(len(dataset))

Comment on lines +104 to +108
# Make batches
batch_idx = [
indices[i : i + batch_size]
for i in range(0, len(indices) - batch_size + 1, batch_size)
]
Copy link
Member

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",
Copy link
Member

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?

Copy link
Member

@awni awni left a 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?

@madroidmaq
Copy link
Contributor Author

I will address comments like this and the need to resolve code conflicts later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants