Skip to content

ggml: Add epsilon as a parameter for group_norm #8818

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
Aug 6, 2024

Conversation

MollySophia
Copy link
Collaborator

Hi! I'm working on adding RWKV implementation in llama.cpp. The graph needs a custom eps value for group_norm.
This PR adds epsilon as a parameter for group_norm operators.

@github-actions github-actions bot added testing Everything test related Nvidia GPU Issues specific to Nvidia GPUs ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language labels Aug 2, 2024
return ggml_group_norm_impl(ctx, a, n_groups, false);
int n_groups,
float eps) {
return ggml_group_norm_impl(ctx, a, n_groups, eps, false);
Copy link
Collaborator

Choose a reason for hiding this comment

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

(Side question) Is ggml_group_norm equivalent to ggml_norm with ggml_reshape to group rows together beforehand and split them back afterwards?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I guess yes?

@mofosyne mofosyne added Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix merge ready indicates that this may be ready to merge soon and is just holding out in case of objections and removed merge ready indicates that this may be ready to merge soon and is just holding out in case of objections labels Aug 5, 2024
@MollySophia
Copy link
Collaborator Author

Hmm... It seems that one of the ci checks is failing
What could be the reason?

@compilade
Copy link
Collaborator

compilade commented Aug 6, 2024

Hmm... It seems that one of the ci checks is failing
What could be the reason?

Seems like a timeout. I've seen that test fail before for the same reason, and usually it passes when retried. The timeout for the slot erase in the server test suite is likely too short when all is run at the same time. Not sure why it only times out in the Release build and not also in the slower builds with sanitizers.

(I've restarted the failing check)

(EDIT: still fails. Hmm.)

@ggerganov
Copy link
Member

Yeah, that test started failing recently for some reason - definitely not related to this PR. I tried to figure out where to increase the timeout for slot erasure, but could figure out. Would be nice if fix this eventually

@ggerganov ggerganov merged commit 2d5dd7b into ggml-org:master Aug 6, 2024
52 of 53 checks passed
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ggml changes relating to the ggml tensor library for machine learning Nvidia GPU Issues specific to Nvidia GPUs Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language testing Everything test related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants