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

ggml : fix handling of zero blocks in IQ quants #7955

Merged
merged 1 commit into from
Jun 16, 2024

Conversation

ggerganov
Copy link
Owner

Allow for blocks full of 0s

@github-actions github-actions bot added the ggml changes relating to the ggml tensor library for machine learning label Jun 16, 2024
@mofosyne mofosyne added the Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix label Jun 16, 2024
@@ -13139,7 +13139,7 @@ static int iq1_find_best_neighbour(const uint16_t * restrict neighbours, const u
const float * restrict xval, const float * restrict weight, float * scale, int8_t * restrict L, int ngrid) {
int num_neighbors = neighbours[0];
GGML_ASSERT(num_neighbors > 0);
float best_score = 0;
float best_score = -FLT_MAX;
Copy link
Contributor

Choose a reason for hiding this comment

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

This function isn't used any more, but why negative FLT_MAX?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Any negative value works, but used -FLT_MAX for consistency with usage of FLT_MAX elsewhere in the source

@ggerganov ggerganov merged commit cddaf02 into master Jun 16, 2024
74 checks passed
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 Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants