Skip to content

parallel : increase the variability of the prompt lengths #13927

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

Merged
merged 1 commit into from
May 30, 2025

Conversation

ggerganov
Copy link
Member

Now the prompts have randomly between [0, n_junk) dummy questions before the actual question.

@ggerganov ggerganov merged commit dd665cc into master May 30, 2025
51 of 53 checks passed
@ggerganov ggerganov deleted the gg/parallel-junk-rand branch May 30, 2025 16:38
@@ -315,7 +315,10 @@ int main(int argc, char ** argv) {
} else {
client.prompt += k_system;
}
for (int i = 0; i < n_junk; ++i) {

const int n_junk_cur = rand() % n_junk;
Copy link
Collaborator

Choose a reason for hiding this comment

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

When n_junk is zero this is a division by zero.

Suggested change
const int n_junk_cur = rand() % n_junk;
const int n_junk_cur = n_junk > 0 ? rand() % n_junk : 0;

Since n_junk = 0 is the default, this throws a floating point exception by default.

params.n_junk = 0;

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

Successfully merging this pull request may close these issues.

2 participants